Gary Larson
  • Research
  • Teaching
  • Contact
  • CV
  • Personal
  • Research
  • Teaching
  • Contact
  • CV
  • Personal

Using anaconda python with the fish shell

11/21/2016

0 Comments

 
After installing Anaconda python in hopes to learn some python via iPython notebooks, I found that the most basic commands (like starting the navigator / new notebook / etc) did not work from the Terminal. I was getting all sorts of confused about what was going on. The problem was simple: 

Anaconda's installation does set all the paths properly, but the problem is using fish as the default shell. Because I'm not using bash as the default shell, I don't get access to any of the PATHs that are set by ~/.bash_profile! 

One option would be to try manually setting all those environment variables in fish.config (or whatever it's called) but that seems like a pain.

Another option, from here, it to try this: "Keep your default shell as Bash and simply add the line exec fish to the appropriate Bash#Configuration files,"

I did that - adding exec fish to the end of ~/.bash_profile, and changed back to bash as the default shell. Now, when opening a new terminal window, fish opens and running which python finally gives me /Users/garylarson/anaconda/bin/python. 
0 Comments

How I got Boost running with Clion

1/26/2016

0 Comments

 
From http://stackoverflow.com/questions/28761323/how-to-include-external-library-boost-into-clion-c-project-with-cmake
Essentially I modified the default CMakeLists.txt file to be:
0 Comments

Linux - see target of symbolic link

1/26/2016

0 Comments

 
How to actually see the location of a symbolic link, e.g. the command "which java" returns /usr/bin/java or whatever.

Use this instead:
readlink -f $(which java)
0 Comments

Cluster - get all my running job info quickly

1/26/2016

0 Comments

 
Note: The below was turned into a script called "listalljobs" on my search path. So I just run "listalljobs" and it shows what I want. The "Name=mpi" part is because all my scripts submitted to run on the cluster contain that string. So for non-Wang-Schmidler stuff, I'll need to modify the command below.

How to quickly learn what directories my jobs belong to when I'm running lots of jobs. (this removes need for my "runIDinformation.txt" file! Yay.)
  • run the below command
  • paste its output into Sublime Text
  • use Ctrl + Command + G to select all unwanted text and quickly remove unwanted lines
  • continue with Sublime text until you have something like
8146477 pfConcept4-25prots
8146478 pfConcept4-25prots
8146479 pfConcept4-25prots
...

scontrol show job | grep --color -E "UserId=gjl7|WorkDir=/hpchome/sysbio/gjl7|Name=mpi"
0 Comments

R - how to run R on the Duke cluster (DCC, formerly DSCR)

1/26/2016

0 Comments

 
0 Comments

Filesystem Hierarchy Standard

9/14/2015

0 Comments

 
Finally, an explanation! File is attached right here.
filesystem_hierarchy_standard.html
File Size: 183 kb
File Type: html
Download File

0 Comments

Fix for Linux Dropbox

4/24/2015

0 Comments

 
I had some kind of problem ... don't even remember what it was. But I found a fix that worked... cleaning up my Desktop... here's the fix.

my fix for linux dropbox

on jan 1, 2015, I did:

cp ~/.dropbox-dist/dropbox-lnx.x86_64-3.0.3/libxml2.so.2 ~/.dropbox-dist/dropbox-lnx.x86_64-3.0.3/libxml2.so.2_BACKUP20150105

killall dropbox

rm ~/.dropbox-dist/dropbox-lnx.x86*/libxml2.so.2

dropbox start
0 Comments

Terminal - how to replace filename extensions

1/4/2015

0 Comments

 
From: http://apple.stackexchange.com/questions/66422/change-all-the-txt-files-to-md-files-in-a-certain-folder

e.g. to replace a bunch of files in a folder which end in .pdb, and change the extension to .txt, run:

find . -iname "*.pdb" -exec bash -c 'mv "$0" "${0%\.pdb}.txt"' {} \;


Note: The website above says it does this "recursively" by which they may mean it acts on subfolders, too. I haven't tested this, so be careful!
0 Comments

How to tell whether your Linux is 32-bit or 64-bit

8/4/2014

0 Comments

 
  • Open a terminal console
  • Enter the command uname -m (uname prints system information; -m option prints the machine hardware name.)
If you have a 32-bit system, uname -m will return a value of i686. A 64-bit system will return a value of x86_64.

0 Comments

How to drag-and-drop files over SSH on Linux

7/17/2014

0 Comments

 
This will give a similar setup like Fugu on Mac. Just be careful when looking at a browser window whether you are looking at the local folder or the remote SSH folder!

open up a file browser window. Hit ctrl-l for 'location' and for the location type sftp://username@server.dns.name/directory1/directory1/ to connect.
0 Comments

    Categories

    All
    Beamer
    Boost
    C++
    Cluster Computing
    Data Munging
    Dplyr
    Finder
    Fish Shell
    Git
    Good Reads
    Hadley Wickham
    Java
    Jupyter
    LaTeX
    Linux
    Mac
    Melt
    Misc
    NetBeans
    Objective Bayes
    Profiling
    Pycharm
    Python
    R
    Rcpp
    Reshape
    Stan
    Statistics
    Statistics History

    Archives

    December 2016
    November 2016
    September 2016
    August 2016
    July 2016
    April 2016
    March 2016
    February 2016
    January 2016
    September 2015
    August 2015
    June 2015
    April 2015
    March 2015
    January 2015
    December 2014
    November 2014
    October 2014
    September 2014
    August 2014
    July 2014
    May 2014
    April 2014
    February 2014
    November 2013
    August 2013
    July 2013

    About

    This blog is mainly for statistics, R, or Duke-related stuff that is not directly relating to research activity.

Powered by Create your own unique website with customizable templates.