Skip to content

Commit c8674d6

Browse files
Travis build 529 pushed to Github Pages
1 parent 187f360 commit c8674d6

File tree

613 files changed

+16047
-14743
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

613 files changed

+16047
-14743
lines changed

5-django-apps-que-nao-vivo-se.html

Lines changed: 33 additions & 33 deletions
Large diffs are not rendered by default.

5-django-apps-que-nao-vivo-se.html.gz

54 Bytes
Binary file not shown.

a-armadilha-dos-argumentos-com-valores-padrao.html

Lines changed: 10 additions & 10 deletions
Large diffs are not rendered by default.
Binary file not shown.

aprendendo-e-ensinando-python.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

aprendendo-e-ensinando-python.html.gz

54 Bytes
Binary file not shown.

archives.html

Lines changed: 10 additions & 1 deletion
Large diffs are not rendered by default.

archives.html.gz

179 Bytes
Binary file not shown.

author/andre-ramos.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/andre-ramos.html.gz

52 Bytes
Binary file not shown.

author/arthur-alves.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/arthur-alves.html.gz

50 Bytes
Binary file not shown.

author/artur-felipe-de-sousa.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/artur-felipe-de-sousa.html.gz

51 Bytes
Binary file not shown.

author/bruno-cezar-rocha.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/bruno-cezar-rocha.html.gz

54 Bytes
Binary file not shown.

author/capi-etheriel.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/capi-etheriel.html.gz

53 Bytes
Binary file not shown.

author/diego-garcia.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/diego-garcia.html.gz

50 Bytes
Binary file not shown.

author/dyesten-paulon.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/dyesten-paulon.html.gz

50 Bytes
Binary file not shown.

author/eduardo-klosowski.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/eduardo-klosowski.html.gz

53 Bytes
Binary file not shown.

author/eduardo-matos.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/eduardo-matos.html.gz

51 Bytes
Binary file not shown.

author/elias-dorneles.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/elias-dorneles.html.gz

49 Bytes
Binary file not shown.

author/elio-duarte.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/elio-duarte.html.gz

53 Bytes
Binary file not shown.

author/eric-hideki.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/eric-hideki.html.gz

57 Bytes
Binary file not shown.

author/erick-muller.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/erick-muller.html.gz

50 Bytes
Binary file not shown.

author/evaldo-junior-bento.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/evaldo-junior-bento.html.gz

56 Bytes
Binary file not shown.

author/fabiano-goes.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/fabiano-goes.html.gz

49 Bytes
Binary file not shown.

author/fabio-c-barrionuevo-da-luz.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
51 Bytes
Binary file not shown.

author/gilmar-soares.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/gilmar-soares.html.gz

51 Bytes
Binary file not shown.

author/guido-luz-percu.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/guido-luz-percu.html.gz

50 Bytes
Binary file not shown.

author/guilherme-louro.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/guilherme-louro.html.gz

52 Bytes
Binary file not shown.

author/hudson-brendon.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/hudson-brendon.html.gz

53 Bytes
Binary file not shown.

author/igor-santos.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/igor-santos.html.gz

55 Bytes
Binary file not shown.

author/lucas-magnum.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/lucas-magnum.html.gz

49 Bytes
Binary file not shown.

author/luciano-ramalho.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/luciano-ramalho.html.gz

54 Bytes
Binary file not shown.

author/mario-chaves.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/mario-chaves.html.gz

51 Bytes
Binary file not shown.

author/matheus-ap-godoy-ribeiro.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
50 Bytes
Binary file not shown.

author/mauricio-camargo-sipmann.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
49 Bytes
Binary file not shown.

author/othon-alberto.html

Lines changed: 197 additions & 0 deletions
Large diffs are not rendered by default.

author/othon-alberto.html.gz

5.37 KB
Binary file not shown.

author/raphael-passini-diniz.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/raphael-passini-diniz.html.gz

