https://www.wolfram.com/events/virtual-conference-br/2020/

Analisando código em Wolfram Language

Warm up: Wolfram Language workshop
Daniel de Souza Carvalho
dcarvalho@wolfram.com
@danielscarvalho
Segunda-Feira, 9 de Novembro (GMT -3)09:30–12:00 Me. Daniel Carvalho (em Portugues do Brasil) no Zoom

Entre no Chat Session do evento

Conectar no chat pelo Mathematica, menu File, New, Chat Session buscar por brconf2020 no campo new contacts...
​
Útil para trabalho em equipe e para o hackathon​
​
Para saber mais sobre Chat Session: https://reference.wolfram.com/language/workflowguide/UsingChat.html​
​
​

De quem é esta criança??

In[]:=
domCasmurroText=Import["https://archive.org/stream/DomCasmurro/Dom+Casmurro_djvu.txt"];
In[]:=
WordCloud[domCasmurroText]
Out[]=
In[]:=
SmoothHistogram[Legended[First/@StringPosition[domCasmurroText,#],#]&/@{"Capitu","Bentinho","Escobar"},FillingAxis]
Out[]=
Capitu
Bentinho
Escobar
In[]:=
{RandomInteger[10,10],RandomInteger[10,10]}*1/2//MatrixForm​​SmoothHistogram[%,FillingAxis]
Out[]//MatrixForm=
7
2
5
2
2
7
2
9
2
9
2
1
5
2
5
2
0
1
2
1
2
3
2
1
2
2
9
2
1
2
2
7
2
Out[]=
In[]:=
SmoothHistogram[{RandomInteger[10,100],RandomInteger[10,100]},FillingAxis]
Out[]=
Interface Wolfram Notebook - v1 - Mathematica - 1988
In[]:=
Map[F,Range[10]]
Out[]=
{F[1],F[2],F[3],F[4],F[5],F[6],F[7],F[8],F[9],F[10]}
In[]:=
F/@Range[10]
Out[]=
{F[1],F[2],F[3],F[4],F[5],F[6],F[7],F[8],F[9],F[10]}
In[]:=
Map[#*2&,Range[10]]
Out[]=
{2,4,6,8,10,12,14,16,18,20}
In[]:=
#*2&/@Range[10]
Out[]=
{2,4,6,8,10,12,14,16,18,20}
In[]:=
StringPosition["abXYZaaabXYZaaaaXYZXYZ","XYZa"]
Out[]=
{{3,6},{10,13}}
In[]:=
MatrixForm[StringPosition["abXYZaaabXYZaaaaXYZXYZ","XYZa"]]
Out[]//MatrixForm=

3
6
10
13

In[]:=
StringPosition["abXYZaaabXYZaaaaXYZXYZ","XYZa"]*2//MatrixForm
Out[]//MatrixForm=

6
12
20
26

In[]:=
Range[10]//Total
Out[]=
55
In[]:=
Total[Range[10]]
Out[]=
55
In[]:=
First/@StringPosition["abXYZaaabXYZaaaaXYZXYZ","XYZa"]
Out[]=
{3,10}
In[]:=
First[Range[10]]
Out[]=
1
In[]:=
Last[Range[10]]
Out[]=
10
In[]:=
Rest[Range[10]]
Out[]=
{2,3,4,5,6,7,8,9,10}
In[]:=
StringPosition[domCasmurroText,"Bentinho"]
Out[]=
{{8470,8477},{8944,8951},{9191,9198},{9537,9544},{10336,10343},{42784,42791},{71941,71948},{74510,74517},{77648,77655},{80616,80623},{83914,83921},{87631,87638},{93652,93659},{104508,104515},{113792,113799},{118581,118588},{123845,123852},{124439,124446},{124549,124556},{124779,124786},{125475,125482},{130152,130159},{135582,135589},{139944,139951},{143745,143752},{150860,150867},{177717,177724},{188243,188250},{189654,189661},{193005,193012},{195858,195865},{203617,203624},{212283,212290},{232122,232129},{232136,232143},{232435,232442},{238058,238065},{238945,238952},{258450,258457},{259144,259151},{259338,259345},{260904,260911},{261836,261843},{262900,262907},{268945,268952},{269690,269697},{270282,270289},{271214,271221},{273215,273222},{276680,276687},{322263,322270},{354534,354541},{354845,354852},{360709,360716},{363368,363375}}
https://www.gutenberg.org/

"One-Liner Competition" casos

Programa em Wolfram Langue com até 180 caracteres
Dia das bruxas:
Média da idade:
Gráfico 3D:

Images & IA

Demonstration: "Counting Objects in Images"

Visualização: CrossRecurrencePlot

http://www.recurrence-plot.tk/

Applying the Smith-Waterman Similarity to Cellular Automata

Twitter #100DaysOfCode

https://twitter.com/search?q=%40 danielscarvalho %20 %23100 DaysOfCode&src=typed_query
Ctrl + =

Image APIs

Lest have some fun!!
Test your models with crazy data!!
​
Nicolas Cage API: https://www.placecage.com/
​
Calm: https://www.placecage.com/200/300
Gray: https://www.placecage.com/g/200/300
Crazy: https://www.placecage.com/c/200/300
GIF: https://www.placecage.com/gif/200/300
Cage Collage: a collage of your preferred star!!
​
Steven Segall API:
​
Calm: https://stevensegallery.com/200/300
Gray: https://stevensegallery.com/g/200/300
And the ultimate WEB API!!!
​
​CAT as a service!!!
​​
​https://cataas.com/
Lista de WEB APIs públicas: https://github.com/public-apis/public-apis​
​
Tem API para tudo na Internet!!

Publicando uma API no Wolfram Cloud

Bill Murray API:
​
Calm: https://fillmurray.com/200/300
Gray: https://fillmurray.com/g/200/300
​
Create a new instant API:​
​
You should add to the URL a query parameter with a famous person name
​
?query=Madonna
?query=Bill+Murray
?query=Bill+Gates
​
Consuming the WEB API:

Onde aprender mais?

Wolfram U:
​https://www.wolfram.com/wolfram-u/​
​
An Elementary Introduction to the Wolfram Language:
​https://www.wolfram.com/language/elementary-introduction/2nd-ed/
Documentação:
​https://reference.wolfram.com/language/
Fast Introduction for Programmers:
​https://www.wolfram.com/language/fast-introduction-for-programmers/en/