<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on Renato L. de F. Cunha</title><link>https://renatocunha.com/posts/</link><description>Recent content in Posts on Renato L. de F. Cunha</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 04 Sep 2019 20:04:33 +0000</lastBuildDate><atom:link href="https://renatocunha.com/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>OpenID Connect Authentication with Booked Scheduler</title><link>https://renatocunha.com/2019/09/openid-connect-authentication-with-booked-scheduler/</link><pubDate>Wed, 04 Sep 2019 20:04:33 +0000</pubDate><guid>https://renatocunha.com/2019/09/openid-connect-authentication-with-booked-scheduler/</guid><description>&lt;p class="has-drop-cap"&gt;
In this post I'll describe the steps for implementing a plugin for using
&lt;a href="https://www.ibm.com/cloud/app-id"&gt;AppID&lt;/a&gt; authentication with
&lt;a href="https://www.bookedscheduler.com/"&gt;Booked Scheduler&lt;/a&gt; deployed
as a &lt;a href="https://www.ibm.com/cloud/cloud-foundry"&gt;Cloud Foundry&lt;/a&gt;
application at the &lt;a href="https://www.ibm.com/cloud"&gt;IBM Cloud&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;It looks like PHP simply isn&amp;rsquo;t going to die, especially because there
are some fine PHP applications such as &lt;a href="https://www.bookedscheduler.com/" class="external-link" target="_blank" rel="noopener"&gt;Booked
Scheduler&lt;/a&gt;. It looks good and works
really well, and that&amp;rsquo;s what we&amp;rsquo;ve been using to schedule meeting rooms
at the Brazil Research Lab for the last 5 years. On top of that, booked
has a plugin system that&amp;rsquo;s really easy to use. Also, notice that
although we&amp;rsquo;re using IBM Cloud here, one can easily customize this to
any other environment.&lt;/p&gt;</description></item><item><title>An argument in favor of strong scaling for deep neural networks with small datasets</title><link>https://renatocunha.com/2018/09/hpml-2018-paper/</link><pubDate>Fri, 21 Sep 2018 18:42:24 +0000</pubDate><guid>https://renatocunha.com/2018/09/hpml-2018-paper/</guid><description>&lt;p&gt;In this post, I'm writing about my most recent paper, which is joint
work with &lt;a href="https://scholar.google.com.br/citations?user=EOmaFDMAAAAJ" class="external-link" target="_blank" rel="noopener"&gt;Eduardo R.
Rodrigues&lt;/a&gt;,
&lt;a href="https://scholar.google.com.br/citations?user=e3bgf_gAAAAJ" class="external-link" target="_blank" rel="noopener"&gt;Matheus Palhares
Viana&lt;/a&gt;, and
&lt;a href="https://scholar.google.com.br/citations?user=Nswjaf0AAAAJ" class="external-link" target="_blank" rel="noopener"&gt;Dario Augusto Borges
Oliveira&lt;/a&gt;. If
you prefer videos, there's a pretty comprehensive version below. You
can read the &lt;a href="https://arxiv.org/abs/1807.09161" class="external-link" target="_blank" rel="noopener"&gt;full paper on the
arXiv&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
 &lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/L0y5hdQ4KC4?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
 &lt;/div&gt;

