Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
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]
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.') |
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).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
sudo systemctl start supervisor | |
sudo systemctl stop supervisor | |
sudo systemctl restart supervisor |
[ | |
{"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" }, | |
] |
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; | |
} |
#!/bin/bash | |
# This runs on 9000 port | |
NAME="appname" | |
VIRTUALENV="virtualenv folder" | |
DJANGO_DIR="django root folder" | |
USER=root | |
GROUP=sudo | |
NUM_WORKERS=5 |