iRoot is a product of the India-based Neutrino Observatory collaboration lead by Prof.Naba Mondal at the Tata Institute of Fundamental Research.
It is a simple plotting and analysis tool based on the popular ROOT from CERN and is primarily intended for analysis using the TTree structures in ROOT. iRoot is supported by a user-friendly GUI designed using Qt.
If your data is stored in TTree stuctures and you want to perform simple analysis with your data without writing any piece of code, iRoot is for you. It has GUI interfaces for most of the jobs that one is most likely to perform with TTree data. Fitting, analysis with PROOF, converting TTree data to ASCII, uploading plots to the cloud etc., are some attractive features to mention.
If you have an SQLite database file and want to check its structure (programmatically)
SELECT * FROM sqlite_master;
To do this via Python as simple as possible, run:
conn = sqlite3.connect("your/database.sqlite")
c = conn.cursor()
c.execute('SELECT * FROM sqlite_master;')
for row in self.cursor:
print row
Resources
- The Python based web framework Django has a nice introspection module for SQLite: introspection.py
- I found the simple SQL statement here: http://stackoverflow.com/a/1780322
http://en.wikipedia.org/wiki/SQL
search using SQL
SELECT * from bash_history where command LIKE '%modprobe%'
% is the wildcard character in SQL!
SQlite specifics
This is an iMacros script to extract transaction details on the online banking website of the German branch of the bank ING-DiBa. As this is mostly interesting to Germans, the following blog post is in German. If you want to read it in English, consider translating it using Google Translate.
I do not particulary like SVN but sometimes I have to use it. The diff output on the Mac OS X command line usually is not colored which is annoying. The solution is to tell SVN it should use colordiff instead. You can easily install colordiff using homebrew:
brew install colordiff
Then change your SVN configuration to use colordiff using vi ~/.subversion/config; add the following line:
diff-cmd = colordiff
Then a svn diff should be colored (with ugly colours). To change this, run vi ~/.colordiffrc to set up your colordiff preferences and enter the following setup:
With FUSE – The Filesystem in Userspace you can mount all different kinds of remote / local filesystems on you Linux/Unix/Mac computer. Here are some implementations of interesting FUSE filesystems:
- SSHFS http://blog.philippklaus.de/2011/07/sshfs-on-mac-os-x-10-6-8-with-fuse4x/ works great!
- Encrypted Filesystem http://blog.philippklaus.de/2011/12/transparently-encrypt-folders-with-encfs/ works well!
- PicasaFUSE https://github.com/jonathanverner/picasafuse
- FuseFTP in Perl https://github.com/marcust/fuseftp
- ZFS-FUSE http://zfs-fuse.net/
- FlickrMS https://github.com/patrickjennings/FlickrMS
- GDataFS (Picasa, YouTube, Documents) http://gdatafs.sourceforge.net/
- Google Storage http://blog.philippklaus.de/?p=1462
- GMail as Storage http://blog.philippklaus.de/2010/04/mount-a-gmail-account-as-filesystem-using-gmailfs/
- Google Docs FS
- Facebook
- https://github.com/vytis/FacebookFS
- http://code.google.com/p/facefuse/ (no changes since 2007)
Official List of FUSE filesystems: http://sourceforge.net/apps/mediawiki/fuse/index.php?title=FileSystems
ezyfit can prevent you from buying the Curve Fitting Tool that Matlab does not come with by default. This is how I use it to fit data according to a function :
x=15:45
y = 30 + 40 * sin( (2*x) * pi / 180 ).^2 + 5*(rand(1, length(x)) - .5)
f = ezfit(x,y,'I(theta) = dC + I_0 * sin( (2 * theta) * pi / 180 )^2');
clf
plot(x,y,'r*');
showfit(f)
dispeqfit(f)
Custom functions can be defined and reused (to speed up) as follows:
There seem to be quite a lot of problems with 16-bit grey scale TIFF images (especially with the Python Imaging Library – PIL). If you can, you may want to use FITS instead of TIFF. There are good and up-to-date libraries for Python: PyFITS.
For me, however, the FreeImage library works great to read 16bit TIFF images.
About the TIFF Format
Every TIFF begins with a 2-byte indicator of byte order: 0x490x49 (“II”) for little-endian Intel style and 0x4d0x4d (“MM”) for big-endian Motorola style byte order. More common is the Intel style.
Hub is a useful extension to make git GitHub aware.
catch lines:
hub introduces git to GitHub
and
hub teaches git about GitHub
Installation
brew install hub
Usage
See hub’s webpage for introductory examples and its man page for further reference.
MacFSEvents is an up-to-date solution to monitor directories for changes on Mac OS X when using the scripting language Python. It is a binding to FSEvents, Mac OS X’s filesystem monitoring framework.
Install MacFSEvents
pip install macfsevents
Quickstart
from fsevents import Observer, Stream
def file_event_callback(event):
"""This is the function being called when an event on a file is detected."""
print "Mask: %s, Cookie: %s, Name: %s" % (event.mask, event.cookie, event.name)
observer = Observer()
observer.start()
stream = Stream(file_event_callback, '/Users/', file_events=True)
observer.schedule(stream)
### Watch how your callback function is being called when files in the /Users dir are changed
# Before your Python program exits, you must stop the observer:
observer.unschedule(stream)
observer.stop()