Science, Python, Travel, Other Curiosities, and Notes To Self

Is there an open source software for data acquisition?

I’ve done it with Python before. Have a look at pyVISA[1]. It can connect through a GPIB, USB, or RS232 interface. You’ll have to write your own SCPI command strings to control your instruments.

Let me rummage through my files and I’ll put up a code snippet if I can still find them.

UPDATE: Here’s a Gist that you can use https://gist.github.com/2301119

The basic idea is to connect to a GPIB interface, which is represented by an object in the Python environment. You can then write() SCPI commands and read() responses from your instrument using that object.

[1] Python GPIB etc. support with PyVISA
http://pyvisa.sourceforge.net/
[2] Controlling a GPIB instrument with Python and pyVISA
https://gist.github.com/2301119

Is there an open source software for data acquisition, e.g: on lines of Labview?

MySQL notes

sudo mysqld_safe
sudo mysqladmin shutdown
sudo mysql
GRANT ALL ON menagerie.* TO 'user'@'localhost';
\q
mysql
SELECT USER();
CREATE DATABASE menagerie;
USE menagerie;
SELECT DATABASE();
CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20),
-> species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);
SHOW TABLES;
DESCRIBE pet;
  • Secure the MySQL accounts. See 5.3.1. General Security Guidelines
  • See Chapter 10: Data Types
  • Delimiter can be specified in the LOAD DATA statement
  • When writing tab-delimited files with Vim, set noexpandtab
  • Pick up from 3.3.4.6. Working with NULL values
  • Databases are stored in /usr/local/mysql/data
  • User configuration file is ~/.my.cnf

After installing from the Mac OS X PKG Installer, you can use a different data directory for your databases:

Read More

Vim pythoncomplete for Google App Engine

Follow this: appengine & virtualenv

And then in your .vimrc, be sure to have the following lines:

py << EOF
import dev_appserver
dev_appserver.fix_sys_path()
EOF

Vim pythoncomplete relies on successful compilation of modules. If one of your modules has a reference to a Google App Engine package, it fails to compile in the Vim environment because the GAE path hasn’t been added. By using the code snippet above in .vimrc or any file that gets sourced prior to running Vim, you are effectively adding the GAE paths to the Vim environment.

The Nerdy Science of the Geekology of Dorkiness

The Nerdy Science of the Geekology of Dorkiness

Geeking out on type

Geeking out on type

(Source: qr.ae)

If you believe too much you’ll never notice the flaws; if you doubt too much you’ll never get started. It requires a lovely balance.

Richard Hamming
You and Your Research

(Source: paulgraham.com)