{{ message }}

Instantly share code, notes, and snippets.

# Constantine Lignos ConstantineLignos

Last active Oct 23, 2016
View Sleep Study Analysis.ipynb
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Last active Oct 23, 2016
Python Bootcamp Notebook Examples
View Presidential Ratings Stub.ipynb
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Last active Mar 22, 2021
Set up OpenBLAS with NO_AFFINITY=1 to make it most useful for applications such as R.
View openblas_ubuntu_compilation.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 1. Check out OpenBlas from https://github.com/xianyi/OpenBLAS and check out the master branch. 2. Build and install to /opt: a.) Multi-threaded: make NO_AFFINITY=1 b.) Single-threaded: sudo make PREFIX=/opt install 3. Configure it as your BLAS of choice: sudo update-alternatives --install /usr/lib/libblas.so.3gf libblas.so.3gf /opt/lib/libopenblas.so.0 50 4. Check the configuration to make sure it's selected update-alternatives --config libblas.so.3gf
Created Mar 22, 2013
Sample items (i.e., words) from a list of items based on their frequencies. Assumes the input file contains lines of the form "<count> <item>".
View freqsampler.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 #!/usr/bin/env python """Randomly sample items from a list of items with their frequencies.""" import sys import random from operator import itemgetter def parse_countword_line(line):
Created Mar 5, 2013
Make git list untracked files that have been ignored. Useful if you want to verify that there's nothing you care about in your ignores.
View show_ignored_untracked.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 git ls-files -oi --exclude-standard
Last active Mar 12, 2018
Building picosat on Windows.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 /* Turn off features that will not work on Windows. */ #define NGETRUSAGE #define NALLSIGNALS
Created Dec 18, 2012
Info for fixing whitespace parsing issue in checkcites.
View oneref.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 \documentclass{article} \begin{document} This is a test \cite{foo2012}. \bibliographystyle{plain} \bibliography{tworef} \end{document}
Created Aug 3, 2012
View TSVs nicely in the terminal
View viewtsv.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 #!/usr/bin/env bash column -t -s $'\t'$1 | less -S
Created Jun 14, 2012
Bash PS1 with user@host, full path, and git_ps1, each in their own color
View gist:2929803
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 GIT_PS1_SHOWDIRTYSTATE=1 PS1='[$\e[1;32m$\u@\h $\e[1;36m$\w$\e[1;35m$$(__git_ps1 " (%s)")$\e[0m$]\$ '
Created Feb 14, 2012
Print plain text files by order of filename, with pretty headers
View printprettytxt.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 find . -name "*.txt" | sort | xargs -n 1 enscript -G