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 __future__ import print_function | |
import os | |
import tinify | |
tinify.key = "" # Fill your developer key here | |
exts = ("jpg", "png", "jpeg") | |
basewidth = 1500 | |
files = [f for f in os.listdir(".") if os.path.isfile(f) and f.endswith(exts)] |
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
#!/bin/bash | |
# INSTALADOR DE ALLIANCE | |
# USO | |
# 1. Descargar el script en una ubicación de fácil acceso (carpeta de usuario) | |
# 2. Dar permiso de ejecución: | |
# $ chmod +x instalar_alliance.sh | |
# 3. Ejecutar | |
# $ ./instalar_alliance.sh | |
# 4. Otorgar la contraseña si es necesario para tareas de superusuario |
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
// Incluir la librería de Encoder | |
// http://www.pjrc.com/teensy/td_libs_Encoder.html | |
#include <Encoder.h> | |
// Inicializar un encoder conectado a los pines 2 y 3 | |
Encoder encoder(2, 3); | |
// Variables para almacenar valores de encoder y ADC | |
long enc_old = 0; | |
int adc_now = 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
*.pyc | |
*.pyo | |
*.db | |
.DS_Store | |
.coverage | |
*.sublime-project | |
*.sublime-workspace | |
*~ |
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
#!/bin/bash | |
# INSTALADOR DE MAGIC | |
# Instala los prerequisitos, descarga la versión de desarrollo, | |
# la compila y la instala para todos los usuarios. | |
# También descarga e incluye los archivos de tecnologías. | |
# Todo queda almacenado en la carpeta "magic" en la carpeta de usuario. | |
# USO | |
# 1. Descargar el script en una ubicación de fácil acceso (carpeta de usuario) |
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
# settings.py | |
TEMPLATE_CONTEXT_PROCESSORS = ( | |
'django.core.context_processors.i18n', | |
) | |
# urls.py (outside i18n_patterns) | |
(r'^i18n/', include('django.conf.urls.i18n')), |
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
/* Controlador PID para sistema de cocina mejorada | |
* Por Eduardo Rivas, Ángel Moreno, David Escobar, Josué Hernández, Henry Orellana | |
* Para la Universidad Don Bosco, Ciclo I - 2014 | |
* A partir de los valores del sensor de oxígeno se ajusta la posición de la | |
* válvula de la chimenea a través de un servo motor. | |
* El programa hace uso de las capacidades de DSP del dsPIC30F para procesar las | |
* señales. Las constantes Kp, Ki, Kd fueron obtenidas con Matlab. | |
* Probado en el dsPIC30F4011, pero debería funcionar con toda la familia 30F */ |
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 re import compile | |
from django.conf import settings | |
from django.contrib.auth import REDIRECT_FIELD_NAME | |
from django.contrib.auth.views import redirect_to_login | |
if hasattr(settings, "LOGIN_REQUIRED_URLS"): | |
URLS = [compile(expr) for expr in settings.LOGIN_REQUIRED_URLS] | |
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/python | |
# Determine memory usage by the current user | |
# From https://wiki.webfaction.com/attachment/wiki/MiscellaneousFiles/memory_usage.py | |
# Minimal modifications to make it PEP8 compliant by https://github.com/jerivas | |
from pprint import pprint | |
import os | |
import pwd | |
import re |
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
// Manda datos del ADC por el EUSART | |
// Entrada analogica en RA0 | |
// David Escobar | |
// Angel Moreno | |
// Eduardo Rivas | |
#include "xc.h" | |
#include "stdlib.h" | |
#include "p18f4550.h" |