Skip to content

Instantly share code, notes, and snippets.

@brando90
brando90 / gist:8a40e83df107f5a915ba105d9fb0121c
Created December 6, 2022 21:11
ruby-build --definitions, showing because I can't install ruby 3.1.2 on a docker ubuntu container
context: https://stackoverflow.com/questions/74695464/why-cant-i-install-ruby-3-1-2-in-linux?noredirect=1#comment131843536_74695464
```
$ ruby-build --definitions
1.8.5-p52
1.8.5-p113
1.8.5-p114
1.8.5-p115
1.8.5-p231
1.8.6
@brando90
brando90 / gist:655bba60d60a1adea2e73dc922bd920a
Created December 6, 2022 19:20
Error message when installing opam with conda `conda install -c conda-forge opam `
```
conda install -c conda-forge opam
...
This path already exists in the target prefix, and it won't be removed
by an uninstall action in this transaction. The path is one that conda
doesn't recognize. It may have been created by another package manager.
@brando90
brando90 / gist:3304119120841b1ebf892fe93a2cc3c9
Created August 13, 2021 15:37
having_the_progress_bar_show_its_done_properly
"""
Use this one to make sure the "end" is shown properly 100% etc
"""
import time
import progressbar
widgets = [
progressbar.Percentage(),
progressbar.Bar(),
@brando90
brando90 / abt
Created June 15, 2021 21:16 — forked from neel-krishnaswami/abt
Abstract binding trees implementation
(* -*- mode: ocaml; -*- *)
module type FUNCTOR = sig
type 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
end
type 'a monoid = {unit : 'a ; join : 'a -> 'a -> 'a}
type var = string
import subprocess
def talk_to_python_interactively():
fw = open("tmpout", "wb")
fr = open("tmpout", "r")
p = subprocess.Popen(['python'],stdin=subprocess.PIPE,stdout=fw,stderr=fw,)
out = frw.readline()
print(out)
print(len(out))
print(type(out))
@brando90
brando90 / cartpole.ipynb
Created February 15, 2019 23:09 — forked from tamlyn/cartpole.ipynb
OpenAI Gym CartPole-v1 with Pytorch 1.0
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@brando90
brando90 / Policy Gradient with Cartpole and PyTorch (Medium Version).ipynb
Created February 15, 2019 22:44
Solution to the Cartpole problem with policy gradients published on Medium
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
(* our first theorem *)
Theorem plus_O_n :
forall n : nat,
0 + n = n.
Proof.
intros n.
simpl.
reflexivity.
Qed.
@brando90
brando90 / Deep Math.md
Created November 27, 2018 04:24 — forked from shagunsodhani/Deep Math.md
Notes for Deep Math paper

Deep Math: Deep Sequence Models for Premise Selection

Introduction

  • Automated Theorem Proving (ATP) - Attempting to prove mathematical theorems automatically.
  • Bottlenecks in ATP:
    • Autoformalization - Semantic or formal parsing of informal proofs.
    • Automated Reasoning - Reasoning about already formalised proofs.
  • Paper evaluates the effectiveness of neural sequence models for premise selection (related to automated reasoning) without using hand engineered features.
  • Link to the paper
@brando90
brando90 / node server
Created March 8, 2014 01:56
Error when running node server
CassandraBackend Works
in memory queue setup complete
in error init test PQ
failure in setup { name: 'TimeoutError',
message: 'Get a connection timed out',
info: 'Represents an error that happens when the maximum amount of time for an operation passed.' }
in memory queue setup complete