Skip to content

Instantly share code, notes, and snippets.

View mikepsn's full-sized avatar

MP mikepsn

View GitHub Profile
@mikepsn
mikepsn / excelapp.py
Created January 15, 2015 09:37
Interacting with Microsoft Excel from Python using the Win32 COM API (Example Python Code)
"""
An example of using PyWin32 and the win32com library to interact
Microsoft Excel from Python.
This can be used instead of Visual Basic for Applications (VBA)
(c) Michael Papasimeon
"""
import win32com.client
@mikepsn
mikepsn / subscription_matrix.py
Last active September 9, 2016 10:02
Early prototype for a subscription/observer pattern based simulation architecture from 1997.
"""
A very early prototype for a client/server push/observer type architecture
for a multi-agent simulation I was developing. Some of the ideas were
prototyped in Python 1.4 back in 1997-1998 (from memory).
The actual system was implemented in C++.
(c) Michael Papasimeon, 1998
"""
__author__ = 'mikepsn'
@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"
"""
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 / 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.
@mikepsn
mikepsn / reward_shaping.md
Last active November 11, 2021 03:15
Reward Shaping and Reinforcement Learning - Student Project
@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 / 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 / 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