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 urllib2 | |
import json | |
UF = ['AC','AL','AM','AP','BA','CE','DF','ES','GO','MA','MG','MS','MT','PA','PB','PE','PI','PR','RJ','RN','RO','RR','RS','SC','SE','SP','TO'] | |
#UF = ['AC','AL','AM','AP','BA','CE'] | |
for estado in UF: | |
#print estado | |
urlCidade = 'https://ww18.itau.com.br/wsinvestnet/Corban.asmx/MontarCombosCorbanCidade?estado=' + estado + '&servico=3&segmento=8&callback=_jqjsp&_1412367567213=' | |
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
# Load Json into a Python object | |
import urllib2 | |
import json | |
req = urllib2.Request("http://localhost:81/sensors/temperature.json") | |
opener = urllib2.build_opener() | |
f = opener.open(req) | |
json = json.loads(f.read()) | |
print json | |
print json['unit'] |
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
#versão Python 3 de http://pastebin.com/uRnDZaTz (Vinicius Marangoni) | |
import urllib.request | |
import json | |
url = 'http://divulga.tse.jus.br/2014/divulgacao/oficial/143/dadosdivweb/br/br-0001-e001431-w.js' | |
def main(): | |
resp = urllib.request.urlopen(url).read() | |
resp = json.loads(resp.decode('utf-8')) | |
candidatos = resp['cand'] |
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 -*- | |
from scrapy.linkextractors import LinkExtractor | |
from scrapy.spiders import CrawlSpider, Rule | |
from yfinance.items import YfinanceItem | |
class FinanceSpider(CrawlSpider): | |
name = 'finance' | |
allowed_domains = ['finance.yahoo.com'] |
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
## | |
# This module requires Metasploit: http://metasploit.com/download | |
# Current source: https://github.com/rapid7/metasploit-framework | |
## | |
require 'msf/core' | |
class Metasploit3 < Msf::Auxiliary | |
include Msf::Exploit::Remote::HttpClient |
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
// === step1 === | |
trait Pizza { | |
def remA: Pizza | |
} | |
case class Crust() extends Pizza { | |
def remA = Crust() | |
} | |
case class Cheese(p: Pizza) extends Pizza { |
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
var _ = require('underscore'); | |
var request = require('request'); | |
var json = 'http://globoesporte.globo.com/dynamo/futebol/campeonato/campeonato-brasileiro/brasileirao2012/classificacao.json'; | |
var tabela = []; | |
var resultado = function (placar) { | |
if (placar.mandante == placar.visitante) | |
return 0.5; | |
return placar.mandante > placar.visitante ? 1 : 0; |
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
var baseUrl = 'https://api.parse.com/1', | |
appId = 'XXXXXXXXXXXXXXX', | |
apiKey = 'XXXXXXXXXXXXXX'; // make sure to use the REST API Key | |
var _register = function(params, lambda, lambdaerror) { | |
var method = 'POST', | |
url = baseUrl + '/installations', | |
payload = (params) ? JSON.stringify(params) : ''; | |
_helper(url, method, payload, function(data, status) { |
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
current_path = File.dirname(__FILE__) | |
sass_path = File.join(current_path, 'scss') | |
css_path = File.join(current_path, 'css') | |
#:expanded, :nested, :compact, :compressed | |
output_style = :expanded |
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
-Implementar busca com sugestão (estilo Google) | |
-Fazer um seed com termos para teste | |
-Fazer debounce de 300ms em cada caractere digitado | |
-Se o usuário digitar "bazinga", a logo do Zoozle deve sumir, a imagem do Sheldon deve ser exibida e uma exceção "Bazinga" deve ser disparada | |
-Busca case insensitive | |
-Ao clicar-se numa opção da lista de sugestões, ou ao apertar-se Enter, fazer a busca no Google de verdade | |
OlderNewer