Dienstag, 1. März 2011

Supermongo Macros

The attached file contains a preliminary set of supermongo macros that I
consider useful. Included are some things that do simple calculations,
some plotting macros, shortcuts for external shell commands, matrix stuff
and a set of filtering routines. I haven't included documentation, because
this is mainly for myself. But feel free to use it :)

The macros are automatically loaded when you use the included wrapper
"msm" (edit paths accordingly).
sm-tar (gz, 5 KB)

Freitag, 28. Januar 2011

Umlaute in Squirrelmail

Wenn Squirrelmail beim Antworten aus Umlauten Obstsalat macht, liegt das
manchmal (wie auch bei mir) wohl tatsächtlich hieran.
Versteh das wer will.

Copying columns while using SExtractors ASSOC

If you want to have an input catalog for your SExtractor run, make sure to
ask for either of NUMBER_ASSOC or VECTOR_ASSOC in your param file, because
otherwise there will be no association anyway. However, if you want to
copy columns from the input catalog to the output catalog's associated
objects, you can use VECTOR_ASSOC(N) where instead of N you put the number
of columns you want, and use ASSOC_DATA to list the columns (there should
be N of them) from the input catalog to be copied. The output catalog then
contains a column VECTOR_ASSOC which is a vector column with N elements
for each object.

Sonntag, 9. Januar 2011

Apache MaxClients

If your apache server tells you in error.log something like
server reached MaxClients setting, consider raising the MaxClients setting
and is slow like hell, consider means by all means do.
Even if it doesn't look like this is the problem.

Samstag, 8. Januar 2011

Redmine + 32 bit chroot ruby + passenger + apache

This is how I got to run the ruby process behind my redmine
application inside a 32 bit debian chroot, where it uses considerably
less memory.

First I followed the well-written instructions here.
I took care to install all the stuff required by redmine, such as
passenger IN THE SAME VERSION as I had it installed on my primary
virtual host which contains the chroot, also installed all binaries
and gems in the very same absolute paths on the chroot as they were on
the primary host.

I linked (with mount -o bind) my redmine base directory to the same
absolute path on the chroot. From the above linked tutorial, I also
mounted /dev, /tmp, /proc and /var/mysqld to the chroot.
I did the "ln -s runas32bit ruby1.8" in my /usr/local/lib and made
sure ruby1.8 is also installed in /usr/local/lib on the chroot.

The correct passenger configuration in my case then was
# this forwards to the 32 bit chroot ruby
PassengerRuby /usr/local/bin/ruby1.8
# this is the correct path on either side of the chroot wall
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.14
# this loads the correct 64 bit version of mod_passenger -- because
apache2 won't swallow the 32bit one
LoadModule passenger_module
/usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.14/ext/apache2/mod_passenger.so
That's about it! If anything goes wrong: the apache2 error logs were
unusually helpful in my case.

Freitag, 7. Januar 2011

FITS mit Python

Endlich mal eine einfache und scheinbar intelligente FITS-Bibliothek:
pyfits fuer Python.

Was sich mit CCFits standhaft weigerte und mit cfitsio sicher moeglich
aber ein boeser Traum ist, ging mit pyfits (ohne Vorkenntnisse) in
Minuten. So liest man aus einer FITS-Datei (uebergeben auf
Kommandozeile) mit einer Tabellen-Extension mit einer Zeile und einer
Spalte, in der ein 3D-Datacube steht, die Werte aus...
#!/usr/bin/python

import pyfits
import sys
hdulist = pyfits.open(sys.argv[1])
tbldata = hdulist[1].data
data = tbldata.field(0)[0]

for i in range(1825):
print data[i]

hdulist.close()

Donnerstag, 16. Dezember 2010

Running ldacsort

Sonntag, 12. Dezember 2010

Google Conversion Code in Drupal

To include Google Conversion Code in your custom Drupal module
"mymodule", the easiest thing might be to edit the function
mymodule_footer such that it returns the Google code. I wanted this
only on the module form page itself, so I added a switch for the right
"q". Take a look at this
function mymodule_footer() {

if ($_GET['q']=="mymodule")
{
return 'YOUR CODE HERE';
}
return '';
}

Mittwoch, 27. Oktober 2010

Supermongo Terminal

Supermongo may loose a lot of its ease of use if you can't recollect and
edit commands from the history to be run again. This may be the case
because sm doesn't correctly work with the particular terminal software it
is run in.

However, there is an easy way of fixing this: Supermongo's termtype
command. You can use this to change the way Supermongo communicates with
your terminal to a language that your terminal unterstands. The file
/etc/termcap contains the available options. For me, it worked to say
: termtype ansi77
in order to get sm history to work like it should.

Supermongo non-quadratic matrices

You might have wondered why the authors of supermongo have only implemented matrix routines for quadratic matrices in their standard macros (see help matrix in supermongo for details). So have I. In case this helps you, feel free to use the following generalizations of some matrix macros to n x m - matrices. I only implemented those I needed and did some testing on them, this is not a complete set of what you might require. The macros are named like the usual ones, but with a suffix "2".

matrix2 (sm, 2 KB)

User Status

Du bist nicht angemeldet.

Aktuelle Beiträge

iPhone to linux
gphoto2 --port=usb -R -P copies all images from an...
danielgruen - 2. Feb, 19:46
Alternative
This screws up the bounding box of non-square plots....
danielgruen - 30. Dez, 23:22
MNRAS submission problems...
Matplotlib ps files like to contain Type 3 fonts, which...
danielgruen - 13. Apr, 19:45
PPPOE connection problems
I was facing connection problems after some technical...
danielgruen - 29. Jun, 01:51
Sort products randomly...
http://www.magentocommerce .com/boards/v/viewthread/2 32826/#t331309 nicely...
danielgruen - 1. Feb, 17:29

Links

Suche

 

Status

Online seit 5918 Tagen
Zuletzt aktualisiert: 2. Feb, 19:46

Credits


Multimedia
Profil
Abmelden
Weblog abonnieren