50 Bytes
Binary file not shown.

author/raphael-passini.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/raphael-passini.html.gz

51 Bytes
Binary file not shown.

author/regis-da-silva.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/regis-da-silva.html.gz

51 Bytes
Binary file not shown.

author/regis-da-silva2.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/regis-da-silva2.html.gz

51 Bytes
Binary file not shown.

author/romulo-collopy.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/romulo-collopy.html.gz

50 Bytes
Binary file not shown.

author/thiago-coroa.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/thiago-coroa.html.gz

52 Bytes
Binary file not shown.

authors.html

Lines changed: 2 additions & 1 deletion
Large diffs are not rendered by default.

authors.html.gz

68 Bytes
Binary file not shown.

bottle-framework-full-stack-sem-django.html

Lines changed: 18 additions & 18 deletions
Large diffs are not rendered by default.
67 Bytes
Binary file not shown.

categories.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

categories.html.gz

51 Bytes
Binary file not shown.

category/anti-patterns.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/anti-patterns.html.gz

48 Bytes
Binary file not shown.

category/banco-de-dados.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/banco-de-dados.html.gz

49 Bytes
Binary file not shown.

category/begginers-bottle-tutorial.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
49 Bytes
Binary file not shown.

category/debugging.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/debugging.html.gz

48 Bytes
Binary file not shown.

category/deploy-infraestrutura.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
52 Bytes
Binary file not shown.

category/django-apps.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/django-apps.html.gz

51 Bytes
Binary file not shown.

category/django.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/django.html.gz

49 Bytes
Binary file not shown.

category/django2.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/django2.html.gz

56 Bytes
Binary file not shown.

category/flask.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/flask.html.gz

54 Bytes
Binary file not shown.

category/google-app-engine.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/google-app-engine.html.gz

50 Bytes
Binary file not shown.

category/heroku.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/heroku.html.gz

51 Bytes
Binary file not shown.

category/load-testing.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/load-testing.html.gz

51 Bytes
Binary file not shown.

category/manipulacao-de-imagens.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
51 Bytes
Binary file not shown.

category/misc.html

Lines changed: 16 additions & 1 deletion
Large diffs are not rendered by default.

category/misc.html.gz

359 Bytes
Binary file not shown.

category/pelican.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/pelican.html.gz

51 Bytes
Binary file not shown.

category/python-banco-de-dados.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
51 Bytes
Binary file not shown.

category/python-django-rest.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/python-django-rest.html.gz

53 Bytes
Binary file not shown.

category/python-django.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/python-django.html.gz

51 Bytes
Binary file not shown.

category/python-por-dentro.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/python-por-dentro.html.gz

52 Bytes
Binary file not shown.

category/python.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/python.html.gz

52 Bytes
Binary file not shown.

category/python2.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/python2.html.gz

51 Bytes
Binary file not shown.

category/pythonentrevistas.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/pythonentrevistas.html.gz

50 Bytes
Binary file not shown.

category/servidor-web.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/servidor-web.html.gz

51 Bytes
Binary file not shown.

category/tutoriais.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/tutoriais.html.gz

52 Bytes
Binary file not shown.

class-based-views-django.html

Lines changed: 91 additions & 91 deletions
Large diffs are not rendered by default.

class-based-views-django.html.gz

101 Bytes
Binary file not shown.

como-encontrar-solucoes-python.html

Lines changed: 35 additions & 35 deletions
Large diffs are not rendered by default.
66 Bytes
Binary file not shown.

como-fazer-fork-clone-push-pull-request-no-github.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Binary file not shown.

como_colaborar_com_projetos_open_source.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
49 Bytes
Binary file not shown.

configurando-ambiente-django-com-apache-e-mod-wsgi.html

Lines changed: 33 additions & 33 deletions
Large diffs are not rendered by default.
Binary file not shown.

configurando-um-servidor-de-producao-para-aplicacoes-python.html

