https://realpython.com/blog/python/asynchronous-tasks-with-django-and-celery/
$ pip install celery
$ sudo apt-get install rabbitmq-server
https://realpython.com/blog/python/asynchronous-tasks-with-django-and-celery/
$ pip install celery
$ sudo apt-get install rabbitmq-server
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
rewimport httplib | |
import urlparse | |
# funcion que se encarga de obtener respuesta del estatus del servidor web | |
def get_server_status_code(url): | |
# descarga sólo el encabezado de una URL y devolver el código de estado del servidor. | |
host, path = urlparse.urlparse(url)[1:3] | |
try: | |
conexion = httplib.HTTPConnection(host) | |
conexion.request('HEAD', path) |
import socket | |
f = open("urls.txt") | |
num_line = sum(1 for line in f) | |
f.close() | |
with open("urls.txt", "r") as ins: | |
array = [] | |
for line in ins: | |
print socket.gethostbyname(line.strip()) |
/* en la metodología de ducks siempre vamos a tener 3 fases por app: Constantes, reducer y acciones*/ | |
import axios from "axios"; | |
import { act } from "react-dom/cjs/react-dom-test-utils.production.min"; | |
// Constantes | |
const dataInicial = { | |
array: [] | |
} |
<html> | |
<head> | |
<title> | |
COMBOBOX | |
</title> | |
<script type="text/javascript"> | |
function cargarSelect2(valor) { | |
var arrayValores=new Array( | |
new Array(1,1,"opcion1-1"), |
import Vue from 'vue' | |
import './plugins/bootstrap-vue' | |
import App from './App.vue' | |
import router from './router' | |
import { | |
BootstrapVue, | |
IconsPlugin | |
} from 'bootstrap-vue' | |
import 'bootstrap/dist/css/bootstrap.css' |
#!/usr/bin/env python | |
# Ejemplo de como enviar SMS usando gammu y python | |
import gammu | |
import sys | |
# se crea un objeto stateMachine, para hablar con el telefono | |
sm = gammu.StateMachine() | |
# Leer la configuracion desde (~/.gammurc) |
// 1. Go to https://twitter.com/following. | |
// 2. Keep scrolling to the bottom repeatedly until all your followers are loaded. | |
// 3. Run this in your console. | |
[].slice.call(document.querySelectorAll('.unfollow-text')).forEach(function(button) { | |
button.click(); | |
}); |