Skip to content

Instantly share code, notes, and snippets.

Avatar

Douglas Russell dpwrussell

  • MathWorks
  • Cambridge, UK
View GitHub Profile
@dpwrussell
dpwrussell / Dockerfile
Created Nov 8, 2019
Docker x-forwarding experiment
View Dockerfile
FROM ubuntu
RUN apt-get -y update \
&& apt-get -y install xauth \
&& apt-get -y install libxt6 libxtst6 libgtk2.0-0 libnss3 libx11-xcb1 libxss1 libasound2 \
&& apt-get -y install x11-apps \
&& rm -rf /var/lib/apt/lists/*
@dpwrussell
dpwrussell / README.md
Last active Mar 3, 2020
MATLAB Reference Architecture CLI Example Usage
View README.md

CLI Examples for MathWorks' Reference Architectures

These are examples of creating and deleting reference architectures for three MathWorks offerings; MATLAB, MATLAB Parallel Server and Network License Manager for MATLAB. There are examples for both AWS and Azure.

In each of the examples, the minimum parameters are supplied. The values for each parameter are specific to your AWS account and the deployment you with to create, so they should be set by the user. The documentation (linked to from each of the examples) goes into details of all possible parameters

@dpwrussell
dpwrussell / README.md
Created Aug 16, 2018
Create/Update/Delete Batch Cluster and Job Queue
View README.md

Example Usage:

Create/Update/Delete of a batch cluster and job queue requires a YAML configuration file of the following shape.

Note: These values are not the actual values for our account.

Region: us-east-1
StackPrefix: stack-name
@dpwrussell
dpwrussell / README.md
Last active Jul 24, 2018
Create AWS user and add to specified group(s).
View README.md

Example Usage:

python create_aws_user.py newuser \
  --group ComputationalScientist \
  --group SUDOers

This outputs a block of text which should be communicated to the user.

@dpwrussell
dpwrussell / rename.py
Created Jul 6, 2017
AT File Renaming
View rename.py
#!/usr/bin/env python3
import os
import re
r = re.compile(r'(\w\s-\s\d\d\(fld\s\d\swv\s\w+\s-\s[\w]+-\stime)(\s\d+)(\s-\s\d+\sms)(\)\.tif)')
d = os.path.abspath('files/')
all_files = [f for f in os.listdir(d) if os.path.isfile(os.path.join(d, f))]
@dpwrussell
dpwrussell / workshop.md
Last active Aug 8, 2017
OMERO User Meeting 2017 AWS Workshop
View workshop.md

OMERO User Meeting 2017 AWS Workshop

https://tinyurl.com/ydz73puv

What is Docker?

  • ...an open source project to pack, ship and run any application as a lightweight container.

  • An abstraction layer to "containerize" any application and allow it to run on any infrastructure
  • Used to containerize OMERO, OMERO.web and and the additional components of OMERO.cloudarchive
@dpwrussell
dpwrussell / Dockerfile
Last active Apr 6, 2017
webtagging-docker52
View Dockerfile
FROM omero-grid-web52
MAINTAINER douglas_russell@hms.havard.edu
USER root
RUN pip install -i https://testpypi.python.org/pypi omero-webtagging-autotag \
&& pip install -i https://testpypi.python.org/pypi omero-webtagging-tagsearch
USER omero
RUN /home/omero/OMERO.server/bin/omero config append omero.web.apps '"omero_webtagging_autotag"' \
&& /home/omero/OMERO.server/bin/omero config append omero.web.ui.center_plugins '["Auto Tag", "omero_webtagging_autotag/auto_tag_init.js.html", "auto_tag_panel"]' \
@dpwrussell
dpwrussell / Dockerfile
Last active Apr 6, 2017
webtagging-docker53
View Dockerfile
FROM omero-grid-web53
MAINTAINER douglas_russell@hms.havard.edu
USER root
RUN pip install -r /home/omero/OMERO.server/share/web/requirements-py27.txt
RUN pip install -i https://testpypi.python.org/pypi omero-webtagging-autotag \
&& pip install -i https://testpypi.python.org/pypi omero-webtagging-tagsearch
USER omero
RUN /home/omero/OMERO.server/bin/omero config append omero.web.apps '"omero_webtagging_autotag"' \
View movies.R
library("mosaic")
library("Hmisc")
# Load the movies and remove non-US/UK observations
allMovies <- read.csv('movie_metadata.csv', na.strings=c("", "NA"))
subsetMovies <- subset(allMovies, country=='USA' | country=='UK')
# Examine the variables of interest for NA
# No budget
nrow(subsetMovies[is.na(subsetMovies$budget),])
You can’t perform that action at this time.