To install a custom package or modify an existing docker image we need to
- run a docker a container from the image we wish to modify
- modify the docker container
- commit the changes to the container as a docker image
- test changes made to image
""" | |
A minimal implementation of Monte Carlo tree search (MCTS) in Python 3 | |
Luke Harold Miles, July 2019, Public Domain Dedication | |
See also https://en.wikipedia.org/wiki/Monte_Carlo_tree_search | |
https://gist.github.com/qpwo/c538c6f73727e254fdc7fab81024f6e1 | |
""" | |
from abc import ABC, abstractmethod | |
from collections import defaultdict | |
import math |
import os | |
import pandas as pd | |
from s3fs.core import S3FileSystem | |
# set the config file to an ini in the same path | |
# ini file contains aws keys. | |
# https://boto3.readthedocs.io/en/latest/guide/quickstart.html | |
os.environ['AWS_CONFIG_FILE'] = 'aws_config.ini' |
#!/bin/bash | |
# This script connects the computer to a vpn server using openconnect without pain | |
prog_name=$(basename $0) | |
# CHANGE YOUR_VPN_SERVER_DOMAIN to the VPN server you know like example.com | |
domain=YOUR_VPN_SERVER_DOMAIN | |
function help { |
@echo off | |
FOR /f "tokens=*" %%i IN ('docker ps -aq') DO docker rm %%i | |
FOR /f "tokens=*" %%i IN ('docker images --format "{{.ID}}"') DO docker rmi %%i |
To install a custom package or modify an existing docker image we need to
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$1 |
sudo yum install gcc python27 python27-devel postgresql-devel | |
sudo curl https://bootstrap.pypa.io/ez_setup.py -o - | sudo python27 | |
sudo /usr/bin/easy_install-2.7 pip | |
sudo pip2.7 install psycopg2 |