This file contains hidden or 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
from Tkinter import * | |
from sys import argv | |
from PIL import Image, ImageTk | |
from datetime import * | |
import random as R | |
def filtroGrisesPromedio(imagen): | |
x, y = imagen.size | |
px = imagen.load() | |
imagenGrises = Image.new('RGB',(x,y)) |
This file contains hidden or 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
def ctl(cad): | |
l = list() | |
for e in cad: | |
l.append(e) | |
return l | |
def mdp(v): | |
i = 0 | |
mapa = dict() | |
for i in range(0, v): |
This file contains hidden or 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 python3 | |
""" | |
Python command line client for gist.github.com | |
Based on Chris Wanstrath's ruby gist client: | |
http://github.com/defunkt/gist/tree/master | |
Basic usage: | |
cat file.txt | pygist | |
pygist file1 file2 file3 file4 |
This file contains hidden or 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
def genera_lineas(imagen, po, eje, fondo, tot = 100): | |
x,y = imagen.size | |
puntos = list() | |
if eje == "x": | |
if fondo == "negro": | |
for i in range(tot): | |
imagen = pintalinea((0, po[i][0]), (x, po[i][0]), imagen, (0,0,255), "x") | |
puntos.append(po[i][0]) | |
elif fondo == "blanco": | |
for i in range(-tot-1, -1): |
This file contains hidden or 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
def generaHistogramas(imagen): | |
pixeles = imagen.load() | |
x,y = imagen.size | |
imagen_nueva = Image.new("RGB", (x, y)) | |
hx = dict() | |
hy = dict() | |
for j in range(y): | |
sumax = 0 |
This file contains hidden or 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 networkx as nx | |
import matplotlib.pyplot as plot | |
from sys import argv | |
vertices = dict() | |
#Clase Nodo, estructura de informacion | |
class Nodo: | |
def __init__(self, nombre, frecuencia, izquierda, derecha): | |
self.nombre = nombre |
This file contains hidden or 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 socket as s | |
import pickle | |
import threading | |
import time | |
from huffman import Huffman | |
class Nodo: | |
def __init__(self, nombre, frecuencia, izquierda, derecha): | |
self.nombre = nombre | |
self.frecuencia = frecuencia |
This file contains hidden or 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 random | |
import socket as s | |
import pickle | |
import time | |
class Paquete: | |
def __init__ (self, header, numeroPaquete, totalPaquetes, contenido): | |
self.header = header | |
self.numeroPaquete = numeroPaquete |
This file contains hidden or 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
def saluda(nombre): | |
return "hola ",nombre | |
saluda("Pepe") |
This file contains hidden or 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
sdf |