&lt;/figure&gt; 
&lt;p&gt;Apart from all the hype that is certainly involved in Machine Learning,
Deep Learning, and Artificial Intelligence these days, there is &lt;em&gt;a lot&lt;/em&gt;
of very good research being done. Since much of this research comes from
big cloud players such as Amazon, Google, IBM, and Microsoft, it is
natural for such research to favor big clusters with humongous datasets.
This is also good marketing: we all want to have access to the biggest
machines possible, and it is good business for a cloud provider to know
how to handle big machine learning workloads.&lt;/p&gt;</description></item><item><title>Non-stationarity and bandit algorithms</title><link>https://renatocunha.com/2018/02/10-armed-bandits/</link><pubDate>Thu, 22 Feb 2018 18:47:41 +0000</pubDate><guid>https://renatocunha.com/2018/02/10-armed-bandits/</guid><description>&lt;p&gt;I&amp;rsquo;ve been (re)reading the second edition of Rich Sutton&amp;rsquo;s Introduction to
Reinforcement Learning, and I&amp;rsquo;ve decided to do the programming exercises.
(Previously, I followed Fermat&amp;rsquo;s tradition of solving exercises on the margin.)&lt;/p&gt;
&lt;p&gt;Exercise 2.5 is nice. It asks us to demonstrate the difficulties that
sample-average methods have for nonstationary problems by experimentation. The
intuition being that, as current distribution means deviate from their original
values, the bandit algorithm takes longer to update its estimates with regards
to what it considers the optimal action. Moving-average methods which give more
weight to more recent returns tend to perform better.&lt;/p&gt;</description></item><item><title>Rock, Paper, Starcraft review</title><link>https://renatocunha.com/2017/03/rock-paper-starcraft/</link><pubDate>Wed, 01 Mar 2017 19:05:40 +0000</pubDate><guid>https://renatocunha.com/2017/03/rock-paper-starcraft/</guid><description>&lt;p&gt;Had forgotten to post this here. Enjoy! (YouTube video.)&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
 &lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/vngfreC8zOk?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
 &lt;/div&gt;</description></item><item><title>Simple image classification using TensorFlow and CIFAR-10</title><link>https://renatocunha.com/2017/03/dlnd-image-classification/</link><pubDate>Wed, 01 Mar 2017 19:03:44 +0000</pubDate><guid>https://renatocunha.com/2017/03/dlnd-image-classification/</guid><description>&lt;p&gt;Almost one year after following &lt;a href="https://cs231n.github.io" class="external-link" target="_blank" rel="noopener"&gt;cs231n&lt;/a&gt; online and
