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 streamlit as st | |
import random | |
import string | |
# NO_CREADO -> GENERAR_PREGUNTA -> NUEVO -> MOSTRAR_PUNTAJE | |
# ^---------------------------v | |
# 1. El juego tiene estados. | |
# 2. Los datos que quiero persistir los guardo en el session_state. | |
# 3. Cada vez que cambio de estado ejecuto rerun() para volver a ejecutar |
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> // por printf | |
#include <ctype.h> // por isalpha y tolower | |
#include <string.h> // por strlen y memcpy | |
int es_palindromo(const char *word) { | |
int i, j; | |
int ultimo = strlen(word) - 1; | |
// Descomentar para ver que viene en word en cada invocación | |
// printf("- {%s}\n", word); | |
for (i = 0, j = ultimo; i < j; i++, j--) { |
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
#!/bin/bash | |
uso() { | |
echo "Uso: $0 [c|s] nickname" >&2 | |
exit 1 | |
} | |
if [ $# -ne 2 ]; then | |
uso | |
fi |
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
// ~/Arduino/libraries/arduino-lmic/project_config/lmic_project_config.h | |
// project-specific definitions for otaa sensor | |
//#define CFG_eu868 1 | |
//#define CFG_us915 1 | |
#define CFG_au921 1 | |
//#define CFG_as923 1 | |
//#define CFG_in866 1 | |
#define CFG_sx1276_radio 1 | |
//#define LMIC_USE_INTERRUPTS |
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
from xremotebot import * | |
import time | |
server = Server('ws://163.10.20.156:8000/api') | |
robot = Robot(server, server.reserve('n6', 6)) | |
robot.forward(50, 1) | |
for i in range(20): | |
if robot.getObstacle(20): | |
robot.backward(50,1) |
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
from xremotebot import * | |
server = Server('ws://163.10.20.156:8000/api') | |
robot = Robot(server, server.reserve('n6', 6)) | |
for i in range(20): | |
if robot.getObstacle(20): | |
robot.backward(50,1) | |
robot.turnLeft(50,.5) | |
robot.forward(80) |
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 leer_codigo(): | |
codigo = raw_input("Ingrese codigo (termina con xx): ") | |
if codigo == 'xx': | |
return None | |
else: | |
nombre = raw_input("Ingrese nombre del prod:") | |
precio = input("Ingrese el precio del prod: ") | |
return (nombre, codigo, precio) | |
def procesar(): |
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 <stdlib.h> | |
#include <string.h> | |
#include <math.h> | |
#include <assert.h> | |
char *digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
char *base(int nro, int base, char *buff){ | |
int length; |
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 <stdlib.h> | |
#include <string.h> | |
char *digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
char *invertir(char *str){ | |
int last = strlen(str) - 1; | |
char swp; | |
for (int i = 0, j = last; i < j; i++, j--){ |
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
# -*- coding: utf-8 -*- | |
import sys | |
import subprocess | |
import functools | |
if sys.version_info.major == 2: | |
input = raw_input | |
NewerOlder