Skip to content

Instantly share code, notes, and snippets.

View cartazio's full-sized avatar

Carter Tazio Schonwald cartazio

View GitHub Profile
@cartazio
cartazio / gist:1654440
Created January 21, 2012 23:03
gnutls upgrade failure
==> Upgrading gnutls
==> Downloading http://ftpmirror.gnu.org/gnutls/gnutls-2.12.16.tar.bz2
File already downloaded in /Users/carter/Library/Caches/Homebrew
/usr/bin/tar xf /Users/carter/Library/Caches/Homebrew/gnutls-2.12.16.tar.bz2
==> ./configure --disable-debug --disable-dependency-tracking --disable-guile --disable-static --prefix=/usr/local/Cellar/gnutls/2.12.16 --with-libgcrypt --without-p11-kit
./configure --disable-debug --disable-dependency-tracking --disable-guile --disable-static --prefix=/usr/local/Cellar/gnutls/2.12.16 --with-libgcrypt --without-p11-kit
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... no
@cartazio
cartazio / gist:1655129
Created January 22, 2012 02:28
brew doctor run
brew doctor 1 ↵
Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/liburweb.0.dylib
/usr/local/lib/liburweb_cgi.0.dylib
/usr/local/lib/liburweb_fastcgi.0.dylib
@cartazio
cartazio / plott.hs
Created January 22, 2012 03:12
gtk haskell chart
import Graphics.Rendering.Chart
import Graphics.Rendering.Chart.Gtk
import Data.Colour.Names
import Data.Colour
import Data.Accessor
chart = layout
where
am :: Double -> Double
am x = (sin (x*3.14159/45) + 1) / 2 * (sin (x*3.14159/5))
@cartazio
cartazio / gist:1655271
Created January 22, 2012 03:16
simple directions to install gtk haskell libs on OS X lion so that Everything works
NOTE: on lion (and snow leopard i suppose), make sure you are using a 64 bit install of ghc. Also, unless you are suggesting an edit to these directions, please go ask people on the relevant mailing list or wiki for help :)
NOTE: gtk2hs 0.12.2 won't build with ghc 7.4.1, but the current darcs repo for gtk2hs does build
NOTE: on 7.4 there seems to be a problem when in ghci and drawing to a window, but not when rendering to pdf. I don't know why this is, but if you do, let me know. I'll update this as i have more info
note that these directions probably can use some cleanup, but i'm choosing these steps so that rebuilding any haskell library doesn't require remembering ANYTHING :-)
(tested on ghc 7.2.2, assumes you have standard developer things installed on mac, like x11 and stuff)
1) cabal install gtk2hs-buildtools #(this should work with any haskell platform install)
2) brew install cairo gtk gettext fontconfig
@cartazio
cartazio / build.log
Created January 26, 2012 00:16
gnutls upgrade failure build log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by GnuTLS configure 2.12.16, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ ./configure --disable-debug --disable-dependency-tracking --disable-guile --disable-static --prefix=/usr/local/Cellar/gnutls/2.12.16 --with-libgcrypt --without-p11-kit
## --------- ##
## Platform. ##
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by GnuTLS configure 2.12.16, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ ./configure --disable-debug --disable-dependency-tracking --disable-guile --disable-static --prefix=/usr/local/Cellar/gnutls/2.12.16 --with-libgcrypt --without-p11-kit
## --------- ##
## Platform. ##
#! /usr/bin/env python
from pandas import *
from numpy import *
import sys
from itertools import *
from math import exp
def logistic(num):
return (exp(num)/(1+exp(num)))
#! /usr/bin/env python
from pandas import *
from numpy import *
import sys
from itertools import *
from math import exp
def logistic(num):
return (exp(num)/(1+exp(num)))
@cartazio
cartazio / gist:2297453
Created April 4, 2012 03:06
bizzare scala exception
exception triggered by applying a parser using the scala std lib parser combinators to a CharArrayReader
source not publicly available for various reasons. If I can come up with a minimal example, i'll make it available
java.lang.NullPointerException
at VwTools$.<init>(<console>:30)
at VwTools$.<clinit>(<console>)
at .<init>(<console>:25)
at .<clinit>(<console>)
at .<init>(<console>:11)
@cartazio
cartazio / vowpal-hash.lhs
Created June 10, 2012 00:09
vowpal hash
\begin{code}
{-# LANGUAGE BangPatterns #-}
{-|
Module : Data.Digest.VowpalHash
Copyright : (c) Carter Tazio Schonwald
License : BSD-style
Maintainer : first dot last @gmail.com