Skip to content

Instantly share code, notes, and snippets.

@brando90
brando90 / gist:9379428
Created March 6, 2014 00:06
Error when running node client
When I run node client for parsoid it throws me this error, does someone know whats up?
HTTP GET to
http://localhost:8002/title?commit=5a274b028d774784d514439f4539507e52c8e05e&ctime=2014-03-04T17%3A42%3A27.000Z failed: Error: connect ECONNREFUSED
Retrying in 51.2 seconds.
master shutting down, killing workers
Exiting master
TypeError: Cannot read property 'statusCode' of undefined
@brando90
brando90 / gist:9392102
Created March 6, 2014 15:26
Error when trying to login to cqlsh with a username
Traceback (most recent call last):
File "/home/tscobb/Documents/BM/apache-cassandra-2.0.5/bin/cqlsh", line 2044, in <module>
main(*read_options(sys.argv[1:], os.environ))
File "/home/tscobb/Documents/BM/apache-cassandra-2.0.5/bin/cqlsh", line 2030, in main
display_float_precision=options.float_precision)
File "/home/tscobb/Documents/BM/apache-cassandra-2.0.5/bin/cqlsh", line 480, in __init__
cql_version=cqlver, transport=transport)
File "/home/tscobb/Documents/BM/apache-cassandra-2.0.5/bin/../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/connection.py", line 143, in connect
File "/home/tscobb/Documents/BM/apache-cassandra-2.0.5/bin/../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/connection.py", line 59, in __init__
File "/home/tscobb/Documents/BM/apache-cassandra-2.0.5/bin/../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/thrifteries.py", line 157, in establish_connection
@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
@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
(* our first theorem *)
Theorem plus_O_n :
forall n : nat,
0 + n = n.
Proof.
intros n.
simpl.
reflexivity.
Qed.
@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.
@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.
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 / 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
@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(),