Skip to content

Instantly share code, notes, and snippets.

Douglas Russell dpwrussell

  • MathWorks
  • Cambridge, UK
Block or report user

Report or block dpwrussell

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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 Oct 29, 2019
MATLAB Reference Architecture CLI Example Usage
View README.md

CLI MATLAB Reference Architecture Examples

AWS

From R2019b and after, each template supports multiple regions. So this can be used in any region that we support.

These examples use the AWS CLI and are written in bash.

Network License Manager for MATLAB

@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),])
@dpwrussell
dpwrussell / .gitignore
Last active Aug 29, 2016
FileMaker JDBC From Python
View .gitignore
*.class
*.pyc
fmjdbc.jar
You can’t perform that action at this time.