View Rodrigo Ghedin.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!-- saved from url=(0032)http://www.rodrigoghedin.com.br/ --> | |
<html lang="pt-BR"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<meta charset="UTF-8"> | |
<title>Rodrigo Ghedin</title> | |
<link href="http://www.rodrigoghedin.com.br/css" rel="stylesheet" type="text/css"> | |
<link href="http://www.rodrigoghedin.com.br/favicon.png" rel="shortcut icon" type="image/x-icon"> | |
<meta name="description" content="Página pessoal de Rodrigo Ghedin."> | |
<meta name="keywords" content="rodrigo ghedin, ghedin, gizmodo, gemind, rodrigo, meio bit, winajuda, paranavaí, direito, faculdades maringá, uem, comunicação, maringá"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
View regression_keras.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%matplotlib inline | |
from keras.models import Sequential | |
from keras.layers import Dense, Dropout, Activation | |
from keras.optimizers import Adam | |
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
#Generate data | |
num_data=10000 |
View bin2wav.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import wave | |
import struct | |
# bit0 is a single period sine wave at 1024Hz with a given amplitude | |
# bit1 is the same but with ~2.7 times the amplitude | |
bits = [[0x00, 0x09, 0x12, 0x1A, 0x21, 0x27, 0x2C, 0x2F, 0x30, 0x2F, 0x2C, 0x27, 0x21, 0x1A, 0x12, 0x09, 0x00, 0xF6, 0xED, 0xE5, 0xDE, 0xD8, 0xD3, 0xD0, 0xD0, 0xD0, 0xD3, 0xD8, 0xDE, 0xE5, 0xED, 0xF6], [0x00, 0x18, 0x30, 0x46, 0x59, 0x69, 0x75, 0x7C, 0x7F, 0x7C, 0x75, 0x69, 0x59, 0x46, 0x30, 0x18, 0x00, 0xE7, 0xCF, 0xB9, 0xA6, 0x96, 0x8A, 0x83, 0x81, 0x83, 0x8A, 0x96, 0xA6, 0xB9, 0xCF, 0xE7]] | |
bits[0] = [b^0x80 for b in bits[0]] | |
bits[1] = [b^0x80 for b in bits[1]] | |
bits[0] = struct.pack('%sB' % len(bits[0]), *bits[0]) |
View steam_bootstrap.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Steam installer for Debian wheezy (32- and 64-bit) | |
# | |
# Place into empty directory and run. | |
# | |
download() { | |
local url="$1" | |
local filename="$(basename "$url")" |
View line_girl.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
W = 500 | |
H = 585 | |
W1 = W - 1 | |
H1 = H - 1 | |
def setup | |
@img = load_image '../scratch/girl.png' | |
@img.filter BLUR, 3 | |
@img.load_pixels | |
end |
View fib.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env julia | |
# Gist: https://gist.github.com/t-nissie/641df996b9035f85b230 | |
# Three ways of generating n-th Fibonacci number in Julia language | |
# Put perfutil.jl in the same directory as: | |
# wget https://raw.githubusercontent.com/JuliaLang/julia/master/test/perf/perfutil.jl | |
# Turn off garbage collection (GC), when you get occasional bad timings. See perfutil.patch below. | |
### | |
using Base.Test | |
include("perfutil.jl") |
View train.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import threading | |
from keras.applications.inception_v3 import InceptionV3 | |
from keras.optimizers import Adam | |
from keras.utils.io_utils import HDF5Matrix | |
class threadsafe_iter: | |
"""Takes an iterator/generator and makes it thread-safe by | |
serializing call to the `next` method of given iterator/generator. |
View graph paper.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%----------------------------------------------------------------------- | |
%% Make your own quadrille, graph, hex, etc paper! | |
%% Uses the pgf/TikZ package for LaTeX, which should be part of | |
%% any modern TeX installation. | |
%% Email: mcnees@gmail.com | |
%% Twitter: @mcnees | |
%%----------------------------------------------------------------------- | |
\documentclass[11pt]{article} |
View hb_all_books_dl.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
After purchasing a humble book bundle, go to your download page for that bundle. | |
Open a console window for the page and paste in the below javascript | |
*/ | |
$('a').each(function(i){ | |
if ($.trim($(this).text()) == 'MOBI') { | |
$('body').append('<iframe id="dl_iframe_'+i+'" style="display:none;">'); | |
document.getElementById('dl_iframe_'+i).src = $(this).data('web'); | |
} | |
}); |
View .XCompose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-#-#-#-#-#-#-# | |
# ~/.XCompose | |
# To change the US International keyboard layout to behave like the | |
# Microsoft Windows (TM) version of the layout | |
# version: 0.2 edit 6 (20110403-6) | |
# by @tamh [48bytes at gmail com] | |
# | |
# Released under LGPL v2.1. Please refer to it by going to: | |
# <http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html> |
OlderNewer