Posts

Thoughts, Projects, and Opinions





Baja - Part 2

Controlling a Robot

In a previous post, I hacked an RC car chassis to create a little robot. This post is to introduce RTCBot, a Python library to remote-control the robot over wifi and 4g. It uses WebRTC to stream the robot’s video from a webcam to the browser, and send back controls from a keyboard or an xbox controller.

Try it here





The Great Filter

A doomsday discovery

Thus far, astronomical observation has not shown evidence of extraterrestrial civilizations. This leads us to the famous question: Where is everybody? This apparent lack of life outside Earth seems to be at odds with the... continue »

Gun Laws

I have recently seen quite a bit of outrage on social media aimed towards gun control in the USA. I don’t know why facebook’s algorithms decided that I should care about a topic that bears... continue »

Visualizing Causal Models

I found it pretty annoying to quickly generate pictures of causal models in my research, for inclusion in presentations and latex documents. To fix this problem, I’ve used the visjs library to generate pngs of publication-quality causal models.

The code, as always, is on github

Try it here



The Great Balancing Act

There are several methods for reading papers. There is the “read-on-a-laptop” method, which gives a good idea of what is going on, and then there is the “print-the-paper-and-spend-6-hours-going-through-it-word-by-word” method. The second method seems to inevitably... continue »


The king is dead, long live the king!

The time has come for me to say goodbye to the Kwiat Group, whose members have for the past 3 years been incessantly a source of friendship and inspiration. It was there that I first tasted the joys of research. I am extremely grateful to them for helping me discover one of the greatest sources of joy and satisfaction in my life. I will definitely bring them many cookies next time I am in town.

In leaving Kwiat Group, I am leaving the world of Physics research, and moving on to Machine Learning. I’m spending the summer working with Dan Gauthier’s group at Duke University, focusing on Reservoir Computing.

Imagine throwing a pebble into a pond which has some nonlinear properties. It turns out that it might be possible to more easily extract information about the pebble’s properties through the excitations of the waves and movements of the pond upon the pebble’s impact, than by looking at the original pebble! These Liquid State Networks, which are called Reservoir Computers when in the form of a Neural Network, can achieve good performance in machine learning tasks, despite having only one hidden layer, which is both generated randomly and fixed!

Sounds awesome, so I will see where this track of research leads me.


New Website

Thanks to Rebecca from Kwiat Group, I discovered Jekyll, which allows for quick generation of static websites.

I don’t want to use Drupal, or any PHP-heavy tools for my website, since my VPS has 128MB of RAM. Jekyll is a step up from manually editing HTML files, while still giving me full control of a lightweight static website.

One of the cool things is that it allows writing content in markdown, which automatically does syntax highlighting with pygments and math with MathJax.

import antigravity
print "Hello World!"
H=ipilog2(pi)

Pretty cool, if you ask me.


Electric Bike Trip

What better way to finish college than by biking from Illinois to California? I don’t know - and that’s why Spencer Gore and I are doing it!

Update: The trip was fun, but we ended up in Kansas City instead of California.


TDC Documentation Released

Part of my work for Kwiat group involves interfacing with time-to-digital converters (TDCs). This is especially important, since my main job is to develop Information Reconciliation codes for use in our higher-dimensional quantum cryptography project. These codes require a very fast way to interface with multiple TDCs.

To that end, I created a C library which enables a standardized method of access to time stamp data. I am proud to say that library is currently used on several research projects within Kwiat group, and is interfaced with 3 different models of time tagger.

So the news-worthy update right now is that I have finished a rough draft of the documentation for this library, which can hopefully be understandable to students without much programming knowledge. You can see it here!

I will put a link to the code once it shows up on the Kwiat group’s website.

EDIT April 3: We have open-sourced the code used for time tagger control. I am super proud of it! Check it out here: Kwiat Group Github.


Send People your Files

So you have a large file. You want to send it to someone. You can use Netcat!

#!/bin/bash
{ echo -ne "HTTP/1.0 200 OK\r\nContent-Type: $(file -b --mime-type "$2")\r\nContent-Length: $(stat -c%s "$2")\r\n\r\n"; cat "$2"; } | nc -l "$1"

This script is based on wikipedia’s netcat example. It is updated to include some information which allows streaming videos (VLC wants a file type and length).

To make the file ‘file.mp4’ available on port 1080, you run the bash script:

./fileserver 1080 file.mp4

Once your friend downloads it, the script returns - it only makes the file available once.

When you run the script, all the other person needs to do is point their web browser (or VLC/mplayer) at your ip and port number.


Watch youtube on the Raspberry Pi

The raspberry pi does not have the power to run youtube well in the default distro. Even if you don’t have X installed, a simple script allows you to take a youtube video’s URL and instantly start streaming its video!

To use this, you will have to get a working omxplayer and the awesome youtube-dl library. If you are using debian, they should be available using apt-get.

#!/bin/bash
#Different formats are: 18-360p, 22-720p, 37-1080p
omxplayer -o hdmi $(youtube-dl -g "$1") #Standard def
#omxplayer -o hdmi $(youtube-dl -f 22 -g "$1") #720
#omxplayer -o hdmi $(youtube-dl -f 37 -g "$1") #1080