Skip to content

Instantly share code, notes, and snippets.

View mathieuboudreau's full-sized avatar

Mathieu Boudreau mathieuboudreau

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mathieuboudreau
mathieuboudreau / postInstall
Created February 26, 2021 14:10
CodeOcean postInstall file
#!/usr/bin/env bash
set -e
cd /MATLAB/extern/engines/python/
python3 setup.py install
pip3 install octave_kernel sos==0.17.7 sos-notebook==0.17.2 sos-python==0.9.12.1 sos-bash==0.12.3 sos-matlab==0.9.12.1 sos-ruby==0.9.15.0 sos-sas==0.9.12.3 sos-julia==0.9.12.1 sos-javascript==0.9.12.2 sos-r==0.9.12.2 scipy plotly==3.10.0 dash dash_core_components dash_html_components dash_dangerously_set_inner_html dash-renderer flask imatlab;
python3 -mimatlab install
python3 -m sos_notebook.install
@mathieuboudreau
mathieuboudreau / Dockerfile
Created February 26, 2021 14:09
CodeOcean Dockerfile
FROM registry.codeocean.com/codeocean/matlab:2019a-ubuntu18.04
ARG DEBIAN_FRONTEND=noninteractive
ARG MLM_LICENSE_FILE
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bsdtar=3.2.2-3.1ubuntu0.6 \
build-essential=12.4ubuntu1 \
cmake=3.10.2-1ubuntu2.18.04.1 \
# Make sure to install openpyxl and pandas first using "pip install ..."
import openpyxl
import pandas as pd
x = np.array([], dtype=[
('x0', 'f4'),
('y0', 'f4'),
('gratio','f4'),
('axon_area','f4'),
('myelin_area','f4'),
@mathieuboudreau
mathieuboudreau / mocov_combine.m
Last active May 12, 2018 06:30
MOCOV_COMBINE Combine MOcov JSON coverage reports.
function combinedReports = mocov_combine(dirPath, outputFileName)
%MOCOV_COMBINE Combine MOcov JSON coverage reports.
%
% dirPath: (string) Directory containing MOcov JSON coverage reports.
%
% (optional)
% outputFileName: (string) Filename of combined reports JSON file – saved in dirPath.
%
% External dependencies: JSONlab – https://github.com/fangq/jsonlab