Skip to content

Instantly share code, notes, and snippets.

View mikepsn's full-sized avatar

MP mikepsn

View GitHub Profile
@mikepsn
mikepsn / collect_univariates.py
Created September 24, 2022 10:45 — forked from camriddell/collect_univariates.py
A collection of univariate plots
from functools import partial
from textwrap import fill
from scipy.stats import norm, uniform, skewnorm, gaussian_kde, triang
from numpy import (
array, linspace, quantile, histogram, atleast_2d, mean, std, add
)
from numpy.lib.stride_tricks import sliding_window_view
from matplotlib.pyplot import subplots, show, rc
@mikepsn
mikepsn / pz.py
Created April 4, 2022 21:48
Playing around with PettingZoo environments -
"""
Playing around with MPE PettingZoo Environments: https://www.pettingzoo.ml/mpe
"""
import numpy as np
from pettingzoo.utils import random_demo
from pettingzoo.mpe import simple_adversary_v2
from pettingzoo.mpe import simple_tag_v2
from pettingzoo.magent import adversarial_pursuit_v3
@mikepsn
mikepsn / gfootball.md
Last active April 4, 2022 21:49
How setup Google Research Football on Linux

Setting Up Google Research Football on Linux

  • Follow the instructions for Linux on: https://github.com/google-research/football

  • I set this up using the KUbuntu variant of Ubuntu 20.04.4 LTS x86_64

  • I already had git, cmake and build-essentials installed so apt installed the following packages:

sudo apt-get install libgl1-mesa-dev libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsdl2-gfx-dev libboost-all-dev libdirectfb-dev libst-dev mesa-utils xvfb x11vnc
@mikepsn
mikepsn / kubuntu.md
Last active June 30, 2020 15:45
Kubuntu 20.04 Configuration

Kubuntu 20.04 Configuration

  • Install Anaconda (Python 3.7)
  • Clone the base environment
conda create --clone base --name acex
conda activate acex
git clone https://github.com/openai/gym.git
cd gym
@mikepsn
mikepsn / python_packaging.md
Last active March 5, 2020 03:36
Setting up Python environments with anaconda

Python Packaging with Anaconda

  • Assume Anaconda 3 is installed under Windows 10 with Python 3.7.0.
  • Tensorflow doesn't work with Python 3.7, so we will need to install a new Python 3.6 environment.
  • Secondly, we will install a new 3.7 test environment to test the local pip install of a local python package.

Conda Environment Basics

In the Anaconda Prompt to get a list of environments:

conda info --envs

@mikepsn
mikepsn / reward_shaping.md
Last active November 11, 2021 03:15
Reward Shaping and Reinforcement Learning - Student Project
@mikepsn
mikepsn / advice_for_software_engineering_graduates.md
Last active August 14, 2018 23:45
Some Advice for Software Engineering Graduates

Some Advice for Software Engineering Graduates

  1. Domain
  2. Roles
  3. Not everyone will have the same software engineering education as you.
  4. Technology is transient.
  5. Team cohesion is important.
  6. Don't over engineer.
  7. Agile is not an excuse for no requirements, design and testing.
  8. Select appropriate process.
"""
MIT License
Copyright (c) 2017 Cyrille Rossant
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@mikepsn
mikepsn / tick.py
Created November 28, 2017 13:11
Show's how to use Python's dict to simulate a switch satement.
#!/bin/env/python
import numpy as np
def action1(t, dt):
print t, "Action 1"
def action2(t, dt):
print t, "Action 2"