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
# coding=utf-8 | |
__author__ = 'gaspar' | |
from turtle import * | |
import turtle | |
setup(1024,900) #configura el tamaño de la ventana | |
def dibuja_rombo(velocidad): |
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
# -*- coding: utf-8 -*- | |
""" | |
Ejemplo básico de uso de la librería Scrapy para obtener información de una página web. | |
## Requerimientos: ## | |
1. Instalar Scrapy (pip install scrapy) | |
2. Descargar el archivo pyme_scrapy.py | |
3. Correr de la siguiente manera: | |
$ scrapy runspider pyme_scrapy.py -o scraped_data.json | |
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
# -*- coding: utf-8 -*- | |
__author__ = 'alexdzul' | |
""" | |
El script identifica las carpetas llamadas "migrations" dentro de nuestro proyecto y elimina todos los archivos *.py | |
omitiendo los __init__.py. | |
Instrucciones: | |
============= | |
1. Copia este archivo "remove_migrations.py" dentro de la carpeta de tu proyecto. | |
Ejemplo: |
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
# -*- coding: utf-8 -*- | |
""" | |
Función para enlistar zonas horarias. | |
Consultar: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones | |
requisito: pip install pytz | |
""" | |
from pytz import all_timezones | |
for tz in all_timezones: | |
print tz |
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
# -*- coding: utf-8 -*- | |
""" | |
Funciones. | |
Es un connjunto de sentencias que pueden ser invocadas varias veces durante la ejecución de un programa. | |
Las ventajas del uso de las funciones son: | |
1) Minimización de código. | |
2) Aumento de legibilidad. | |
3) Fomenta la reutilización de código. | |
""" |
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
# -*- coding: utf-8 -*- | |
""" | |
Función que nos permite calcular la distancia entre 2 geo puntos | |
""" | |
import math | |
# Punto 1 | |
lat1 = 20.694462 | |
lon1 = -102.656250 |