Esta es una guia práctica para varios casos de uso común al momento de desarrollar usando postgresql tanto en producción como en desarrollo.
ramses@debian:~$ sudo apt-get install postgresql postgresql-contrib libpq-dev
{ | |
"cmd": ["/home/USUARIO/anaconda3/bin/python3", "-u", "$file"], | |
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", | |
"selector": "source.python" | |
} |
#!/bin/bash | |
# This runs on 9000 port | |
NAME="appname" | |
VIRTUALENV="virtualenv folder" | |
DJANGO_DIR="django root folder" | |
USER=root | |
GROUP=sudo | |
NUM_WORKERS=5 |
upstream app_server { | |
server 127.0.0.1:9000 fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name <server name>; | |
return 301 https://$server_name$request_uri; | |
} |
[ | |
{"keys": ["ctrl+alt+i"], "command": "reindent", "args": {"single_line": false}}, | |
{ "keys": ["ctrl+}"], "command": "toggle_comment", "args": { "block": false } }, | |
{ "keys": ["ctrl+shift+}"], "command": "toggle_comment", "args": { "block": true } }, | |
{ "keys": ["ctrl+alt+shift+s"], "command": "save_all" }, | |
{ "keys": ["ctrl+shift+-"], "command": "toggle_side_bar" }, | |
] |
sudo systemctl start supervisor | |
sudo systemctl stop supervisor | |
sudo systemctl restart supervisor |
Esta es una guia práctica para varios casos de uso común al momento de desarrollar usando postgresql tanto en producción como en desarrollo.
ramses@debian:~$ sudo apt-get install postgresql postgresql-contrib libpq-dev
Here are the steps (for whoever runs into this problem):
delete from django_migrations;
rm -rf <app>/migrations/
find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
find . -path "*/migrations/*.pyc" -delete
python manage.py migrate --fake
python manage.py makemigrations
. Take care of dependencies (models with ForeignKey's should run after their parent model).import math | |
class LeastSquares(object): | |
"""docstring for LeastSquares""" | |
def __init__(self, x:list, y:list): | |
super(LeastSquares, self).__init__() | |
if len(x) != len(y): | |
raise NameError('Las listas deben tener misma longitud.') |
To access your instance:
chmod 400 Key-Tesca.pem
ec2-123-456-789-123.us-west-2.compute.amazonaws.com
Example:
ssh -i "Key-Tesca.pem" [email protected]