Skip to content

Instantly share code, notes, and snippets.

@azundo
azundo / pipenv_utils.py
Created April 8, 2022 22:20
Pipenv utils to rewrite lockfiles to work around pipenv bugs
from pipenv.project import Project
# for working around bug mentioned in https://github.com/pypa/pipenv/issues/4263
def remove_package(package_name):
project = Project()
lockfile = project.get_or_create_lockfile()
if package_name in lockfile.default:
del lockfile.default[package_name] # if in normal dependencies
if package_name in lockfile.develop:
del lockfile.develop[package_name] # if in dev
@azundo
azundo / README.md
Last active December 19, 2015 10:38
An implementation of the Fox in a Hole from http://gurmeet.net/puzzles/.

#The Fox Puzzle

From http://gurmeet.net/puzzles/

##Puzzle Description

Consider five holes in a line. One of them is occupied by a fox. Each night, the fox moves to a neighboring hole, either to the left or to the right. Each morning, you get to inspect a hole of your choice. What strategy would ensure that the fox is eventually caught?

@azundo
azundo / flag.svg
Last active December 19, 2015 08:49
The Pirate Puzzle in D3.js
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.