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
# The steps we are going to follow are the following: | |
# 0) (Not required) look at versions and paths of python inside and outside container | |
# 1) Bootstrap the python:latest docker container into a Singularity image with the module directory as a bind point | |
# 2) Add the mapped directory (inside container) to the PYTHONPATH | |
# 3) import as usual! | |
# Outside Container | |
vanessa@vanessa-ThinkPad-T450s:~$ whoami | |
vanessa |
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
Bootstrap: docker | |
From: joke/hcppipelines | |
%runscript | |
exec /run.py "$@" | |
%post | |
# Make script executable |
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
Bootstrap:docker | |
From:cern/slc6-base | |
%runscript | |
echo "Hi from slc6" | |
cat /etc/issue | |
%post | |
yum -y update |
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
Bootstrap: docker | |
From: ubuntu:14.04 | |
%runscript | |
echo "SINGULARITY RUNSCRIPT" | |
echo "Arguments received: $*" | |
exec /opt/anaconda3/bin/python "$@" | |
%post |
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
import json | |
from os.path import exists | |
from selenium import webdriver | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.common.exceptions import TimeoutException | |
class GoogleGroupsScraper(object): | |
""" A simple class to scrape a google group. """ |
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
import sys | |
import os | |
import time | |
def show_progress(iteration,total,length=100,min_level=0,carriage_return=True,suffix=None,symbol=None): | |
'''create a terminal progress bar, default bar shows for verbose+ | |
:param iteration: current iteration (Int) | |
:param total: total iterations (Int) | |
:param length: character length of bar (Int) |
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 glob import glob | |
import dicom | |
import pandas | |
import random | |
import json | |
import os | |
# wget https://bootstrap.pypa.io/get-pip.py | |
# sudo python3 get-pip.py | |
# sudo pip3 install pydicom |
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 glob import glob | |
import multiprocessing | |
import itertools | |
import time | |
import os | |
################################################################### | |
# Setup | |
# ----------------------------------------------------------------- |
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
Bootstrap:docker | |
From: centos:7 | |
%labels | |
CREATOR vsochat@stanford.edu | |
%environment | |
PATH=$PATH/STAR/bin/Linux_x86_64 | |
%post |
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 | |
python test_timeparser.py | |
# Asking for datetime for date:20040826 and time:185744 | |
# 2004-08-26T18:57:44Z | |
# Asking for datetime for date:20040826 | |
# 2004-08-26T00:00:00Z |