Skip to content

Instantly share code, notes, and snippets.

View heltonbiker's full-sized avatar

Helton Moraes heltonbiker

  • Porto Alegre, Brazil
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@heltonbiker
heltonbiker / 11_42_23.csv
Last active July 12, 2019 18:50
Uroflowmetry Dataset
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
-13
-11
-15
-9
-12
-11
-19
-9
-11
-8
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="utf-8">
<title>Imagem Projetada</title>
<style>
:root {
--width: 1024px;
--height: 500px;
}
@heltonbiker
heltonbiker / TratamentoGlobalExcecao.cs
Created July 6, 2018 14:06
Tratamento Global de Exceção
using System;
using System.Windows;
using System.Windows.Threading;
namespace TratamentoGlobalExcecao
{
public partial class App : Application
{
[STAThread]
static void Main(string[] args)
@heltonbiker
heltonbiker / Digraph.cs
Last active April 3, 2018 19:09
Simple Digraph class (for use with GraphViz etc.)
using System.Collections.Generic;
using System.IO;
using System.Text;
using Colorspace;
public class Digraph
{
public List<Dependency> Dependencies = new List<Dependency>();
@heltonbiker
heltonbiker / fftNumpy.py
Last active March 14, 2018 13:40
FFT with Numpy
import numpy as np
import matplotlib.pyplot as plt
lenfft = len(sinal)/2.
nyq = sampling_rate/2.
freq_axis = np.linspace(0, nyq, lenfft+1)
spectrum = np.abs(np.fft.rfft(sinal))
plt.plot(freq_axis, spectrum)
@heltonbiker
heltonbiker / GriloTone.ino
Created November 25, 2017 20:14
Gera o som de um grilo - Generates the sound of a cricket
const int pulsos = 7;
const int duracaoPulso = 17;
const int pausa = 360;
const int frequencia = 4000;
const int pinoFalante = 8; // 8 ohm speaker in series with potentiometer
void setup() {
pinMode(pinoFalante, OUTPUT);
}
@heltonbiker
heltonbiker / extract_pairs.py
Last active May 22, 2017 19:16
Torso Point Cloud
pdict = {}
for line in open('torso_points.txt'):
vals = [float(v) for v in line.strip().split('; ')]
indice = int(vals[0])
valores = vals[1:]
pdict[indice] = valores
pList = [pdict[key] for key in sorted(pdict.keys())]
@heltonbiker
heltonbiker / Distribute.cs
Created January 12, 2017 19:15
Method that aims to distribute a sequence amongst N other sequences, cyclically, like dealing cards.
using System;
using System.Linq;
using System.Reactive.Linq;
using System.Reactive.Subjects;
namespace UnzipRx
{
class Program
{
static void Main(string[] args)
@heltonbiker
heltonbiker / FootprintCompression.py
Last active August 8, 2016 21:32
Compression Alternatives for Foot Pressure Map
import json
footprint = json.load(open('both.json'))
shape = (44,52)
nonzero = 0
for f in footprint:
for l in f:
if l > 0: