- Arquitectura Cliente-Servidor
- Python ¿Qué es?
- Python 2.x vs Python 3.x
- pyvenv
- Entornos Virtuales ref: https://docs.google.com/a/devf.mx/document/d/1qTY0IIPnx7ZdCg6jdsdUm2qcfKk4m_LzJAKbTV9A2pw/
- ¿Qué es un Framework?
- Frameworks Web para Python
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 invoke import task, run | |
| from paramiko import SSHConfig, SSHClient, SSHException, AutoAddPolicy | |
| import logging | |
| import os | |
| logging.basicConfig(level=logging.INFO) | |
| logger = logging.getLogger('Paramiko') |
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
| server { | |
| listen 80; | |
| return 444; | |
| } |
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
| DB_USERNAME='' | |
| DB_NAME='' | |
| DB_PASSWORD='' | |
| DB_HOST='' | |
| DATE=`date +%Y%m%d` | |
| TIME=`date +%H%M` | |
| BACKUP_DIR='/some/path/to/dbackups/' | |
| FILENAME="$DATE-$TIME.sql.gz" |
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 django.http import HttpResposne | |
| import os | |
| class DownloadResponse(HttpResponse): | |
| """ | |
| A download HTTP response class that forces download in the browser or redirects to URL given for file. | |
| Args: |
I hereby claim:
- I am henocdz on github.
- I am henocdz (https://keybase.io/henocdz) on keybase.
- I have a public key whose fingerprint is 9C96 DF24 FE61 35E6 2417 5AD4 43F4 8594 1C29 ADD7
To claim this, I am signing this object:
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
| import React from 'react' | |
| import ReactDOM from 'react-dom' | |
| import { createBrowserHistory } from 'history' | |
| import { ConnectedRouter } from 'react-router-redux' | |
| // Global Styles | |
| import 'styles/app.less' | |
| // Routes config |
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
| def get_input(cast, text=''): | |
| """Request user for input and tries to cast input to cast function provided | |
| Args: | |
| cast (function): cast function to use | |
| text (string): text to print so user can know what to type in! | |
| Returns: | |
| casted user input | |
| """ | |
| try: | |
| return cast(input(text)) |