diff --git a/.gitignore b/.gitignore index c845b88..5a254f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ *.sw? .DS_Store -index.json *.pyc *.xml report.html diff --git a/_images/40-years-processor-trend.png b/_images/40-years-processor-trend.png new file mode 100644 index 0000000..dba70cc Binary files /dev/null and b/_images/40-years-processor-trend.png differ diff --git a/_images/ActivityPub-logo.svg b/_images/ActivityPub-logo.svg new file mode 100644 index 0000000..8a21262 --- /dev/null +++ b/_images/ActivityPub-logo.svg @@ -0,0 +1,328 @@ + + + + diff --git a/_images/ActivityPub-tutorial-image.png b/_images/ActivityPub-tutorial-image.png new file mode 100644 index 0000000..9c11210 Binary files /dev/null and b/_images/ActivityPub-tutorial-image.png differ diff --git a/_images/MIT_logo.svg b/_images/MIT_logo.svg new file mode 100644 index 0000000..89e0c5c --- /dev/null +++ b/_images/MIT_logo.svg @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/_images/Sorry-bout-that.gif b/_images/Sorry-bout-that.gif new file mode 100644 index 0000000..5fec08a Binary files /dev/null and b/_images/Sorry-bout-that.gif differ diff --git a/_images/activitypub-logo.png b/_images/activitypub-logo.png new file mode 100644 index 0000000..2de3a0c Binary files /dev/null and b/_images/activitypub-logo.png differ diff --git a/_images/agpl-logo.png b/_images/agpl-logo.png new file mode 100644 index 0000000..ccf0c2d Binary files /dev/null and b/_images/agpl-logo.png differ diff --git a/_images/all-eggs-broken.jpeg b/_images/all-eggs-broken.jpeg new file mode 100644 index 0000000..83150f2 Binary files /dev/null and b/_images/all-eggs-broken.jpeg differ diff --git a/_images/all-eggs.jpeg b/_images/all-eggs.jpeg new file mode 100644 index 0000000..4437cc4 Binary files /dev/null and b/_images/all-eggs.jpeg differ diff --git a/_images/apache-license-2.0.png b/_images/apache-license-2.0.png new file mode 100644 index 0000000..72bb492 Binary files /dev/null and b/_images/apache-license-2.0.png differ diff --git a/_images/apache-license.png b/_images/apache-license.png new file mode 100644 index 0000000..5b551c0 Binary files /dev/null and b/_images/apache-license.png differ diff --git a/_images/back-to-the-future.jpeg b/_images/back-to-the-future.jpeg new file mode 100644 index 0000000..cc38851 Binary files /dev/null and b/_images/back-to-the-future.jpeg differ diff --git a/_images/bar.png b/_images/bar.png new file mode 100644 index 0000000..60fcaa5 Binary files /dev/null and b/_images/bar.png differ diff --git a/_images/bsd.png b/_images/bsd.png new file mode 100644 index 0000000..c2ede19 Binary files /dev/null and b/_images/bsd.png differ diff --git a/_images/builds-character.png b/_images/builds-character.png new file mode 100644 index 0000000..99d25b7 Binary files /dev/null and b/_images/builds-character.png differ diff --git a/_images/chrysalis.jpeg b/_images/chrysalis.jpeg new file mode 100644 index 0000000..d3df35f Binary files /dev/null and b/_images/chrysalis.jpeg differ diff --git a/_images/community.jpg b/_images/community.jpg new file mode 100644 index 0000000..903c970 Binary files /dev/null and b/_images/community.jpg differ diff --git a/_images/consuela.jpeg b/_images/consuela.jpeg new file mode 100644 index 0000000..26d7a2f Binary files /dev/null and b/_images/consuela.jpeg differ diff --git a/_images/copyright.jpeg b/_images/copyright.jpeg new file mode 100644 index 0000000..2880ca4 Binary files /dev/null and b/_images/copyright.jpeg differ diff --git a/_images/datastream.png b/_images/datastream.png new file mode 100644 index 0000000..c56a2e0 Binary files /dev/null and b/_images/datastream.png differ diff --git a/_images/download-apple-google.png b/_images/download-apple-google.png new file mode 100644 index 0000000..f810192 Binary files /dev/null and b/_images/download-apple-google.png differ diff --git a/_images/email.png b/_images/email.png new file mode 100644 index 0000000..9c51b7a Binary files /dev/null and b/_images/email.png differ diff --git a/_images/fear.jpeg b/_images/fear.jpeg new file mode 100644 index 0000000..e879f00 Binary files /dev/null and b/_images/fear.jpeg differ diff --git a/_images/federation.png b/_images/federation.png new file mode 100644 index 0000000..0feafd9 Binary files /dev/null and b/_images/federation.png differ diff --git a/_images/flink-cluster1.png b/_images/flink-cluster1.png new file mode 100644 index 0000000..536d797 Binary files /dev/null and b/_images/flink-cluster1.png differ diff --git a/_images/flink-cluster2.png b/_images/flink-cluster2.png new file mode 100644 index 0000000..abcc5c1 Binary files /dev/null and b/_images/flink-cluster2.png differ diff --git a/_images/flink-cluster3.png b/_images/flink-cluster3.png new file mode 100644 index 0000000..058474f Binary files /dev/null and b/_images/flink-cluster3.png differ diff --git a/_images/flink1.png b/_images/flink1.png new file mode 100644 index 0000000..a57b46f Binary files /dev/null and b/_images/flink1.png differ diff --git a/_images/flink2.png b/_images/flink2.png new file mode 100644 index 0000000..7b18903 Binary files /dev/null and b/_images/flink2.png differ diff --git a/_images/flink3.png b/_images/flink3.png new file mode 100644 index 0000000..2a00650 Binary files /dev/null and b/_images/flink3.png differ diff --git a/_images/github-lgpl.png b/_images/github-lgpl.png new file mode 100644 index 0000000..5c11048 Binary files /dev/null and b/_images/github-lgpl.png differ diff --git a/_images/gpl-logo.png b/_images/gpl-logo.png new file mode 100644 index 0000000..167077f Binary files /dev/null and b/_images/gpl-logo.png differ diff --git a/_images/guido-no-bdfl.png b/_images/guido-no-bdfl.png new file mode 100644 index 0000000..662c89f Binary files /dev/null and b/_images/guido-no-bdfl.png differ diff --git a/_images/hacktoberfest.png b/_images/hacktoberfest.png new file mode 100644 index 0000000..8dd4641 Binary files /dev/null and b/_images/hacktoberfest.png differ diff --git a/_images/internet.jpeg b/_images/internet.jpeg new file mode 100644 index 0000000..4755512 Binary files /dev/null and b/_images/internet.jpeg differ diff --git a/_images/iplenix.png b/_images/iplenix.png new file mode 100644 index 0000000..54ceeac Binary files /dev/null and b/_images/iplenix.png differ diff --git a/_images/ipython-notebook.png b/_images/ipython-notebook.png new file mode 100644 index 0000000..0a992a4 Binary files /dev/null and b/_images/ipython-notebook.png differ diff --git a/_images/ipython.png b/_images/ipython.png new file mode 100644 index 0000000..9d98163 Binary files /dev/null and b/_images/ipython.png differ diff --git a/_images/isso-nao-prova-nada.png b/_images/isso-nao-prova-nada.png new file mode 100644 index 0000000..bdb8aa1 Binary files /dev/null and b/_images/isso-nao-prova-nada.png differ diff --git a/_images/jobmanager-1.png b/_images/jobmanager-1.png new file mode 100644 index 0000000..41243de Binary files /dev/null and b/_images/jobmanager-1.png differ diff --git a/_images/jupyter.jpeg b/_images/jupyter.jpeg new file mode 100644 index 0000000..9f41bd1 Binary files /dev/null and b/_images/jupyter.jpeg differ diff --git a/_images/lgpl-logo.png b/_images/lgpl-logo.png new file mode 100644 index 0000000..e1d66ad Binary files /dev/null and b/_images/lgpl-logo.png differ diff --git a/_images/motorbike.jpg b/_images/motorbike.jpg new file mode 100644 index 0000000..6f5b728 Binary files /dev/null and b/_images/motorbike.jpg differ diff --git a/_images/nope.gif b/_images/nope.gif new file mode 100644 index 0000000..13c5412 Binary files /dev/null and b/_images/nope.gif differ diff --git a/_images/oogway.jpeg b/_images/oogway.jpeg new file mode 100644 index 0000000..7ae84cf Binary files /dev/null and b/_images/oogway.jpeg differ diff --git a/_images/past.jpg b/_images/past.jpg new file mode 100644 index 0000000..b0d01d2 Binary files /dev/null and b/_images/past.jpg differ diff --git a/_images/patrick-license.jpeg b/_images/patrick-license.jpeg new file mode 100644 index 0000000..3d024f0 Binary files /dev/null and b/_images/patrick-license.jpeg differ diff --git a/_images/plan_visualizer.png b/_images/plan_visualizer.png new file mode 100644 index 0000000..85b8c55 Binary files /dev/null and b/_images/plan_visualizer.png differ diff --git a/_images/potato-farming-300x225.jpg b/_images/potato-farming-300x225.jpg new file mode 100644 index 0000000..7ab4454 Binary files /dev/null and b/_images/potato-farming-300x225.jpg differ diff --git a/_images/present.jpg b/_images/present.jpg new file mode 100644 index 0000000..3af0846 Binary files /dev/null and b/_images/present.jpg differ diff --git a/_images/processor-speed.png b/_images/processor-speed.png new file mode 100644 index 0000000..d73f596 Binary files /dev/null and b/_images/processor-speed.png differ diff --git a/_images/public-domain.png b/_images/public-domain.png new file mode 100644 index 0000000..7352dcb Binary files /dev/null and b/_images/public-domain.png differ diff --git a/_images/pycaxias.png b/_images/pycaxias.png new file mode 100644 index 0000000..46d5e86 Binary files /dev/null and b/_images/pycaxias.png differ diff --git a/_images/python-datascience.png b/_images/python-datascience.png new file mode 100644 index 0000000..efee2ef Binary files /dev/null and b/_images/python-datascience.png differ diff --git a/_images/python-usage.png b/_images/python-usage.png new file mode 100644 index 0000000..de848c9 Binary files /dev/null and b/_images/python-usage.png differ diff --git a/_images/python15.png b/_images/python15.png new file mode 100644 index 0000000..2cbf4f4 Binary files /dev/null and b/_images/python15.png differ diff --git a/_images/python27-clock.png b/_images/python27-clock.png new file mode 100644 index 0000000..b471e2e Binary files /dev/null and b/_images/python27-clock.png differ diff --git a/_images/rewind.png b/_images/rewind.png new file mode 100644 index 0000000..21c059a Binary files /dev/null and b/_images/rewind.png differ diff --git a/_images/rust-energy.png b/_images/rust-energy.png new file mode 100644 index 0000000..437af43 Binary files /dev/null and b/_images/rust-energy.png differ diff --git a/_images/rust-ferris.png b/_images/rust-ferris.png new file mode 100644 index 0000000..d553e74 Binary files /dev/null and b/_images/rust-ferris.png differ diff --git a/_images/rust-issues.png b/_images/rust-issues.png new file mode 100644 index 0000000..8d2109f Binary files /dev/null and b/_images/rust-issues.png differ diff --git a/_images/rust-memory.png b/_images/rust-memory.png new file mode 100644 index 0000000..1db55bc Binary files /dev/null and b/_images/rust-memory.png differ diff --git a/_images/rust-reference.png b/_images/rust-reference.png new file mode 100644 index 0000000..394b801 Binary files /dev/null and b/_images/rust-reference.png differ diff --git a/_images/rust.png b/_images/rust.png new file mode 100644 index 0000000..95257d5 Binary files /dev/null and b/_images/rust.png differ diff --git a/_images/rustlatam-asmjs.jpg b/_images/rustlatam-asmjs.jpg new file mode 100644 index 0000000..14faf4b Binary files /dev/null and b/_images/rustlatam-asmjs.jpg differ diff --git a/_images/rustlatam-async1.jpg b/_images/rustlatam-async1.jpg new file mode 100644 index 0000000..29af7c3 Binary files /dev/null and b/_images/rustlatam-async1.jpg differ diff --git a/_images/rustlatam-async2.jpg b/_images/rustlatam-async2.jpg new file mode 100644 index 0000000..df0990f Binary files /dev/null and b/_images/rustlatam-async2.jpg differ diff --git a/_images/rustlatam-defensive.png b/_images/rustlatam-defensive.png new file mode 100644 index 0000000..3c6c0e0 Binary files /dev/null and b/_images/rustlatam-defensive.png differ diff --git a/_images/rustlatam-openingkeynote1.png b/_images/rustlatam-openingkeynote1.png new file mode 100644 index 0000000..8f3b2cc Binary files /dev/null and b/_images/rustlatam-openingkeynote1.png differ diff --git a/_images/rustlatam-openingkeynote2.png b/_images/rustlatam-openingkeynote2.png new file mode 100644 index 0000000..de224d4 Binary files /dev/null and b/_images/rustlatam-openingkeynote2.png differ diff --git a/_images/rustlatam-openingkeynote3.png b/_images/rustlatam-openingkeynote3.png new file mode 100644 index 0000000..d9a7e95 Binary files /dev/null and b/_images/rustlatam-openingkeynote3.png differ diff --git a/_images/rustlatam-openingkeynote4.png b/_images/rustlatam-openingkeynote4.png new file mode 100644 index 0000000..2c833d5 Binary files /dev/null and b/_images/rustlatam-openingkeynote4.png differ diff --git a/_images/rustlatam-travel.png b/_images/rustlatam-travel.png new file mode 100644 index 0000000..f53a824 Binary files /dev/null and b/_images/rustlatam-travel.png differ diff --git a/_images/rustlatam.png b/_images/rustlatam.png new file mode 100644 index 0000000..3a1a454 Binary files /dev/null and b/_images/rustlatam.png differ diff --git a/_images/scikit.jpeg b/_images/scikit.jpeg new file mode 100644 index 0000000..61565a0 Binary files /dev/null and b/_images/scikit.jpeg differ diff --git a/_images/senta-que-la-vem-historia.gif b/_images/senta-que-la-vem-historia.gif new file mode 100644 index 0000000..7afa525 Binary files /dev/null and b/_images/senta-que-la-vem-historia.gif differ diff --git a/_images/several-song-filled-hours-later.jpg b/_images/several-song-filled-hours-later.jpg new file mode 100644 index 0000000..048330e Binary files /dev/null and b/_images/several-song-filled-hours-later.jpg differ diff --git a/_images/silo.jpeg b/_images/silo.jpeg new file mode 100644 index 0000000..095fb26 Binary files /dev/null and b/_images/silo.jpeg differ diff --git a/_images/socializing.jpeg b/_images/socializing.jpeg new file mode 100644 index 0000000..85b239d Binary files /dev/null and b/_images/socializing.jpeg differ diff --git a/_images/streamprocessing-read-ready.jpg b/_images/streamprocessing-read-ready.jpg new file mode 100644 index 0000000..1b6ceaa Binary files /dev/null and b/_images/streamprocessing-read-ready.jpg differ diff --git a/_images/tchelinux-2019.png b/_images/tchelinux-2019.png new file mode 100644 index 0000000..eed37c4 Binary files /dev/null and b/_images/tchelinux-2019.png differ diff --git a/_images/tchelinux-first.png b/_images/tchelinux-first.png new file mode 100644 index 0000000..d67485a Binary files /dev/null and b/_images/tchelinux-first.png differ diff --git a/_images/tchelinux-poa2019.jpg b/_images/tchelinux-poa2019.jpg new file mode 100644 index 0000000..e400a25 Binary files /dev/null and b/_images/tchelinux-poa2019.jpg differ diff --git a/_images/tchelinux.png b/_images/tchelinux.png new file mode 100644 index 0000000..e8813f5 Binary files /dev/null and b/_images/tchelinux.png differ diff --git a/_images/the-next-day.jpg b/_images/the-next-day.jpg new file mode 100644 index 0000000..bfa16aa Binary files /dev/null and b/_images/the-next-day.jpg differ diff --git a/_images/the-witch-is-dead.png b/_images/the-witch-is-dead.png new file mode 100644 index 0000000..aebb974 Binary files /dev/null and b/_images/the-witch-is-dead.png differ diff --git a/_images/tilefile.jpg b/_images/tilefile.jpg new file mode 100644 index 0000000..522d0c5 Binary files /dev/null and b/_images/tilefile.jpg differ diff --git a/_images/tweet-python2020.png b/_images/tweet-python2020.png new file mode 100644 index 0000000..3fa486d Binary files /dev/null and b/_images/tweet-python2020.png differ diff --git a/_images/xmpp.png b/_images/xmpp.png new file mode 100644 index 0000000..f39327c Binary files /dev/null and b/_images/xmpp.png differ diff --git a/activitypub.html b/activitypub.html new file mode 100644 index 0000000..b8fe3d4 --- /dev/null +++ b/activitypub.html @@ -0,0 +1,489 @@ + + +
+ + ++ content +
+Ian Cooper: "TDD, where did it all go wrong"
+ +Discussões como "qual a unidade a ser testada" é que geraram - coisas como BDD e ATDD (Acceptance Test-Driven Development).
++ Discussões como "qual a unidade a ser testada" é + que geraram coisas como BDD e ATDD (Acceptance + Test-Driven Development). +
+ +Reddit: Devo escrever testes para a validação interna do Django?
+ +... bom, talvez sim.
+Nossos testes End-to-End.
+
class Client:
def __init__(self, name):
self.name = name
@@ -286,7 +356,7 @@ class Client:
Coverage
Exemplo
-
+
def _multiple_names(name):
split_names = name.split(' ')
return len(split_names) > 1
@@ -306,7 +376,7 @@ class Client:
Coverage
Exemplo
-
+
import pytest
def test_single_name():
@@ -321,7 +391,7 @@ def test_multiple_name():
Coverage
Exemplo
-
+
def test_valid_name():
_validate_name('Julio Biason')
@@ -335,7 +405,7 @@ def test_invalid_name():
Coverage
Exemplo
-
+
def test_client_error():
with pytest.raises(Exception):
Client(name='Cher')
@@ -349,7 +419,7 @@ def test_client():
Coverage
Exemplo
-
+
$ pytest client.py
==== test session starts ====
rootdir: /home/jbiason/unitt, inifile:
@@ -365,7 +435,7 @@ client.py ......
Coverage
Exemplo
-
+
$ pytest --cov=client client.py
==== test session starts ====
plugins: cov-2.4.0
@@ -393,7 +463,7 @@ client.py 25 0 100%
Coverage
Exemplo
-
+
class Client:
def __init__(self, name):
self.name = name
@@ -404,7 +474,7 @@ class Client:
Coverage
Exemplo
-
+
==== FAILURES ====
____ test_client_error ____
@@ -422,7 +492,7 @@ client.py:37: Failed
Coverage
Exemplo
-
+
$ pytest client.py
==== test session starts ====
rootdir: /home/jbiason/unitt, inifile:
@@ -439,7 +509,7 @@ client.py ......
Coverage
Exemplo
-
+
$ pytest --cov=client client.py
==== test session starts ====
rootdir: /home/jbiason/unitt, inifile:
@@ -481,10 +551,10 @@ client.py 24 0 100%
- - @juliobiason
- - https://functional.cafe/@juliobiason
- - julio.biason@gmail.com
- - http://presentations.juliobiason.net
+ - Júlio Biason
+ - https://functional.cafe/@juliobiason
+ - julio.biason@pm.me
+ - https://presentations.juliobiason.me
diff --git a/flask-40mins.html b/flask-40mins.html
index 829c201..5dceff4 100644
--- a/flask-40mins.html
+++ b/flask-40mins.html
@@ -78,7 +78,7 @@
Júlio Biason
@juliobiason
julio.biason@gmail.com
- http://presentations.juliobiason.net
+ https://presentations.juliobiason.me
diff --git a/flink.html b/flink.html
new file mode 100644
index 0000000..4526f87
--- /dev/null
+++ b/flink.html
@@ -0,0 +1,285 @@
+
+
+
+
+
+ Flink
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/fonts/hack-bold-subset.woff b/fonts/hack-bold-subset.woff
new file mode 100644
index 0000000..a47c8aa
Binary files /dev/null and b/fonts/hack-bold-subset.woff differ
diff --git a/fonts/hack-bold-subset.woff2 b/fonts/hack-bold-subset.woff2
new file mode 100644
index 0000000..93d425e
Binary files /dev/null and b/fonts/hack-bold-subset.woff2 differ
diff --git a/fonts/hack-bold.woff b/fonts/hack-bold.woff
new file mode 100644
index 0000000..368b913
Binary files /dev/null and b/fonts/hack-bold.woff differ
diff --git a/fonts/hack-bold.woff2 b/fonts/hack-bold.woff2
new file mode 100644
index 0000000..1155477
Binary files /dev/null and b/fonts/hack-bold.woff2 differ
diff --git a/fonts/hack-bolditalic-subset.woff b/fonts/hack-bolditalic-subset.woff
new file mode 100644
index 0000000..0da4750
Binary files /dev/null and b/fonts/hack-bolditalic-subset.woff differ
diff --git a/fonts/hack-bolditalic-subset.woff2 b/fonts/hack-bolditalic-subset.woff2
new file mode 100644
index 0000000..236b7de
Binary files /dev/null and b/fonts/hack-bolditalic-subset.woff2 differ
diff --git a/fonts/hack-bolditalic.woff b/fonts/hack-bolditalic.woff
new file mode 100644
index 0000000..ce87fe2
Binary files /dev/null and b/fonts/hack-bolditalic.woff differ
diff --git a/fonts/hack-bolditalic.woff2 b/fonts/hack-bolditalic.woff2
new file mode 100644
index 0000000..46ff1c4
Binary files /dev/null and b/fonts/hack-bolditalic.woff2 differ
diff --git a/fonts/hack-italic-subset.woff b/fonts/hack-italic-subset.woff
new file mode 100644
index 0000000..1d1f511
Binary files /dev/null and b/fonts/hack-italic-subset.woff differ
diff --git a/fonts/hack-italic-subset.woff2 b/fonts/hack-italic-subset.woff2
new file mode 100644
index 0000000..b6f5fc9
Binary files /dev/null and b/fonts/hack-italic-subset.woff2 differ
diff --git a/fonts/hack-italic.woff b/fonts/hack-italic.woff
new file mode 100644
index 0000000..bd545e4
Binary files /dev/null and b/fonts/hack-italic.woff differ
diff --git a/fonts/hack-italic.woff2 b/fonts/hack-italic.woff2
new file mode 100644
index 0000000..1e7630c
Binary files /dev/null and b/fonts/hack-italic.woff2 differ
diff --git a/fonts/hack-regular-subset.woff b/fonts/hack-regular-subset.woff
new file mode 100644
index 0000000..85583a5
Binary files /dev/null and b/fonts/hack-regular-subset.woff differ
diff --git a/fonts/hack-regular-subset.woff2 b/fonts/hack-regular-subset.woff2
new file mode 100644
index 0000000..1e3abb9
Binary files /dev/null and b/fonts/hack-regular-subset.woff2 differ
diff --git a/fonts/hack-regular.woff b/fonts/hack-regular.woff
new file mode 100644
index 0000000..e835381
Binary files /dev/null and b/fonts/hack-regular.woff differ
diff --git a/fonts/hack-regular.woff2 b/fonts/hack-regular.woff2
new file mode 100644
index 0000000..524465c
Binary files /dev/null and b/fonts/hack-regular.woff2 differ
diff --git a/fugindo-com-python-2.html b/fugindo-com-python-2.html
index 249b7f1..de576a1 100644
--- a/fugindo-com-python-2.html
+++ b/fugindo-com-python-2.html
@@ -58,15 +58,15 @@
max-height: 90%;
}
- .semi-opaque {
- background-color: rgba(0, 0, 0, 0.7);
- color: #fff;
- text-shadow: 2px 2px #000;
- }
-
- .reveal h1 {
- font-size: 3em !important;
- }
+ .semi-opaque {
+ background-color: rgba(0, 0, 0, 0.8);
+ color: #fff;
+ text-shadow: 2px 2px #000;
+ }
+
+ .reveal h1 {
+ font-size: 3em !important;
+ }
@@ -86,10 +86,10 @@
+
- Júlio Biason
- - @juliobiason
- - https://functional.cafe/@juliobiason
- - julio.biason@gmail.com
- - http://presentations.juliobiason.net
+ - https://functional.cafe/@juliobiason
+ - https://t.me/juliobiason
+ - julio.biason@pm.me
+ - https://presentations.juliobiason.me
@@ -112,7 +112,7 @@
Solução
- """Randomize a "Run to the hills" phrase."""
+ """Randomize a "Run to the hills" phrase."""
from __future__ import print_function
@@ -178,7 +178,7 @@ if __name__ == "__main__":
Docstrings
-
+
"""Randomize a "Run to the hills" phrase."""
@@ -203,7 +203,7 @@ if __name__ == "__main__":
Módulos e imports
-
+
import random
from argparse import ArgumentParser
@@ -267,7 +267,7 @@ from argparse import ArgumentParser
Variáveis e tipos
-
+
CONSONANTS = ['f', 'j', 'c', 'l', 'n']
PASSPHRASE = '{}u{}am para as {}o{}i{}as'
@@ -292,13 +292,25 @@ PASSPHRASE = '{}u{}am para as {}o{}i{}as'
nós vamos estragar essa convenção.)
+
+
+ Variáveis e tipos (um pouco mais)
+
+
+ " ou '
: Strings
+ []
: Listas/arrays
+ {}
: Dicionários/mapas/objetos/arrays associativos
+ ()
: Tuplas
+ Set()
: Conjuntos (tipo lista, sem duplicações)
+
+
Funções
-
+
def print_phrase(consonants):
"""Print the phrase with the randomized consonants."""
@@ -328,7 +340,7 @@ def print_phrase(consonants):
Funções
-
+
def print_phrase(consonants, something_else):
@@ -341,7 +353,7 @@ def print_phrase(consonants, something_else):
Funcões
-
+
def soma(primeiro, segundo):
total = primeiro + segundo
return total
@@ -361,7 +373,7 @@ def soma(primeiro, segundo):
Funções
-
+
soma(1, 2)
@@ -374,7 +386,7 @@ soma(1, 2)
Funções
-
+
soma(primeiro=2, segundo=3)
@@ -387,7 +399,7 @@ soma(primeiro=2, segundo=3)
Funções
-
+
soma(segundo=3, primeiro=2)
@@ -404,11 +416,11 @@ soma(segundo=3, primeiro=2)
Funções
-
+
def soma(primeiro=0, segundo=0):
-
+
soma()
soma(1)
soma(segundo=3)
@@ -428,17 +440,17 @@ soma(segundo=3)
Pausa: Varargs
-
+
def soma(primeiro, segundo):
total = primeiro + segundo
return total
-
+
soma(1)
-
+
soma(1, 2, 3)
@@ -451,7 +463,7 @@ soma(1, 2, 3)
Pausa: Varargs
-
+
TypeError: soma() takes exactly 2 arguments (3 given)
@@ -464,7 +476,7 @@ TypeError: soma() takes exactly 2 arguments (3 given)
Pausa: Varargs
-
+
def soma(*valores):
@@ -479,16 +491,16 @@ def soma(*valores):
Pausa: Varargs
-
+
def soma(*valores):
print(valores)
-
+
soma(1, 2, 3, 4, 5)
-
+
[1, 2, 3, 4, 5]
@@ -496,7 +508,7 @@ soma(1, 2, 3, 4, 5)
Pausa: Varargs
-
+
def soma(inicial, segundo=0, *valores):
print(inicial)
print(segundo)
@@ -504,11 +516,11 @@ def soma(inicial, segundo=0, *valores):
-
+
soma(2)
-
+
2
0
[]
@@ -526,16 +538,16 @@ soma(2)
Pausa: Varargs
-
+
def soma(**valores):
print(valores)
-
+
soma(primeiro=1, segundo=2)
-
+
{'primeiro': 1, 'segundo': 2}
@@ -568,7 +580,7 @@ soma(primeiro=1, segundo=2)
Pausa: Varargs
-
+
params = [4, 4]
soma(*params)
@@ -594,7 +606,7 @@ soma(*params)
Pausa: Objetos
-
+
"isso é uma string"
@@ -606,7 +618,7 @@ soma(*params)
Pausa: Objetos
-
+
help("isso é uma string")
@@ -625,11 +637,11 @@ help("isso é uma string")
Pausa: Objetos
-
+
"isso é uma string".capitalize()
-
+
frase = "isso é uma string"
frase.capitalize()
@@ -640,7 +652,7 @@ frase.capitalize()
Welcome to Hell
-
+
print(PASSPHRASE.format(*consonants).capitalize())
@@ -680,11 +692,11 @@ frase.capitalize()
Welcome to Hell
-
+
'Bem vindo {}!'.format('Júlio')
-
+
Bem vindo Júlio!
@@ -697,12 +709,12 @@ Bem vindo Júlio!
Welcome to Hell
-
+
PASSPHRASE = '{}u{}am para as {}o{}i{}as'
PASSPHRASE.format('f', 'j', 'c', 'l', 'n')
-
+
'fujam para as colinas'
@@ -716,13 +728,13 @@ PASSPHRASE.format('f', 'j', 'c', 'l', 'n')
Welcome to... Hell
-
+
CONSONANTS = ['f', 'j', 'c', 'l', 'n']
PASSPHRASE = '{}u{}am para as {}o{}i{}as'
PASSPHRASE.format(*CONSONANTS)
-
+
'fujam para as colinas'
@@ -737,11 +749,11 @@ PASSPHRASE.format(*CONSONANTS)
Welcome to... Hell?
-
+
'fujam para as colinas'.capitalize()
-
+
Fujam para as colinas
@@ -756,7 +768,7 @@ Fujam para as colinas
Randomizações
-
+
def totally_random():
"""Run a totally random way."""
random.shuffle(CONSONANTS)
@@ -776,7 +788,7 @@ def totally_random():
Randomizações
-
+
def switch_two():
"""Run by changing two steps at a time."""
first = random.randint(0, 1)
@@ -801,7 +813,7 @@ def switch_two():
Welcome to hell, maybe?
-
+
CONSONANTS[second], CONSONANTS[first] = \
CONSONANTS[first], CONSONANTS[second]
@@ -810,7 +822,7 @@ def switch_two():
Welcome to Listas!
-
+
# CONSONANTS = ['f', 'j', 'c', 'l', 'n']
# second = random.randint(2, 4)
CONSONANTS[second]
@@ -836,7 +848,7 @@ CONSONANTS[second]
E pra criar uma tupla:
-
+
valor, valor
@@ -846,13 +858,13 @@ valor, valor
Welcome to Destructuring
-
+
primeiro, segundo = [1, 2]
print(primeiro)
print(segundo)
-
+
1
2
@@ -875,12 +887,12 @@ print(segundo)
Tudo junto, agora!
-
+
CONSONANTS[second], CONSONANTS[first] = \
CONSONANTS[first], CONSONANTS[second]
-
+
tmp = CONSONANTS[first]
CONSONANTS[first] = CONSONANTS[second]
CONSONANTS[second] = tmp
@@ -901,7 +913,7 @@ CONSONANTS[second] = tmp
O Pai de Todos Módulos
-
+
if __name__ == "__main__":
@@ -937,7 +949,7 @@ if __name__ == "__main__":
A linha de comando
-
+
args = ArgumentParser()
args.add_argument('-t', '--totally',
dest='type',
@@ -967,7 +979,7 @@ if __name__ == "__main__":
Funções são cidadãos de primeira classe
-
+
callbacks = {
'totally': totally_random,
'switch': switch_two
@@ -1010,6 +1022,46 @@ if __name__ == "__main__":
+
+
+ O que faltou?
+
+
+
+ List comprehensions
+
+
+numeros = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
+pares = [num
+ for num
+ in numeros
+ if num % 2 = 0]
+
+
+ Curiosidade: Strings são iteráveis como listas.
+
+
+
+ Generators
+
+
+numeros = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
+pares = (num
+ for num
+ in numeros
+ if num % 2 = 0)
+
+
+
+<generator object <genexpr> at 0x7f03ce4e67d0>
+
+
+
+
+ Laziness
+
+
+
Fulindo para as Cojinas com Python
@@ -1022,47 +1074,49 @@ if __name__ == "__main__":
+
+
+ - https://functional.cafe/@juliobiason
+ - https://t.me/juliobiason
+ - julio.biason@pm.me
+ - https://presentations.juliobiason.me
+
+
+
+
+
Perguntas?
+
+
+
+
+
+
+
+
+
-
-
- - @juliobiason
- - https://functional.cafe/@juliobiason
- - julio.biason@gmail.com
- - http://presentations.juliobiason.net
-
-
-
-
-
-
-
-
-
-
-
-
-