Skip to content

Instantly share code, notes, and snippets.

View vkryukov's full-sized avatar

Victor vkryukov

  • Sunnyvale, CA
  • 18:50 (UTC -07:00)
View GitHub Profile
@vkryukov
vkryukov / digits.py
Last active October 13, 2019 18:37
Arithmetic puzzle solver
"""
Arithmetic puzzle solver. You are given a sequence of four digits, say 1,2,3,4,
and your job is to combine them with ordinary arithmetic operations (+, -, ×, and ÷)
in any order to make a target number. E.g. 24 = 1 * 2 * 3 * 4 or 24 = (1 + 2 + 3) * 4.
Some 'hard' problems from https://blog.plover.com/math/17-puzzle.html:
1. Given 6, 6, 5, 2, get 17.
2. Given 3, 3, 8, 8, get 24.
"""
@vkryukov
vkryukov / codex_beam_bootstrap.sh
Last active June 19, 2025 08:58
Installing Elixir/Erlang on Codex
#!/usr/bin/env bash
###############################################################################
# codex_beam_bootstrap.sh ─ OTP 27 + Elixir 1.18 behind Codex MITM proxy
###############################################################################
go install github.com/asdf-vm/asdf/cmd/[email protected]
asdf plugin add erlang https://github.com/michallepicki/asdf-erlang-prebuilt-ubuntu-24.04.git || true
asdf plugin add elixir
asdf install erlang 27.3.4
asdf set -u erlang 27.3.4