Posts by: Michael Hirsch

Using USB-serial FTDI adapters with Intel Edison

The current Yocto kernel distro available for the Intel Edison (version 68 by configure_edison –version) does not include the FTDI driver. Thus when you plug a USB-serial adapter into the USB OTG host port, you’ll see it partially recognized in dmesg tail upon plugin, but you won’t see an assignment to a /dev/ttyUSB_ device. You […]

Connecting to Boston University’s 802.1x Wifi from a Linux device

BU’s Enterprise Wifi is a little tricky to connect to. The settings below are modified from BU’s recommended settings that didn’t work for me. I have notified BU IT that their webpage is out of date.  Their webpage has now been updated. # nano /etc/wpa_supplicant/wpa_supplicant.conf paste at the end network={ ssid=”BU (802.1x)” key_mgmt=WPA-EAP pairwise=CCMP TKIP […]

WriteLatex vs. ShareLatex

Short answer: Use ShareLatex Why? 1) ShareLatex is much faster to compile. I have a 30 page journal article draft with numerous figures, and WriteLatex seems to take on the order of a minute to compile while ShareLatex was substantially less. 2) ShareLatex has far better error/warning feedback and a much better IDE overall. WriteLatex […]

Python findpeaks

If you’re looking for a Python function that works like Matlab’s “findpeaks” checkout SciPy argrelmax. If you want to do a comparison in the same code, you can call Octave findpeaks using Oct2Py, or use the Matlab Python API in Matlab R2014b

Intel Edison: Measuring USB voltage on breakout board

I have been trying out a variety of power sources. One is the 4xAA battery holder to female USB Verbatim 97928 available for about $10. It seems to have a well regulated 5.0 volt output. The red arrow points to the side of the “74″ diode that comes right off the micro USB connector. I […]

Miniconda Python on Intel Edison

Since the Intel Edison is a 32-bit CPU, we use the 32-bit version. But first, we need to install GNU Tar because Busybox tar doesn’t have some needed tar options, and it’s not compatible with GNU tar archives (!). Since original writing, AlexT_Intel has put GNU tar in the opkg repository, so you can just […]

Python logging module versions to disk

I run Python massively in parallel with GNU Parallel across numerous remote PCs. I want to have the version numbers of the Python modules I’m using logged to disk. Here’s how I do so for Python 2.7 and 3.4

Python using NaN or None as sentinel

Sometimes I was forced to use NaN as a sentinel value, for example with the current version of Numba that can’t handle “is not None”. The summary is that comparing to None instead of NaN is over 100 times faster. This negates the advantage of Numba when you have to compare to sentinel values! Here’s […]

Travis CI SciPy requirements.txt

I have noticed that currently Travis CI has SciPy 0.9.0. That’s fine for most of my things (except savgol_filter which is new in 0.14.0) When I put SciPy>=0.9.0 in requirements.txt, even though Travis gets SciPy 0.9.0 from apt-get install scipy Travis still tries to pip install SciPy latest version. It’s been suggested by many to […]

Matplotlib ValueError on LogNorm plots

I was getting the error ValueError: Data has no positive values, and therefore can not be log-scaled. The issue is that I was setting vmin=0 in my pcolormesh() plot. By setting vmin=1 or some small positive value, your plots will work with norm=LogNorm() as expected.