doing the assignments, I met the &lt;a href="http://www.cs.toronto.edu/~kriz/cifar.html" class="external-link" target="_blank" rel="noopener"&gt;CIFAR-10
dataset&lt;/a&gt; again.&lt;/p&gt;
&lt;p&gt;This time, instead of implementing my Convolutional Neural Network &lt;a href="https://cs231n.github.io/assignments2016/assignment2/" class="external-link" target="_blank" rel="noopener"&gt;from
scratch using numpy&lt;/a&gt;,
I had to implement mine using &lt;a href="http://tensorflow.org" class="external-link" target="_blank" rel="noopener"&gt;TensorFlow&lt;/a&gt;, as part of
one of the &lt;a href="https://br.udacity.com/course/deep-learning-nanodegree-foundation--nd101/" class="external-link" target="_blank" rel="noopener"&gt;Deep Learning Nano
Degree&lt;/a&gt; &lt;a href="https://github.com/udacity/deep-learning/image-classification" class="external-link" target="_blank" rel="noopener"&gt;assignments&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As an aside, since this course uses some content from the free &lt;a href="https://br.udacity.com/course/deep-learning--ud730/" class="external-link" target="_blank" rel="noopener"&gt;Deep
Learning&lt;/a&gt; course, they
took the time to fix the sub par presentation of that course. Good. &lt;code&gt;:-)&lt;/code&gt;&lt;/p&gt;</description></item><item><title>Deploying JupyterHub behind an Apache reverse proxy’s subdirectory</title><link>https://renatocunha.com/2016/11/jupyterhub-apache/</link><pubDate>Tue, 29 Nov 2016 19:34:32 +0000</pubDate><guid>https://renatocunha.com/2016/11/jupyterhub-apache/</guid><description>&lt;p&gt;&lt;a href="http://jupyterhub.readthedocs.io/en/latest/" class="external-link" target="_blank" rel="noopener"&gt;JupyterHub&lt;/a&gt; supports deployment behind a reverse proxy and even instructs how to do so &lt;a href="http://jupyterhub.readthedocs.io/en/latest/config-examples.html?highlight=proxy#example-with-nginx-reverse-proxy" class="external-link" target="_blank" rel="noopener"&gt;behindnginx&lt;/a&gt; in its manual. I was unable to find documentation about how to do this serving the content from a reverse proxy subdirectory.&lt;/p&gt;
&lt;p&gt;Since there’s been a long time since I worked as a sysadmin and, therefore, I tend to forget these things, here hoes my documentation, in the hopes it will be useful to someone else.&lt;/p&gt;</description></item><item><title>Checking whether a pointer is valid in Linux</title><link>https://renatocunha.com/2015/12/msync-pointer-validity/</link><pubDate>Wed, 09 Dec 2015 19:36:42 +0000</pubDate><guid>https://renatocunha.com/2015/12/msync-pointer-validity/</guid><description>&lt;p&gt;Recently I noticed some calls I was making to a certain C API were returning pointers that I thought were invalid. A quick inspection with &lt;code&gt;gdb&lt;/code&gt; confirmed my fears. A particular interaction showed:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(gdb) print *job-&amp;gt;someMember
Cannot access memory at address 0xec00000005
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Unfortunately I don&amp;rsquo;t have access to the source of the API and won&amp;rsquo;t be able to change it. So now I&amp;rsquo;m at a loss. How can I know if a pointer is valid without dereferencing it? &lt;code&gt;:S&lt;/code&gt;&lt;/p&gt;</description></item><item><title>Implementing a reader-writer lock for multiple processes in python</title><link>https://renatocunha.com/2015/11/ctypes-mmap-rwlock/</link><pubDate>Fri, 27 Nov 2015 19:38:27 +0000</pubDate><guid>https://renatocunha.com/2015/11/ctypes-mmap-rwlock/</guid><description>&lt;p&gt;Python lacks a lock type that supports multiple readers and a single writer across multiple processes. Here we investigate how one can be implemented using only default python features: &lt;code&gt;ctypes&lt;/code&gt; and &lt;code&gt;mmap&lt;/code&gt;, and the POSIX reader-writer locks.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;TL;DR: If you just want to use it, refer to the &lt;a href="https://bitbucket.org/prwlock/prwlock" class="external-link" target="_blank" rel="noopener"&gt;module&amp;rsquo;s repository&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id="introduction"&gt;
 Introduction
 &lt;a class="heading-link" href="#introduction"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;I had a setting similar to the figure below. A single Python process would start up and spawn N children that would receive requests from the network. All these children shared a memory region from which they would read data for processing, with the parameters that defined how the processing should be done coming from the network.&lt;/p&gt;</description></item><item><title>A review of Udacity’s Machine Learning Engineer nanodegree</title><link>https://renatocunha.com/2015/11/a-review-of-udacitys-machine-learning-engineer-nanodegree/</link><pubDate>Thu, 19 Nov 2015 19:41:38 +0000</pubDate><guid>https://renatocunha.com/2015/11/a-review-of-udacitys-machine-learning-engineer-nanodegree/</guid><description>&lt;p&gt;You can say I&amp;rsquo;m into AI. I&amp;rsquo;ve published a &lt;a href="https://renatocunha.com/pdf/publications/cunha2010artificial/cunha2010artificial.pdf" class="external-link" target="_blank" rel="noopener"&gt;couple&lt;/a&gt; of &lt;a href="http://dl.acm.org/authorize?N95458" class="external-link" target="_blank" rel="noopener"&gt;papers&lt;/a&gt; on the subject and worked with Game AI before. Moreover, I&amp;rsquo;ve taken the original &lt;a href="https://en.wikipedia.org/wiki/Peter_Norvig#cite_ref-12" class="external-link" target="_blank" rel="noopener"&gt;AI&lt;/a&gt; and &lt;a href="https://ml-class.org" class="external-link" target="_blank" rel="noopener"&gt;ML&lt;/a&gt; classes offered by Stanford University back in
