Skip to content

Instantly share code, notes, and snippets.

View samuel-davis's full-sized avatar

Sam Davis samuel-davis

View GitHub Profile
@samuel-davis
samuel-davis / hundred_prisoners.py
Created June 6, 2023 15:52
100 Prisoners Solution Python 3.10 ( Single File )
from random import randint
from time import time_ns
import sys
import argparse
try:
import loguru # loguru==0.7.0
logger = loguru.logger
logger.remove()
### Keybase proof
I hereby claim:
* I am samuel-davis on github.
* I am codehounded (https://keybase.io/codehounded) on keybase.
* I have a public key ASCU7QwmmAhciqu7SSqVM6DISN2zJqam2NMOw2zVSRQiYQo
To claim this, I am signing this object:
@samuel-davis
samuel-davis / Convert Tensorflow SavedModel to WebModel for TF-JS
Last active May 7, 2021 02:49
Convert a Tensorflow Object Detection SavedModel to a Web Model For TensorflowJS
#Currently within the Tensorflow ecosystem there is a ton of confusing similar words.
#Maybe this is because of my own understanding and is not due to their naming.
#Regardless I struggled making this work, so I #figured I would write a Gist.
# Firstly we are trying to convert a previously created Tensorflow frozen graph or checkpoint files.
# Specifically I wanted to #convert some of the Tensorflow Object Detection API models.
# We already have a SavedModel in the download from the object detection model zoo.
# If you need to get a SavedModel from your own trained Object Detection Model, you will need to export it using the script
# provided by the object_detection module. The python script is called exporter. It is not that well documented, but if you