Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
import argparse
from scipy import misc
import numpy as np
def process_image(filepath, outfile):
image = misc.imread(filepath)
if image.shape[2] == 3:
alpha = np.expand_dims(np.full(image.shape[:2], 255), axis=2)
@cypai
cypai / .bashrc
Last active December 30, 2016 06:24
.bashrc additions
ulimit -v 4000000
GIT_PROMPT_ONLY_IN_REPO=1
source ~/.bash-git-prompt/gitprompt.sh
alias crontab="crontab -i"
alias aka="grep ^alias ~/.bashrc"
alias down="cd ~/Downloads"
alias doc="cd ~/Documents"
alias ls="ls --color=auto"
@cypai
cypai / .gitconfig
Last active September 5, 2016 00:04
[alias]
aka = "!git config -l | grep alias | cut -c 7-"
amend = commit --amend
ac = "!git add . && git commit -am"
amc = "!git add . && git commit --amend"
cm = commit -m
cp = cherry-pick
cpcont = cherry-pick --continue
co = checkout
cof = checkout remotes/origin/master --
@cypai
cypai / pom.xml
Created December 5, 2015 01:04
sevntu-checkstyle-sonar-plugin pom
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.sevntu.checkstyle</groupId>
<artifactId>sevntu-checkstyle-sonar-plugin</artifactId>
<version>1.17.0</version>
<packaging>sonar-plugin</packaging>