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/bin/env python | |
# -*- coding: utf-8 -*- | |
import requests, time | |
from lxml import etree | |
class TwitterHammer: | |
def __init__(self, username, password): | |
self.username = username | |
self.password = password |
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
module Hilo where | |
import System.Random as R | |
jogo :: Int -> Int -> IO Int | |
jogo n x = do | |
putStr "Tentativa? " | |
str <- getLine | |
let y = read str | |
if y == x then |
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 selenium import webdriver | |
url = 'http://betaalbare-website.be' | |
b = webdriver.Firefox() | |
b.get( url ) | |
resolutions = [(1024, 768), (1920, 1080), (1366, 768), (1280, 800), (1024, 768), (800, 600)] | |
for largura, altura in resolutions: | |
output_name = 'ticked_' + str(largura) + 'x' + str(altura) + '.png' |
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 splinter import Browser | |
from lxml import etree | |
import json | |
# recebe um objecto etree e devolve uma string com codigo html | |
def get_page_posts(article): | |
article_text = article.xpath('.//div[contains(@class, "userContent")]')[0] | |
a = etree.tostring(article_text, pretty_print=True).encode('utf-8') | |
return a | |
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 flask import Flask, jsonify | |
from lxml import etree | |
from urllib3 import PoolManager | |
import time | |
app = Flask(__name__) | |
def parseProxyString(proxyString): | |
keys = ["address", "port"] | |
values = proxyString.split(':') |
NewerOlder