Lines changed: 19 additions & 19 deletions
Large diffs are not rendered by default.
Binary file not shown.

conteinerizando-suas-aplicacoes-django-com-docker-e-fig.html

Lines changed: 14 additions & 14 deletions
Large diffs are not rendered by default.
Binary file not shown.

criando-novos-comandos-no-django-admin.html

Lines changed: 88 additions & 88 deletions
Large diffs are not rendered by default.
46 Bytes
Binary file not shown.

criando-sites-estaticos-com-pelican.html

Lines changed: 8 additions & 8 deletions
Large diffs are not rendered by default.
52 Bytes
Binary file not shown.

criar-site-com-form-lista-30-min.html

Lines changed: 91 additions & 91 deletions
Large diffs are not rendered by default.
97 Bytes
Binary file not shown.

debugging-em-python-sem-ide.html

Lines changed: 11 additions & 11 deletions
Large diffs are not rendered by default.

debugging-em-python-sem-ide.html.gz

56 Bytes
Binary file not shown.

deploy-app-django-openshift.html

Lines changed: 15 additions & 15 deletions
Large diffs are not rendered by default.

deploy-app-django-openshift.html.gz

44 Bytes
Binary file not shown.

deploy-com-django-fagungis.html

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

deploy-com-django-fagungis.html.gz

45 Bytes
Binary file not shown.

desenvolvendo-com-bottle-parte-1.html

Lines changed: 30 additions & 30 deletions
Large diffs are not rendered by default.
48 Bytes
Binary file not shown.

desenvolvendo-para-google-app-engine-com-tekton.html

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.
Binary file not shown.

django-introducao-queries.html

Lines changed: 36 additions & 36 deletions
Large diffs are not rendered by default.

django-introducao-queries.html.gz

51 Bytes
Binary file not shown.

django-na-pratica-aula-01.html

Lines changed: 18 additions & 18 deletions
Large diffs are not rendered by default.

django-na-pratica-aula-01.html.gz

35 Bytes
Binary file not shown.

django-overview-10-minutos.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

django-overview-10-minutos.html.gz

50 Bytes
Binary file not shown.

django-rest-framework-quickstart.html

Lines changed: 24 additions & 24 deletions
Large diffs are not rendered by default.
37 Bytes
Binary file not shown.

drafts/diferenca-operadores.html

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

drafts/diferenca-operadores.html.gz

54 Bytes
Binary file not shown.

editando-o-admin-do-django.html

Lines changed: 16 additions & 16 deletions
Large diffs are not rendered by default.

editando-o-admin-do-django.html.gz

78 Bytes
Binary file not shown.

entrevista-henrique-bastos.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

entrevista-henrique-bastos.html.gz

49 Bytes
Binary file not shown.

extraindo-texto-de-imagens-com-python.html

Lines changed: 10 additions & 10 deletions
Large diffs are not rendered by default.
43 Bytes
Binary file not shown.

feeds/all.atom.xml

Lines changed: 2521 additions & 2392 deletions
Large diffs are not rendered by default.

feeds/all.atom.xml.gz

3.64 KB
Binary file not shown.

feeds/all.rss.xml

Lines changed: 2521 additions & 2392 deletions
Large diffs are not rendered by default.

feeds/all.rss.xml.gz

3.64 KB
Binary file not shown.

feeds/andre-ramos.atom.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,37 @@
66
<p>Como descrito acima, já existe uma tecnologia para realizar essa função, então apenas precisamos utilizá-la em nosso script python e assim desenvolvermos o que a imaginação permitir.</p>
77
<h3>Instalando Dependências (Ubuntu)</h3>
88
<p>Primeiro vamos começar pela instalação do Tesseract OCR. Abra o terminal e digite o seguinte comando:</p>
9-
<div class="highlight"><pre><span class="nv">$ </span>sudo apt-get install tesseract-ocr tesseract-ocr-por
9+
<div class="highlight"><pre>$ sudo apt-get install tesseract-ocr tesseract-ocr-por
1010
</pre></div>
1111

