TDC Documentation Finished

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.

Send People your Files

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

{ 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, however awesome, 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.

#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

Voila, instant streaming youtube videos!