Skip to content

Instantly share code, notes, and snippets.

View allen-munsch's full-sized avatar
⁉️

James allen-munsch

⁉️
View GitHub Profile
@allen-munsch
allen-munsch / another-example.md
Last active November 28, 2023 17:35 — forked from JamesChevalier/lambda_function.py
How to install lxml in Amazon Lambda
sudo yum install update
sudo yum groupinstall -y "Development Tools"
sudo yum install -y python-devel libpng-devel freetype-devel gcc72-c++

If you want to use docker, you can use the following command:

 docker run -it lambci/lambda:build-python3.7 bash
@allen-munsch
allen-munsch / docker-cleanup-resources.md
Created August 25, 2018 16:24 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

import math
import numpy
import numpy.random as nrand
"""
Note - for some of the metrics the absolute value is returns. This is because if the risk (loss) is higher we want to
discount the expected excess return from the portfolio by a higher amount. Therefore risk should be positive.
"""
@allen-munsch
allen-munsch / gist:a52f024d32f300529747006c2c9dc632
Created July 4, 2018 00:16 — forked from mdbecker/gist:1309633
multiprocess && gevent example
from multiprocessing import Pool as MPool
from time import sleep
import datetime
import multiprocessing
import random
def time_request():
from gevent import monkey; monkey.patch_socket
from jsonrequester import JsonRequester
@allen-munsch
allen-munsch / ca.md
Created May 1, 2018 15:04 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.