2011. Still, I felt my memory could use some refreshing, and decided to give the program a shot.&lt;/p&gt;
&lt;p&gt;There are some reviews of other nanodegree programs on the Internet, so I&amp;rsquo;m going to talk about the Machine Learning one specifically.&lt;/p&gt;</description></item><item><title>How to connect your Android devices to an OpenVPN VPN</title><link>https://renatocunha.com/2014/12/openvpn-android/</link><pubDate>Sun, 28 Dec 2014 19:44:27 +0000</pubDate><guid>https://renatocunha.com/2014/12/openvpn-android/</guid><description>&lt;p&gt;There are various OpenVPN configuration tutorials around the Internet, this
post aims to fill in the gaps on how to configure the OpenVPN server, and
OpenVPN for Android clients, while managing a simple firewall configured with
UFW running an Arch Linux system.&lt;/p&gt;
&lt;h1 id="introduction"&gt;
 Introduction
 &lt;a class="heading-link" href="#introduction"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;OpenVPN is a robust and highly flexible VPN daemon. OpenVPN supports SSL/TLS
security, Ethernet bridging, TCP or UDP tunnel transport through proxies or
NAT, support for dynamic IP addresses and DHCP, scalability to hundreds or
thousands of users, and portability to most major OS platforms. Further details
about OpenVPN (and advanced tips on how to to configure it) can be found in the
&lt;a href="https://wiki.archlinux.org/index.php/OpenVPN" class="external-link" target="_blank" rel="noopener"&gt;ArchWiki OpenVPN&lt;/a&gt; entry.&lt;/p&gt;</description></item><item><title>Mysterious 501 error responses and WebSEAL</title><link>https://renatocunha.com/2014/03/501-error-tam/</link><pubDate>Sun, 02 Mar 2014 19:46:37 +0000</pubDate><guid>https://renatocunha.com/2014/03/501-error-tam/</guid><description>&lt;p&gt;This is just a quick post for future reference. Hopefully, it can help
others in figuring out why a service behind Tivoli Access Manager's
WebSEAL is returning a 501 error from POST requests.&lt;/p&gt;
&lt;p&gt;Recently, I wrote a client using Apache's HttpClient for accessing a
REST API protected by IBM's WebSEAL 6. While uploading data via POST, I
started receiving a mysterious &lt;code&gt;501 Not Implemented&lt;/code&gt; error.&lt;/p&gt;
&lt;p&gt;The data in question was being uploaded with chunked encoding, as in the
following snippet&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;</description></item><item><title>Making the Playstation Eye’s microphones work on Linux</title><link>https://renatocunha.com/2012/04/playstation-eye-audio-linux/</link><pubDate>Thu, 26 Apr 2012 19:48:07 +0000</pubDate><guid>https://renatocunha.com/2012/04/playstation-eye-audio-linux/</guid><description>&lt;h2 id="introduction"&gt;
 Introduction
 &lt;a class="heading-link" href="#introduction"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;m the proud owner of a &lt;a href="http://en.wikipedia.org/wiki/Playstation_move" class="external-link" target="_blank" rel="noopener"&gt;PlayStation® Move&lt;/a&gt; system and also a proud user of
the Arch Linux distribution. As much as pride is concerned, it&amp;rsquo;s not very
&amp;ldquo;proudful&amp;rdquo; when you decide to give your &lt;a href="http://en.wikipedia.org/wiki/PlayStation_Eye" class="external-link" target="_blank" rel="noopener"&gt;PlayStation® Eye&lt;/a&gt; (PS3 Eye) a try as
a webcam, and you realize it doesn&amp;rsquo;t quite work as you expected. This post
investigates this issue and proposes a solution.&lt;/p&gt;</description></item><item><title>Please, don’t use exit(-1)</title><link>https://renatocunha.com/2011/10/please-dont-use-exit-1/</link><pubDate>Sat, 01 Oct 2011 19:50:05 +0000</pubDate><guid>https://renatocunha.com/2011/10/please-dont-use-exit-1/</guid><description>&lt;h2 id="introduction"&gt;
 Introduction
 &lt;a class="heading-link" href="#introduction"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;In the past two weeks I saw a few cases where programmers were telling their
