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 json | |
import requests | |
#req = requests.get('http://www.mitele.es/ipadws/?action=getHome&device=ipa') | |
#req = requests.get('http://www.mitele.es/ipadws/?action=getContent&contentId=46231&device=ipa') | |
req = requests.get('http://servicios.mitele.es/tokenizer/tkjs.php?id=/nogeo/seriesonline/laqueseavecina/t2/c19.mp4', headers={'User-agent': 'iPad'}) | |
print json.loads(req.content.replace('videoTokenizer(', '')[:-2])['tokenizedUrl'] |
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
# -*- coding: utf-8 -*- | |
import json | |
import requests | |
from lxml import etree | |
#req = requests.get('http://www.mitele.es/ipadws/?action=getHome&device=ipa') | |
#req = requests.get('http://www.mitele.es/ipadws/?action=getContent&contentId=46231&device=ipa') | |
#req = requests.get('http://servicios.mitele.es/tokenizer/tkjs.php?id=/nogeo/seriesonline/laqueseavecina/t2/c19.mp4', headers={'User-agent': 'iPad'}) |
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
juanriaza at MacBookPro in ~ | |
(cpython273) $ whois facebook.com | |
Whois Server Version 2.0 | |
Domain names in the .com and .net domains can now be registered | |
with many different competing registrars. Go to http://www.internic.net | |
for detailed information. | |
FACEBOOK.COM.ZZZZZ.GET.LAID.AT.WWW.SWINGINGCOMMUNITY.COM |
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
WebSocket.prototype._send = WebSocket.prototype.send; | |
WebSocket.prototype.send = function (data) { | |
console.log("\u2192 " + data); | |
this._send(data); | |
this.addEventListener('message', function (msg) { | |
console.log('\u2190 ' + msg.data); | |
}, false); | |
this.send = function (data) { | |
this._send(data); | |
console.log("\u2192 " + data); |
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
message Currency { | |
required uint64 a = 1; | |
required uint64 b = 2; | |
required uint64 c = 3; | |
required uint64 donuts = 4; | |
required uint64 e = 5; | |
} |
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
{10: {'config': {'descripcion': 'Madrid', | |
'iconomapa': 'pin_cercanias', | |
'incidencias': 'http://infocer.renfe.es/informacionCercanias/incidenciasXML.do?login=aplinf1&password=HTULE593&idnucleo=10', | |
'lat': '40.40615564778484', | |
'lon': '-3.688957970842623', | |
'tarifas': 'http://www.renfe.com/viajeros/cercanias/madrid/abonos_y_descuentos/index.html'}, | |
'content': {'dateTimeUpdate': '20130101113000', | |
'estaciones': 'http://api.mo2o.com/apps/RenfeApp/contents/estaciones_10.xml.gz', | |
'lineas': 'http://api.mo2o.com/apps/RenfeApp/contents/lineas_10.xml.gz', | |
'mapaesquematico': 'http://api.mo2o.com/apps/RenfeApp/contents/mapaesquematico_10.xml.gz', |
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 base64 | |
import hashlib | |
from django.contrib.auth.hashers import BasePasswordHasher, mask_hash | |
from django.utils.crypto import constant_time_compare | |
from django.utils.datastructures import SortedDict | |
from django.utils.translation import ugettext_lazy as _ | |
class SymfonyPasswordHasher(BasePasswordHasher): |
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 tablib | |
lines = csv_data.split('\n')[:-1] | |
clean = lambda data: map(lambda e: e.strip('"'), data.split(',')) | |
headers = clean(lines[0]) | |
data = [clean(contact) for contact in lines[1:]] | |
parsed_data = tablib.Dataset(*data, headers=headers) | |
print parsed_data.json |
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
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) | |
PROJECT(phantompy) | |
SET(CMAKE_PREFIX_PATH "/usr/local/opt/qt5") | |
#SET(CMAKE_BUILD_TYPE "Release") | |
SET(CMAKE_BUILD_TYPE "Debug") | |
SET(CMAKE_VERBOSE_MAKEFILE ON) | |
SET(CMAKE_INCLUDE_CURRENT_DIR ON) | |
SET(CMAKE_AUTOMOC ON) |
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
# -*- coding: utf-8 -*- | |
import os | |
import requests | |
from bs4 import BeautifulSoup | |
from selenium import webdriver | |
url = 'http://goo.gl/mff2' | |
print url | |
req = requests.get(url) |