Skip to content

Instantly share code, notes, and snippets.

@caiopo
caiopo / keybase.md
Created August 17, 2017 00:49
keybase.md

Keybase proof

I hereby claim:

  • I am caiopo on github.
  • I am caiopo (https://keybase.io/caiopo) on keybase.
  • I have a public key whose fingerprint is 6446 623E D872 9247 0C2D 4FCF 3354 0F14 327B 4EA9

To claim this, I am signing this object:

@caiopo
caiopo / gauss.py
Created August 8, 2017 18:13
Gaussian Elimination
import numpy as np
def gauss(A, b):
n = len(A)
A = np.concatenate((A, b), axis=1)
for k in range(n-1):
for i in range(k+1, n):
aux = A[i, k] / A[k, k]
@caiopo
caiopo / epos
Created September 5, 2016 03:46
FROM ubuntu:trusty
MAINTAINER contato@fjorgemota.com
RUN apt-get update && apt-get install -y \
bc \
bin86 \
build-essential \
lib32bz2-1.0 \
lib32ncurses5 \
lib32stdc++6 \
@caiopo
caiopo / FailproofIntegerInput.java
Created August 17, 2015 21:51
Failproof Integer Input
static int inputInt(String msg) {
String aux = JOptionPane.showInputDialog(msg);
int result;
try {
result = Integer.parseInt(aux);
} catch (NumberFormatException e) {