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
| 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 |
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/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... |
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 -tt | |
| ############ EJEMPLO 2 ############ | |
| #SO SO SOLUTION | |
| def area(x1, y1, x2, y2): | |
| return abs(x1-x2) * abs(y1-y2) | |
| def testArea1(): |
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 -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 |
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 | |
| # GIT ejemplo practico | |
| git clone https://github.com/pablohe/ctpython.git | |
| #Traer los cambios, si hubo | |
| git pull ; git status |
NewerOlder