1212

1313
<p>Também precisamos instalar a biblioteca Pillow e suas dependências. Ela será necessária para carregar a imagem para nosso script:</p>
1414
<p>Ubuntu 12.04/14.04:</p>
15-
<div class="highlight"><pre><span class="nv">$ </span>sudo apt-get install python-dev python3-dev build-essential liblcms1-dev zlib1g-dev libtiff4-dev libjpeg8-dev libfreetype6-dev libwebp-dev
16-
<span class="nv">$ </span>sudo -H pip install Pillow
15+
<div class="highlight"><pre>$ sudo apt-get install python-dev python3-dev build-essential liblcms1-dev zlib1g-dev libtiff4-dev libjpeg8-dev libfreetype6-dev libwebp-dev
16+
$ sudo -H pip install Pillow
1717
</pre></div>
1818

1919

2020
<p>Ubuntu 15.04/15.10:</p>
21-
<div class="highlight"><pre><span class="nv">$ </span>sudo apt-get install python-dev python3-dev build-essential liblcms2-dev zlib1g-dev libtiff4-dev libjpeg8-dev libfreetype6-dev libwebp-dev
22-
<span class="nv">$ </span>sudo -H pip install Pillow
21+
<div class="highlight"><pre>$ sudo apt-get install python-dev python3-dev build-essential liblcms2-dev zlib1g-dev libtiff4-dev libjpeg8-dev libfreetype6-dev libwebp-dev
22+
$ sudo -H pip install Pillow
2323
</pre></div>
2424

2525

2626
<p>Agora partiremos para a instalação do wrapper que irá permitir a utilização do Tesseract através do python:</p>
27-
<div class="highlight"><pre><span class="nv">$ </span>sudo -H pip install pytesseract
27+
<div class="highlight"><pre>$ sudo -H pip install pytesseract
2828
</pre></div>
2929

3030

3131
<h3>Mão Na Massa!</h3>
3232
<p>Finalmente chegamos a parte prática desse artigo. Como dito anteriormente, são apenas 3 linhas de código, mas antes de começar baixe a seguinte imagem para realizar seus testes:</p>
3333
<p><img alt="imagem para teste" src="images/andrelramos/ocr2.png" title="Imagem Para Teste" /></p>
3434
<p>Agora vamos ao código:</p>
35-
<div class="highlight"><pre><span class="kn">from</span> <span class="nn">PIL</span> <span class="kn">import</span> <span class="n">Image</span> <span class="c"># Importando o módulo Pillow para abrir a imagem no script</span>
35+
<div class="highlight"><pre><span class="kn">from</span> <span class="nn">PIL</span> <span class="kn">import</span> <span class="n">Image</span> <span class="c1"># Importando o módulo Pillow para abrir a imagem no script</span>
3636

37-
<span class="kn">import</span> <span class="nn">pytesseract</span> <span class="c"># Módulo para a utilização da tecnologia OCR</span>
37+
<span class="kn">import</span> <span class="nn">pytesseract</span> <span class="c1"># Módulo para a utilização da tecnologia OCR</span>
3838

