This file contains 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 urllib2, urllib | |
import json | |
import StringIO | |
import gzip | |
import random | |
import codecs | |
import time | |
import pprint | |
import requests | |
import re |
This file contains 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
def trystuff(): | |
status = 0 | |
i=0 | |
while i < 100: | |
if status == 0: | |
temp = requests.get('http://steamcommunity.com/market/listings/730/Tec-9%20%7C%20Urban%20DDPAT%20(Field-Tested)') | |
print 'html ' + str(temp.status_code) | |
status = 1 | |
i +=1 | |
time.sleep(0.3) |
This file contains 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
try: | |
tempfile = open('util/fail_ip.txt', 'a') | |
tempfile.write('A thread ' + str(thread) +' teve timeout no ip '+ str(host) +' as ' + str(time.strftime("%H:%M:%S"))+'\n') | |
tempfile.flush() | |
os.fsync(tempfile.fileno()) | |
tempfile.close() | |
except IOError: | |
print "Erro ao escrever no ficheiro" |
This file contains 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
''' | |
def get_bitskins_bot_from_file(self): | |
file = open('bitskins_bots_urls.json', 'r') | |
bitskins_urls_raw = ujson.load(file) | |
file.close() | |
bitskins_urls_good = {} | |
i = 0 |
This file contains 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 urllib | |
import urllib2 | |
import json | |
import time | |
from Crypto.PublicKey import RSA | |
from Crypto.Cipher import PKCS1_v1_5 | |
import base64 | |
import cookielib | |
uname = "----" |
This file contains 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
items = [{"pastel de belem" : ["Portugal", "Lisbon", "Belem"]}, | |
{"croissant" : ["Paris", "France"]}, | |
{"pizza" : ["Rome", "Italy", "Lisbon"]}, | |
{"bitoque" : ["Lisbon", "Portugal"]}, | |
{"laptop" : ["France", "Italy", Portugal"]}] | |
result = [{"Portugal" : ["pastel de belem", "laptop", "bitoque"]}, | |
{"Lisbon" : ["pastel de belem", "bitoque", "pizza"]}, | |
{"Belem" : ["pastel de belem"]}, | |
{"Paris" : ["croissant"]}, |