Skip to content

Instantly share code, notes, and snippets.

View pablohe's full-sized avatar

Pablo Echevarria pablohe

  • Universität Bremen
  • Bremen Germany
View GitHub Profile
sudo gedit /etc/apt/sources.list
deb http://ftp.ccc.uba.ar/pub/linux/ubuntu/ trusty main restricted universe multiverse
deb http://ftp.ccc.uba.ar/pub/linux/ubuntu/ trusty-backports main restricted universe multiverse
deb http://ftp.ccc.uba.ar/pub/linux/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://ftp.ccc.uba.ar/pub/linux/ubuntu/ trusty-security main restricted universe multiverse
deb http://ftp.ccc.uba.ar/pub/linux/ubuntu/ trusty-updates main restricted universe multiverse
sudo apt-get install python-pip
#!/bin/python -tt
import glob
import os
vamos a un lugar donde no rompamos nada
os.chdir("/tmp")
#crear 10 archivos con el nombre 1.txt, 2.txt...
#!/usr/bin/python -tt
############ EJEMPLO 2 ############
#SO SO SOLUTION
def area(x1, y1, x2, y2):
return abs(x1-x2) * abs(y1-y2)
def testArea1():
#!/usr/bin/python -tt
############ EJEMPLO 1 ############
#Don't write what code is doing, this should be left for the code to explain and can be easily done by giving class, variable and method meaningful name. For example:
t=10
#calculates square root of given number
#using Newton-Raphson method
def abc( a):
r = a / 2
@pablohe
pablohe / 1 GIT ejemplo práctico
Last active August 29, 2015 14:02
1 GIT ejemplo práctico
#!/bin/bash
# GIT ejemplo practico
git clone https://github.com/pablohe/ctpython.git
#Traer los cambios, si hubo
git pull ; git status