Tuesday, December 30, 2014

Resize images from the command line in Ubuntu

If you need to resize a lot of images to conserve disk space, you can use imagemagick. Note: mogrify will overwrite the original files.

sudo apt-get install imagemagick
mogrify -resize 1024x768 *JPG

Tuesday, December 2, 2014

SMACS 2014 Experience

I attended SMACS 2014 in Ateneo de Naga last November, but only the seminar part. It was attended by about fifty participants including the presenters. There were a few presenters from Japan and China, but majority are from the Philippines. Most of the presentations came from the ACLab  in UP Diliman tackling some topics on membrane computing particularly P Systems. Presenters from Japan talked about some formalizations on programming language constructs as well as formal specifications for real-time systems. Topics on bioinformatics were discussed by UPLB  presenters. Being a "systems" person, I needed some effort to understand their presentations. I've already forgotten some topics on graphs and NP-completeness!The talk I liked the most is the one delivered by Ma'am Marge on reversible sorting networks using quantum gates.

Thursday, November 20, 2014

PhD Qualifying Exam

I took the qualifying exam last November 17. Actually I have no idea what the exam is all about. They say that the exam will test if I am ready to move forward towards the PhD. I also asked my adviser what to prepare for the exam. He just wanted me to present the paper I submitted for NCITE 2014 then be ready to answer any question related or not to my research. One of my committee member asked me on what skills do I still need to have in order to proceed to my PhD. My adviser asked me what I think will be the challenging part of my study. I found it difficult to answer these questions but gave them the best answer I can. Luckily I was able to convince them and they gave me the go signal to proceed. I am now officially a PhD candidate!

Monday, November 3, 2014

NCITE 2014 Experience

Last October 23-25 we attended NCITE in Boracay. This year's conference acceptance rate is quite low, 29%. I like this year's conference because everything seems to go very smoothly. The conference website is very functional and informative. The review process is great because of the use of Easychair. In attendance are about 300+ participants from different regions. The venue and food are also good. Two papers from our institute were awarded the Best Paper. I also presented two papers. One is the work of my previous student and the other is part of my PhD work. I was also part of the program committee which actually motivated me to write this post.



Thursday, October 16, 2014

Playing with the Facebook Graph API in Python: Downloading posts from "The Elbi Files" Page

If you are a fan of The Elbi Files, you can download the posts on the page using the procedure described here. I am using Ubuntu 12.04.
  1. Install pip[1].
  2. Configure and activate facebookenv virtual environment[2].
  3. Install requests package while in facebookenv environment: pip install requests
  4. Get an access token using Facebook's Graph API Explorer tool[3].
  5. Download the Python file below. Make sure you change the access token to the  one you obtained from step 4.
  6. Run the script on the terminal and redirect the output to a file:  PYTHONIOENCODING=UTF-8 python elbifiles.py > elbifiles.txt
  7. Note that the script downloads the messages only. Facebook however allows you to download more! Use responsibly. Now do some "interesting" text processing on the text file!


Resources:
[1] http://www.saltycrane.com/blog/2010/02/how-install-pip-ubuntu/
[2] http://facebook-sdk.readthedocs.org/en/latest/install.html
[3] https://developers.facebook.com/tools/explorer

Sunday, October 5, 2014

On reading/reviewing papers

(Last update: 17 January 2023)



I've reviewed for PCSC, NCITE, MJST, PeJARD, and others. Although most of the reviewing are unpaid (aka "service"), it is quite fulfilling to be part of the academic peer review process. Reviewing also lets me know what my peers are currently working on. In this post, I describe how I review a paper. 

I don't do any plagiarism check because I assume that the program committee chair/journal editor has performed a "desk check" using current automated tools, like Turnitin, before handing out the paper to the reviewers. I also don't initially read a paper's abstract. 

After reading a paper two times, I consider it well-structured and well-written if I can clearly answer the following at a "high level":
  • What is the problem/research question being addressed?
  • Why is the problem/research question significant or interesting?
  • What are existing solutions to the problem?
  • What is/are the proposed solution(s)?
  • What is the work's main (technical) contribution to the "body of knowledge" in the area?
  • Is the contribution "new" and "significant"?
I do a more thorough reading on the third and fourth passes where I take note of the important claims and check the methods, as well as the results, for correctness. I dissect the technical details of the work "as presented" in the paper. The fifth pass is for validating and double-checking my understanding of the paper. 

Once I'm confident about my understanding of the paper, I write my own abstract and compare it to the paper's abstract. 

I accept a paper based on the following: 
  1. The paper is "relevant" to the conference or journal.
  2. The contribution is "significant".
  3. The work is not just a "repeat-experiment" or an "application of existing techniques" on a different dataset or domain. If it is a "repeat-experiment", the "insights" gained from the result are "substantial" and are "extensively" supported by proofs.
  4. Important claims are supported by citations, proofs, or data analysis and interpretation.
  5. The "context of the work" is properly "placed" in relation to other work. Relevant papers are properly cited. I should be able to identify the one (or two) reference(s) which motivated the work. 
  6. The paper uses simple words and sentences. Too much use of jargon  makes a paper difficult to read and thus defeats the purpose of publication: effective and efficient communication of research results.
  7. The paper cites scholarly articles (journal articles, conference proceedings, technical reports), not just web sites. 
  8. I believe I can duplicate the experiments conducted and get the same results using the same dataset, environment, and parameters as the authors' (if I have the resources and given enough time). Plus points if the source code and dataset are made public.
  9. The paper is in the proper format for the conference or journal.
  10. Tables and figures are readable, can stand on their own, and have useful labels and captions.
