Skip to content

Instantly share code, notes, and snippets.

View tdhopper's full-sized avatar
©️
𝔀𝓸𝓻𝓴𝓲𝓷𝓰 𝓱𝓪𝓻𝓭

Tim Hopper tdhopper

©️
𝔀𝓸𝓻𝓴𝓲𝓷𝓰 𝓱𝓪𝓻𝓭
View GitHub Profile

If I want to call

conda build --output asdf

Is there a cleaner way than this:

sh.Command('conda').build.bake(output=True)("asdf")
from scipy.stats import dirichlet, poisson
from numpy.random import choice
num_documents = 5
num_topics = 2
topic_dirichlet_parameter = 1 # beta
term_dirichlet_parameter = 1 # alpha
vocabulary = ["see", "spot", "run"]
num_terms = len(vocabulary)
tdhopper@~/repos/qadium/datamicroscopes/build [master*] $ conda install -c https://conda.binstar.org/datamicroscopes eigen3
Fetching package metadata:
......
Solving package specifications: .
Package plan for installation in environment /Users/tdhopper/anaconda:
The following packages will be downloaded:
package | build
---------------------------|-----------------
tdhopper@~ $ binstar config --set url api.anaconda.org
tdhopper@~ $ binstar config --get url
api.anaconda.org
tdhopper@~ $ conda update conda
Error: maximum recursion depth exceeded in cmp
tdhopper@~ $ conda install flask
Error: maximum recursion depth exceeded in cmp
tdhopper@~ $ python -m pdb /Users/tdhopper/anaconda/bin/conda install flask
> /Users/tdhopper/anaconda/bin/conda(2)<module>()
-> import sys
tdhopper@~/repos/qadium/datamicroscopes/lda/examples [master*] $ conda update conda
Fetching package metadata: ....Error: HTTPError: 401 Client Error: UNAUTHORIZED: https://conda.binstar.org/distributions/noarch/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tdhopper
tdhopper / build-all.sh
Created July 6, 2015 18:38
Build Data Microscopes projects on OS X with Conda
#! /bin/bash
# Run `. build-all.sh conda-env-name`
conda create -n $1 cmake eigen3 anaconda cython
bash build-dist.sh $1
bash build-common.sh $1
bash build-mm.sh $1
bash build-irm.sh $1
bash build-lda.sh $1
@tdhopper
tdhopper / weather.sh
Last active April 4, 2020 03:50
Get weather for Morrisville, NC
curl http://api.openweathermap.org/data/2.5/weather?q=27560 | /usr/local/bin/jq .main.temp | awk '{print $1 * 9.0 / 5 - 459.67}' OFMT="NC:%2.0f°"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tdhopper
tdhopper / IldaGibbs.java
Created April 7, 2015 18:46
Code from "'Infinite LDA' – Implementing the HDP with minimum code complexity".
/*
* (C) Copyright 2005-2011, Gregor Heinrich (gregor :: arbylon : net) \
* (This file is part of the knowceans-ilda experimental software package
*/
/*
* knowceans-ilda is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 3 of the License, or (at your option)
* any later version.