Wednesday, March 30, 2016

Install improved_dense_trajectories code on vision machines

https://gist.github.com/dineshj1/873850c07a0ff2a5a899a14008dc8abe

Run install_IDT_code.sh, but this will run into errors at first. Follow the instructions given in install_IDT_code.sh to edit Makefile. That should do the job.

Matlab script to plot caffe outputs

Wednesday, March 16, 2016

Setting primary group on UTCS machines

The code snippet in https://gist.github.com/dineshj1/d6b975a8d3d160e95c69 should be added to the end of the .profile file.

NOTE: This causes issues with getting graphics working on eldar-1.

Friday, February 19, 2016

Screenshot shortcuts on a new Linux Mint OS

Linux Mint 17.3 did not have the keyboard shortcuts for screenshots of selected areas working.
I want the behavior to be:

  • Shift-PrintScr = save selected area screenshot (to /home/<username>/Pictures/)
  • Ctrl-Shift-PrintScr = copy selected area screenshot to clipboard
The following steps proved sufficient:
  • Copy scripts from https://gist.github.com/dineshj1/d2c671a3ad82f89879c2
    • Navigate to keyboard>shortcuts>custom shortcuts
    • Add shortcut commands: 
      • bash /home/dineshj/screenshot_area.sh, with keyboard bindings: Shift+Print 
      • bash /home/dineshj/screenshot_area_to_clipboard.sh, with keyboard bindings: Ctrl+Shift+Print 

    Compiling and submitting matlab scripts to condor on the UTCS cluster



    1. Write the script in condor-compatible way: (see https://gist.github.com/dineshj1/935a703f93c12a3efc19#file-sample_condorized_function-m, and read tips and details)
    2. Compile code after adding all necessary paths to Matlab path: (see https://gist.github.com/dineshj1/935a703f93c12a3efc19#file-compilecodes-m-example)
    3. Create submit script: (see https://gist.github.com/dineshj1/935a703f93c12a3efc19#file-sample_submit_file)
    4. Some edits to PATH, LD_LIBRARY_PATH etc. may be necessary (see full .profile at https://gist.github.com/dineshj1/935a703f93c12a3efc19#file-profile-when-working): 
      1. export PATH=$PATH:/lusr/share/software/matlab-r2015b/bin/glnxa64/:/lusr/share/software/matlab-r2015b/toolbox/compiler/deploy/;
      2. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/v/filer4b/software/matlab-r2015b/bin/glnxa64/:/v/filer4b/software/matlab-r2015b/runtime/glnxa64/;
      3. export MCR_CACHE_ROOT=/scratch/vision/dineshj/mcrCache/ # where executables will extract ctf archives
      4. export KMP_DUPLICATE_LIB_OK=true;

    Wednesday, February 17, 2016

    Python jobs on condor

    Condor submit file could look like:

    +Group="GRAD"
    +Project="AI_ROBOTICS"
    +ProjectDescription=""
    Universe = vanilla
    Getenv = True
    Log    = ../SUN_download_condor.log
    Output = ../SUN_download_condor.out
    Error  = ../SUN_download_condor.err
    Executable = ./download_SUN_large_panos.py
    Queue 100

    And the python script itself could look like:

    #!/usr/bin/env python

    import os
    import urllib
    import sys

    def touch(fname, times=None):
      with open(fname, 'a'):
        os.utime(fname, times)

    target_root='./dataset/9104x4552/';
    if not os.path.exists(target_root):
      os.mkdir(target_root);


    Note the header at the top (shown in bold). This is important for condor to know how to execute the script.

    Also, obviously, the python script would have to have executable permissions.