programs to exit(), but without fully understanding what their exit codes meant
and how they were represented. In this post I&amp;rsquo;ll explain what I believe to be the
right way of doing it.&lt;/p&gt;
&lt;p&gt;The first time I started to think about this was when I saw a script similar to
the one below. But what really motivated my was [this reddit thread][]. If
a practice I believe is bad starts to appear on best practices guides, then
it&amp;rsquo;s time to express my opinion, right?
[this reddit thread]: &lt;a href="http://www.reddit.com/r/linux/comments/kwaoc/bash_best_practices/" class="external-link" target="_blank" rel="noopener"&gt;http://www.reddit.com/r/linux/comments/kwaoc/bash_best_practices/&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Cognitive biases</title><link>https://renatocunha.com/2010/07/cognitive-biases/</link><pubDate>Sun, 11 Jul 2010 19:51:45 +0000</pubDate><guid>https://renatocunha.com/2010/07/cognitive-biases/</guid><description>&lt;p&gt;Ever since I first heard about the &lt;a href="http://en.wikipedia.org/wiki/Dunning%e2%80%93Kruger_effect" class="external-link" target="_blank" rel="noopener"&gt;Dunning-Kruger effect&lt;/a&gt;, I&amp;rsquo;ve started
observing a bit more how I and some other people behave. Last week a friend
introduced the &amp;ldquo;&lt;a href="http://en.wikipedia.org/wiki/Impostor_syndrome" class="external-link" target="_blank" rel="noopener"&gt;Impostor syndrome&lt;/a&gt;&amp;rdquo; concept to me, a &amp;ldquo;syndrome&amp;rdquo; apparently
common among graduate students. There&amp;rsquo;s a &lt;a href="http://sciencecareers.sciencemag.org/career_development/previous_issues/articles/2008_02_15/caredit_a0800025" class="external-link" target="_blank" rel="noopener"&gt;very interesting article&lt;/a&gt; that
presents the concept nicely, and which I quote here:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;Impostor syndrome&amp;rdquo; is the name given to the feelings that Abigail and
many other young scientists describe: Their accomplishments are just
luck or deceit, and they&amp;rsquo;re in over their heads. The key to getting
past it, experts say, is making accurate, realistic assessments of
your performance. Perhaps equally important: knowing you&amp;rsquo;re not alone.
Abigail thinks that sharing her feelings with other people is how she
will eventually come to grips with her sense of feeling like an
impostor. &amp;ldquo;It&amp;rsquo;s fantastic to hear other people say, &amp;lsquo;I&amp;rsquo;ve felt that
way, too.&amp;rsquo; &amp;quot;&lt;/p&gt;</description></item><item><title>One month and a half in the Summer of Code program</title><link>https://renatocunha.com/2010/07/summer-of-code-progress/</link><pubDate>Fri, 09 Jul 2010 19:55:10 +0000</pubDate><guid>https://renatocunha.com/2010/07/summer-of-code-progress/</guid><description>&lt;p&gt;It&amp;rsquo;s been a month and a half since I started working on the &lt;a href="http://mercurial.selenic.com" class="external-link" target="_blank" rel="noopener"&gt;Mercurial&lt;/a&gt;
project as part of the &lt;a href="http://code.google.com/soc/" class="external-link" target="_blank" rel="noopener"&gt;Google Summer of Code&lt;/a&gt; program. Mercurial is a free,
distributed source control tool written in &lt;a href="http://www.python.org" class="external-link" target="_blank" rel="noopener"&gt;Python&lt;/a&gt; that efficiently handles
projects of any size and offers an easy and intuitive interface while the
Google Summer of Code is a global program that offers student developers
stipends to write code for various open source software projects.&lt;/p&gt;</description></item></channel></rss>