tag:blogger.com,1999:blog-47172698724575035302024-03-13T10:39:33.776-04:00Raspberry Pi Python AdventuresFrancois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.comBlogger251125tag:blogger.com,1999:blog-4717269872457503530.post-4206375897502853552020-08-26T13:26:00.001-04:002020-08-26T13:28:37.197-04:00Jupyter: JUlia PYThon and R<p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9zAv-sKSVmOQocFsuqazokyKCPRFbVzMROIxd6PLEumrm6W_OAejw0gWk9MiQSH0V7M_pQGcj2lj38vGJJBcL4OAiidpWB8TSBy37xHgbcnoXzMbQETpdfl2cTRHZO0x_JO2UphoJhWY/s2048/IMG_20200819_2227585.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1365" data-original-width="2048" height="342" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9zAv-sKSVmOQocFsuqazokyKCPRFbVzMROIxd6PLEumrm6W_OAejw0gWk9MiQSH0V7M_pQGcj2lj38vGJJBcL4OAiidpWB8TSBy37xHgbcnoXzMbQETpdfl2cTRHZO0x_JO2UphoJhWY/w512-h342/IMG_20200819_2227585.jpg" width="512" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">it's "ggplot2", not "ggplot", but it is ggplot()<br /></td></tr></tbody></table><br /> <p></p><p>Did you know that <a href="https://twitter.com/ProjectJupyter">@projectJupyter</a>'s Jupyter Notebook (and JupyterLab) name came from combining 3 programming languages: <span style="color: red;">JU</span>lia, <span style="color: red;">PYT</span>hon and <span style="color: red;">R</span>.</p><p>Readers of my blog do not need an introduction to Python. But what about the other 2? <b> </b></p><p><b>Today we will talk about R. Actually, R <i>and</i> Python, on the Raspberry Pi.</b><br /></p><h2 style="text-align: left;">R Origin</h2><p>R traces its origins to the S statistical programming language, developed in the 1970s at Bell Labs by John M. Chambers. He is also the author of books such as Computational Methods for Data Analysis (1977) and <a href="https://archive.org/details/graphicalmethods00cham_0">Graphical Methods for Data Analysis</a> (1983). R is an open source implementation of that statistical language. It is compatible with S but also has enhancements over the original.</p><p> </p><p>A quick getting started guide is available here: <a href="https://support.rstudio.com/hc/en-us/sections/200271437-Getting-Started">https://support.rstudio.com/hc/en-us/sections/200271437-Getting-Started</a></p><p> <br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhctQjuLQkJuMwp1rAqywotpVWpDwJlSdZq7zBXIRl14qxuPRKPSYEHehc2zn4K0v-a9Wte4UIZI-YevjXIaZ8VyW0w4ZNq2L06NywRZRMrD5_qxjk9Qq6LWWmKia51T1V4EOghMKPvRQs/s1920/R_logo.svg.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1488" data-original-width="1920" height="397" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhctQjuLQkJuMwp1rAqywotpVWpDwJlSdZq7zBXIRl14qxuPRKPSYEHehc2zn4K0v-a9Wte4UIZI-YevjXIaZ8VyW0w4ZNq2L06NywRZRMrD5_qxjk9Qq6LWWmKia51T1V4EOghMKPvRQs/w512-h397/R_logo.svg.png" width="512" /></a></div><br /><p><br /></p><h2 style="text-align: left;">Installing Python</h2><p>As a recap, in case you don't have Python 3 and a few basic modules, the installation goes as follow (open a terminal window first):</p><p><br /></p><p><span style="background-color: #cccccc;"><span style="font-family: courier;"><span style="color: #2b00fe;">pi@raspberrypi: $</span> sudo apt install python3 python3-dev build-essential</span></span></p><p><span style="background-color: #cccccc;"><span style="font-family: courier;"><span style="background-color: #cccccc;"><span style="font-family: courier;"><span style="color: #2b00fe;">pi@raspberrypi: $</span> sudo pip3 install jedi pandas numpy</span></span><br /></span></span></p><p><span style="background-color: #cccccc;"><span style="font-family: courier;"><br /></span></span></p><h2 style="text-align: left;">Installing R</h2><p style="text-align: left;">Installing R is equally easy:</p><p style="text-align: left;"><span style="font-family: courier;"><span style="color: #2b00fe;"> </span></span></p><p style="text-align: left;"><span style="background-color: #cccccc;"><span style="font-family: courier;"><span style="color: #2b00fe;">pi@raspberrypi: $</span> sudo apt install r-recommended</span></span></p><p style="text-align: left;"> </p><p style="text-align: left;">We also need to install a few development packages:</p><p style="text-align: left;"><br /><span style="background-color: #cccccc;"><span style="font-family: courier;"><span style="font-family: courier;"><span style="color: #2b00fe;">pi@raspberrypi: $</span> sudo apt install libffi-dev libcurl4-openssl-dev libxml2-dev</span></span></span></p><p style="text-align: left;"><span style="font-family: courier;"><span style="font-family: courier;"><br /></span></span></p><div style="text-align: left;"><p style="text-align: left;">This will allow us to install many packages in R. Now that R is installed, we can start it:</p><p style="text-align: left;"><br /><span style="font-family: courier;"><span style="font-family: courier;"><span style="background-color: #cccccc;"><span style="font-family: courier;"><span style="font-family: courier;"><span style="color: #2b00fe;">pi@raspberrypi: $</span> R</span></span></span></span></span></p><h2 style="text-align: left;">Installing packages<span style="font-family: courier;"><span style="font-family: courier;"><br /></span></span></h2><p style="text-align: left;">Once inside R, we can install packages using install.packages('name') where name is the name of the package. For example, to install <span style="font-family: courier;">ggplot2</span> (to install <span style="font-family: courier;">tidyverse</span>, simply replace <span style="font-family: courier;">ggplot2</span> with <span style="font-family: courier;">tidyverse</span>):</p><p style="text-align: left;"><span style="font-family: courier;"><span style="font-family: courier;"><span style="background-color: #444444;"><span style="color: #04ff00;">> install.packages('ggplot2')</span></span><br /></span></span></p><br />To load it:<p style="text-align: left;"><br /><span style="font-family: courier;"><span style="font-family: courier;"><span style="font-family: courier;"><span style="font-family: courier;"><span style="background-color: #444444;"><span style="color: #04ff00;">> library(<span style="color: white;">ggplot2</span>)<br /></span></span></span></span></span></span></p><p style="text-align: left;">And we can now use it. We will use the mpg dataset and plot displacement vs highway miles per gallon and set the color to:</p><p style="text-align: left;"><span style="font-family: courier;"><span style="font-family: courier;"><span style="font-family: courier;"><span style="font-family: courier;"><span style="background-color: #444444;"><span style="color: #04ff00;">>ggplot(mpg, aes(displ, hwy, colour=class))+</span></span></span></span></span></span></p><p style="text-align: left;"><span style="font-family: courier;"><span style="font-family: courier;"><span style="font-family: courier;"><span style="font-family: courier;"><span style="background-color: #444444;"><span style="color: #04ff00;"> geom_point()</span></span></span></span></span></span></p><p style="text-align: left;"><span style="font-family: courier;"><span style="font-family: courier;"><span style="font-family: courier;"><span style="font-family: courier;"><span style="background-color: #444444;"></span></span></span></span></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWzM4QmKmPmkN8xusf6cu4kSju9OJ6Z-WsEnQKOVW1CRMVXNg-3G81BjyANtwH69RcI425ktDbBZgWD_Z3RzQsfKUWUnFdtSY4tke7Yz7m85IuMVJddzlTS2hwTTXJKDxPFr5kIeBFoYU/s672/mpg.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="671" data-original-width="672" height="511" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWzM4QmKmPmkN8xusf6cu4kSju9OJ6Z-WsEnQKOVW1CRMVXNg-3G81BjyANtwH69RcI425ktDbBZgWD_Z3RzQsfKUWUnFdtSY4tke7Yz7m85IuMVJddzlTS2hwTTXJKDxPFr5kIeBFoYU/w512-h511/mpg.png" width="512" /></a></div><br /><span style="color: #04ff00;"><br /></span><p></p><h2 style="text-align: left;">Combining R and Python</h2><p style="text-align: left;">We can go at this 2 ways, from Python call R, or from R call Python. Here, from R we will call Python.</p><p style="text-align: left;">First, we need to install reticulate (the package that interfaces with Python):<br /></p><p style="text-align: left;"><span style="font-family: courier;"><span style="font-family: courier;"><span style="background-color: #444444;"><span style="color: #04ff00;">> install.packages('reticulate')</span></span></span></span></p><p style="text-align: left;">And load it:</p><p style="text-align: left;"><span style="font-family: courier;"><span style="color: #04ff00;"><span style="background-color: black;">> library(reticulate)</span></span></span> <br /></p><p style="text-align: left;">We can verify which python binary that reticulate is using:</p><p style="text-align: left;"><span style="font-family: courier;"><span style="background-color: #444444;"><span style="color: #04ff00;">> py_config()</span></span></span><br /></p><p style="text-align: left;"> Then we can use it to execute some python code. For example, to import the os module and use os.listdir(), from R we do (<i>$ works a bit in a similar fashion to Python's .</i>):<br /></p><span style="background-color: black;"><span style="color: #04ff00;"><span style="font-family: courier;">> os <- import("os") </span></span></span></div><div style="text-align: left;"><span style="font-family: courier;"><span style="background-color: black;"><span style="color: #04ff00;">> os$listdir(".")</span></span><br /></span><p style="text-align: left;"><span style="font-family: courier;"><span style="background-color: #444444;"><span style="color: #04ff00;"></span></span></span></p><p style="text-align: left;">Or even enter a Python REPL:</p><p style="text-align: left;"><span style="background-color: black;"><span style="color: #04ff00;"><span style="font-family: courier;">> repl_python()<br />>>> import pandas as pd</span></span></span></p><p style="text-align: left;"><span style="background-color: black;"><span style="color: #04ff00;"><span style="font-family: courier;">>>><br /></span></span></span></p><p style="text-align: left;"><br /></p><p style="text-align: left;">Type exit to leave the Python REPL.</p><h2 style="text-align: left;">One more trick: Radian</h2><p style="text-align: left;">we will now exit R (<span style="background-color: black;"><span style="color: #04ff00;"><span style="font-family: courier;">quit()</span></span></span>) and install <a href="https://pypi.org/project/radian/">radian</a>, a command line REPL for R that is fully aware of the reticulate and Python integration:</p><p style="text-align: left;"><span style="background-color: #cccccc;"><span style="font-family: courier;"><span style="background-color: #cccccc;"><span style="font-family: courier;"><span style="color: #2b00fe;">pi@raspberrypi: $</span> sudo pip3 install radian</span></span></span></span></p><p style="text-align: left;"><br /><span style="background-color: #cccccc;"><span style="font-family: courier;"><span style="background-color: #cccccc;"><span style="font-family: courier;"><span style="background-color: #cccccc;"><span style="font-family: courier;"><span style="background-color: #cccccc;"><span style="font-family: courier;"><span style="color: #2b00fe;">pi@raspberrypi: $</span> radian</span></span></span></span></span></span></span></span></p><p style="text-align: left;">This is just like the R REPL, only better. And you can switch to python very quickly by typing ~:</p><p style="text-align: left;"><span style="background-color: black;"><span style="color: #04ff00;"><span style="font-family: courier;">r$> ~</span></span></span></p><p style="text-align: left;">As soon as the ~ is typed, radian enters the python mode by itself: <br /></p><p style="text-align: left;"><span style="background-color: black;"><span style="color: #04ff00;"><span style="font-family: courier;">r$> reticulate::repl_python()</span></span></span></p><p style="text-align: left;"><span style="background-color: black;"><span style="color: #04ff00;"><span style="font-family: courier;">>>> </span></span></span></p><p style="text-align: left;">Hitting backspace at the beginning of the line switches back to the R REPL:</p><p style="text-align: left;"><span style="background-color: black;"><span style="color: #04ff00;"><span style="font-family: courier;">r$> </span></span></span><br /></p><p style="text-align: left;"><br /></p><p style="text-align: left;">I'll cover more functionality in a future post.</p><p style="text-align: left;"><br /></p><div style="font-family: "helvetica"; font-stretch: normal; line-height: normal;">
Francois Dion</div>
<div style="font-family: "helvetica"; font-stretch: normal; line-height: normal;">
<a href="https://mobile.twitter.com/f_dion">@f_dion</a></div></div>Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com0tag:blogger.com,1999:blog-4717269872457503530.post-55846243945157799872020-05-03T09:58:00.005-04:002020-06-22T09:26:24.425-04:00The Democratization of Computer Vision<div style="font-family: Helvetica; font-size: 12px; font-stretch: normal; line-height: normal;">
<span style="font-size: 12pt;">The Raspberry Pi foundation does it again. There is both a new guide and some new hardware that will create a big impact for students and for academia and businesses.</span></div>
<div style="font-family: Helvetica; font-size: 12px; font-stretch: normal; line-height: normal;">
<br />
<br /></div>
<div style="font-family: Helvetica; font-size: 12px; font-stretch: normal; line-height: normal;">
<span style="font-size: 12pt;">See the details on the Dion Research Blog, The Democratization of Computer Vision</span></div>
<div style="font-family: Helvetica; font-size: 12px; font-stretch: normal; line-height: normal;">
<span style="font-size: 12pt;"><br /></span></div>
<div style="font-family: Helvetica; font-size: 12px; font-stretch: normal; line-height: normal;">
<a href="https://blog.dionresearch.com/2020/04/democratization-of-computer-vision.html">https://blog.dionresearch.com/2020/04/democratization-of-computer-vision.html</a></div>
<div style="font-family: Helvetica; font-size: 12px; font-stretch: normal; line-height: normal;">
<span style="font-size: 12pt;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb6EiuIg6imkr6fqMHtBJPdLVzxcyilVcB3zUMrDZKglUNS2-lMLocv_ByKCJVehkqqV6EOfMoeHY6B08IdkHt7v3Lf0EIsiqAlY93V896mJZ7JjizZbBVRG9JRV_0H8BFDAjEZUvGFKE/s1600/5CD48C90-3D0B-477D-817B-F7A9C0B5C1E2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="320" data-original-width="244" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb6EiuIg6imkr6fqMHtBJPdLVzxcyilVcB3zUMrDZKglUNS2-lMLocv_ByKCJVehkqqV6EOfMoeHY6B08IdkHt7v3Lf0EIsiqAlY93V896mJZ7JjizZbBVRG9JRV_0H8BFDAjEZUvGFKE/s1600/5CD48C90-3D0B-477D-817B-F7A9C0B5C1E2.png" /></a></div>
<div style="font-family: Helvetica; font-size: 12px; font-stretch: normal; line-height: normal;">
<span style="font-size: 12pt;"><br /></span></div>
<div style="font-family: Helvetica; font-size: 12px; font-stretch: normal; line-height: normal;">
<span style="font-size: 12pt;"><br /></span></div>
<div style="font-family: Helvetica; font-stretch: normal; line-height: normal;">
Francois Dion</div>
<div style="font-family: Helvetica; font-stretch: normal; line-height: normal;">
<a href="https://mobile.twitter.com/f_dion">@f_dion</a></div>
Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com0tag:blogger.com,1999:blog-4717269872457503530.post-59622735951734433152018-03-11T21:56:00.003-04:002018-03-11T21:56:53.528-04:00Are you smarter than a fifth grader?<div class="reader-article-content">
<blockquote>
<blockquote class="tr_bq">
"the editorial principle that nothing should be given both graphically
and in tabular form has to become unacceptable" - John W. Tukey
</blockquote>
</blockquote>
<h2>
Back to school</h2>
In the United States, most fifth grade students are learning about a
fairly powerful type of visualization of data. In some states, it starts
at an even younger age, in the 4th grade. As classwork and homework,
they will produce many of these plots:<br />
<br />
<div class="slate-resizable-image-embed slate-image-embed__resize-full-width">
<img data-li-src="https://media.licdn.com/dms/image/C4D12AQEM0Lp8AaklVg/article-inline_image-shrink_1500_2232/0?e=2120018400&v=alpha&t=mskQsE3lYJM_wH85XPnNt7VtxEU5WrcVmGlTkKWMjoQ" data-media-urn="urn:li:digitalmediaAsset:C4D12AQEM0Lp8AaklVg" height="206" src="https://media.licdn.com/dms/image/C4D12AQEM0Lp8AaklVg/article-inline_image-shrink_1500_2232/0?e=2120018400&v=alpha&t=mskQsE3lYJM_wH85XPnNt7VtxEU5WrcVmGlTkKWMjoQ" width="400" />
</div>
<br />
They are called stem-and-leaf displays, or stem-and-leaf plots. The
left side of the vertical bar is the stem, and the right side, the
leaves. The key or scale is important as it indicates the multiplier.
The top row in the image above has a stem of 2 and leaves 0,6 and 7,
representing 20, 26 and 27. Invented by John W. Tukey in the 1970's (see
the statistics section of <a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-ii-model-francois-dion/?lipi=urn%3Ali%3Apage%3Ad_flagship3_pulse_read%3BWkTepRJUQMmAUSm3vXizBQ%3D%3D" target="_blank">part II</a> and the classics section of <a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-v-visualization-francois-dion/?lipi=urn%3Ali%3Apage%3Ad_flagship3_pulse_read%3BWkTepRJUQMmAUSm3vXizBQ%3D%3D" target="_blank">part V</a>
of my "ex-libris" series), few people use them once they leave school.
Doing stem-and-leaf plots by hand is not the most entertaining thing to
do. The original plot was also limited to handling small data sets. But
there is a variation on the original display that gets around these
limitations.<br />
<br />
<h2>
"Data! Data! Data!"</h2>
Powerful? Why did I say that in the first paragraph?<br />
<br />
And why should stem-and-leaf plots be of interest to students,
teachers, analysts, data scientists, auditors, statisticians,
economists, managers and other people teaching, learning or working with
data? There are a few reasons, with the two most important being:<br />
<ul>
<li>they represent not only the overall distribution of data, but the individual data points themselves (or a close approximation)</li>
<li>They can be <strong>more useful than histograms</strong> as data size increases, particularly on long tailed distributions </li>
</ul>
<h2>
</h2>
<h2>
An example with annual salaries</h2>
We will look at a data set of the salaries for government employees
in Texas (over 690,000 values, from an August 2016 snapshot of the data
from the <a href="https://salaries.texastribune.org/" rel="nofollow noopener" target="_blank">Texas Tribune Salary Explorer</a>).
From this we create a histogram, one of the most popular plot for
looking at distributions. As can be seen, we can't really tell any
detail (left is Python Pandas <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.plot.hist.html?highlight=hist#pandas.DataFrame.plot.hist" rel="nofollow noopener" target="_blank">hist</a>, right is R <a href="https://www.rdocumentation.org/packages/graphics/versions/3.4.3/topics/hist" rel="nofollow noopener" target="_blank">hist</a>):<br />
<br />
<div class="slate-resizable-image-embed slate-image-embed__resize-full-width">
<img data-li-src="https://media.licdn.com/dms/image/C4D12AQF9X81HcgwYPw/article-inline_image-shrink_1000_1488/0?e=2120018400&v=alpha&t=tj5LKcPXJOABIEUkavS3VlVwDSDy_9A1z0vMmY8plrQ" data-media-urn="urn:li:digitalmediaAsset:C4D12AQF9X81HcgwYPw" height="193" src="https://media.licdn.com/dms/image/C4D12AQF9X81HcgwYPw/article-inline_image-shrink_1000_1488/0?e=2120018400&v=alpha&t=tj5LKcPXJOABIEUkavS3VlVwDSDy_9A1z0vMmY8plrQ" width="400" />
</div>
<br />
It really doesn't matter the language or software package used, we
get one very large bar with almost all the observations, and perhaps (as
in R or seaborn), a second tiny bar next to it. A box plot (another
plot popularized by John Tukey) would have been a bit more useful here
adding some "outliers" dots. And, how about a stem-and-leaf plot? We are
not going to sort and draw something by hand with close to 700,000
values...<br />
<br />
Fortunately, I've built a package (<em>python modules plus a command line tool</em>) that handles stem-and-leaf plots at that scale (and much, much larger). It is available from <a href="http://stemgraphic.org/" rel="nofollow noopener" target="_blank">http://stemgraphic.org</a> and also from <a href="https://github.com/fdion/stemgraphic/" rel="nofollow noopener" target="_blank">github</a> (the code has been available as open source since 2016) and pypi (pip install stemgraphic).<br />
So how does it look for the same data set?<br />
<br />
<div class="slate-resizable-image-embed slate-image-embed__resize-full-width">
<img data-li-src="https://media.licdn.com/dms/image/C4D12AQGnHttklIc3zA/article-inline_image-shrink_1500_2232/0?e=2120018400&v=alpha&t=HhTjOxkL19d7nbe0X1QMTC2QAF0Cs0Ld-2MCzJCrzKo" data-media-urn="urn:li:digitalmediaAsset:C4D12AQGnHttklIc3zA" height="472" src="https://media.licdn.com/dms/image/C4D12AQGnHttklIc3zA/article-inline_image-shrink_1500_2232/0?e=2120018400&v=alpha&t=HhTjOxkL19d7nbe0X1QMTC2QAF0Cs0Ld-2MCzJCrzKo" width="640" />
</div>
<br />
Now we can see a lot of detail. Scale was automatically found to be
optimal as 10000, with consecutive stems ranging from 0 to 35 (350000).
We can read numbers directly, without having to refer to a color coded
legend or other similar approach. At the bottom, we see a value of 0.00 (<em>who works and is considered employed for $0 annual income? apparently, quite a few in this data set</em>), and a maximum of $5,266,667.00 (<em>hint, sports related</em>),
we see a median of about $42K and we see multiple classes of employees,
ranging from non managerial, to middle management, upper management and
beyond ($350,000+). We've limited the display here to 500 observations,
and that is what the aggregate count on the leftmost column tells us.
Notice also how we have a convenient sub-binning going on, allowing us
to see which $1000 ranges are more common. All this from one simple
display. And of course we can further trim, zoom, filter or limit what
data or slice of data we want to inspect.<br />
<br />
Knowing your data (particularly at scale) is a fundamental first step
to turning it into insight. Here, we were able to know our data a lot
better by simply using the function stem_graphic() instead of hist() (<em>or use the included stem command line tool - compatible with Windows, Mac OS and Linux</em>).<br />
<h2>
Tune in next episode...</h2>
Customers already using my software products for data governance,
anomaly detection and data quality are already familiar with it. Many
other companies, universities and individuals are using <a href="http://stemgraphic.org/" rel="nofollow noopener" target="_blank">stemgraphic</a>
in one way or another. For everybody else, hopefully this has raised
your interest, you'll master this visualization in no time, and you'll
be able to answer the title question affirmatively...<br />
<br />
Stemgraphic has another dozen types of visualizations, including some interactive and beyond <strong>numbers,</strong> adding support for <strong>categorical data</strong> and for <strong>text </strong>(as of version 0.5.x). In the following months I'll talk a bit more about a few of them.<br />
<br />
<br />
Francois Dion <br />
<a href="http://www.twitter.com/f_dion" rel="nofollow noopener" target="_blank">@f_dion</a><br />
<br />
N.B. This article was originally published on LinkedIn at:<br />
<br />
<a href="https://www.linkedin.com/pulse/you-smarter-than-fifth-grader-francois-dion/">https://www.linkedin.com/pulse/you-smarter-than-fifth-grader-francois-dion/</a> </div>
Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com0tag:blogger.com,1999:blog-4717269872457503530.post-90032512724373275462018-02-27T22:16:00.001-05:002018-02-28T22:16:15.285-05:00Stemgraphic v.0.5.x: stem-and-leaf EDA and visualization for numbers, categoricals and text <br />
<h2>
Stemgraphic open source</h2>
<br />
In 2016 at PyDataCarolinas, I open-sourced my stem-and-leaf toolkit for exploratory data analysis and visualization. Later, in October 2016 I had posted <a href="https://raspberry-python.blogspot.com/2016/10/stemgraphic-new-visualization-tool.html">the link to the video</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsB8ovPaGz3EYfLto_ndltjsJLwi2pTJidWytB_-v696zXETo4PqwGV9OwkizIpz8uSfcSsKNzf5YE1jZLB-s-axPyHgdvck5culaPpq2YhQlTb7raMiJZ1MZgq3DgoABHcfEvdB0avYc/s1600/test_alias_hist.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="801" data-original-width="700" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsB8ovPaGz3EYfLto_ndltjsJLwi2pTJidWytB_-v696zXETo4PqwGV9OwkizIpz8uSfcSsKNzf5YE1jZLB-s-axPyHgdvck5culaPpq2YhQlTb7raMiJZ1MZgq3DgoABHcfEvdB0avYc/s320/test_alias_hist.png" width="279" /></a></div>
<br />
<h2>
Stemgraphic.alpha</h2>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLRIpbO8CdCVIwzqUAzn7e5kDIyzAqCr7-N5GSDWpQ2awMx-sLU1X_pYnDIcNY-lNjV4VOmT4faVXFrBeIgyZmZm0OIt0svKJdEy6RNEpUHd9HJXPJi21bmvqSIqwPPt5KeNr2tt4Dq4o/s1600/stemgraphic.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="419" data-original-width="919" height="181" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLRIpbO8CdCVIwzqUAzn7e5kDIyzAqCr7-N5GSDWpQ2awMx-sLU1X_pYnDIcNY-lNjV4VOmT4faVXFrBeIgyZmZm0OIt0svKJdEy6RNEpUHd9HJXPJi21bmvqSIqwPPt5KeNr2tt4Dq4o/s400/stemgraphic.png" width="400" /></a></div>
With the 0.5.x releases, I've introduced the categorical and text support. In the next few weeks, I'll be introducing some of the features, particularly those found in the new stemgraphic.alpha module of the stemgraphic package, such as back-to-back plots and stem-and-leaf heatmaps:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4xWGapfgmLPzJqRfiW1qpiPsS4UU7BFJTGxYwKrfOrPqP-Q1S713y5tzyMx4qds809jihU48HvAEoI_QWrYY_4trcuw8fBCTA2IVm4rCaL9a3ndWLtnPLcckd23EQa42nCODd4Cb8Hbc/s1600/b2b_stem_graphic.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="400" data-original-width="1436" height="111" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4xWGapfgmLPzJqRfiW1qpiPsS4UU7BFJTGxYwKrfOrPqP-Q1S713y5tzyMx4qds809jihU48HvAEoI_QWrYY_4trcuw8fBCTA2IVm4rCaL9a3ndWLtnPLcckd23EQa42nCODd4Cb8Hbc/s400/b2b_stem_graphic.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgLkCDWZ02vlTeLVVQGHYmvlZ2HU84hyHJbKbaypy-AYeLr8y5g1AfCi-LLaQQppvc6rcdK3ITRph824_fsfQu6DaNn0Iz-ayDt5YMQ7RxwXfVPSMnX4GoGXAGVg8_1U_A_8Bj-bODs6Y/s1600/heatmap.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1152" data-original-width="1440" height="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgLkCDWZ02vlTeLVVQGHYmvlZ2HU84hyHJbKbaypy-AYeLr8y5g1AfCi-LLaQQppvc6rcdK3ITRph824_fsfQu6DaNn0Iz-ayDt5YMQ7RxwXfVPSMnX4GoGXAGVg8_1U_A_8Bj-bODs6Y/s320/heatmap.png" width="320" /></a></div>
<br />
<br />
But if you want to get started, check out <a href="http://stemgraphic.org/">stemgraphic.org</a>, and the <a href="https://github.com/fdion/stemgraphic">github repo</a> (especially the <a href="https://github.com/fdion/stemgraphic/tree/master/notebooks">notebooks</a>).<br />
<br />
<h3>
Github Repo</h3>
<a href="https://github.com/fdion/stemgraphic">https://github.com/fdion/stemgraphic</a><br />
<br />
<br />
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan"><span class="ansigreen"><span class="ansired"><span style="font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13px; line-height: 18px; white-space: normal;">Francois Dion</span>
<a href="http://www.twitter.com/f_dion" style="color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none; white-space: normal;">@f_dion</a></span></span></span></pre>
Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com0tag:blogger.com,1999:blog-4717269872457503530.post-24903207555445639382018-02-26T22:00:00.002-05:002018-02-27T07:50:33.645-05:00Readings in Communication<h2 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 22px; margin: 0px; position: relative;">
"Ex-Libris" part VI: Communication</h2>
<div>
</div>
<div>
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;">Part 6 of my "ex-libris" of a Data Scientist is now available. This one is about<a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-vi-communication-francois-dion/"> communication</a>.</span></div>
<div>
</div>
<div>
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;">When I started this series, I introduced this diagram.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilWouhzL-d22dtX2QV7eqiwc938p6Czd-DSTnqLfnBImUDauUycr45EzmgO92OlBdZBdaY6WRwGHagcdtIMckawJGIJsCRKa-sgy4d_7A36kOIbchykrj4pyR3997kNEDscI8mODmcxS4/s1600/datascience_circle.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="576" data-original-width="800" height="287" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilWouhzL-d22dtX2QV7eqiwc938p6Czd-DSTnqLfnBImUDauUycr45EzmgO92OlBdZBdaY6WRwGHagcdtIMckawJGIJsCRKa-sgy4d_7A36kOIbchykrj4pyR3997kNEDscI8mODmcxS4/s400/datascience_circle.jpg" width="400" /></a></div>
<div>
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;"><br /></span></div>
<div>
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;">I also quoted Johh Tukey:</span></div>
<div>
</div>
<blockquote class="tr_bq">
<div>
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;">"Far better an approximate answer to the right question, which is often
vague, than an exact answer to the wrong question, which can always be
made precise"
</span></div>
</blockquote>
<br />
This is quite important since a data science project has to start with a question and come up with an answer.<br />
<br />
But how do we communicate at the time of formulating the question? How
about at the time of providing an answer? By any means necessary.<br />
<br />
Do check out the full article with the list of books: <br />
<br />
<a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-vi-communication-francois-dion/">"ex-libris" part vi</a><br />
<br />
<br />
<h2 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 22px; margin: 0px; position: relative;">
See also</h2>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: rgba(0, 0, 0, 0.7); font-family: "Source Serif Pro", serif; font-size: 21px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 32px; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;">Part I was on "data and databases": <a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-i-francois-dion?blogger" style="color: #888888; text-decoration-line: none;">"ex-libris" of a Data Scientist - Part i</a></span><span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;"><br />Part II, was on "models": <a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-ii-model-francois-dion" style="color: #888888; text-decoration-line: none;">"ex-libris" of a Data Scientist - Part II</a></span><span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;"><br /></span><span style="background-color: white; color: #222222; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13.2px;"></span><span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;">Part III, was on "technology": <a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-iii-technology-francois-dion" style="color: #888888; text-decoration-line: none;">"ex-libris" of a Data Scientist - Part III</a></span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;">Part IV, was on "code": </span><a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-iv-code-francois-dion" style="color: #888888; font-family: arial, helvetica, sans-serif; font-size: 13.2px; text-decoration-line: none;">"ex-libris" of a Data Scientist - Part IV</a><br />
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;">Part V was on <a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-v-visualization-francois-dion/">"visualization"</a>. Bonus after that will be on management / leadership.</span></div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: rgba(0, 0, 0, 0.7); font-family: "Source Serif Pro", serif; font-size: 21px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 32px; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan"><span class="ansigreen"><span class="ansired"><span style="font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13px; line-height: 18px; white-space: normal;">Francois Dion</span>
<a href="http://www.twitter.com/f_dion" style="color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration-line: none; white-space: normal;">@f_dion</a></span></span></span></pre>
</div>
Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com0tag:blogger.com,1999:blog-4717269872457503530.post-57871635535750696792017-08-11T20:27:00.002-04:002018-01-17T20:41:09.083-05:00Readings in Visualization<h2 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 22px; margin: 0px; position: relative;">
"Ex-Libris" part V: Visualization</h2>
<div>
<br /></div>
<div>
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;">Part 5 of my "ex-libris" of a Data Scientist is now available. This one is about visualization.</span></div>
<div>
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;"><br /></span></div>
<div>
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;">Starting from a historical perspective, particularly of statistical visualization, and covering a few classic must have books, the article then goes on to cover graphic design, cartography, information architecture and design and concludes with many recent books on information visualization (<i>specific Python and R books to create these were listed in part IV of this series)</i>. In all, about 66 books on the subject.</span></div>
<div>
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;"><br /></span></div>
<div>
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;">Just follow the link to the LinkedIn post to go directly to it:</span></div>
<div>
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;"><br /></span></div>
<div>
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;"><a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-v-visualization-francois-dion">"ex-libris of a data scientist, part V</a></span></div>
<div>
<br /></div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKOZ2Md77kMqSHexgzqWDZrC9_nvd3Kfq2xHLMXxXs-W3wDAE9_6va4QCvMyAb5OWRX6BoLJRRYB9ZwqldRI_Wq5pzou-IyE1hplZjazPQHP6SMKiqMlakmtI2OWdehEbV1mAZX4QoMSI/s1600/tumblr_oueg3ybhmY1vsgnoeo1_1280.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="601" data-original-width="800" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKOZ2Md77kMqSHexgzqWDZrC9_nvd3Kfq2xHLMXxXs-W3wDAE9_6va4QCvMyAb5OWRX6BoLJRRYB9ZwqldRI_Wq5pzou-IyE1hplZjazPQHP6SMKiqMlakmtI2OWdehEbV1mAZX4QoMSI/s320/tumblr_oueg3ybhmY1vsgnoeo1_1280.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">From Jacques Bertin’s Semiology of Graphics</td></tr>
</tbody></table>
<div>
<br /></div>
<div>
<blockquote class="tr_bq" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: rgba(0, 0, 0, 0.7); font-family: Georgia, "Source Serif Pro", serif; font-size: 2.4rem; font-stretch: inherit; font-style: italic; font-variant-numeric: inherit; line-height: 3.6rem; margin: 4.8rem 120px; outline: 0px; padding: 0px; quotes: none; text-align: center; vertical-align: baseline;">
<span style="border: 0px; font-family: inherit; font-size: 24px; font-stretch: inherit; font-style: normal; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">"Le plus court croquis m'en dit plus long qu'un long rapport", Napoleon Ier</span></blockquote>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: rgba(0, 0, 0, 0.7); font-family: "Source Serif Pro", serif; font-size: 21px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 32px; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<br /></div>
<h2 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 22px; margin: 0px; position: relative;">
See also</h2>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: rgba(0, 0, 0, 0.7); font-family: "Source Serif Pro", serif; font-size: 21px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 32px; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;">Part I was on "data and databases": <a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-i-francois-dion?blogger" style="color: #888888; text-decoration-line: none;">"ex-libris" of a Data Scientist - Part i</a></span><span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;"><br />Part II, was on "models": <a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-ii-model-francois-dion" style="color: #888888; text-decoration-line: none;">"ex-libris" of a Data Scientist - Part II</a></span><span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;"><br /></span><span style="background-color: white; color: #222222; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13.2px;"></span><span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;">Part III, was on "technology": <a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-iii-technology-francois-dion" style="color: #888888; text-decoration-line: none;">"ex-libris" of a Data Scientist - Part III</a></span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;">Part IV, was on "code": </span><a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-iv-code-francois-dion" style="color: #888888; font-family: arial, helvetica, sans-serif; font-size: 13.2px; text-decoration-line: none;">"ex-libris" of a Data Scientist - Part IV</a><br />
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: 13.2px;">Part VI will be on communication. Bonus after that will be on management / leadership.</span></div>
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan"><span class="ansigreen"><span class="ansired"><span style="font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13px; line-height: 18px; white-space: normal;">Francois Dion</span>
<a href="http://www.twitter.com/f_dion" style="color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration-line: none; white-space: normal;">@f_dion</a></span></span></span></pre>
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan">
</span></pre>
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan">P.S.</span></pre>
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan">Je vais aussi avoir une liste de publications en francais</span></pre>
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;">En el futuro cercano voy a hacer una lista en espanol tambien</pre>
</div>
Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com0tag:blogger.com,1999:blog-4717269872457503530.post-54187297141233915772017-06-13T16:38:00.000-04:002017-06-13T16:43:03.142-04:00Readings in Programming<h2 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 22px; margin: 0px; position: relative;">
"Ex-Libris" part IV: Code</h2>
<div>
<br /></div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white;">I've made available part 4 of my "ex-libris" of a Data Scientist. This one is about code. </span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">No doubt, many have been waiting for the list that is most related to Python. </span><span style="background-color: white; font-family: "arial" , "helvetica" , sans-serif;"> </span><span style="font-family: "arial" , "helvetica" , sans-serif;">In a recent poll by KDNuggets, the <b>top tool</b> used for analytics, data science and machine learning by respondents turned out to also be a programming language: <b>Python</b>.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">The article goes from algorithms and theory, to approaches, to the top languages for data science, and more. In all, almost 80 books in just that part 4 alone. It can be found on LinkedIn:</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-iv-code-francois-dion" style="background-color: white; color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; text-decoration-line: none;">"ex-libris" of a Data Scientist - Part IV</a><br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj25IaBR6OnMivOm7DpyycoNi4Y_WcA9SaFE7jILkNo_bOWe1Qaw0rjERpma1IFnvySNcI5XBaQsJfz_Y44IJud3S7Zic7kYI79HZnngoH7_15ZFFlrs7DJmL90h8wM0XDfU1OCfle21uM/s1600/algo_tree.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="768" data-original-width="1218" height="251" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj25IaBR6OnMivOm7DpyycoNi4Y_WcA9SaFE7jILkNo_bOWe1Qaw0rjERpma1IFnvySNcI5XBaQsJfz_Y44IJud3S7Zic7kYI79HZnngoH7_15ZFFlrs7DJmL90h8wM0XDfU1OCfle21uM/s400/algo_tree.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: xx-small;"><em style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: rgba(0, 0, 0, 0.7); font-family: Georgia, "Source Serif Pro", serif; font-stretch: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; text-align: start; vertical-align: baseline;">from </em><a href="https://archive.org/details/Algorithms_And_Automatic_Computing_Machines" rel="nofollow noopener" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: #8c68cb; cursor: pointer; font-family: "Source Serif Pro", serif; font-stretch: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-align: start; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"><em style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Georgia, "Source Serif Pro", serif; font-stretch: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Algorithms and Automatic Computing Machines</em></a><em style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: rgba(0, 0, 0, 0.7); font-family: Georgia, "Source Serif Pro", serif; font-stretch: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; text-align: start; vertical-align: baseline;">by B. A. Trakhtenbrot</em></span></td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKryOwAGQivH9zqC0qfoduJWNwug7ovFs6l4YAb2HO3-75ZST-A_AMJvgG0k5pxgT0yN8atGGSA67DXYYzqh71dbA5bmZTdzuascuzFSUOCHu7RqvJKOcKDBkUu9caXgtXfIwlNL5-qYQ/s1600/lovelace.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="558" data-original-width="1122" height="198" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKryOwAGQivH9zqC0qfoduJWNwug7ovFs6l4YAb2HO3-75ZST-A_AMJvgG0k5pxgT0yN8atGGSA67DXYYzqh71dbA5bmZTdzuascuzFSUOCHu7RqvJKOcKDBkUu9caXgtXfIwlNL5-qYQ/s400/lovelace.png" width="400" /></a></div>
<br />
<h2 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 22px; margin: 0px; position: relative;">
See also</h2>
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;" />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white; color: #222222;">Part I was on "data and databases": <a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-i-francois-dion?blogger" style="color: #888888; text-decoration-line: none;">"ex-libris" of a Data Scientist - Part i</a></span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white; color: #222222;"><br /></span><span style="background-color: white; color: #222222;">Part II, was on "models": <a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-ii-model-francois-dion" style="color: #888888; text-decoration-line: none;">"ex-libris" of a Data Scientist - Part II</a></span></span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Part III, was on "technology": <a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-iii-technology-francois-dion" style="background-color: white; color: #888888; text-decoration-line: none;">"ex-libris" of a Data Scientist - Part III</a></span><br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">Part V will be on visualization, part VI on communication. Bonus after that will be on management / leadership.</span><br />
<br />
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan"><span class="ansigreen"><span class="ansired"><span style="font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13px; line-height: 18px; white-space: normal;">Francois Dion</span>
<a href="http://www.twitter.com/f_dion" style="color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration-line: none; white-space: normal;">@f_dion</a></span></span></span></pre>
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan"><span class="ansigreen">
</span></span></pre>
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan"><span class="ansigreen">P.S.</span></span></pre>
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan"><span class="ansigreen">Je vais aussi avoir une liste de publications en francais</span></span></pre>
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;">En el futuro cercano voy a hacer una lista en espanol tambien</pre>
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;"></pre>
Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com5tag:blogger.com,1999:blog-4717269872457503530.post-64287608968779784892017-06-03T22:08:00.001-04:002017-06-03T22:08:31.337-04:00Readings in Technology<h2>
"Ex-Libris" part III</h2>
<br />
I've made available part 3 of my "ex-libris" of a Data Scientist. This one is on Technology, from some historical perspective (ie. Turing, Shannon, Von Neuman) all the way to the most recent trends (ie. Ansible, Docker, Cloud, Continuous Integration, Performance etc) and can be found on LinkedIn:<br />
<br />
<a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-iii-technology-francois-dion">"ex-libris" of a Data Scientist - Part III</a><br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPfAKub2Jq2p3hU3ajnveFXFnShxJV6c_0cb1nqbz4Whk65SB7kmbaso7aqCYpZurN2LMlyVdjvFf4D5eU5KOiwBIu1ZX6u0XABdnqA_C2vHDeZDOgayGvjePOdcFS3WQZtxE1QNF7d04/s1600/AAEAAQAAAAAAAAqjAAAAJDQxYzcyZjdhLTYzNTktNDZmMy04YWYwLTJmNjQ4MzE2ODc3Yg.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="479" data-original-width="640" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPfAKub2Jq2p3hU3ajnveFXFnShxJV6c_0cb1nqbz4Whk65SB7kmbaso7aqCYpZurN2LMlyVdjvFf4D5eU5KOiwBIu1ZX6u0XABdnqA_C2vHDeZDOgayGvjePOdcFS3WQZtxE1QNF7d04/s320/AAEAAQAAAAAAAAqjAAAAJDQxYzcyZjdhLTYzNTktNDZmMy04YWYwLTJmNjQ4MzE2ODc3Yg.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">My CES Industries EdLab model #804, in the History section</td></tr>
</tbody></table>
<br />
<br />
<h2>
See also</h2>
<br />
<span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13.2px;">Part I was on "data and databases": <a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-i-francois-dion?blogger" style="color: #888888; text-decoration-line: none;">"ex-libris" of a Data Scientist - Part i</a></span><br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;" /><span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13.2px;"><br /></span><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"></span><span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13.2px;">Part II, was on "models": <a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-ii-model-francois-dion" style="color: #888888; text-decoration-line: none;">"ex-libris" of a Data Scientist - Part II</a></span><br />
<br />
Part IV is right around the corner, and will have a significant Python section.<br />
<br />
<br />
<br />
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan"><span class="ansigreen"><span class="ansired"><span style="font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13px; line-height: 18px; white-space: normal;">Francois Dion</span>
<a href="http://www.twitter.com/f_dion" style="color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration-line: none; white-space: normal;">@f_dion</a></span></span></span></pre>
Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com0tag:blogger.com,1999:blog-4717269872457503530.post-66487444893610975762017-06-02T21:02:00.000-04:002017-06-02T21:03:56.675-04:00Raspberry Pi 3 Canakit<h2>
It's been a long time...</h2>
<br />
I don't even remember when was the last time I talked about <a href="http://raspberrypi.org/">Raspberry Pi</a> hardware on my blog. I do remember <a href="http://raspberry-python.blogspot.com/2012/08/what-it-looks-like.html">the first time</a>, however, some 5 years ago. Meanwhile, the price of Raspberry Pis have both gone down (Zero) and up (Raspberry Pi 3) due to economies of scale, Moore's law and removal / addition of components from the various versions.<br />
<br />
<h2>
Raspberry Pi 3</h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGL4zzDmC1lSPcgVbDxd4PPON-FCPumWerBXlPh3aplUPUPtUlhhrldD5TfA1ueH7XIWe3WUNo-skbXSSpSJuIctVW7_OfsS6tDUCALbwNMMCbezwo3OSBdmrMUsqlHWpfJyzhguud_F0/s1600/IMG_20170602_094254.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1600" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGL4zzDmC1lSPcgVbDxd4PPON-FCPumWerBXlPh3aplUPUPtUlhhrldD5TfA1ueH7XIWe3WUNo-skbXSSpSJuIctVW7_OfsS6tDUCALbwNMMCbezwo3OSBdmrMUsqlHWpfJyzhguud_F0/s320/IMG_20170602_094254.jpg" width="320" /></a></div>
<br />
So, I realize that I've covered everything from the original Raspberry Pi model B with 256MB of ram, all the way to the Raspberry Pi 2 and Zero, but nothing on the Raspberry Pi 3. I typically don't buy kits, but I picked one up to see how that would work for people who had never used a Raspberry Pi before. The reason there is that I suggested to my fellow data scientists (and those interested by data science, and whoever else who reads my posts) to also be technologists, to <a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-iii-technology-francois-dion">get better acquainted with technology and hardware</a>. And to get one (<i>or four - I'll follow up on that</i>) Raspberry Pi 3. I wanted to make sure it would be smooth sailing.<br />
<br />
<h2>
The Canakit</h2>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggxILRkyTaxKOjANF8N6d7BussmqM9vqXSvrKuvMB33X6Xcy3J1tQi_XqKgI3M2fxbj_-E6HCSsuH1Ov7NVm6y_4L1DpZVkj986qh6xHVgew-xJnTjF79cUCzPSfQnRmXgFsGfkFeeK04/s1600/IMG_20170602_094200.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1600" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggxILRkyTaxKOjANF8N6d7BussmqM9vqXSvrKuvMB33X6Xcy3J1tQi_XqKgI3M2fxbj_-E6HCSsuH1Ov7NVm6y_4L1DpZVkj986qh6xHVgew-xJnTjF79cUCzPSfQnRmXgFsGfkFeeK04/s400/IMG_20170602_094200.jpg" width="400" /></a></div>
<br />
I ordered a Canakit with a Raspberry Pi board and two heatsinks, a case, a 2.5A power supply and a guide. It is convenient to get a single ready to go package quickly, particularly with free 2nd day shipping (you know who).<br />
<br />
I say ready to go, but not quite. Of course you'll need a monitor, keyboard and mouse if you don't enable ssh (distro dependent ways, some have ssh enabled by default). But you'll also need an SD card.<br />
<br />
<h2>
No SD card?</h2>
<br />
The kit I ordered basically got you the case, heatsinks and power supply for $15 above the price of the Raspberry Pi 3. But no microSD card. The step above kit includes a microSD card with the OS already pre-installed, but when I looked at it, the price difference was too much for just that and a plain HDMI cable.<br />
<br />
Oh, but it's so hard to prepare an SD card! Don't panic. Use <a href="https://etcher.io/">Etcher</a>. Later, when you get your command line skills up, you'll be able to do it with dd.<br />
<br />
If you get stuck, leave a comment or contact me on twitter<br />
<br />
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan"><span class="ansigreen"><span class="ansired"><span style="font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13px; line-height: 18px; white-space: normal;">Francois Dion</span>
<a href="http://www.twitter.com/f_dion" style="color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration-line: none; white-space: normal;">@f_dion</a></span></span></span></pre>
Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com0tag:blogger.com,1999:blog-4717269872457503530.post-40939542778322972202017-05-08T18:27:00.003-04:002017-05-08T18:27:52.937-04:00Readings in Data Science models<h2 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 22px; margin: 0px; position: relative;">
Ex-libris</h2>
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><br /></span>
<span style="background-color: white; color: #222222;"><span style="font-family: Arial, Helvetica, sans-serif;">As I've <a href="http://raspberry-python.blogspot.com/2017/04/readings-in-data-and-databases.html">previously mentioned</a>, I recently started a 6 part series on LinkedIn called "ex-libris" of a Data Scientist. </span></span><br />
<span style="background-color: white; color: #222222;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; color: #222222;">Part I was on "data and databases": </span><a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-i-francois-dion?blogger" style="background-color: white; color: #888888; text-decoration-line: none;">"ex-libris" of a Data Scientist - Part i</a></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">I just posted part II, "models": <a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-ii-model-francois-dion">"ex-libris" of a Data Scientist - Part II</a></span><br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">It does cover machine learning, but before going there, I cover Metrics, Operations Research, Econometrics and Time Series and Statistics. Even more fundamentally, I start with Math.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Yes, if you slept through linear algebra or calculus (or analysis as it is called in certain parts of the world), check the list out. Book suggestions and links to videos and other resources.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<br />
<span style="background-color: white; color: #222222;"><span style="font-family: Arial, Helvetica, sans-serif;">Also, a reminder: Python specific books will show up in part IV.</span></span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;" /><br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;" /><br />
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan"><span class="ansigreen"><span class="ansired"><span style="font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13px; line-height: 18px; white-space: normal;">Francois Dion</span>
<a href="http://www.twitter.com/f_dion" style="color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration-line: none; white-space: normal;">@f_dion</a></span></span></span></pre>
Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com0tag:blogger.com,1999:blog-4717269872457503530.post-22416061268993843792017-04-24T21:48:00.001-04:002017-04-24T21:48:50.863-04:00Meet Eliza #AI<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaRW9LW_b7vI0PafByl4JorjJRPqwWaXD2V2LU5huq_xuQFXdDNd9us3rc5B6NkeJhOe2pno5uv97FfviWySETq10nGC4qbiSW6jSjAOrXWIsfmNxgnSkZ8MD_rEYOJcrpZNSKfQF4lnM/s1600/linkedin.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaRW9LW_b7vI0PafByl4JorjJRPqwWaXD2V2LU5huq_xuQFXdDNd9us3rc5B6NkeJhOe2pno5uv97FfviWySETq10nGC4qbiSW6jSjAOrXWIsfmNxgnSkZ8MD_rEYOJcrpZNSKfQF4lnM/s400/linkedin.png" width="400" /></a></div>
<br />
<br />
I will be presenting and directing a discussion on artificial intelligence, from various angles including the arts, Tuesday April 25th at Wake Forest in Winston Salem, NC.<br />
<br />
Details here:<br />
<a href="http://www.pyptug.org/2017/04/pyptug-monthly-meeting-meet-eliza-april.html">http://www.pyptug.org/2017/04/pyptug-monthly-meeting-meet-eliza-april.html</a><br />
<br />
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan"><span class="ansigreen"><span class="ansired"><span style="font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13px; line-height: 18px; white-space: normal;">Francois Dion</span>
<a href="http://www.twitter.com/f_dion" style="color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration-line: none; white-space: normal;">@f_dion</a></span></span></span></pre>
Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com0tag:blogger.com,1999:blog-4717269872457503530.post-86983808424272622422017-04-13T20:59:00.005-04:002017-04-14T07:27:22.942-04:00Readings in data and databases<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1DEuIrtIXnLOam1Tw-ifOyJ1PT6XNCYtcjQd-nLYEJmN8pFtzsJPeEr_PXBUbPqWPLWMVK57MJu2dcABvG2P3-zIoW2Cs02gOkeuBl2bhdfh01YEdXW1YqVPUQQPS0q3huRwvfJzPP8w/s1600/exlibris.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="245" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1DEuIrtIXnLOam1Tw-ifOyJ1PT6XNCYtcjQd-nLYEJmN8pFtzsJPeEr_PXBUbPqWPLWMVK57MJu2dcABvG2P3-zIoW2Cs02gOkeuBl2bhdfh01YEdXW1YqVPUQQPS0q3huRwvfJzPP8w/s400/exlibris.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Recent readings (can you guess/decipher some of them?)</td></tr>
</tbody></table>
<br />
I've been fairly quiet on this particular blog this year. Beside a lot of data science work, I've done presentations at meetups and conferences, including a recent tutorial on "Getting to know your data at scale" at the IEEE SouthEastCon 2017. Notebooks will be posted on github soon.<br />
<br />
But, in the meantime...<br />
<br />
<h2>
Ex-libris</h2>
Something else I've been doing is publishing a few articles here and there. Just recently, I started a 6 part series on LinkedIn called "ex-libris" of a Data Scientist. I think many readers of this blog will appreciate this series, and particularly this first installment on "<b>data and databases</b>":<br />
<br />
<a href="https://www.linkedin.com/pulse/ex-libris-data-scientist-part-i-francois-dion?blogger">"ex-libris" of a Data Scientist - Part i</a><br />
<br />
It covers a good variety of books on the subject, some pretty much must read for whatever corner of the computer science world you live in. Also of interest will be the <b>Postgres</b>, <b>Hadoop</b> and <b>graph database</b> pointers and a list of over <b>20</b> curated must read <b>papers</b> in the field.<br />
<br />
Python specific books will show up in part IV.<br />
<br />
<br />
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan"><span class="ansigreen"><span class="ansired"><span style="font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13px; line-height: 18px; white-space: normal;">Francois Dion</span>
<a href="http://www.twitter.com/f_dion" style="color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration-line: none; white-space: normal;">@f_dion</a></span></span></span></pre>
Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com0tag:blogger.com,1999:blog-4717269872457503530.post-46400074821343242782016-11-07T18:33:00.001-05:002016-11-07T18:33:35.180-05:00Something For Your Mind, Polymath Podcast episode 3<h3>
"Improving your communications and Entrepreneurship" </h3>
In this episode, , we will cover these
two different topics. Specifically,
we will talk about kinematic displays, improving your communications,
coworking spaces, entrepreneurship, innovation and
more. This episode will wrap up with a learn more section, on what
is an entrepreneur.<br />
<blockquote style="background-color: white; border-left: 5px solid rgb(238, 238, 238); box-sizing: border-box; color: #333333; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 17.5px; line-height: 1.25; margin: 0px 0px 20px; padding: 10px 20px;">
"these are people that can't help but generate ideas all the time..."</blockquote>
<br />
<br />
A few selected links are on the <a href="http://artchiv.es/s4ym/posts/podcast-episode-003/">episode web page</a>, and includes a few items related to colors (some for all platforms, others are Linux only)<br />
<br />
<br />
<br />
<br />
<br />
<div>
<div style="font-size: large; font-weight: lighter;">
<span style="box-sizing: border-box; font-family: "arial" , sans-serif; font-size: x-small;">Something for your mind is available on</span></div>
<div style="font-size: large; font-weight: lighter;">
<span style="box-sizing: border-box; font-family: "arial" , sans-serif; font-size: x-small;"></span><br />
<div class="w_xlarge" style="font-family: arial, sans-serif-light, sans-serif; font-size: xx-large !important; font-weight: lighter !important;">
</div>
<span style="box-sizing: border-box; font-family: "arial" , sans-serif; font-size: x-small;">
<div class="w_xlarge" style="font-family: arial, sans-serif-light, sans-serif; font-size: xx-large !important; font-weight: lighter !important;">
art·chiv.es</div>
<div style="font-family: Times;">
<div class="w_large" style="font-family: arial, sans-serif; font-size: large;">
<span class="phonetic">/'ärt,kīv/</span></div>
<div class="w_large" style="font-family: arial, sans-serif; font-size: large;">
<span class="phonetic"><br /></span></div>
</div>
</span></div>
<div>
<span style="box-sizing: border-box;"><span style="font-family: "arial" , sans-serif; font-size: x-small;">at <a href="http://artchiv.es/s4ym/" style="color: #888888; text-decoration: none;">artchiv.es/s4ym/</a></span></span></div>
<div>
<span style="box-sizing: border-box;"><br /></span></div>
<div>
<span style="box-sizing: border-box;"><br /></span></div>
<div>
<pre style="font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan"><span class="ansigreen"><span class="ansired"><span style="font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13px; line-height: 18px; white-space: normal;">Francois Dion</span>
<a href="http://www.twitter.com/f_dion" style="color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none; white-space: normal;">@f_dion</a></span></span></span></pre>
</div>
</div>
Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com0tag:blogger.com,1999:blog-4717269872457503530.post-68286593436653914622016-10-20T17:46:00.001-04:002016-10-20T22:09:23.549-04:00Stemgraphic, a new visualization tool<h3>
PyData Carolinas 2016</h3>
At PyData Carolinas 2016 I presented the talk <span style="color: orange;"><a href="http://pydata.org/carolinas2016/schedule/presentation/59/">Stemgraphic: A Stem-and-Leaf Plot for the Age of Big Data.</a></span><br />
<h3>
<span style="color: orange;"><span style="color: black;">Intro</span></span></h3>
The stem-and-leaf plot is one of the most powerful tools <i>not found</i> in a
data scientist or statistician’s toolbox. If we go back in time thirty
some years we find the exact opposite. What happened to the
stem-and-leaf plot? Finding the answer led me to design and implement an
improved graphical version of the stem-and-leaf plot, as a python
package. As a companion to the talk, a printed research paper was
provided to the audience (a PDF is now available through <a href="http://artchiv.es/pydata2016/stemgraphic">artchiv.es</a>)<br />
<br />
<h3>
The talk</h3>
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/-4h8U_I-tzo" width="560"></iframe><br />
<br />
Thanks to the organizers of PyData Carolinas, videos of all the talks and tutorials have been posted on youtube. <a href="https://www.youtube.com/watch?v=-4h8U_I-tzo">In just 30 minutes</a>, this is a great way to learn more about stemgraphic and the history of the stem-and-leaf plot for EDA work. This <a href="https://www.youtube.com/watch?v=-4h8U_I-tzo">updated version</a> does include the animated intro sequence, but unfortunately the sound was recorded from the microphone, and not the mixer. You can see the intro sequence in higher audio and video quality on the main page of the website below.<br />
<h3>
Stemgraphic.org</h3>
I've created a <a href="http://stemgraphic.org/">web site for stemgraphic</a>, as I'll be posting some tutorials and demo some of the more advanced features, particularly as to how stemgraphic can be used in a <b>data science pipeline</b>, as a data <i>wrangling</i> tool, as an intermediary to big data on HDFS, as a visual validation for building models and as a superior distribution plot, particularly when faced with non uniform distributions or distributions showing a high degree of skewness (long tails).<br />
<h3>
Github Repo</h3>
<a href="https://github.com/fdion/stemgraphic">https://github.com/fdion/stemgraphic</a><br />
<br />
<br />
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan"><span class="ansigreen"><span class="ansired"><span style="font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13px; line-height: 18px; white-space: normal;">Francois Dion</span>
<a href="http://www.twitter.com/f_dion" style="color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none; white-space: normal;">@f_dion</a></span></span></span></pre>
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan"><span class="ansigreen"><span class="ansired"> </span></span></span></pre>
<br />
<br />
<br />Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com0tag:blogger.com,1999:blog-4717269872457503530.post-33594194587969922292016-10-11T23:27:00.000-04:002016-10-11T23:27:13.677-04:00PyData Carolinas 2016 Tutorial: Datascience on the web<h2>
PyData Carolinas 2016</h2>
<div>
Don Jennings and I presented a tutorial at PyData Carolinas 2016: <a href="http://pydata.org/carolinas2016/schedule/presentation/4/">Datascience on the web</a>.</div>
<br />
The plan was as follow:<br />
<h3 style="background-color: white; box-sizing: border-box; color: #333333; font-family: Lato, sans-serif; font-weight: lighter; line-height: 1.1; margin: 0.2em 0px 0.5em;">
<span style="font-size: x-small;">Description</span></h3>
<div class="description" style="background-color: white; box-sizing: border-box; color: #333333; font-family: Lato, sans-serif;">
<div style="box-sizing: border-box; margin-bottom: 1.25em;">
<span style="font-size: x-small;">Learn to deploy your research as a web application. You have been using Jupyter and Python to do some interesting research, build models, visualize results. In this tutorial, you’ll learn how to easily go from a notebook to a Flask web application which you can share.</span></div>
</div>
<h3 style="background-color: white; box-sizing: border-box; color: #333333; font-family: Lato, sans-serif; font-weight: lighter; line-height: 1.1; margin: 0.2em 0px 0.5em;">
<span style="font-size: x-small;">Abstract</span></h3>
<div class="abstract" style="background-color: white; box-sizing: border-box; color: #333333; font-family: Lato, sans-serif;">
<div style="box-sizing: border-box; margin-bottom: 1.25em;">
<span style="font-size: x-small;"><a href="https://jupyter.org/" style="background-color: transparent; box-sizing: border-box; color: #428bca; text-decoration: none;">Jupyter</a> is a great notebook environment for <a href="https://www.python.org/" style="background-color: transparent; box-sizing: border-box; color: #428bca; text-decoration: none;">Python</a> based data science and exploratory data analysis. You can share the notebooks via a github repository, as html or even on the web using something like <a href="https://jupyterhub.readthedocs.io/en/latest/" style="background-color: transparent; box-sizing: border-box; color: #428bca; text-decoration: none;">JupyterHub</a>. How can we turn the work we have done in the notebook into a real web application?</span></div>
<div style="box-sizing: border-box; margin-bottom: 1.25em;">
<span style="font-size: x-small;">In this tutorial, you will learn to structure your notebook for web deployment, how to create a skeleton <a href="http://flask.pocoo.org/" style="background-color: transparent; box-sizing: border-box; color: #428bca; text-decoration: none;">Flask</a> application, add a model and add a visualization. While you have some experience with Jupyter and Python, you do not have any previous web application experience.</span></div>
<div style="box-sizing: border-box; margin-bottom: 1.25em;">
<span style="font-size: x-small;">Bring your laptop and you will be able to do all of these hands-on things:</span></div>
<ol style="box-sizing: border-box; margin-bottom: 10px; margin-top: 0px;">
<li style="box-sizing: border-box;"><div style="box-sizing: border-box; margin-bottom: 1.25em;">
<span style="font-size: x-small;">get to the virtual environment</span></div>
</li>
<li style="box-sizing: border-box;"><div style="box-sizing: border-box; margin-bottom: 1.25em;">
<span style="font-size: x-small;">review the Jupyter notebook</span></div>
</li>
<li style="box-sizing: border-box;"><div style="box-sizing: border-box; margin-bottom: 1.25em;">
<span style="font-size: x-small;">refactor for reuse</span></div>
</li>
<li style="box-sizing: border-box;"><div style="box-sizing: border-box; margin-bottom: 1.25em;">
<span style="font-size: x-small;">create a basic Flask application</span></div>
</li>
<li style="box-sizing: border-box;"><div style="box-sizing: border-box; margin-bottom: 1.25em;">
<span style="font-size: x-small;">bring in the model</span></div>
</li>
<li style="box-sizing: border-box;"><div style="box-sizing: border-box; margin-bottom: 1.25em;">
<span style="font-size: x-small;">add the visualization</span></div>
</li>
<li style="box-sizing: border-box;"><div style="box-sizing: border-box; margin-bottom: 1.25em;">
<span style="font-size: x-small;">profit!</span></div>
</li>
</ol>
</div>
Now that is has been presented, the artifacts are a github repo and a youtube video.<br />
<br />
<h2>
Github Repo</h2>
<br />
<a href="https://github.com/fdion/pydata/">https://github.com/fdion/pydata/</a><br />
<br />
<h2 style="border-bottom: 1px solid rgb(238, 238, 238); box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; line-height: 1.25; margin: 24px 0px 16px; padding-bottom: 0.3em;">
After the fact</h2>
<div style="box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; margin-bottom: 16px;">
The unrefactored notebook is <a href="https://github.com/fdion/pydata/blob/master/notebooks/PyData.ipynb" style="box-sizing: border-box; color: #4078c0; text-decoration: none;">here</a> while the refactored one is <a href="https://github.com/fdion/pydata/blob/master/notebooks/PyData-Refactored.ipynb" style="box-sizing: border-box; color: #4078c0; text-decoration: none;">here</a>.</div>
<div style="box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; margin-bottom: 16px;">
Once you run through the whole refactored notebook, you will have train and test sets saved in data/ and a trained model in trained_models/. To make these available in the tutorial directory, you will have to run the publish.sh script. On a unix like environment (mac, linux etc):</div>
<pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"><code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow: visible; padding: 0px; word-break: normal; word-wrap: normal;">chmod a+x publish.sh
./publish.sh
</code></pre>
<h2 style="border-bottom: 1px solid rgb(238, 238, 238); box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; line-height: 1.25; margin: 24px 0px 16px; padding-bottom: 0.3em;">
Video</h2>
<h1 style="border-bottom: 1px solid rgb(238, 238, 238); box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; line-height: 1.25; margin: 24px 0px 16px; padding-bottom: 0.3em;">
<a aria-hidden="true" class="anchor" href="https://github.com/fdion/pydata/#video" id="user-content-video" style="box-sizing: border-box; color: #4078c0; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration: none;"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a></h1>
<div style="box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; margin-bottom: 16px;">
The whole session is now on youtube: <a href="https://www.youtube.com/watch?v=qP_8ch-5XhE" style="box-sizing: border-box; color: #4078c0; text-decoration: none;">Francois Dion & Don Jennings Datascience on the web</a></div>
<div style="box-sizing: border-box; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; margin-bottom: 16px;">
<br /></div>
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan"><span class="ansigreen"><span class="ansired"><span style="font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13px; line-height: 18px; white-space: normal;">Francois Dion</span>
<a href="http://www.twitter.com/f_dion" style="color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none; white-space: normal;">@f_dion</a></span></span></span></pre>
Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com0tag:blogger.com,1999:blog-4717269872457503530.post-64735259878796933792016-10-06T17:35:00.001-04:002016-10-06T17:35:09.547-04:00Improving your communications: Professional Audio-Video Production on Linux<h3>
Pro AV on Linux</h3>
<div>
I'll be presenting on the subject of Professional Audio-Video Production on Linux, next week at <a href="http://trilug.org/">TriLug</a>.</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhimH54gzRZdLK4pDu4BpRYHRzbVMyAKpQhS0vJpOYgt39X72Kk8n6Nj5ELde1BDNPTFcTfSQllIjmHzhR4N-qiatXox1WoezuPxSkR_4HFT1aQMNWuj3eeIa_lnvkUauDl9YgV_VcUN-U/s1600/digital_fd_small.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhimH54gzRZdLK4pDu4BpRYHRzbVMyAKpQhS0vJpOYgt39X72Kk8n6Nj5ELde1BDNPTFcTfSQllIjmHzhR4N-qiatXox1WoezuPxSkR_4HFT1aQMNWuj3eeIa_lnvkUauDl9YgV_VcUN-U/s1600/digital_fd_small.jpg" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<div>
<br /></div>
<div>
<br /></div>
<div>
<span style="background-color: white; color: #3b3b3b; font-family: Georgia, "Times New Roman", Times, serif; font-size: 14px;">From concept to finished product, it has never been easier to obtain professional results when it comes to audio-video production on Linux.</span></div>
<div>
<span style="background-color: white; color: #3b3b3b; font-family: Georgia, "Times New Roman", Times, serif; font-size: 14px;"><br /></span></div>
<div style="background-color: white; color: #3b3b3b; font-family: Georgia, "Times New Roman", Times, serif; font-size: 14px; margin-bottom: 1.2em;">
We will cover some of the hardware that should be part of your production suite, from microphones to jog wheels and highlight some of the top tools for animation, audio, broadcasting, effects, modeling, music, transcoding and video. We will also go beyond the usual suspects and introduce some tools that might not be typically used for AV production.</div>
<div style="background-color: white; color: #3b3b3b; font-family: Georgia, "Times New Roman", Times, serif; font-size: 14px; margin-bottom: 1.2em;">
By the end of the presentation, you will have all the tools you need to improve the quality of your communications, for your personal enjoyment, your career, or your business.</div>
<h3 style="background-color: white; color: #3b3b3b; font-family: Georgia, "Times New Roman", Times, serif; font-size: 14px; margin-bottom: 1.2em;">
When</h3>
<div style="background-color: white; color: #3b3b3b; font-family: Georgia, "Times New Roman", Times, serif; font-size: 14px; margin-bottom: 1.2em;">
Thursday, 13 October 2016 - <span class="date-display-start">7:00pm</span> to <span class="date-display-end">9:00pm</span></div>
<div style="background-color: white; color: #3b3b3b; font-family: Georgia, "Times New Roman", Times, serif; font-size: 14px; margin-bottom: 1.2em;">
<span class="date-display-end"><b>Where</b></span></div>
<div style="background-color: white; color: #3b3b3b; font-family: Georgia, "Times New Roman", Times, serif; font-size: 14px; margin-bottom: 1.2em;">
<span class="date-display-end">The Frontier, 800 Park Offices Drive, Durham, NC</span></div>
<div style="background-color: white; color: #3b3b3b; font-family: Georgia, "Times New Roman", Times, serif; font-size: 14px; margin-bottom: 1.2em;">
More info <a href="http://trilug.org/2016-10-13/Linux-AV-Production">at the Trilug website</a>.</div>
<pre style="background-color: white; color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan"><span class="ansigreen"><span class="ansired"><span style="font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13px; line-height: 18px; white-space: normal;">Francois Dion</span>
<a href="http://www.twitter.com/f_dion" style="color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none; white-space: normal;">@f_dion</a></span></span></span></pre>
Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com1tag:blogger.com,1999:blog-4717269872457503530.post-64391450651682463252016-10-05T17:25:00.002-04:002016-11-07T18:32:56.771-05:00Something For Your Mind, Polymath Podcast episode 2<h3 style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 16.8px; margin-bottom: 0.1in;">
A is for Anomaly</h3>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 16.8px; margin-bottom: 0.1in;">
In this episode, "A is for Anomaly", our first of the alphabetical episodes, we cover financial fraud, the Roman quaestores, outliers, PDFs and EKGs. Bleep... Bleep... Bleep...</div>
<blockquote style="background-color: white; border-left: 5px solid rgb(238, 238, 238); box-sizing: border-box; color: #333333; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 17.5px; line-height: 1.25; margin: 0px 0px 20px; padding: 10px 20px;">
"so perhaps this is not the ideal way of keeping track of 15 individuals..."</blockquote>
<br />
<div class="post-body entry-content" id="post-body-7748326552652504904" itemprop="description articleBody" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.4; position: relative; width: 570px;">
<div>
<div style="font-size: large; font-weight: lighter;">
<span style="box-sizing: border-box; font-family: "arial" , sans-serif; font-size: small;">Something for your mind is available on</span></div>
<div style="font-size: large; font-weight: lighter;">
<span style="box-sizing: border-box; font-family: "arial" , sans-serif; font-size: small;"></span><br />
<div class="w_xlarge" style="font-family: arial, sans-serif-light, sans-serif; font-size: xx-large !important; font-weight: lighter !important;">
<span style="box-sizing: border-box; font-family: "arial" , sans-serif; font-size: small;"><br /></span></div>
<span style="box-sizing: border-box; font-family: "arial" , sans-serif; font-size: small;">
</span>
<br />
<div class="w_xlarge" style="font-family: arial, sans-serif-light, sans-serif; font-size: xx-large !important; font-weight: lighter !important;">
<span style="box-sizing: border-box; font-family: "arial" , sans-serif; font-size: small;">art·chiv.es</span></div>
<span style="box-sizing: border-box; font-family: "arial" , sans-serif; font-size: small;">
</span>
<br />
<div style="font-family: Times;">
<div class="w_large" style="font-family: arial, sans-serif; font-size: large;">
<span style="box-sizing: border-box; font-family: "arial" , sans-serif; font-size: small;"><span class="phonetic">/'ärt,kīv/</span></span></div>
<div class="w_large" style="font-family: arial, sans-serif; font-size: large;">
<span style="box-sizing: border-box; font-family: "arial" , sans-serif; font-size: small;"><span class="phonetic"><br /></span></span></div>
</div>
<span style="box-sizing: border-box; font-family: "arial" , sans-serif; font-size: small;">
</span></div>
<div>
<span style="box-sizing: border-box;"><span style="font-family: "arial" , sans-serif; font-size: small;">at <a href="http://artchiv.es/s4ym/" style="color: #888888; text-decoration: none;">artchiv.es/s4ym/</a></span></span></div>
<div>
<span style="box-sizing: border-box;"><br /></span></div>
<div>
<span style="box-sizing: border-box;"><br /></span></div>
<div>
<pre style="font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan"><span class="ansigreen"><span class="ansired"><span style="font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13px; line-height: 18px; white-space: normal;">Francois Dion</span>
<a href="http://www.twitter.com/f_dion" style="color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none; white-space: normal;">@f_dion</a></span></span></span></pre>
</div>
</div>
<div style="clear: both;">
</div>
</div>
<div class="post-footer" style="background-color: #f9f9f9; border-bottom: 1px solid rgb(238, 238, 238); color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 10.8px; line-height: 1.6; margin: 20px -2px 0px; padding: 5px 10px;">
</div>
P.S. There is a bit more detail on this podcast as a whole, <a href="https://www.linkedin.com/pulse/something-your-mind-polymath-podcast-francois-dion">on linkedin</a>.Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com0tag:blogger.com,1999:blog-4717269872457503530.post-41174872801650143062016-09-30T14:37:00.000-04:002016-09-30T14:37:12.120-04:005 music things<div class="cell border-box-sizing text_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background-attachment: initial; background-clip: initial; background-image: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; margin: 0px; outline: none; padding: 5px; width: 1110px;">
<div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%;">
<div class="text_cell_render border-box-sizing rendered_html" style="border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;">
<h1 id="5-in-5" style="box-sizing: border-box; color: inherit; font-family: inherit; font-size: 25.998px; line-height: 1; margin: 0.538em 0px 0px;">
5 in 5<a class="anchor-link" href="https://www.blogger.com/blogger.g?blogID=4717269872457503530#5-in-5" style="box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration: none; visibility: hidden;"></a></h1>
I like to cover 5 things in 5 minutes for lightning talks. Or one thing. At the local<br />
Python user group, sometimes questions or other circumstances turn these 5<br />
in 5 more into a 5 in 10-15...
<br />
<h1 id="5-Music-Things" style="box-sizing: border-box; color: inherit; font-family: inherit; font-size: 25.998px; line-height: 1; margin: 1.08em 0px 0px;">
5 Music Things<a class="anchor-link" href="https://www.blogger.com/blogger.g?blogID=4717269872457503530#5-Music-Things" style="box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration: none; visibility: hidden;"></a></h1>
Eventually, after a year or two, I'll revisit a subject. I recently noticed that I had<br />
not talked about music related things in almost two and a half years, so I did<br />
5 quick Jupyter notebooks and presented that. Interestingly enough, none of<br />
these 5 things were covered back then. The github repo includes edited versions<br />
of the notebooks, based on the interactions at the meeting during my presentation.
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background-attachment: initial; background-clip: initial; background-image: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; padding: 5px; width: 1110px;">
<div class="prompt input_prompt" style="-webkit-user-select: none; border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right;">
</div>
<div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%;">
<div class="text_cell_render border-box-sizing rendered_html" style="border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;">
<div style="box-sizing: border-box;">
Requirements: All require the following</div>
<div class="highlight" style="background: rgb(248, 248, 248); box-sizing: border-box;">
<pre style="background-color: white; border-radius: 2px; border: 0px; box-sizing: border-box; line-height: inherit; margin: 1em 2em; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;">pip install jupyter
</pre>
</div>
<div style="box-sizing: border-box; margin-top: 1em;">
Alphabetically...</div>
<h1 id="1---Audio" style="box-sizing: border-box; color: inherit; font-family: inherit; font-size: 25.998px; line-height: 1; margin: 1.08em 0px 0px;">
1 - Audio<a class="anchor-link" href="https://www.blogger.com/blogger.g?blogID=4717269872457503530#1---Audio" style="box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration: none; visibility: hidden;"></a></h1>
<div style="box-sizing: border-box; margin-top: 1em;">
<a href="http://github.com/fdion/5_music_things/blob/master/notebooks/Audio.ipynb" style="box-sizing: border-box; color: #337ab7;">Notebook</a></div>
<h1 id="2---libROSA" style="box-sizing: border-box; color: inherit; font-family: inherit; font-size: 25.998px; line-height: 1; margin: 1.08em 0px 0px;">
2 - libROSA<a class="anchor-link" href="https://www.blogger.com/blogger.g?blogID=4717269872457503530#2---libROSA" style="box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration: none; visibility: hidden;"></a></h1>
<div style="box-sizing: border-box; margin-top: 1em;">
Here we will need to <em style="box-sizing: border-box;">pip install matplotlib</em> and <em style="box-sizing: border-box;">numpy</em>, and of course <em style="box-sizing: border-box;">librosa</em>.</div>
<div style="box-sizing: border-box; margin-top: 1em;">
<a href="http://github.com/fdion/5_music_things/blob/master/notebooks/librosa.ipynb" style="box-sizing: border-box; color: #337ab7;">Notebook</a></div>
<h1 id="3---music21" style="box-sizing: border-box; color: inherit; font-family: inherit; font-size: 25.998px; line-height: 1; margin: 1.08em 0px 0px;">
3 - music21<a class="anchor-link" href="https://www.blogger.com/blogger.g?blogID=4717269872457503530#3---music21" style="box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration: none; visibility: hidden;"></a></h1>
<div style="box-sizing: border-box; margin-top: 1em;">
<em style="box-sizing: border-box;">pip install music21</em></div>
<div style="box-sizing: border-box; margin-top: 1em;">
You'll need some external programs: <a href="http://lilypond.org/" style="box-sizing: border-box; color: #337ab7;">Lilypond</a> and <a href="https://musescore.org/" style="box-sizing: border-box; color: #337ab7;">Musescore</a></div>
<div style="box-sizing: border-box; margin-top: 1em;">
You also need launch scripts for each of them. On a mac, use the provided<br />
launch scripts in the mac/ folder of this repo. Make sure you <em style="box-sizing: border-box;">chmod a+x</em> them.<br />
Change the path in the notebook to reflect your own user path.</div>
<div style="box-sizing: border-box; margin-top: 1em;">
<a href="http://github.com/fdion/5_music_things/blob/master/notebooks/music21.ipynb" style="box-sizing: border-box; color: #337ab7;">Notebook</a></div>
<h1 id="4---python-sonic" style="box-sizing: border-box; color: inherit; font-family: inherit; font-size: 25.998px; line-height: 1; margin: 1.08em 0px 0px;">
4 - python-sonic<a class="anchor-link" href="https://www.blogger.com/blogger.g?blogID=4717269872457503530#4---python-sonic" style="box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration: none; visibility: hidden;"></a></h1>
<div style="box-sizing: border-box; margin-top: 1em;">
<em style="box-sizing: border-box;">pip install python-sonic</em></div>
<div style="box-sizing: border-box; margin-top: 1em;">
You'll need one external program: <a href="http://sonic-pi.net/" style="box-sizing: border-box; color: #337ab7;">Sonic Pi</a> and to start it before running through<br />
the notebook.</div>
<div style="box-sizing: border-box; margin-top: 1em;">
<a href="http://github.com/fdion/5_music_things/blob/master/notebooks/psonic.ipynb" style="box-sizing: border-box; color: #337ab7;">Notebook</a></div>
<h1 id="5---pyKnon" style="box-sizing: border-box; color: inherit; font-family: inherit; font-size: 25.998px; line-height: 1; margin: 1.08em 0px 0px;">
5 - pyKnon<a class="anchor-link" href="https://www.blogger.com/blogger.g?blogID=4717269872457503530#5---pyKnon" style="box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration: none; visibility: hidden;"></a></h1>
<div style="box-sizing: border-box; margin-top: 1em;">
<em style="box-sizing: border-box;">pip install pyknon</em></div>
<div style="box-sizing: border-box; margin-top: 1em;">
You'll need one external program: <a href="https://sourceforge.net/projects/timidity/" style="box-sizing: border-box; color: #337ab7;">timidity</a><br />
<br />
easily installed:<br />
<br />
<ul>
<li>in Linux with <em style="box-sizing: border-box;">apt-get install timidity</em></li>
<li>on a Mac with <em style="box-sizing: border-box;">brew install timidity</em></li>
</ul>
</div>
<div style="box-sizing: border-box; margin-top: 1em;">
This was mostly an excuse to demo that external command line tools like <em style="box-sizing: border-box;">timidity</em><br />
or <em style="box-sizing: border-box;">sox</em> can be used here.</div>
<div style="box-sizing: border-box; margin-top: 1em;">
<a href="http://github.com/fdion/5_music_things/blob/master/notebooks/pyknon.ipynb" style="box-sizing: border-box; color: #337ab7;">Notebook</a></div>
<div style="box-sizing: border-box; margin-top: 1em;">
<br /></div>
<div style="box-sizing: border-box; margin-top: 1em;">
<br /></div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background-attachment: initial; background-clip: initial; background-image: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; padding: 5px; width: 1110px;">
<div class="prompt input_prompt" style="-webkit-user-select: none; border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right;">
</div>
<div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%;">
<div class="text_cell_render border-box-sizing rendered_html" style="border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;">
<div style="box-sizing: border-box;">
Have fun!</div>
<div style="box-sizing: border-box; margin-top: 1em;">
<a href="http://twitter.com/f_dion" style="box-sizing: border-box; color: #337ab7;">@f_dion</a> - francois<em style="box-sizing: border-box;">(dot)</em>dion<em style="box-sizing: border-box;">(at)</em>gmail<em style="box-sizing: border-box;">(dot)</em>com</div>
<div style="box-sizing: border-box; margin-top: 1em;">
<br /></div>
<div style="box-sizing: border-box; margin-top: 1em;">
<b>P.S.</b>: Github repo at: <a href="https://github.com/fdion/5_music_things">https://github.com/fdion/5_music_things</a> but for some strange reason, github will not render the first (0-StartHere) notebook. This blog post is basically that notebook, putting things in context.</div>
</div>
</div>
</div>
Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com1tag:blogger.com,1999:blog-4717269872457503530.post-77483265526525049042016-09-25T22:32:00.001-04:002016-09-25T22:32:57.427-04:00Something for your mind: Polymath Podcast Episode 001<h2 style="background-color: white; color: #222222; font-weight: lighter;">
<span style="font-family: arial, sans-serif; font-size: x-small; font-weight: lighter;">Two topics will be covered:</span></h2>
<h2 style="background-color: white; color: #222222; font-weight: lighter;">
<span style="font-family: "arial" , sans-serif; font-size: large;">Chipmusic, limitations and creativity</span></h2>
<div style="background-color: white;">
<div style="color: #222222; font-size: large; font-weight: lighter;">
<span style="font-family: "arial" , sans-serif; font-size: 16px;"></span></div>
<h2 style="box-sizing: border-box; color: #222222; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: lighter; line-height: 1.1; margin-bottom: 10px; margin-top: 20px;">
<span style="box-sizing: border-box; font-family: arial, sans-serif;"><span style="font-size: large;">Numfocus (Open code = better science)</span></span></h2>
<div style="color: #222222; font-size: large; font-weight: lighter;">
<span style="box-sizing: border-box; font-family: arial, sans-serif; font-size: medium;"><br /></span></div>
<div style="color: #222222; font-size: large; font-weight: lighter;">
<span style="box-sizing: border-box; font-family: arial, sans-serif; font-size: medium;">The numfocus interview was recorded at PyData Carolinas 2016. There will be a future episode covering the keynotes, tutorials, talks and lightning talks later this year. This interview was really more about open source and less about PyData.</span></div>
<div style="color: #222222; font-size: large; font-weight: lighter;">
<span style="box-sizing: border-box; font-family: arial, sans-serif; font-size: medium;"><br /></span></div>
<div style="color: #222222; font-size: large; font-weight: lighter;">
<span style="box-sizing: border-box; font-family: arial, sans-serif; font-size: medium;">The episode concludes with Learn more, on Claude Shannon and Harry Nyquist.</span></div>
<div style="color: #222222; font-size: large; font-weight: lighter;">
<span style="box-sizing: border-box; font-family: arial, sans-serif; font-size: medium;"><br /></span></div>
<div style="color: #222222; font-size: large; font-weight: lighter;">
<span style="box-sizing: border-box; font-family: arial, sans-serif; font-size: medium;">Something for your mind is available on</span></div>
<div style="color: #222222; font-size: large; font-weight: lighter;">
<span style="box-sizing: border-box; font-family: arial, sans-serif; font-size: medium;"><div class="w_xlarge" style="font-family: arial, sans-serif-light, sans-serif; font-size: xx-large !important; font-weight: lighter !important;">
<br /></div>
<div class="w_xlarge" style="font-family: arial, sans-serif-light, sans-serif; font-size: xx-large !important; font-weight: lighter !important;">
art·chiv.es</div>
<div style="font-family: Times; font-size: medium;">
<div class="w_large" style="font-family: arial, sans-serif; font-size: large;">
<span class="phonetic">/'ärt,kīv/</span></div>
<div class="w_large" style="font-family: arial, sans-serif; font-size: large;">
<span class="phonetic"><br /></span></div>
</div>
</span></div>
<div>
<span style="box-sizing: border-box;"><span style="color: #222222; font-family: arial, sans-serif; font-size: medium;">at <a href="http://artchiv.es/s4ym/">artchiv.es/s4ym/</a></span></span></div>
<div>
<span style="box-sizing: border-box;"><br /></span></div>
<div>
<span style="box-sizing: border-box;"><br /></span></div>
<div>
<pre style="color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan"><span class="ansigreen"><span class="ansired"><span style="font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13px; line-height: 18px; white-space: normal;">Francois Dion</span>
<a href="http://www.twitter.com/f_dion" style="color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none; white-space: normal;">@f_dion</a></span></span></span></pre>
</div>
</div>
Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com0tag:blogger.com,1999:blog-4717269872457503530.post-23701655353785790462016-09-18T21:23:00.000-04:002016-09-18T21:23:59.039-04:00Something for your mind: Polymath Podcast launched<br />
<dt style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; font-weight: bold; line-height: 1.42857;">Some episodes</dt>
<dd style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.42857; margin-left: 0px;">will have more Art content, some will have more Business content, some will have more Science content, and some will be a nice blend of different things. But for sure, the show will live up to its name and provide you with “something for your mind”. It might raise more questions than it answers, and that is fine too.</dd><dd style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.42857; margin-left: 0px;"><br />
<b>Episode 000</b></dd><dd style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.42857; margin-left: 0px;">Listen to Something for your mind on <span style="background-color: transparent;"><a href="http://artchiv.es/s4ym/">http://Artchiv.es</a></span><br />
<br />
<pre style="color: #222222; font-size: 13.2px; line-height: 16.5px;"><span class="ansicyan"><span class="ansigreen"><span class="ansired"><span style="font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13px; line-height: 18px; white-space: normal;">Francois Dion</span>
<a href="http://www.twitter.com/f_dion" style="color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none; white-space: normal;">@f_dion</a></span></span></span></pre>
</dd>Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com0tag:blogger.com,1999:blog-4717269872457503530.post-88654457626729471212016-04-18T19:59:00.000-04:002016-04-18T19:59:44.356-04:00Los Alamos 10742: The Making of<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="background: rgb(255, 255, 255); border: 1px solid rgb(238, 238, 238); box-shadow: rgba(0, 0, 0, 0.0980392) 1px 1px 5px; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 18.48px; margin-left: auto; margin-right: auto; padding: 5px; position: relative; text-align: center;"><tbody>
<tr><td><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT55fRi0WWFpDqBsuCoIyhhq30M8ze2m5dbsd22B-uT9gMdOpRKnoJY7x6AOwIb0jkncCHBHocmNmlX4RMwbab6X3PoBDhwWXO3NLPOdVceMHaec4IdFW-X1xd5WZVKfQgNPQknYNU9hY/s1600/Stan_Ulam_Memo_10742.png" imageanchor="1" style="color: #888888; margin-left: auto; margin-right: auto; text-decoration: none;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT55fRi0WWFpDqBsuCoIyhhq30M8ze2m5dbsd22B-uT9gMdOpRKnoJY7x6AOwIb0jkncCHBHocmNmlX4RMwbab6X3PoBDhwWXO3NLPOdVceMHaec4IdFW-X1xd5WZVKfQgNPQknYNU9hY/s640/Stan_Ulam_Memo_10742.png" style="background: transparent; border: none; box-shadow: rgba(0, 0, 0, 0.0980392) 0px 0px 0px; padding: 0px; position: relative;" width="587" /></a></td></tr>
<tr><td class="tr-caption" style="font-size: 10.56px;">Modern rendering of the original 1947 Memo 10742</td></tr>
</tbody></table>
<h3 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; margin: 0px; position: relative;">
Before reading</h3>
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 18.48px;" />
<span style="color: #222222; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif;"><span style="background-color: white; font-size: 13.2px; line-height: 18.48px;">If you've not read the first part (<a href="http://raspberry-python.blogspot.com/2016/03/the-return-of-los-alamos-memo-10742.html">The return of the Los Alamos Memo 10742</a>) of this blog, go there now. There will be a link to come back here at the end, so you don't forget ...</span></span><br />
<span style="color: #222222; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif;"><span style="background-color: white; font-size: 13.2px; line-height: 18.48px;"><br /></span></span>
<br />
<h3 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; margin: 0px; position: relative;">
Your assignment</h3>
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 18.48px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13.2px; line-height: 18.48px;">If you remember, in the previous article, I had asked the students (and, you, the reader) to try this exercise:</span><br />
<br />
<blockquote class="tr_bq" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 18.48px;">
"Replicate either:<br />
<b>a</b>) the whole memo<br />
or<br />
<b>b</b>) the list of numbers </blockquote>
<blockquote class="tr_bq" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 18.48px;">
Whichever assignment you choose, the numbers must be generated programmatically."</blockquote>
<br />
One possible way<br />
<br />
We'll use Python 3 and do b):<br />
<br />
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">
In [1]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3">
<pre><span class="k">def</span> <span class="nf">num_to_words</span><span class="p">(</span><span class="n">n</span><span class="p">):</span>
<span class="sd">"""Returns a number in words, covering 0 to 100 inclusive."""</span>
<span class="n">n2w</span> <span class="o">=</span> <span class="p">{</span>
<span class="mi">0</span><span class="p">:</span> <span class="s">'zero'</span><span class="p">,</span> <span class="mi">1</span><span class="p">:</span> <span class="s">'one'</span><span class="p">,</span> <span class="mi">2</span><span class="p">:</span> <span class="s">'two'</span><span class="p">,</span> <span class="mi">3</span><span class="p">:</span> <span class="s">'three'</span><span class="p">,</span> <span class="mi">4</span><span class="p">:</span> <span class="s">'four'</span><span class="p">,</span> <span class="mi">5</span><span class="p">:</span> <span class="s">'five'</span><span class="p">,</span> <span class="mi">6</span><span class="p">:</span> <span class="s">'six'</span><span class="p">,</span>
<span class="mi">7</span><span class="p">:</span> <span class="s">'seven'</span><span class="p">,</span> <span class="mi">8</span><span class="p">:</span> <span class="s">'eight'</span><span class="p">,</span> <span class="mi">9</span><span class="p">:</span> <span class="s">'nine'</span><span class="p">,</span> <span class="mi">10</span><span class="p">:</span> <span class="s">'ten'</span><span class="p">,</span> <span class="mi">11</span><span class="p">:</span> <span class="s">'eleven'</span><span class="p">,</span> <span class="mi">12</span><span class="p">:</span> <span class="s">'a dozen'</span><span class="p">,</span>
<span class="mi">13</span><span class="p">:</span> <span class="s">'thirteen'</span><span class="p">,</span> <span class="mi">14</span><span class="p">:</span> <span class="s">'fourteen'</span><span class="p">,</span> <span class="mi">15</span><span class="p">:</span> <span class="s">'fifteen'</span><span class="p">,</span> <span class="mi">16</span><span class="p">:</span> <span class="s">'sixteen'</span><span class="p">,</span> <span class="mi">17</span><span class="p">:</span> <span class="s">'seventeen'</span><span class="p">,</span>
<span class="mi">18</span><span class="p">:</span> <span class="s">'eighteen'</span><span class="p">,</span> <span class="mi">19</span><span class="p">:</span> <span class="s">'nineteen'</span><span class="p">,</span>
<span class="mi">20</span><span class="p">:</span> <span class="s">'twenty'</span><span class="p">,</span> <span class="mi">30</span><span class="p">:</span> <span class="s">'thirty'</span><span class="p">,</span> <span class="mi">40</span><span class="p">:</span> <span class="s">'fourty'</span><span class="p">,</span> <span class="mi">50</span><span class="p">:</span> <span class="s">'fifty'</span><span class="p">,</span> <span class="mi">60</span><span class="p">:</span> <span class="s">'sixty'</span><span class="p">,</span> <span class="mi">70</span><span class="p">:</span> <span class="s">'seventy'</span><span class="p">,</span>
<span class="mi">80</span><span class="p">:</span> <span class="s">'eighty'</span><span class="p">,</span> <span class="mi">90</span><span class="p">:</span> <span class="s">'ninety'</span><span class="p">,</span> <span class="mi">100</span><span class="p">:</span> <span class="s">'one hundred'</span>
<span class="p">}</span>
<span class="k">try</span><span class="p">:</span>
<span class="k">return</span> <span class="n">n2w</span><span class="p">[</span><span class="n">n</span><span class="p">]</span>
<span class="k">except</span> <span class="ne">KeyError</span><span class="p">:</span>
<span class="k">return</span> <span class="n">n2w</span><span class="p">[</span><span class="n">n</span><span class="o">-</span><span class="n">n</span><span class="o">%</span><span class="k">10</span>] + ' ' + n2w[n%10]
</pre>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
The famous twelve as 'a dozen'</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">
In [2]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3">
<pre><span class="n">num_to_words</span><span class="p">(</span><span class="mi">12</span><span class="p">)</span>
</pre>
</div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="prompt output_prompt">
Out[2]:</div>
<div class="output_text output_subarea output_execute_result">
<pre>'a dozen'</pre>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">
In [3]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3">
<pre><span class="n">num_to_words</span><span class="p">(</span><span class="mi">7</span><span class="p">)</span>
</pre>
</div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="prompt output_prompt">
Out[3]:</div>
<div class="output_text output_subarea output_execute_result">
<pre>'seven'</pre>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">
In [4]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3">
<pre><span class="n">num_to_words</span><span class="p">(</span><span class="mi">67</span><span class="p">)</span>
</pre>
</div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="prompt output_prompt">
Out[4]:</div>
<div class="output_text output_subarea output_execute_result">
<pre>'sixty seven'</pre>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">
In [5]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3">
<pre><span class="n">num_to_words</span><span class="p">(</span><span class="mi">100</span><span class="p">)</span>
</pre>
</div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="prompt output_prompt">
Out[5]:</div>
<div class="output_text output_subarea output_execute_result">
<pre>'one hundred'</pre>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
Generating the alphabetical word list, not including number 10</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">
In [6]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3">
<pre><span class="n">word_tuples</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">([(</span><span class="n">num_to_words</span><span class="p">(</span><span class="n">num</span><span class="p">),</span><span class="n">num</span><span class="p">)</span> <span class="k">for</span> <span class="n">num</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">101</span><span class="p">)</span> <span class="k">if</span> <span class="n">num</span> <span class="o">!=</span> <span class="mi">10</span><span class="p">])</span>
</pre>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
Now that the list is sorted alphabetically, just want the second item of each tuple [1]</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">
In [7]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3">
<pre><span class="n">result</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="nb">zip</span><span class="p">(</span><span class="o">*</span><span class="n">word_tuples</span><span class="p">))[</span><span class="mi">1</span><span class="p">]</span>
</pre>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
Let's print this.</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">
In [8]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3">
<pre><span class="nb">print</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">result</span><span class="p">)[</span><span class="mi">1</span><span class="p">:</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span>
</pre>
</div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="prompt">
</div>
<div class="output_subarea output_stream output_stdout output_text">
<pre>12, 8, 18, 80, 88, 85, 84, 89, 81, 87, 86, 83, 82, 11, 15, 50, 58, 55, 54, 59, 51, 57, 56, 53, 52, 5, 4, 14, 40, 48, 45, 44, 49, 41, 47, 46, 43, 42, 9, 19, 90, 98, 95, 94, 99, 91, 97, 96, 93, 92, 1, 100, 7, 17, 70, 78, 75, 74, 79, 71, 77, 76, 73, 72, 6, 16, 60, 68, 65, 64, 69, 61, 67, 66, 63, 62, 13, 30, 38, 35, 34, 39, 31, 37, 36, 33, 32, 3, 20, 28, 25, 24, 29, 21, 27, 26, 23, 22, 2, 0
</pre>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">
In [ ]:</div>
</div>
</div>
<br />
If you read the commentaries for the previous article on the subject, you surely ran into Edward Carney's almost working proposed solution. I am adding it here as another way of attacking the problem. Edward used a module named num2words. As you'll discover over years of writing python code, most anything you can think of has already been done. And in some cases, multiple times.<br />
<br />
Why did I say almost working? Let's see if somebody finds the issue. If not I'll post the correction in a future post (the very next one will diverge from this subject to talk about fractals). I'll also introduce the inflect module and since we're introducing some NLP concepts, I'll bring in NLTK too.<br />
<br />
<div class="cell code_cell rendered selected" tabindex="2">
<div class="input">
<div class="prompt input_prompt">
In [1]:</div>
<div class="inner_cell">
<div class="input_area">
<div class="CodeMirror cm-s-ipython">
<div style="height: 0px; left: 198.8px; overflow: hidden; position: relative; top: 5.59999px; width: 3px;">
<textarea autocapitalize="off" autocorrect="off" spellcheck="false" style="height: 1em; outline: medium none; padding: 0px; position: absolute; width: 1px;" tabindex="0" wrap="off"></textarea></div>
<div class="CodeMirror-scroll" draggable="true" tabindex="-1">
<div class="CodeMirror-sizer" style="border-right-width: 30px; margin-bottom: 0px; margin-left: 0px; min-height: 28px; min-width: 196.2px; padding-bottom: 0px; padding-right: 0px;">
<div style="position: relative; top: 0px;">
<div class="CodeMirror-lines">
<div style="outline: medium none; position: relative;">
<div class="CodeMirror-measure">
</div>
<div class="CodeMirror-measure">
</div>
<div style="position: relative; z-index: 1;">
</div>
<div class="CodeMirror-cursors" style="visibility: hidden;">
<div class="CodeMirror-cursor" style="height: 17px; left: 193.2px; top: 0px;">
</div>
</div>
<div class="CodeMirror-code">
<pre class=" CodeMirror-line "><span class="cm-keyword">import</span> <span class="cm-variable">num2words</span> <span class="cm-keyword">as</span> <span class="cm-variable">n2w</span></pre>
</div>
</div>
</div>
</div>
</div>
<div style="height: 30px; position: absolute; top: 28px; width: 1px;">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="output_wrapper">
</div>
</div>
<div class="cell code_cell rendered unselected" tabindex="2">
<div class="input">
<div class="prompt input_prompt">
In [2]:</div>
<div class="inner_cell">
<div class="input_area">
<div class="CodeMirror cm-s-ipython">
<div style="height: 0px; left: 5.60001px; overflow: hidden; position: relative; top: 5.60001px; width: 3px;">
<textarea autocapitalize="off" autocorrect="off" spellcheck="false" style="height: 1em; outline: medium none; padding: 0px; position: absolute; width: 1px;" tabindex="0" wrap="off"></textarea></div>
<div class="CodeMirror-scroll" draggable="true" tabindex="-1">
<div class="CodeMirror-sizer" style="border-right-width: 30px; margin-bottom: 0px; margin-left: 0px; min-height: 181px; min-width: 507px; padding-bottom: 0px; padding-right: 0px;">
<div style="position: relative; top: 0px;">
<div class="CodeMirror-lines">
<div style="outline: medium none; position: relative;">
<div class="CodeMirror-measure">
</div>
<div class="CodeMirror-measure">
</div>
<div style="position: relative; z-index: 1;">
</div>
<div class="CodeMirror-cursors">
<div class="CodeMirror-cursor" style="height: 17px; left: 0px; top: 0px;">
</div>
</div>
<div class="CodeMirror-code">
<pre class=" CodeMirror-line "><span class="cm-variable">key_set</span> = []</pre>
<pre class=" CodeMirror-line ">[<span class="cm-variable">key_set</span>.<span class="cm-variable">append</span>(<span class="cm-variable">n2w</span>.<span class="cm-variable">num2words</span>(<span class="cm-variable">i</span>)) <span class="cm-keyword">for</span> <span class="cm-variable">i</span> <span class="cm-keyword">in</span> <span class="cm-builtin">list</span>(<span class="cm-builtin">range</span>(<span class="cm-number">101</span>))]</pre>
<pre class=" CodeMirror-line "><span class="cm-variable">key_set</span>[<span class="cm-number">12</span>] = <span class="cm-string">'dozen'</span></pre>
<pre class=" CodeMirror-line "><span class="cm-variable">key_set</span>[<span class="cm-number">100</span>] = <span class="cm-string">'one hundred'</span></pre>
<pre class=" CodeMirror-line "><span class="cm-variable">numset_dict</span> = <span class="cm-builtin">dict</span>(<span class="cm-builtin">zip</span>(<span class="cm-variable">key_set</span>,<span class="cm-builtin">list</span>(<span class="cm-builtin">range</span>(<span class="cm-number">101</span>))))</pre>
<pre class=" CodeMirror-line "><span class="cm-variable">line_breaks</span> = [<span class="cm-number">14</span>, <span class="cm-number">30</span>, <span class="cm-number">46</span>, <span class="cm-number">62</span>, <span class="cm-number">78</span>, <span class="cm-number">94</span>]</pre>
<pre class=" CodeMirror-line "><span class="cm-keyword">for</span> <span class="cm-variable">i</span>, <span class="cm-variable">k</span> <span class="cm-keyword">in</span> <span class="cm-builtin">enumerate</span>(<span class="cm-variable">yvals</span>):</pre>
<pre class=" CodeMirror-line "> <span class="cm-builtin">print</span>(<span class="cm-string">'{} '</span>.<span class="cm-builtin">format</span>(<span class="cm-variable">k</span>[<span class="cm-number">1</span>]),<span class="cm-variable">end</span>=<span class="cm-string">''</span>)</pre>
<pre class=" CodeMirror-line "> <span class="cm-keyword">if</span> <span class="cm-variable">i</span> <span class="cm-keyword">in</span> <span class="cm-variable">line_breaks</span>:</pre>
<pre class=" CodeMirror-line "> <span class="cm-builtin">print</span>(<span class="cm-string">'\n'</span>)</pre>
</div>
</div>
</div>
</div>
</div>
<div style="height: 30px; position: absolute; top: 181px; width: 1px;">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="out_prompt_overlay prompt" title="click to scroll output; double click to hide">
</div>
<div class="output">
<div class="output_area">
<div class="prompt">
</div>
<div class="output_subarea output_text output_error">
<pre><span class="ansired">---------------------------------------------------------------------------</span>
<span class="ansired">NameError</span> Traceback (most recent call last)
<span class="ansigreen"><ipython-input-2-6c7998a49267></span> in <span class="ansicyan"><module><span class="ansiblue">()</span>
<span class="ansigreen"> 5</span> numset_dict <span class="ansiblue">=</span> dict<span class="ansiblue">(</span>zip<span class="ansiblue">(</span>key_set<span class="ansiblue">,</span>list<span class="ansiblue">(</span>range<span class="ansiblue">(</span><span class="ansicyan">101</span><span class="ansiblue">)</span><span class="ansiblue">)</span><span class="ansiblue">)</span><span class="ansiblue">)</span><span class="ansiblue"></span>
<span class="ansigreen"> 6</span> line_breaks <span class="ansiblue">=</span> <span class="ansiblue">[</span><span class="ansicyan">14</span><span class="ansiblue">,</span> <span class="ansicyan">30</span><span class="ansiblue">,</span> <span class="ansicyan">46</span><span class="ansiblue">,</span> <span class="ansicyan">62</span><span class="ansiblue">,</span> <span class="ansicyan">78</span><span class="ansiblue">,</span> <span class="ansicyan">94</span><span class="ansiblue">]</span><span class="ansiblue"></span>
<span class="ansigreen">----> 7<span class="ansired"> <span class="ansigreen">for</span> i<span class="ansiblue">,</span> k <span class="ansigreen">in</span> enumerate<span class="ansiblue">(</span>yvals<span class="ansiblue">)</span><span class="ansiblue">:</span><span class="ansiblue"></span>
<span class="ansigreen"> 8</span> print<span class="ansiblue">(</span><span class="ansiblue">'{} '</span><span class="ansiblue">.</span>format<span class="ansiblue">(</span>k<span class="ansiblue">[</span><span class="ansicyan">1</span><span class="ansiblue">]</span><span class="ansiblue">)</span><span class="ansiblue">,</span>end<span class="ansiblue">=</span><span class="ansiblue">''</span><span class="ansiblue">)</span><span class="ansiblue"></span>
<span class="ansigreen"> 9</span> <span class="ansigreen">if</span> i <span class="ansigreen">in</span> line_breaks<span class="ansiblue">:</span><span class="ansiblue"></span>
<span class="ansired">NameError</span>: name 'yvals' is not defined
</span></span></span></pre>
<pre><span class="ansicyan"><span class="ansigreen"><span class="ansired">
</span></span></span></pre>
<pre><span class="ansicyan"><span class="ansigreen"><span class="ansired">
</span></span></span></pre>
<pre><span class="ansicyan"><span class="ansigreen"><span class="ansired">You know the solution? Post it in the comments section.</span></span></span></pre>
<pre><span class="ansicyan"><span class="ansigreen"><span class="ansired">
</span></span></span></pre>
<pre><span class="ansicyan"><span class="ansigreen"><span class="ansired"><span style="background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13px; line-height: 18px; white-space: normal;">Francois Dion</span>
<a href="http://www.twitter.com/f_dion" style="background-color: white; color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none; white-space: normal;">@f_dion</a></span></span></span></pre>
<pre></pre>
</div>
</div>
</div>
</div>
</div>
Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com0tag:blogger.com,1999:blog-4717269872457503530.post-2979704154529616662016-03-14T14:40:00.000-04:002016-03-14T14:40:27.574-04:00The date is the title...<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIihs-ttOyiwCi3dIfYjzTPl1vsgmBxtTsew2EVdRXSiROgYoWtfzcFpl3qrhbE4n-95Bi0W8rkN2i5xBb4WoimGOhGD4iPMkSdwWFAeRFe9uMwfzK_kg0FCFLozfWDIj8JdnhhApWjbQ/s1600/not_turtle_graphics.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIihs-ttOyiwCi3dIfYjzTPl1vsgmBxtTsew2EVdRXSiROgYoWtfzcFpl3qrhbE4n-95Bi0W8rkN2i5xBb4WoimGOhGD4iPMkSdwWFAeRFe9uMwfzK_kg0FCFLozfWDIj8JdnhhApWjbQ/s640/not_turtle_graphics.png" width="552" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">J. Venn - Logic of Chance</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<h3>
Turtle Graphics?</h3>
<br />
The above, looks suspiciously like a printout from my first session with Apple Logo (<a href="https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=10&cad=rja&uact=8&ved=0ahUKEwjnj82m3sDLAhWDND4KHaZOD94QFghSMAk&url=https%3A%2F%2Fapplelogointroduction.wikispaces.com%2Ffile%2Fview%2FApple%2520Logo.pdf%2F334025686%2FApple%2520Logo.pdf&usg=AFQjCNFQfhnO7tYf9P_DFIKaBRXBJfm56w&sig2=CbQcf18MHdMobx2lo9b8Ig">the language</a>, not the branding), before I figured the command for "pen up"...<br />
<br />
A few months back, I was reading a few books and found the above in one of them. It is titled "<i>Logic of Chance</i>", by John Venn (mostly known for the Venn diagram). The year? <b>1866</b>.<br />
<br />
So, where were we? Ah yes...<br />
<br />
<h3>
3/14/16</h3>
<br />
Yes, that famous sequence of number. What was the story with John Venn and <i>pi</i>, here? Whereas I used digits 0-9 in "<a href="http://raspberry-python.blogspot.com/2015/12/the-10-colors-of-pi.html">the 10 colors of pi</a>", John used digits 0-7, discarding all 8s and 9s. Since back then there were no computers, he picked his numbers from a book (by R. Shank) which had 707 digits of pi, leaving him with 568 digits between 0 and 7. He mapped 0 to 7 to directions (10 directions might have felt a bit odd, at 36 degrees, versus nice 45 degree lines):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPf-YyiC2PRW5nGggl9RFOlL1ta6Px7KaxLOANN1ftflyNbWknakyQeqg0PiDxia6gk4frbGANM0MgCo42duXthEP5a6fvzOz3M9H_W_jY-N-cdViujvBh_A9_Ut5qOmMOjP0ZcOvq3PE/s1600/compass_rose_by_dlimedia-d4q37iu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPf-YyiC2PRW5nGggl9RFOlL1ta6Px7KaxLOANN1ftflyNbWknakyQeqg0PiDxia6gk4frbGANM0MgCo42duXthEP5a6fvzOz3M9H_W_jY-N-cdViujvBh_A9_Ut5qOmMOjP0ZcOvq3PE/s200/compass_rose_by_dlimedia-d4q37iu.png" width="170" /></a></div>
<br />
<br />
Although he doesn't specify the mapping, it is easy to infer from the graph. The first digit after the decimal is 1, then 4 and we can see the path as NE, then S, so:<br />
<br />
<br />
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 130px;">
<colgroup><col span="2" style="width: 65pt;" width="65"></col> </colgroup><tbody>
<tr height="15" style="height: 15.0pt;">
<td align="left" class="xl63" height="15" style="height: 15.0pt; width: 65pt;" width="65">0</td>
<td class="xl63" style="border-left: none; width: 65pt;" width="65">N</td>
</tr>
<tr height="15" style="height: 15.0pt;">
<td align="left" class="xl63" height="15" style="border-top: none; height: 15.0pt;">1</td>
<td class="xl63" style="border-left: none; border-top: none;">NE</td>
</tr>
<tr height="15" style="height: 15.0pt;">
<td align="left" class="xl63" height="15" style="border-top: none; height: 15.0pt;">2</td>
<td class="xl63" style="border-left: none; border-top: none;">E</td>
</tr>
<tr height="15" style="height: 15.0pt;">
<td align="left" class="xl63" height="15" style="border-top: none; height: 15.0pt;">3</td>
<td class="xl63" style="border-left: none; border-top: none;">SE</td>
</tr>
<tr height="15" style="height: 15.0pt;">
<td align="left" class="xl63" height="15" style="border-top: none; height: 15.0pt;">4</td>
<td class="xl63" style="border-left: none; border-top: none;">S</td>
</tr>
<tr height="15" style="height: 15.0pt;">
<td align="left" class="xl63" height="15" style="border-top: none; height: 15.0pt;">5</td>
<td class="xl63" style="border-left: none; border-top: none;">SW</td>
</tr>
<tr height="15" style="height: 15.0pt;">
<td align="left" class="xl63" height="15" style="border-top: none; height: 15.0pt;">6</td>
<td class="xl63" style="border-left: none; border-top: none;">W</td>
</tr>
<tr height="15" style="height: 15.0pt;">
<td align="left" class="xl63" height="15" style="border-top: none; height: 15.0pt;">7</td>
<td class="xl63" style="border-left: none; border-top: none;">NW</td>
</tr>
</tbody></table>
<br /><h3>
The random walk</h3>
<div>
He would then move by 1 unit in the direction of each digit / direction mapping. NE, S, NE, SW, skip 9, E, so on and so forth. (NB: This is easy to reproduce in python with the turtle module. A quick search of my blog will get you started on this, from a <b>pi generator</b> to <b>import turtle</b>.)</div>
<div>
<br /></div>
<div>
His conclusion stated: </div>
<blockquote class="tr_bq">
"The result seems to me to furnish a very fair graphical indication of randomness". </blockquote>
<div>
<br /></div>
<div>
<span style="background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13px; line-height: 18px;">Francois Dion</span><br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 18.48px;" /><a href="http://www.twitter.com/f_dion" style="background-color: white; color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none;">@f_dion</a></div>
Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com0tag:blogger.com,1999:blog-4717269872457503530.post-57651408282815806482016-03-05T19:13:00.001-05:002016-04-18T21:42:38.405-04:00The return of the Los Alamos Memo 10742 -<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT55fRi0WWFpDqBsuCoIyhhq30M8ze2m5dbsd22B-uT9gMdOpRKnoJY7x6AOwIb0jkncCHBHocmNmlX4RMwbab6X3PoBDhwWXO3NLPOdVceMHaec4IdFW-X1xd5WZVKfQgNPQknYNU9hY/s1600/Stan_Ulam_Memo_10742.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT55fRi0WWFpDqBsuCoIyhhq30M8ze2m5dbsd22B-uT9gMdOpRKnoJY7x6AOwIb0jkncCHBHocmNmlX4RMwbab6X3PoBDhwWXO3NLPOdVceMHaec4IdFW-X1xd5WZVKfQgNPQknYNU9hY/s640/Stan_Ulam_Memo_10742.png" width="587" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Modern rendering of the original 1947 Memo 10742</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h3>
The mathematician prankster</h3>
<br />
Can you imagine yourself receiving this memo in your inbox in Washington in 1947? There's a certain artistic je ne sais quoi in this memo...<br />
<br />
This prank was made by J Carson Mark and Stan Ulam. A&S was Administration and Services.<br />
<br />
And Ulam, well known for working on the <b>Manhattan project</b>, also worked on really interesting things in mathematics. Specifically, a collaboration with <b>Nicholas Constantine Metropolis</b> and <b>John Von Neumann</b>. You might know this as the <b>Monte Carlo </b>method (<i>so named due to Ulam's uncle always asking for money to go and gamble in a Monte Carlo casino...</i>). Some people have learned about a specific Monte Carlo simulation (the first) known as <a href="https://en.wikipedia.org/wiki/Buffon%27s_needle">Buffon's needle</a>.<br />
<br />
<h3>
Copying the prankster</h3>
When I stumbled upon this many years ago, I decided that it would make a fantastic programming challenge for a workshop and/or class. I first tried it in a Java class, but people didn't get quite into it. Many years later I redid it as part of a weekly Python class I was teaching at a previous employer.<br />
<br />
The document is the output of a Python script. In order to make the memo look like it came from the era, I photocopied it. It still didn't look quite right, so I then scanned that into Gimp, bumped the Red and Blue in the color balance tool to give it that stencil / mimeograph / ditto look.<br />
<h3>
<br />Your assignment</h3>
<br />
Here is what I asked the students:<br />
<br />
<blockquote class="tr_bq">
"Replicate either:<br />
<b>a</b>) the whole memo<br />
or<br />
<b>b</b>) the list of numbers </blockquote>
<blockquote class="tr_bq">
Whichever assignment you choose, the numbers must be generated programmatically."</blockquote>
<br />
That was basically it. So, go ahead and try it. In Python. Or in R, or whatever you fancy and post a solution as a comment.<br />
<br />
We will come back in some days (so everybody gets a chance to try it) and present some possible methods of doing this. Oh, and why the title of "the return of the Los Alamos Memo"? Well, I noticed I had <a href="http://raspberry-python.blogspot.com/2013/04/python-los-alamos-memo-10742.html">blogged about it before</a> some years back, but never detailed it...<br />
<br />
<h3>
Learning more on Stan Ulam</h3>
<br />
See the <a href="https://en.wikipedia.org/wiki/Stanislaw_Ulam">wikipedia entry</a> and also:<br />
<br />
<h3 class="barcolor" style="background: rgb(61, 76, 133); font-family: Arial, Helvetica, sans-serif; font-size: 11px; height: 13px; letter-spacing: 0.01em; margin: 0px 0px 5px; padding: 4px 10px 3px; text-transform: uppercase; vertical-align: top; width: 378px;">
<a href="http://la-science.lanl.gov/lascience15.shtml"><span style="color: #f3f3f3;">LOS ALAMOS SCIENCE NO. 15, 1987</span></a></h3>
<br />
<br />
[EDIT: Part 2 is at: <a href="http://raspberry-python.blogspot.com/2016/04/los-alamos-10742-making-of.html">los-alamos-10742-making-of.html</a>]<br />
<br />
<span style="background-color: white; color: #222222; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13px; line-height: 18px;">Francois Dion</span><br />
<a href="http://www.twitter.com/f_dion" style="background-color: white; color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none;">@f_dion</a>Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com6tag:blogger.com,1999:blog-4717269872457503530.post-24238570042047125632016-01-04T21:05:00.000-05:002016-01-04T21:05:39.337-05:00Stack overflow en espanolEn caso que no lo ha encontrado, el sitio stack overflow ahora es disponible en español. Y, no todas las respuestas son las mismas que la del stack overflow en ingles. Hay una buena cantidad de contenido exclusivo.<br />
<div>
<br /></div>
<h2>
#Python</h2>
<div>
Por ejemplo, alguien pregunto: <span style="background-color: white; color: #222426; font-family: Arial, Helvetica, sans-serif; line-height: 1.3;">Cómo instalar MySQLdb en OS X?</span></div>
<div>
<span style="background-color: white; color: #222426; font-family: Arial, Helvetica, sans-serif; line-height: 1.3;"><br /></span></div>
<div>
<span style="background-color: white; color: #222426; font-family: Arial, Helvetica, sans-serif; line-height: 1.3;">Hay varias respuestas, pero yo se que la mía es algo que yo he escrito solamente en español:</span></div>
<div>
<span style="background-color: white; color: #222426; font-family: Arial, Helvetica, sans-serif; line-height: 1.3;"><br /></span></div>
<div>
<span style="background-color: white; line-height: 20.8px;"><span style="color: #222426; font-family: Arial, Helvetica, sans-serif;"><a href="http://es.stackoverflow.com/questions/973/python-c%C3%B3mo-instalar-mysqldb-en-os-x/1122#1122">Como-instalar-mysqldb-en-os-x/1122#1122</a>:</span></span></div>
<div>
<span style="background-color: white; line-height: 20.8px;"><br /></span></div>
<div>
<div style="background-color: white; border: 0px; clear: both; color: #222426; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;">
<code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">Mysql-python</code> solo es compatible con <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">python 2</code> (<a href="https://python3wos.appspot.com/" rel="nofollow" style="border: 0px; color: #005999; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;">Python3 WOS</a>), y el <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">pip</code> es de <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">python 3</code>:</div>
<pre class="default prettyprint prettyprinted" style="background-color: #eeeeee; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;"><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px;">$ which pip</span></code></pre>
<div style="background-color: white; border: 0px; clear: both; color: #222426; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;">
Muy probablemente devolverá algo similar a:</div>
<pre class="default prettyprint prettyprinted" style="background-color: #eeeeee; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;"><span class="str" style="border: 0px; color: maroon; margin: 0px; padding: 0px;">/Library/</span><span class="typ" style="border: 0px; color: #2b91af; margin: 0px; padding: 0px;">Frameworks</span><span class="pun" style="border: 0px; color: black; margin: 0px; padding: 0px;">/</span><span class="typ" style="border: 0px; color: #2b91af; margin: 0px; padding: 0px;">Python</span><span class="pun" style="border: 0px; color: black; margin: 0px; padding: 0px;">.</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px;">framework</span><span class="pun" style="border: 0px; color: black; margin: 0px; padding: 0px;">/</span><span class="typ" style="border: 0px; color: #2b91af; margin: 0px; padding: 0px;">Versions</span><span class="pun" style="border: 0px; color: black; margin: 0px; padding: 0px;">/</span><span class="lit" style="border: 0px; color: maroon; margin: 0px; padding: 0px;">3.x</span><span class="pun" style="border: 0px; color: black; margin: 0px; padding: 0px;">/</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px;">bin</span><span class="pun" style="border: 0px; color: black; margin: 0px; padding: 0px;">/</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px;">pip</span></code></pre>
<div style="background-color: white; border: 0px; clear: both; color: #222426; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;">
Para hacer la instalación bajo <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">python 2</code>, hay que seleccionar el <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">pip</code> de <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">python 2</code>:</div>
<pre class="default prettyprint prettyprinted" style="background-color: #eeeeee; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;"><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px;">$ sudo pip2 install </span><span class="typ" style="border: 0px; color: #2b91af; margin: 0px; padding: 0px;">MySQL</span><span class="pun" style="border: 0px; color: black; margin: 0px; padding: 0px;">-</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px;">python</span></code></pre>
<div style="background-color: white; border: 0px; clear: both; color: #222426; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;">
La otra opción es un módulo puro <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">python</code> que es compatible <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">python 2</code> y <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">3</code>, como <a href="https://pypi.python.org/pypi/PyMySQL" rel="nofollow" style="border: 0px; color: #005999; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;">pymysql</a>.</div>
<div style="background-color: white; border: 0px; clear: both; color: #222426; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;">
Al final, para evitar los conflictos de versiones y también los <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">python</code> de Apple (con varios problemas) es mejor hacer la instalación de <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">python 2.x</code> y <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">3.x</code> con <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">homebrew</code>, y utilizar <a href="https://pypi.python.org/pypi/virtualenv" rel="nofollow" style="border: 0px; color: #005999; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;">virtualenv</a> que permite la creación de entornos virtuales <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">python</code>, cada cual con solo los requisitos para el entorno. Sin entornos virtuales hay que siempre ser explicito: <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">pip2</code> o <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">pip3</code> en vez de <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">pip</code>.<br />
<br />
<br />
<br />
<br />
<div class="cell border-box-sizing text_cell rendered">
<span style="background-color: white; color: #222222; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13px; line-height: 18px;">Francois Dion</span><br />
<a href="http://www.twitter.com/f_dion" style="color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none;">@f_dion</a> </div>
</div>
</div>
Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com1tag:blogger.com,1999:blog-4717269872457503530.post-17909494631064948952015-12-31T18:21:00.001-05:002016-01-01T11:38:19.744-05:00And thus ends 2015...<h2>
Yet it is also just the beginning</h2>
This is not going a long review of the year. Perhaps in January I'll do that. But I did want to point out that it was a good year for python. Earlier this month I looked at the TIOBE ratings for Python, R and Scala, the main languages I use on a regular basis (and in decreasing order of use by me - I might do java, C++ or javascript on occasion, but not on a regular basis anymore):<br />
<br />
<blockquote class="twitter-tweet" lang="en">
<div dir="ltr" lang="en">
Dec. 2015 TIOBE index:
<a href="https://t.co/NRQ13Pi00O">https://t.co/NRQ13Pi00O</a>
My current primary languages
<a href="https://twitter.com/hashtag/Python?src=hash">#Python</a> at #4, <a href="https://twitter.com/hashtag/Rstats?src=hash">#Rstats</a> at #18 and <a href="https://twitter.com/hashtag/Scala?src=hash">#Scala</a> at #28.</div>
— Francois Dion (@f_dion) <a href="https://twitter.com/f_dion/status/674719400830849024">December 9, 2015</a></blockquote>
<script async="" charset="utf-8" src="//platform.twitter.com/widgets.js"></script>
And that was a peak for Python at #4. Back in 2007, you might remember, TIOBE had named Python "Language of the year". And if we do a quick check on google trends of a good indicator of the popularity worldwide ("learn python"), we see that this is when it started to pick up some steam. For some fun, I'm comparing to "learn java" (ranked #1 on latest TIOBE rating):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrqO_XDwDnKFAKs6Cu7Jdj-K2eLw6FULM1oR8QKVb0BWj4jTzhYzCTE0nnlHlQJurW21C1UrIy5XbO5D3_t3jcmdzs_cSznuuAATkZrAynHkbIN3Qkef-yjXGhA9e84XizncY8oFHTB54/s1600/trends_py_java.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrqO_XDwDnKFAKs6Cu7Jdj-K2eLw6FULM1oR8QKVb0BWj4jTzhYzCTE0nnlHlQJurW21C1UrIy5XbO5D3_t3jcmdzs_cSznuuAATkZrAynHkbIN3Qkef-yjXGhA9e84XizncY8oFHTB54/s640/trends_py_java.png" width="635" /></a></div>
Hey wait, what is going on in November / December 2015? :P<br />
<br />
Let's zoom in and take a closer look at 2015:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjBP7IJnR3Ygvfn4F1jhQAQyXPZNB67RAtpbStDY3SQPnwXReno9RWitRzSkWs0UevylTAdxoken6h0MUwOjYHFnxevUtZvpDj9SpF4q5ycBchn9230MEmdwSc_PWmUyNv8rhL2cfHQRI/s1600/2015_py_java.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="634" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjBP7IJnR3Ygvfn4F1jhQAQyXPZNB67RAtpbStDY3SQPnwXReno9RWitRzSkWs0UevylTAdxoken6h0MUwOjYHFnxevUtZvpDj9SpF4q5ycBchn9230MEmdwSc_PWmUyNv8rhL2cfHQRI/s640/2015_py_java.png" width="640" /></a></div>
<br />
It appears it might be overtaking Java there... It is quite early to really see if this is just a fluke, only the next few months will reveal this.<br />
<br />
<h2>
That credit card sized computer thingy</h2>
What is also worth mentioning is that the level of interest in learning Python and the Raspberry Pi seem to follow a similar path, but that will be for a follow up post. See you next year!<br />
<br />
<div class="cell border-box-sizing text_cell rendered">
<span style="background-color: white; color: #222222; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13px; line-height: 18px;">Francois Dion</span><br />
<a href="http://www.twitter.com/f_dion" style="color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none;">@f_dion</a> </div>
Francois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.com0