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
[{'clicks': '37', | |
'cost': '3456000000', | |
'impressions': '126', | |
'conversions': '6.00', | |
'allConv': '7.00', | |
'network': 'Search Network', | |
'device': 'Computers', | |
'campaignState': 'enabled'}, | |
{'clicks': '2', | |
'cost': '719000000', |
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
Computer Information: | |
Manufacturer: Unknown | |
Model: Unknown | |
Form Factor: Laptop | |
No Touch Input Detected | |
Processor Information: | |
CPU Vendor: GenuineIntel | |
CPU Brand: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz | |
CPU Family: 0x6 |
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
Nota: Todos estos pasos se deben hacer antes de bloquear el acceso con contraseña al servidor. | |
Pasos para crear deploy keys y fichero .pem: | |
ssh-keygen -t rsa -b 4096 | |
cd ~/.ssh && openssl rsa -in id_rsa -outform pem > test.pem | |
cat id_rsa.pub >> authorized_keys | |
Referencia: https://thepracticalsysadmin.com/set-up-pem-key-authentication/ |
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 cv2 import imread, cvtColor, CascadeClassifier, COLOR_BGR2GRAY, CASCADE_SCALE_IMAGE | |
HAARCASCADE_FRONTALFACE = '{base_path}/cascades/haarcascade_frontalface_default.xml'.format( | |
base_path=os.path.abspath(os.path.dirname(__file__).replace('configs', '')) | |
) | |
num_faces = 0 | |
locations = [] | |
image = imread ('PATH/TO/IMAGE') |
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
# adboozter_uwsgi.ini file | |
[uwsgi] | |
project = NAME | |
base = /home/USER | |
# Django-related settings | |
# the base directory (full path) | |
chdir = %(base)/www/%(project) | |
# Django's wsgi file |
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
# Place this data inside /etc/supervisor/conf.d/project.conf | |
[program:uwsgi] | |
command=/home/user/.virtualenvs/project/bin/uwsgi --ini project_uwsgi.ini | |
stdout_logfile=/home/user/logs/uwsgi/output.log | |
stderr_logfile=/home/user/logs/uwsgi/error.log | |
autostart=true | |
autorestart=true | |
stopsignal=INT |
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
upstream project_app { | |
server unix:///home/USER/project.sock; | |
} | |
server { | |
server_name www.example.com; | |
charset utf-8; | |
root /home/USER/www/path/to/project; |
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
Conectarse a PSQL: sudo -u postgres psql -d finance | |
Eliminar: | |
DROP TABLE django_admin_log; | |
DELETE FROM django_migrations WHERE app = 'admin'; |
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
# Celery | |
BROKER_URL = "redis://127.0.0.1:6379/0" | |
CELERY_SEND_EVENTS = True | |
CELERY_RESULT_BACKEND = 'redis://127.0.0.1:6379/0' | |
# CELERY_TASK_RESULT_EXPIRES = 60 | |
CELERY_ACCEPT_CONTENT = ['pickle', 'json', 'msgpack', 'yaml'] | |
CELERY_IMPORTS = ( | |
'another_module_with_task', | |
) |
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
# coding=utf-8 | |
from __future__ import absolute_import | |
import os | |
from django.conf import settings | |
from celery import Celery | |
# set the default Django settings module for the 'celery' program. | |
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project_name.settings') |
NewerOlder