Skip to content

Instantly share code, notes, and snippets.

View stevenbedrick's full-sized avatar

Steven Bedrick stevenbedrick

View GitHub Profile

Keybase proof

I hereby claim:

  • I am stevenbedrick on github.
  • I am stevenbedrick (https://keybase.io/stevenbedrick) on keybase.
  • I have a public key ASCu3UnGssFMIWd0tFH42H936tQAwlnigQEDvrMb-w2Dmgo

To claim this, I am signing this object:

@stevenbedrick
stevenbedrick / small_example.py
Created September 27, 2019 01:00
Small worked example
from dataclasses import dataclass
from dataclasses_json import dataclass_json
from datetime import datetime
from typing import Optional
@dataclass_json
@dataclass
class FirstExample:
some_field: str
some_date: datetime
@stevenbedrick
stevenbedrick / # openblas - 2018-07-31_17-20-44.txt
Created August 1, 2018 00:23
openblas on macOS 10.13.6 - Homebrew build logs
Homebrew build logs for openblas on macOS 10.13.6
Build date: 2018-07-31 17:20:44
RWS00427 [~] % brew upgrade
==> Upgrading 1 outdated package, with result:
openblas 0.3.0 -> 0.3.2
==> Upgrading openblas --with-openmp
==> Downloading https://github.com/xianyi/OpenBLAS/archive/v0.3.2.tar.gz
Already downloaded: /Users/bedricks/Library/Caches/Homebrew/openblas-0.3.2.tar.gz
==> make CC=gcc-8 FC=gfortran libs netlib shared
Last 15 lines from /Users/bedricks/Library/Logs/Homebrew/openblas/01.make:
<instantiation>:8:2: error: instruction requires: AVX-512 ISA
vaddps (%r15), %zmm4,%zmm4
@stevenbedrick
stevenbedrick / # pianobar - 2018-04-23_10-20-04.txt
Created April 23, 2018 21:23
pianobar on macOS 10.12.6 - Homebrew build logs
Homebrew build logs for pianobar on macOS 10.12.6
Build date: 2018-04-23 10:20:04
@stevenbedrick
stevenbedrick / gist:d3bdbbb082dcc6b8dfb7a60364e7ed37
Created October 10, 2017 17:50
Installing pynini in a virtual environment
steven@bigbird0:~$ mkdir pynini_test
steven@bigbird0:~$ cd pynini_test/
steven@bigbird0:~/pynini_test$ virtualenv ./venv
New python executable in /mnt/emu/g/steven/pynini_test/venv/bin/python
Installing setuptools, pip, wheel...done.
steven@bigbird0:~/pynini_test$ source venv/bin/activate
(venv) steven@bigbird0:~/pynini_test$ wget http://openfst.cs.nyu.edu/twiki/pub/GRM/PyniniDownload/pynini-1.7.tar.gz
--2017-10-10 10:18:50-- http://openfst.cs.nyu.edu/twiki/pub/GRM/PyniniDownload/pynini-1.7.tar.gz
Resolving openfst.cs.nyu.edu (openfst.cs.nyu.edu)... 128.122.80.127
Connecting to openfst.cs.nyu.edu (openfst.cs.nyu.edu)|128.122.80.127|:80... connected.
>>> for (s1, s2) in product(wordnet.synsets("OCTOPUS"), wordnet.synsets("SQUID")):
... print(s1)
... print(s2)
... print(wordnet.jcn_similarity(s1,s2,ic))
...
...
Synset('octopus.n.01')
Synset('squid.n.01')
5e-301
Synset('octopus.n.01')
@stevenbedrick
stevenbedrick / statecounter.py
Created December 10, 2014 23:03
StateCounter
class StateCounter(object):
def __init__(self):
self.set = {}
self.count = -1
def __contains__(self, obj):
return obj in self.set
def __getitem__(self, obj):
if not obj in self.set:
@stevenbedrick
stevenbedrick / convert_syms.cc
Created December 9, 2014 23:11
OpenFST: ASCII symbol table to binary symbol table
#include <fst/fst.h>
#include <fst/symbol-table.h>
/*
Converts ASCII OpenFST symbol tables to binary symbol tables. To compile:
g++ -I/usr/local/lib/fst -L/usr/local/lib/fst -lfst -o convert_syms convert_syms.cc
Then, run:
[~] % ssh -vv bedricks@login.csee.ogi.edu
OpenSSH_5.9p1, OpenSSL 0.9.8y 5 Feb 2013
debug1: Reading configuration data /Users/steven/.ssh/config
debug1: /Users/steven/.ssh/config line 5: Applying options for *
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 53: Applying options for *
debug1: auto-mux: Trying existing master
debug1: Control socket "/tmp/ssh_mux_login.csee.ogi.edu_22_bedricks" does not exist
debug2: ssh_connect: needpriv 0