Building DeepPiCar

DRAFT Goal Building a self driving car with these resources. End Result Equipment Setting up On the local machine, setup the picar environment 1 2 3 4 5 pipenv --python 3.7 pipenv install pyqt5 pipenv install requests cd client python On the picar itself, you may run into some errors while importing cv2. Exporting the variable LD_PRELOAD may help resolve the issue. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 pi@model-t: $ sudo apt-get install libhdf5-dev -y && sudo apt-get install libhdf5-serial-dev -y && sudo apt-get install libatlas-base-dev -y && sudo apt-get install libjasper-dev -y && sudo apt-get install libqtgui4 -y && sudo apt-get install libqt4-test -y pi@model-t: $ pip3 install opencv-python pi@model-t: $ pip3 install matplotlib pi@model-t:~/projects/SunFounder_PiCar-V/remote_control $ python3 Python 3.

GraalVM, Truffle, SubstrateVM and Sulong

I've been reading a lot about Graal recently, and with a bunch of related projets, I needed to remind myself what are the differences and uses for each. Here's a brief recap and intro to those projects. Most of the research and work is from Oracle and the JKU (Johannes Kepler University Linz). GraalVM GraalVM‘s motto is “Run Programs Faster Anywhere”, also known as “One VM to rule them all”. Basically it is an extension of the Java virtual machine (build on HotSpot) that supports all the traditional JVM-based languages, such as Java, Scala and Kotlin, but also JavaScript, Python, Ruby, R and LLVM-based languages such as C and C++.

Record on motion detection with Xiaomi Dafang

Couple months ago, I read this article about hacking the Xiaomi Dafang camera to expand its capabilities. It's a cheap $30 camera with neat features, such as MicroSD support, a rotating gimbal, microphone, infrared vision, among others. Thought it would be a fun project to try it out. The goal was to check if I could use this to record motion detection at night, without going to a third party service.

How to read the RubyGems specs file

Had an issue with gems not being downloaded from JFrog's Artifactory. Basically it looked as if gem install could not be found on the Artifactory repo, yet manually browsing the repo, the gem was properly uploaded. Reading the specs file that is downloaded during gem install highlighted the issue, which is deploying a same gem version didn't properly show up in the specs file. # the ;1 is to prevent the possible long list of gems to display afterwards irb(main) list = Marshal.

Understanding the JVM memory

Stumbled upon a very nice explanation of the JVM memory, including garbage collector, tuning and related errors (watch here, in french). Here are some notes. Garbage Collector The classic garbage collector (included into the standard HotSpot JVM) will clean the Young Gen in minor GCs, and the entire heap (including both Young and Tenured gen) during a full GC, which occurs less frequently than the former. Read for some additional information:

Capture The Flag

There’s a Capture The Flag security challenge going on, organized by Stripe, the payment company. Capture The Flag security challenge are a series of technical weaknesses that participants need to find in order to find flags and capture them for points. It can range from finding a password through a SQL injection, to getting permissions to a server box. I highly recommend anyone that is interested in broadening their development skills in joining those challenges.

Understanding PHP multi_curl_exec loops

In the PHP curl_multi_exec manual, a strange 3 loops are given as an example: do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM); while ($active && $mrc == CURLM_OK) { if (curl_multi_select($mh) != -1) { do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM); } } I was wondering why we needed so many while loops as opposed to a simple one such as: do { curl_multi_exec($master,$running); } while($running > 0); What I have found is mostly due to prevent making unnecessary calls to curl_multi_exec.

Capistrano deploy tag, using wrong revision

You have your code under SVN, and trying to deploy via Capistrano. You capify your root folder, you cap deploy:setup, everything works. How do you deploy a specific tag? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 <td class="code"> <pre class="ruby" style="font-family:monospace;">set <span style="color:#ff3333; font-weight:bold;">:application</span>, <span style="color:#996600;">"my-app"</span> set :repository_root, "https://my.

PHP flush, sleep, and browsers…

If anything else doesn’t work, try this sample code:

@apache_setenv('no-gzip', 1);
@ini_set('zlib.output_compression', 0);
@ini_set('implicit_flush', 1);
for ($i = 0; $i &lt; ob_get_level(); $i++) { ob_end_flush(); }

// All you need is 256 spaces first
echo str_repeat(" ", 256); ob_flush();
   echo $i,' ';