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
#include <stdio.h> | |
#include <pthread.h> //libreria de thread | |
#include <semaphore.h> //libreria estilo semaforo | |
#include <stdlib.h> | |
char n[1024]; | |
sem_t sema; | |
void * escri() |
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
int incomingByte = 0; // para el byte leido | |
boolean estado; | |
void setup() { | |
Serial.begin(115200); | |
pinMode(13, OUTPUT); | |
digitalWrite(13, LOW); | |
estado = false; | |
} |
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
void mousePressed() | |
{ | |
/////////////////////////motor hacia adelante/////////////////////// | |
/// aqui tiene una condicion si se toco en ese rango mandara un dato | |
if(mouseX > 70 && mouseX < 170 && mouseY > 250 && mouseY < 300) | |
{ | |
int algox = 1; | |
try |
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 random | |
from numpy import * | |
binario = [] #aqui guardamos la cadena binaria | |
peso1 = [] #guardamos el peso generado aleatoriamente | |
multi = [] #guardamos los resultados de la multiplicacion | |
x = 0 | |
suma = 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
import random | |
from numpy import * | |
#maria = open("libreta2.txt","r","w") ## libreta quien resive | |
salida = [] | |
recuperador = [] | |
mensaje = [] | |
inicio = 0 | |
final = 7 |
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 crearlibretas(): ## aqui creamos las libretas para la encriptacion | |
x = 0 | |
y = 0 | |
pepe = open("libreta1.txt","w") ##libreta el que envia | |
ana = open("libreria2.txt","w") | |
while y<=20: | |
while x<= 20: | |
numeror = random.randint(0,2) ##valor random entre: 0<= x <2 | |
#float(numeror) | |
pepe.write(str(numeror)) ## escribimos el caracter |
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 math | |
entrada = open("libreta1.txt") | |
nn = 0 | |
nm = 0 | |
y = 0 | |
totalb = 0 | |
bloquea = 0 | |
#bloqueb = 0 | |
x = 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
import random ##import mmodul random | |
p = 0 | |
q = 0 | |
n = 0 | |
modul = 0 | |
c = [] | |
a = [] | |
b = [] | |
d = [] | |
z = [] |
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 socket #import librery for sockets | |
import random #import librery for random numers | |
s = socket.socket() | |
s.bind(("localhost",9999)) | |
s.listen(10) ##accept maxim conexion |
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 socket #import sockers for client | |
s = socket.socket() #declared objets | |
s.connect(("localhost",9999)) ##conect to server | |
n = 0 | |
y = 0 | |
x = 0 | |
print "1 Conectarte \n 2 Salida" |
OlderNewer