Links
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
def post(self): | |
""" | |
Create a new user document in the users and cluster users database. | |
:json string username: required, the requested username | |
:json string password: required, the requested password | |
:json string email: required, and email address to be associated | |
with the account | |
:json string first_name: required, the user's first name | |
:json string last_name: required, the user's last name | |
:json string company: optional, the user's company |
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 | |
""" | |
pyfile_to_module | |
Simple util to convert a python filename like | |
some_package/some_module/some_file.py to some_package.some_module.some_file | |
style module name. | |
""" | |
import argparse |
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
sudo chmod -R a+rw /usr/local/src | |
mkdir /usr/local/src | |
chmod a+rw -R /usr/local/src | |
curl --remote-name http://www.ijg.org/files/jpegsrc.v9b.tar.gz | |
tar -xzvf jpegsrc.v9b.tar.gz | |
cd jpeg-9b | |
./configure --enable-shared --enable-static | |
make | |
sudo make install | |
sudo ranlib /usr/local/lib/libjpeg.a |
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
#!/bin/bash | |
# assumes that XCode and XCode command line tools have been installed | |
# xcode-select --install | |
# assumes that gfortran has been installed | |
# https://gcc.gnu.org/wiki/GFortranBinaries | |
# install pyenv & set 2.7.11 as current | |
# See: https://github.com/yyuu/pyenv-installer | |
# See: https://github.com/yyuu/pyenv | |
curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash |
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
function parse_git_branch () | |
{ | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return; | |
BRANCH="("${ref#refs/heads/}")"; | |
echo "${BRANCH}" | |
} | |
export PS1="[\t \W] \$(parse_git_branch) " |
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
# | |
# required downloading source of cmakem protobuf, gsasl as well as hdfs3 | |
# | |
mv ~/Downloads/cmake-3.9.0-rc5.tar.gz . | |
tar -zxf cmake-3.9.0-rc5.tar.gz | |
cd cmake-3.9.0-rc5 | |
./bootstrap && make | |
sudo make install |
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
from contextlib import contextmanager | |
@contextmanager | |
def context1(arg): | |
print("Bronte") | |
yield "Tolkien" | |
print(arg) | |
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
(base) root@0343625ee20e:/opt/unicron/imc-unicron-jupyter# conda list | |
# packages in environment at /opt/conda: | |
# | |
# Name Version Build Channel | |
_libgcc_mutex 0.1 main | |
asn1crypto 1.0.1 py37_0 | |
attrs 19.2.0 py_0 | |
backcall 0.1.0 py37_0 | |
bleach 3.1.0 py37_0 | |
ca-certificates 2019.8.28 0 |