Skip to content

Instantly share code, notes, and snippets.

import openmdao.api as om
import numpy as np
from openmdao.utils.array_utils import evenly_distrib_idxs
N = 3
class DistribComp(om.ExplicitComponent):
def initialize(self):
FROM tacc/tacc-centos7
RUN yum -y install wget && docker-clean
# install omnipath drivers
RUN yum -y install \
libibverbs-devel \
numactl-devel \
libibmad-devel \
libibumad-devel \
@bbrelje
bbrelje / monte_carlo.py
Created January 3, 2020 17:20
Plots for computing optimal strategy in winner-take-all games with many opponents
from __future__ import division
from matplotlib import pyplot as plt
import numpy as np
sigma_mine = 2.0
sigma_they = 1.0
mean_mine = 0.3
mean_they = 0.0
N_other_players = 4
@bbrelje
bbrelje / bootstrap3-load-spinner.css
Last active December 20, 2019 14:12
Script for rendering Tecplot structured CFD surface data (in .dat point format) using Plotly
.glyphicon-refresh-animate {
-animation: spin .7s infinite linear;
-webkit-animation: spin2 .7s infinite linear;
}
@-webkit-keyframes spin2 {
from { -webkit-transform: rotate(0deg);}
to { -webkit-transform: rotate(360deg);}
}