The above criteria may seem too strict and rigid. However, I believe peers who review my work have even stricter criteria.

As a final note, I always review with the mindset of accepting a submission. In case I reject a paper, I see to it that my written review describes the things that will make me accept the paper if resubmitted. 

Wednesday, September 10, 2014

On Linux Server Documentation

The following information about a server are what I usually take note of:
  1. Purpose
  2. Linux distribution version (lsb_release -a)
  3. Kernel version (uname -a)
  4. Processor information (cat /proc/cpuinfo)
  5. Memory information (cat /proc/meminfo)
  6. Disk partitions (fdisk -l)
  7. Network configuration (cat /etc/network/interfaces)
  8. Hostname (cat /etc/hostname)
  9. Hosts file (cat /etc/hosts)
  10. DNS Servers (cat /etc/resolv.conf)
  11. Allowed users/Sudoers  (cat /etc/passwd; cat /etc/sudoers)
  12. SSH server configuration (cat /etc/ssh/sshd_config )
  13. Firewall/IPTables settings ( iptables -L )
  14. APT sources ( cat /etc/apt/sources.list
  15. Nagios settings
  16. Backup process (depends on the solution being used: rsync, bacula, etc. )
  17. more to follow...
If you know the specific function of the server, say a MySQL database server, document the configuration (/etc/my.cnf).

Don't forget to backup the config and the data!

Sunday, August 24, 2014

A quick-and-dirty Java implementation of Topological Sort

Loading or something, this is just text to display while the browser pulls the gist....

Thursday, July 3, 2014

Reset/Reinitialize nova (openstack)

Sometimes the contents of the nova database are not updated properly when instances are deleted through the dashboard. This creates clutter because the instances with ERROR status remain in the dashboard list and cannot be deleted (in my case, no matter how many times I try). Some guides describe how to delete the problematic instances manually by accessing the nova database then deleting the appropriate entries in the affected tables using SQL. If you are working on an experimental system, reinitializing the entire nova database may be easier and faster. Perform the steps below on the controller node. WARNING: This will delete everything in the nova database. This is tested only on the havana version of openstack.

$mysql -u root -p
mysql>drop database nova;
mysql>create database nova; 
mysql>grant all privileges on nova.* to 'nova'@'%' identified by 'yournovapassword';
mysql>grant all privileges on nova.* to 'nova'@'localhost' identified by 'yournovapassword';
mysql>flush privileges;
mysql>exit
$sudo nova-manage db sync
After issuing the above commands, you need to restart all nova services on the controller node.

$sudo service nova-api restart
$sudo service nova-cert restart
$sudo service nova-consoleauth restart
$sudo service nova-scheduler restart
$sudo service nova-conductor restart
$sudo service nova-novncproxy restart
$sudo service nova-network restart

You also need to restart nova-compute on the compute nodes.

$sudo service nova-compute restart

You may need to do the following after:
  • Add custom flavors (nova flavor-create)
  • Add VM networks (nova net-create)
  • Add floating IP pool (nova floating-ip-bulk-create)
  • Edit the security rules for a project to access instances (best done through the dashboard)
*Note: The common cause of being unable to terminate instances is that the hypervisor is unreachable.
References:

Friday, January 10, 2014

ICS-Outdoor Society (ICS-OS) Season 2014

Jan 18. Mt Romelo / Buruwisan Falls
              Siniloan, Laguna
              to coincide with ICS week kick-off activity Mountain Clean-up Drive
              http://www.pinoymountaineer.com/2007/09/mt-romelo-240.html

Feb 22-25 Tirad Pass Traverse to Sagada
              Gregorio del Pilar, Ilocus Sur to Sagada, Mt. Province
              http://www.pinoymountaineer.com/2008/12/tirad-pass-traverse-sagada-1312.html

Mar 15 Makiling Traverse
     Sto. Tomas, Batangas to UPLB
       http://www.pinoymountaineer.com/2008/01/mt-makilingsto-tomas-trail-1090.html

Apr 6-9 Mt. Pulag Akiki Trail
              Kabayan, Benguet
              http://www.pinoymountaineer.com/2008/02/mt-pulagakiki-trail-2922.html

May 24-25 Cinco Picos - Silaguin Cove
              Subic, Zambales
              http://www.pinoymountaineer.com/2008/10/mt-cinco-picostraverse-to-silanguin.html

June 12 Freedom Climb
               Mt. Kalisugan, Calauan, Laguna
              http://www.pinoymountaineer.com/2007/08/mt-kalisungan-760.html