Instalar paquetes básicos de compilación
$ sudo apt-get install build-essentialInstalar cabeceras de compilación de Python
| # -*- coding: utf-8 -*- | |
| from random import random | |
| from math import sqrt | |
| from turtle import * | |
| speed(0) # Máxima velocidad | |
| n = 100 # Número de intentos | |
| scale = 200 # Proporción del dibujo, por defecto es 200 | |
| pos = [(-1.5,.5),(0,.5),(-1.5,-1),(0,-1)] # Posición de los gráficos | |
| font = ('Arial', scale/20, 'bold') |
| #!/usr/local/bin/python3.3 | |
| """ | |
| This script creates and installs a Mezzanine CMS database and application. | |
| """ | |
| import sys | |
| import xmlrpclib | |
| cmsName = "my_cms" | |
| databaseName = "cms_db" | |
| databaseType = "postgresql" |
| // | |
| // Bubbles emerging over horizon and spaceships arriving to base | |
| // Use two planes, one upper left for arcs over bands, | |
| // and a lower right plane with points, triangles, rectangles and quads. | |
| // I want to use open access nice color palettes. | |
| // | |
| // For lines use Sunny Duck Palette http://www.colourlovers.com/palette/167272/Sunny_Duck | |
| // For arcs use Thought Provoking Palette http://www.colourlovers.com/palette/694737/Thought_Provoking | |
| // For points use cheer up emo kid Palette http://www.colourlovers.com/palette/1930/cheer_up_emo_kid | |
| // For triangules use Three Colors Palette http://www.colourlovers.com/palette/3473665/Three_Colors |
| import urllib | |
| url = "http://www.mppp.gob.ve/libro/images/VzlaEnCifras-{}.jpg" | |
| data = "VzlaEnCifras-{}.jpg" | |
| for i in xrange(1, 151): | |
| image = urllib.URLopener() | |
| image.retrieve(url.format(i), data.format(i)) |
| # instalar img2pdf usando | |
| # $ pip install img2pdf | |
| import img2pdf | |
| import glob | |
| page_list = glob.glob("*.jpg") | |
| def page_num(s): | |
| start = s.index("-") + 1 | |
| end = s.index(".", start + 1) |
El contenido de este Gist se mudó al repositorio https://github.com/OpenVE/comunidades-en-telegram
Saludos
@atmantree