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
#!/usr/lib/python | |
import re | |
correo = '[email protected]' | |
if re.match('^[(a-z0-9\_\-\.)]+@[(a-z0-9\_\-\.)]+\.[(a-z)]{2,4}$',correo.lower()): | |
print 'Correo Correcto' | |
else: | |
print 'El correo no es correcto...' |
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 -*- | |
import sys | |
import time | |
from PyQt4.QtCore import * | |
from PyQt4.QtGui import * | |
from PyQt4.QtWebKit import * | |
class Screenshot(QWebView): | |
def __init__(self): | |
self.app = QApplication(sys.argv) |
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
#!/usr/lib/python | |
# by @eliezerfot123 | |
import random | |
import os | |
# Abrimos el archivo donde tenemos los twitts con la función open() de python. | |
linea=open("archivoDeTwitts.txt","r").readlines() | |
# Le decimos a python que haga un random en las lineas encontradas y escoja uno. | |
muestro = linea[random.randint(0, len(linea)-1)] |
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 string | |
from random import choice | |
def generador(n): | |
return ''.join([choice(string.letters + string.digits) for i in range(n)]) | |
for genera in range(1000): | |
genera = generador(8) | |
#el numero significa la base o la longitud que quieres que sea el valor de la clave | |
print genera(8) |
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
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) |
NewerOlder