Skip to content

Instantly share code, notes, and snippets.

View kcg2015's full-sized avatar

Kyle Guan kcg2015

View GitHub Profile
@ryanpeach
ryanpeach / hungarian.py
Created September 28, 2016 18:03
A Python 2 implementation of both the Hungarian and Murty's Algorithm, which I believe runs in O(n^3) time, with sources, memoization, testing methods, and capable of being run in parallel instances with multiprocessing.pool.
# Ryan Peach 3/1/2016
# References Used for this Implementation
# https://en.wikipedia.org/wiki/Hungarian_algorithm
# https://github.com/bmc/munkres/blob/master/munkres.py
# http://csclab.murraystate.edu/bob.pilgrim/445/munkres.html
# ---
# No copying and pasting of online code was performed, though some code may turn out to be similar due to the standardized nature of this algorithm.
# This is a very different implementation due to the fact that it heavily uses numpy, vastly simplifies many poorly pythonized coding elements
# removes the "class" approach for a function based one. Etc.
# Improvements that need to be made is to require the matrix class, and to vectorize iterations through the matrix.
import time
class Bucket(object):
def __init__(self, max_amount, refill_time, refill_amount):
self.max_amount = max_amount
self.refill_time = refill_time
self.refill_amount = refill_amount
self.reset()
def _refill_count(self):
@SaschaDittmann
SaschaDittmann / 01_AddAzureMLCLIExtension.sh
Created October 21, 2019 16:26
DevOps for Machine Learning (Azure MLOps Part 2) - Setup Azure Machine Learning Services
az extension add -n azure-cli-ml