Skip to content

Instantly share code, notes, and snippets.

View emms-garcia's full-sized avatar

Emmanuel García emms-garcia

  • México
View GitHub Profile
from numpy import *
import scipy
import pywt
import sys
import Image
import scipy.ndimage
noiseSigma = 5.0
def denoise(data,wavelet,noiseSigma):
#!/usr/bin/python
import pygame
import math
import random
import time
import numpy as np
WIDTH, HEIGHT = 600, 500
NODE_LIFE = 100
import Image
import ImageDraw
import numpy
import sys
import math
import pygame
NFRAMES = None
try:
NFRAMES = int(sys.argv[1])
import Image
import random
import numpy
import sys
import os
import time
WIDTH, HEIGHT = 280, 160
bg = numpy.empty((HEIGHT, WIDTH))
bg.fill(255)
#!/usr/bin/python
import Tkinter
import ImageTk
import numpy
import math
import time
w, h = 774, 548
TRANS_IM = "transmisor.png"
import numpy
import random
from sys import argv
try:
DEBUG = bool(int(argv[1].replace("debug=", "")))
except IndexError:
DEBUG = False
########################################################################
#Class used to run an experiment, "sending" multiple messages
#through a channel and adding a certain noise to add errors to message
a-8.167
b-1.492
c-2.782
d-4.253
e-12.702
f-2.228
g-2.015
h-6.094
i-6.966
j-0.153
@emms-garcia
emms-garcia / ps3_demo.py
Created April 18, 2013 02:18
Pygame button test demo with PS3 controller. Supports run time disconnection/re connection.
#!/usr/bin/python
import pygame
import os
import time
import usb
os.environ['SDL_VIDEO_CENTERED'] = '1'
if not pygame.display.get_init():
pygame.display.init()
#!/usr/bin/python
import sys
import Image
import ImageDraw
import math
import random
from collections import defaultdict
OUTPUT_FILE = "output.png"
TMP_FILE = "output.png"
#!/usr/bin/python
import sys
import Image
import ImageDraw
import math
import random
from collections import defaultdict
OUTPUT_FILE = "output.png"
TMP_FILE = "output.png"