http://pebl.sourceforge.net/battery.html
Might come in handy
Teaching, programming, and maybe even a little bit of research. Find more about me here: navatintarev.com
http://pebl.sourceforge.net/battery.html
Might come in handy
Generally these instructions work: http://nltk.org/install.html
easy_install running from sudo also needs to work around the proxy, use the “-E” flag for that.
Don’t forget to start up the python interpreter and get the corpora 🙂
import nltk
nltk.download()
Many Java applications need to know the location of a
$JAVA_HOME
directory. The$JAVA_HOME
on Mac OS X should be found using the/usr/libexec/java_home
command line tool on Mac OS X 10.5 or later. On older Mac OS X versions where the tool does not exist, use the fixed path “/Library/Java/Home
“. The/usr/libexec/java_home
tool dynamically finds the top Java version specified in Java Preferences for the current user. This path allows access to thebin
subdirectory where command line tools such asjava
,javac
, etc. exist as on other platforms. The tool/usr/libexec/java_home
allows you to specify a particular CPU architecture and Java platform version when locating a$JAVA_HOME
.
from:
http://developer.apple.com/library/mac/#qa/qa1170/_index.html
also
http://wiki.apache.org/hadoop/Running_Hadoop_On_OS_X_10.5_64-bit_%28Single-Node_Cluster%29
/usr/libexec/java_home
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Been playing with setting up SMS lib, but could not seem to run
the modem version of sending messages, or test the ports.
Was getting an error of the type;
java.lang.UnsatisfiedLinkError: [path]/librxtxSerial.jnilib: no suitable image found. Did find: [path]….
Last thing I did to get it to run was make sure that I had the right librxtxSerial.jnlib, one that’s compatible with Java 1.5:
http://tech.element77.com/2009/06/arduino-problems-with.html
And copied it to ~Library/Java/Extensions
Together with the rxtx jar.
So I moved these two files, and changed some privileges, which might also have made a difference.
chmod 755 on : /var/lock
and
/var/spool/uucp
http://protolab.pbworks.com/w/page/19403641/RxTxOSX
Geo tools has a pretty good start up tutorial:
http://docs.geotools.org/stable/tutorials/quickstart/eclipse.html#eclipse-mvn-start
The maven repository has changed since then though:
http://download.eclipse.org/technology/m2e/releases
Also, being behind a proxy meant it told me it couldn’t find the archetypes, but didn’t tell me why.
So just like last time I used maven…Proxy settings can be saved under .m2:
http://www.petefreitag.com/item/169.cfm
This will return rows having duplicates.
SELECT user_id, movie_id, COUNT(*)
FROM training
GROUP BY user_id, movie_id
HAVING COUNT(*) > 1
Remove duplicate entries:
http://www.justin-cook.com/wp/2006/12/12/remove-duplicate-entries-rows-a-mysql-database-table/
Step 1: Move the non duplicates (unique tuples) into a temporary table
CREATE TABLE new_table as
SELECT * FROM old_table WHERE 1 GROUP BY [column to remove duplicates by];
Step 2: delete the old table
DROP TABLE old_table;
Step 3: rename the new_table to the name of the old_table
RENAME TABLE new_table TO old_table;
Mysql workbench can be fiddly sometimes, and can be easier to use commandline (surprise! 😉 )
First login:
mysql -u user -p
For importing, it’s important to set the database so:
USE db_name;
Then, just read the sql file. Assuming you’re already in the right directory:
\. file_name