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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
__author__ = "Adrien Pujol - http://www.crashdump.fr/" | |
__copyright__ = "Copyright 2013, Adrien Pujol" | |
__license__ = "Mozilla Public License" | |
__version__ = "0.3" | |
__email__ = "adrien.pujol@crashdump.fr" | |
__status__ = "Development" | |
__doc__ = "Check a TLS certificate validity." |
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
Thu Mar 20 17:24:00.676 [conn17] build index forum.newcolOne { _id: 1 } | |
Thu Mar 20 17:24:00.677 [conn17] build index done. scanned 0 total records. 0 secs | |
Thu Mar 20 17:24:12.144 [conn17] build index forum.newcolTwo { _id: 1 } | |
Thu Mar 20 17:24:12.195 [conn17] build index done. scanned 0 total records. 0.051 secs | |
Thu Mar 20 17:24:31.321 [conn17] build index forum.newcolThree { _id: 1 } | |
Thu Mar 20 17:24:31.409 [conn17] build index done. scanned 0 total records. 0.087 secs | |
Thu Mar 20 17:24:43.095 [conn17] build index forum.newcolFour { _id: 1 } | |
Thu Mar 20 17:33:12.076 [conn17] build index forum.newcolFive { _id: 1 } | |
Thu Mar 20 17:33:12.114 [conn17] build index done. scanned 0 total records. 0.037 secs |
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
__author__ = 'horacioibrahim' | |
# This file contains a small code to check if the limit of 40MB returned by | |
# Websrv Mongo it's really exclusive where called OP_KILL_CURSORS | |
# All indicates and a little obvious that result to be returned all documents | |
# via cursor, BUT we have to run. | |
# The tests are applicable to mongoDB. | |
# | |
# Requirements: bottle and pymongo | |
# |
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 -*-# | |
# | |
# Isto é um fragmento de código para traduzir certos pydoc's | |
# que usa o goslate de https://pypi.python.org/pypi/goslate | |
# LEMBRE: que o Google Tradutor faz traduções literais que | |
# às vezes pode não fazer sentido. Assim você que dará sentido | |
# ao texto traduzido conforme o contexto. | |
# | |
# Foi criado para o curso Python X-Series (101x). Por isso é | |
# interesse que você não copie este código. Assim, abra um |
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 -*- | |
""" | |
Minha lista de compras. O gabarito dos testes | |
Python 101x - Interleaving practices. | |
Criado por: horacioibrahim at gmail dot com | |
""" | |
# Baixe o arquivo CSV http://pastebin.com/jMaxUr0p | |
# ou copie os valores (RAW Paste Data) abra um arquivo | |
# de texto simples e salve. Exemplo: |
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
""" | |
Simple code for to show when is need to use copy() | |
""" | |
class MyObj(object): | |
# ... hide ... | |
def save(self, document, id_field="_id"): | |
""" |
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
<!-- ... omitted ... --> | |
<body> | |
<!-- | |
In this case, I have passed variable of template in the attributes of the element sc-navbar. | |
NOTE: I did change of '{{' to '%%' for display the variables from Flask template engine. This help us | |
to see difference of the Flask for Polymer scopes. | |
I'm using g (global variable) of the Flask (see more: http://flask.pocoo.org/docs/0.10/templating/#standard-context) | |
--> | |
<sc-navbar username="%% g.user.shortname %%" avatar="%% g.user.md5_email %%" online="%% g.user.status_online %%"></sc-navbar> | |
</body> |
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
[{ | |
"content": ["<p>O <a href=\"http://brasil.elpais.com/tag/dolar_americano/a/\">d\u00f3lar</a> superou, nesta ter\u00e7a-feira, a temida barreira dos 4 reais, e atingiu sua maior cota\u00e7\u00e3o desde a cria\u00e7\u00e3o do Plano Real em 1994. \u00c0s 10h30, a moeda norte-americana tinha alta de 1,65% e era vendida a 4,0464 reais, refletindo a tend\u00eancia mundial de valoriza\u00e7\u00e3o do d\u00f3lar, mas tamb\u00e9m a <a href=\"http://brasil.elpais.com/tag/c/9ee51b56a07c53428c6e49c56b289628/\">crise pol\u00edtica</a> e econ\u00f4mica que o <a href=\"http://brasil.elpais.com/tag/brasil/a/\">Brasil</a> atravessa. Na segunda-feira, a moeda fechou em alta de 3,980 reais, mas era vendida nas casas de c\u00e2mbio por mais de 4 reais.</p>", "<p>Nem as proje\u00e7\u00f5es mais pessimistas pressagiavam a atual forte desvaloriza\u00e7\u00e3o do real frente ao d\u00f3lar e a tempestade de m\u00e1s not\u00edcias que o Brasil enfrentaria em 2015. Desde o in\u00edcio do ano, a moeda norte-americana j\u00e1 acum |
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
from scrapy.selector import Selector | |
selector = Selector(text=""" | |
<div itemscope itemtype ="http://schema.org/Movie"> | |
<h1 itemprop="name">Avatar</h1> | |
<span>Director: <span itemprop="director">James Cameron</span> (born August 16, 1954)</span> | |
<span itemprop="genre">Science fiction</span> | |
<a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">Trailer</a> | |
</div>""", type="html") |
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
[ | |
[ | |
[{ | |
"article_body": "\u00a0O Brasil perdeu a estreia contra o Chile e nesta ter\u00e7a-feira tem a segunda partida das eliminat\u00f3rias da Copa do Mundo de 2018, em Fortaleza, contra a Venezuela. No \"Sele\u00e7\u00e3o SporTV\", o comentarista Caio Ribeiro disse que gostaria de ver um meia atuando pela sele\u00e7\u00e3o brasileira por conta das caracter\u00edsticas diferentes do jeito que cada um dos advers\u00e1rios joga (assista ao v\u00eddeo).- Contra a Venezuela \u00e9 um jogo diferente, que pode at\u00e9 querer atacar o Brasil em alguns momentos, mas vai marcar com todo mundo atr\u00e1s do meio-campo. Onde est\u00e1 o espa\u00e7o? Nos homens que v\u00eam de tr\u00e1s, como Elias e Luis Gustavo. O Luis Gustavo, em alguns momentos, fica sem fun\u00e7\u00e3o. N\u00e3o que n\u00e3o seja bom, mas por ser mais lento. Eu gostaria de ver o Renato Augusto nesse time porque \u00e9 um cara que trabalha por tr\u00e1s, se movimenta, pega a bola na direita e leva para a esquerda - disse.Ca |
OlderNewer