Skip to content

Instantly share code, notes, and snippets.

View abenezerangelos's full-sized avatar

abenezerangelos

  • Washington State University
View GitHub Profile
@myusuf3
myusuf3 / uninstall.sh
Created April 21, 2011 03:06
how to cleanly uninstall python packages installed with python setup.py
# Next time you need to install something with python setup.py -- which should be never but things happen.
python setup.py install --record files.txt
# This will cause all the installed files to be printed to that directory.
# Then when you want to uninstall it simply run; be careful with the 'sudo'
cat files.txt | xargs sudo rm -rf
aahed
aalii
aargh
aarti
abaca
abaci
abacs
abaft
abaka
abamp
@abenezerangelos
abenezerangelos / doomsday_fuel.py
Created August 9, 2023 09:21 — forked from algomaster99/doomsday_fuel.py
Solution to Doomsday Fuel foobar challenge
from fractions import Fraction
# Replace trials by probabilties of occurrences
def replace_probability(m):
for row in range(len(m)):
total = 0
for item in range(len(m[row])):
total += m[row][item]
if total != 0:
for item in range(len(m[row])):