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 random | |
import bpy#blender libreria | |
from math import pi | |
bpy.ops.object.delete() | |
add_cube = bpy.ops.mesh.primitive_cube_add | |
mylayers = [False]*20 | |
mylayers[0] = True | |
obj = bpy.data.objects['Camera'] | |
obj.location.x = 0.0 |
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/python | |
import math | |
from pylab import * | |
from matplotlib.patches import Ellipse | |
def localizacion(a,b,c): | |
"""se localiza el dispositivo por medio de las | |
fuerzas de las senales captadas y de la ubicacion de | |
las antenas |
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/python | |
from Tkinter import * | |
from PIL import Image, ImageTk | |
import math | |
import sys | |
import filtros | |
import random | |
import ImageFont, ImageDraw | |
import Image | |
from math import sqrt, atan2, pi, atan |
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
for i in contornos: | |
dic = defaultdict(list) | |
for punto in i: | |
x,y,angulo= gradiente_sobel(punto, imagen) | |
dic[angulo].append((x,y)) | |
listas.append(dic) | |
for i in listas: | |
print "*************************************" | |
for j in i: | |
r = int(random.random()*250) |
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
for i in contornos: | |
dic = defaultdict(list) | |
for punto in i: | |
x,y,angulo= gradiente_sobel(punto, imagen) | |
dic[angulo].append((x,y)) | |
listas.append(dic) | |
for i in listas: | |
print "*************************************" | |
for j in i: | |
r = int(random.random()*250) |
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
def gradiente_sobel(punto, imagen): | |
#print punto | |
pixeles = imagen.load() | |
x = punto[0] | |
y = punto[1] | |
#print x, y | |
z1 = pixeles[x-1, y-1][0] | |
z2 = pixeles[x, y-1][0] | |
z3 = pixeles[x+1, y-1][0] | |
z4 = pixeles[x-1, y][0] |
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/python | |
from fractions import Fraction | |
#para comprimir | |
scheme = {'000':[1111111,'s1'], '001':[1111110,'s2'], '010':[111110,'s3'], | |
'011':[11110,'s4'], '100':[1110,'s5'], '101':[110,'s6'], | |
'110':[10, 's7'], '111':[0,'s8']} | |
#archivo de entrada | |
f = open('entrada.txt', 'r') | |
file = f.readline().replace("\n", "") |
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/python | |
from PIL import Image, ImageDraw | |
import random | |
import filtros | |
import time | |
from math import sqrt, fabs, atan2, pi, cos, sin, ceil, degrees | |
import sys | |
import numpy | |
def dibuja_elipse(num,imagen): |
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
3, 0, 2.0, 10, 10.1.1.1, 100 | |
2, 4, 0, 40, 10.1.1.6, 300 | |
1, 2, 0, 10, 10.1.1.3, 160 | |
3, 2, 1.1, 10, 10.1.1.3, 800 | |
4, 2, 0, 10, 10.1.1.5, 1000 |
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 ns.applications | |
import ns.bridge | |
import ns.core | |
import ns.csma | |
import ns.internet | |
import ns.network | |
import ns.mobility | |
import ns.visualizer | |
import ns.flow_monitor |