Skip to content

Instantly share code, notes, and snippets.

@acoffman
acoffman / get_variants_for_gene.py
Created February 13, 2019 21:13
Get all variants in CIViC for a specific entrez symbol
import requests
entrez_symbol = 'BRAF'
gene_url = 'https://civicdb.org/api/genes/{}?identifier_type=entrez_symbol'.format(entrez_symbol)
gene_response = requests.get(gene_url)
gene_body = gene_response.json()
variant_details = []
@acoffman
acoffman / get_all_variants.py
Last active February 13, 2019 21:32
Get All CIViC Variants
import requests
next_url = 'https://civicdb.org/api/variants?count=100'
variants = []
while next_url:
response = requests.get(nextUrl)
body = response.json()
variants += body['records']
next_url = body['_meta']['links']['next']
@acoffman
acoffman / install.md
Last active June 27, 2017 19:11
Basic Ruby/Rails Setup

OS X Command Line Tools

xcode-select --install

Homebrew (https://brew.sh/)

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update

brew install openssl libyaml libffi rbenv ruby-build

Keybase proof

I hereby claim:

  • I am acoffman on github.
  • I am acoffman (https://keybase.io/acoffman) on keybase.
  • I have a public key whose fingerprint is 3A64 D6BB 0521 3865 255C 4413 A2AA 59E5 20F4 063A

To claim this, I am signing this object:

@acoffman
acoffman / gist:d3b27b875f8e572f8d53
Last active August 29, 2015 14:01
workstation build flags
#tmux configure, updated libevent in /home/archive
LIBEVENT_CFLAGS="-I/home/archive/include" LIBEVENT_LIBS="-L/home/archive/lib -levent" ./configure --prefix=/home/archive
#vim configure, out of /home/archive
./configure --with-features=huge \
--enable-rubyinterp \
--enable-pythoninterp \
--with-python-config-dir=/usr/lib/python2.7-config \
--enable-perlinterp \
--enable-luainterp \
unless File.exist?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'arel', github: 'rails/arel'
gem 'sqlite3'
GEMFILE
system 'bundle'
end
@acoffman
acoffman / gist:4715708
Created February 5, 2013 16:43
compile output
make ycm_core
Scanning dependencies of target BoostParts
[ 0%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/date_time/src/gregorian/date_generators.cpp.o
In file included from /Users/acoffman/.vim/bundle/YouCompleteMe/cpp/BoostParts/libs/date_time/src/gregorian/date_generators.cpp:14:
In file included from /Users/acoffman/.vim/bundle/YouCompleteMe/cpp/BoostParts/boost/date_time/date_generators.hpp:16:
In file included from /usr/bin/../lib/c++/v1/stdexcept:46:
In file included from /usr/bin/../lib/c++/v1/exception:81:
/usr/bin/../lib/c++/v1/type_traits:737:2: error: #error is_base_of not implemented.
#error is_base_of not implemented.
^
@acoffman
acoffman / gist:4715698
Created February 5, 2013 16:42
cmake output
cmake -G "Unix Makefiles" -DPATH_TO_LLVM_ROOT=~/ycm_temp/clang+llvm-3.2-x86_64-apple-darwin11 . ~/.vim/bundle/YouCompleteMe/cpp
-- The C compiler identification is Clang 3.1.0
-- The CXX compiler identification is Clang 3.1.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
Process: postgres [834]
Path: /Applications/Postgres.app/Contents/MacOS/bin/postgres
Identifier: postgres
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: initdb [833]
Date/Time: 2012-12-06 17:09:06.342 -0600
OS Version: Mac OS X 10.7.5 (11G63)
Report Version: 9
12/6/12 5:09:06.248 PM Postgres: Existing PGVersion: (null)
12/6/12 5:09:06.248 PM Postgres: Installed PGVersion: 9.2
12/6/12 5:09:06.255 PM lsboxd: @AE relay 4755524c:4755524c
12/6/12 5:09:06.327 PM com.heroku.postgres-service: dyld: Symbol not found: _xmlStructuredErrorContext
12/6/12 5:09:06.327 PM com.heroku.postgres-service: Referenced from: /Applications/Postgres.app/Contents/MacOS/bin/postgres
12/6/12 5:09:06.327 PM com.heroku.postgres-service: Expected in: /usr/lib/libxml2.2.dylib
12/6/12 5:09:06.327 PM com.heroku.postgres-service: in /Applications/Postgres.app/Contents/MacOS/bin/postgres
12/6/12 5:09:06.818 PM com.heroku.postgres-service: no data was returned by command ""/Applications/Postgres.app/Contents/MacOS/bin/postgres" -V"
12/6/12 5:09:06.820 PM Postgres: 833 /Applications/Postgres.app/Contents/MacOS/bin/initdb: Status 1
12/6/12 5:09:06.819 PM com.heroku.postgres-service: The program "postgres" is needed by initdb but was not found in the