Posts

Showing posts with the label scripting

Exporting Skype Chat/Skype Contacts to csv file using the shell script and sqlite3 (usually already installed on mac)

Edit: a very first draft version of Skype Exporter have been made and released. https://github.com/renesto/SkypeExportSwift/releases check it, and report any issues to renesto-at-gmail.com I heard there are not so many nice ways to get the chat history from skype, so I came across a page of one guy who shows a way to open the sql chat history database and delete all conversations. I thought to make something more from that idea (as delete chat history is now one of the options in skype) Create a file exportFromSkype.sh place either this text: sqlite3 -batch "$HOME/Library/Application Support/Skype/$1/main.db" < <EOF .mode csv .output $2.csv select * from Messages where dialog_partner = '$2'; .output stdout .exit EOF now make the script executable by running chmod +x exportFromSkype.sh now, when you want to export some chat history from certain person, you can do it by: sh exportFromSkype.sh your_skype_name your_friends_skype_name and i...

Parallel processing, yiha :)

So, you have some very high computation-demanding work to do? Furthermore, you also have some fancy server with 16 cores or more, all available for your sexy computations? Cool, then you would LOVE the ppss . What it does is that it can scan for you how many cores has the machine that runs ppss, and schedules list of processes to each of the cores. For example, I have around 200 separate simulations to perform. I downloaded ppss (no compilation necessary :) ), and just run it with specific command (help can be found on link above). It reduced the running time of my simulations from 2 weeks to 2 days :)

Debugging QUALNET with GDB

Compiling QualNet with Debug Option By default, the optimization option of the compiler is enabled in the Linux and Mac OS X Makefiles. When the optimization option is enabled, the compiler may optimize the program for better performance. However, for better source level debugging, the optimization option of the compiler should be disabled and the debug option should be enabled. Perform following steps to recompile QualNet with the debug option enabled: 1. Go to QUALNET_HOME/main. Copy the makefile for your compiler to Makefile. 2.Edit Makefile as follows: •Enable the DEBUG line by removing the ‘#’ character so it is displayed as: DEBUG = -g •Disable the OPT line by inserting a ‘#’ character at the beginning of the line so it is displayed as: # OPT = -O3 3.Recompile QualNet by typing the following commands: make clean make Running the Debugger QualNet can be run from within debug tools such as gdb or dbx. Here, we use gdb as an example. To run gdb, perform the following...