39-
<span class="k">print</span><span class="p">(</span> <span class="n">pytesseract</span><span class="o">.</span><span class="n">image_to_string</span><span class="p">(</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s">'nome_da_imagem.jpg'</span><span class="p">)</span> <span class="p">)</span> <span class="p">)</span> <span class="c"># Extraindo o texto da imagem</span>
39+
<span class="k">print</span><span class="p">(</span> <span class="n">pytesseract</span><span class="o">.</span><span class="n">image_to_string</span><span class="p">(</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">'nome_da_imagem.jpg'</span><span class="p">)</span> <span class="p">)</span> <span class="p">)</span> <span class="c1"># Extraindo o texto da imagem</span>
4040
</pre></div>
4141

4242

feeds/andre-ramos.atom.xml.gz

-8 Bytes
Binary file not shown.

feeds/andre-ramos.rss.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,37 @@
66
<p>Como descrito acima, já existe uma tecnologia para realizar essa função, então apenas precisamos utilizá-la em nosso script python e assim desenvolvermos o que a imaginação permitir.</p>
77
<h3>Instalando Dependências (Ubuntu)</h3>
88
<p>Primeiro vamos começar pela instalação do Tesseract OCR. Abra o terminal e digite o seguinte comando:</p>
9-
<div class="highlight"><pre><span class="nv">$ </span>sudo apt-get install tesseract-ocr tesseract-ocr-por
9+
<div class="highlight"><pre>$ sudo apt-get install tesseract-ocr tesseract-ocr-por
1010
</pre></div>
1111

1212

1313
<p>Também precisamos instalar a biblioteca Pillow e suas dependências. Ela será necessária para carregar a imagem para nosso script:</p>
1414
<p>Ubuntu 12.04/14.04:</p>
15-
<div class="highlight"><pre><span class="nv">$ </span>sudo apt-get install python-dev python3-dev build-essential liblcms1-dev zlib1g-dev libtiff4-dev libjpeg8-dev libfreetype6-dev libwebp-dev
16-
<span class="nv">$ </span>sudo -H pip install Pillow
15+
<div class="highlight"><pre>$ sudo apt-get install python-dev python3-dev build-essential liblcms1-dev zlib1g-dev libtiff4-dev libjpeg8-dev libfreetype6-dev libwebp-dev
16+
$ sudo -H pip install Pillow
1717
</pre></div>
1818

1919

2020
<p>Ubuntu 15.04/15.10:</p>
21-
<div class="highlight"><pre><span class="nv">$ </span>sudo apt-get install python-dev python3-dev build-essential liblcms2-dev zlib1g-dev libtiff4-dev libjpeg8-dev libfreetype6-dev libwebp-dev
22-
<span class="nv">$ </span>sudo -H pip install Pillow
21+
<div class="highlight"><pre>$ sudo apt-get install python-dev python3-dev build-essential liblcms2-dev zlib1g-dev libtiff4-dev libjpeg8-dev libfreetype6-dev libwebp-dev
22+
$ sudo -H pip install Pillow
2323
</pre></div>
2424

2525

2626
<p>Agora partiremos para a instalação do wrapper que irá permitir a utilização do Tesseract através do python:</p>
27-
<div class="highlight"><pre><span class="nv">$ </span>sudo -H pip install pytesseract
27+
<div class="highlight"><pre>$ sudo -H pip install pytesseract
2828
</pre></div>
2929

3030

3131
<h3>Mão Na Massa!</h3>
3232
<p>Finalmente chegamos a parte prática desse artigo. Como dito anteriormente, são apenas 3 linhas de código, mas antes de começar baixe a seguinte imagem para realizar seus testes:</p>
3333
<p><img alt="imagem para teste" src="images/andrelramos/ocr2.png" title="Imagem Para Teste" /></p>
3434
<p>Agora vamos ao código:</p>
35-
<div class="highlight"><pre><span class="kn">from</span> <span class="nn">PIL</span> <span class="kn">import</span> <span class="n">Image</span> <span class="c"># Importando o módulo Pillow para abrir a imagem no script</span>
35+
<div class="highlight"><pre><span class="kn">from</span> <span class="nn">PIL</span> <span class="kn">import</span> <span class="n">Image</span> <span class="c1"># Importando o módulo Pillow para abrir a imagem no script</span>
3636

37-
<span class="kn">import</span> <span class="nn">pytesseract</span> <span class="c"># Módulo para a utilização da tecnologia OCR</span>
37+
<span class="kn">import</span> <span class="nn">pytesseract</span> <span class="c1"># Módulo para a utilização da tecnologia OCR</span>
3838

39-
<span class="k">print</span><span class="p">(</span> <span class="n">pytesseract</span><span class="o">.</span><span class="n">image_to_string</span><span class="p">(</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s">'nome_da_imagem.jpg'</span><span class="p">)</span> <span class="p">)</span> <span class="p">)</span> <span class="c"># Extraindo o texto da imagem</span>
39+
<span class="k">print</span><span class="p">(</span> <span class="n">pytesseract</span><span class="o">.</span><span class="n">image_to_string</span><span class="p">(</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">'nome_da_imagem.jpg'</span><span class="p">)</span> <span class="p">)</span> <span class="p">)</span> <span class="c1"># Extraindo o texto da imagem</span>
4040
</pre></div>
4141

4242

feeds/andre-ramos.rss.xml.gz

-7 Bytes
Binary file not shown.

feeds/anti-patterns.atom.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Ou seja, por questões de optimização, seguindo nosso exemplo, o python não c
6868
</blockquote>
6969
<p>Outro exemplo seria utilizar o resultado de funções como valores default de argumentos, por exemplo, uma função com um argumento que recebe como default o valor de <code>datetime.now()</code>. </p>
7070
<div class="highlight"><pre><span class="k">def</span> <span class="nf">what_time_is_it</span><span class="p">(</span><span class="n">dt</span><span class="o">=</span><span class="n">datetime</span><span class="o">.</span><span class="n">now</span><span class="p">()):</span>
71-
<span class="k">print</span><span class="p">(</span><span class="n">dt</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s">'</span><span class="si">%d</span><span class="s">/%m/%Y %H:%M:%S'</span><span class="p">))</span>
71+
<span class="k">print</span><span class="p">(</span><span class="n">dt</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s1">'</span><span class="si">%d</span><span class="s1">/%m/%Y %H:%M:%S'</span><span class="p">))</span>
7272
</pre></div>
7373

7474

@@ -114,31 +114,31 @@ Ou seja, por questões de optimização, seguindo nosso exemplo, o python não c
114114

115115
<h3>Por que isso não acontece com Strings?</h3>
116116
<p>Porque strings são <code>imutáveis</code>, o que significa que a cada alteração de valor em uma variavel que armazena uma strings, o python cria uma nova instância para essa variável.</p>
117-
<div class="highlight"><pre><span class="o">>>></span> <span class="n">a</span> <span class="o">=</span> <span class="s">'foo'</span>
117+
<div class="highlight"><pre><span class="o">>>></span> <span class="n">a</span> <span class="o">=</span> <span class="s1">'foo'</span>
118118
<span class="o">>>></span> <span class="nb">id</span><span class="p">(</span><span class="n">a</span><span class="p">)</span>
119119
<span class="mi">140398402003832</span>
120-
<span class="o">>>></span> <span class="n">a</span> <span class="o">=</span> <span class="s">'bar'</span>
120+
<span class="o">>>></span> <span class="n">a</span> <span class="o">=</span> <span class="s1">'bar'</span>
121121
<span class="o">>>></span> <span class="nb">id</span><span class="p">(</span><span class="n">a</span><span class="p">)</span>
122-
<span class="mi">140398402003872</span> <span class="c"># o penúltimo número muda :)</span>
122+
<span class="mi">140398402003872</span> <span class="c1"># o penúltimo número muda :)</span>
123123
</pre></div>
124124

125125

126126
<p>Em argumentos com valores default, não é diferente.</p>
127-
<div class="highlight"><pre><span class="nx">def</span> <span class="nx">my_function</span><span class="p">(</span><span class="nx">my_str</span><span class="o">=</span><span class="s1">'abc'</span><span class="p">)</span><span class="o">:</span>
128-
<span class="nx">my_str</span> <span class="o">+=</span> <span class="s1">'d'</span>
129-
<span class="nx">print</span><span class="p">(</span><span class="nx">my_str</span><span class="p">)</span>
127+
<div class="highlight"><pre>def my_function(my_str='abc'):
128+
my_str += 'd'
129+
print(my_str)
130130
</pre></div>
131131

132132

133133
<p>No exemplo acima, sempre que for executado o <code>inplace add</code> (<code>+=</code>) será criada outra váriavel para <code>my_str</code> sem alterar o valor default do argumento. </p>
134134
<div class="highlight"><pre><span class="o">>>></span> <span class="n">my_function</span><span class="p">()</span>
135135
<span class="n">abcd</span>
136136
<span class="o">>>></span> <span class="n">my_function</span><span class="o">.</span><span class="n">func_defaults</span>
137-
<span class="p">(</span><span class="s">'abc'</span><span class="p">,)</span>
137+
<span class="p">(</span><span class="s1">'abc'</span><span class="p">,)</span>
138138
<span class="o">>>></span> <span class="n">my_function</span><span class="p">()</span>
139139
<span class="n">abcd</span>
140140
<span class="o">>>></span> <span class="n">my_function</span><span class="o">.</span><span class="n">func_defaults</span>
141-
<span class="p">(</span><span class="s">'abc'</span><span class="p">,)</span>
141+
<span class="p">(</span><span class="s1">'abc'</span><span class="p">,)</span>
142142
</pre></div>
143143

144144

feeds/anti-patterns.atom.xml.gz

-14 Bytes
Binary file not shown.

feeds/arthur-alves.atom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,17 @@ Feito isso ele vai gerar os "htmls" na pasta output do projeto. E você pode ver
138138
8
139139
9
140140
10
141-
11</pre></div></td><td class="code"><div class="highlight"><pre><span class="c">#!/usr/bin/env python</span>
142-
<span class="c"># -*- coding: utf-8 -*- #</span>
141+
11</pre></div></td><td class="code"><div class="highlight"><pre><span class="ch">#!/usr/bin/env python</span>
142+
<span class="c1"># -*- coding: utf-8 -*- #</span>
143143
<span class="kn">from</span> <span class="nn">__future__</span> <span class="kn">import</span> <span class="n">unicode_literals</span>
144144

145-
<span class="n">AUTHOR</span> <span class="o">=</span> <span class="s">u'Arthur Alves'</span> <span class="c"># Autor do site</span>
146-
<span class="n">SITENAME</span> <span class="o">=</span> <span class="s">u'Meu Blog Pelican'</span> <span class="c"># Nome do site </span>
147-
<span class="n">SITEURL</span> <span class="o">=</span> <span class="s">'blogdoarthur.dev'</span> <span class="c"># url do site</span>
145+
<span class="n">AUTHOR</span> <span class="o">=</span> <span class="s1">u'Arthur Alves'</span> <span class="c1"># Autor do site</span>
146+
<span class="n">SITENAME</span> <span class="o">=</span> <span class="s1">u'Meu Blog Pelican'</span> <span class="c1"># Nome do site </span>
147+
<span class="n">SITEURL</span> <span class="o">=</span> <span class="s1">'blogdoarthur.dev'</span> <span class="c1"># url do site</span>
148148

149-
<span class="n">TIMEZONE</span> <span class="o">=</span> <span class="s">'America/Sao_Paulo'</span>
149+
<span class="n">TIMEZONE</span> <span class="o">=</span> <span class="s1">'America/Sao_Paulo'</span>
150150

151-
<span class="n">DEFAULT_LANG</span> <span class="o">=</span> <span class="s">u'pt'</span>
151+
<span class="n">DEFAULT_LANG</span> <span class="o">=</span> <span class="s1">u'pt'</span>
152152
</pre></div>
153153
</td></tr></table>
154154

feeds/arthur-alves.atom.xml.gz

5 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)