This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// c++ -O3 -o nanof2a nanof2a.cpp && ./nanof2a | |
#include <cstdint> | |
#include <cstring> | |
namespace { // anonymous namespace to encourage inlining | |
struct f2a { | |
char str[16]; | |
f2a(float f) { // example usage: printf("%s", f2a(f).str) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://youtu.be/-C-JoyNuQJs?t=39m45s | |
When I put the reference implementation onto the website I needed to | |
put a software license on it. | |
And I looked at all the licenses that were available, and there were a lot | |
of them. And I decided that the one I liked the best was the MIT License, | |
which was a notice that you would put on your source and it would say, | |
"you're allowed to use this for any purpose you want, just leave the | |
notice in the source and don't sue me." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
By hylang core devs: | |
Defining Function Arguments in Hy | |
http://agentultra.com/2013/04/22/defining-function-arguments-in-hy/ | |
Hy a Lisp on Python | |
http://agentultra.com/2013/04/19/hy-a-lisp-on-python/ | |
Programming Can Be Fun with Hy | |
http://www.opensourceforu.com/2014/02/programming-can-fun-hy/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for remote in gnarf jugglinmike oconnore protonk rwaldron | |
do | |
git remote add $remote git@github.com:$remote/gaia | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
entropy.df <- subset( | |
tickets.df[ | |
1:nrow( | |
tickets.df | |
) | |
%in% which( | |
outer( | |
subset( | |
tickets.df, | |
period == "hadean" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# if we have the data in a csv, we can make it more reproducible | |
# with dput(), specifically | |
# dput(read.csv("~/Desktop/ts.csv", as.is = TRUE), control = NULL) | |
# there are some peculiarities with list type objects and dput | |
unpadded.ts <- data.frame(list(time = c("2011/11/01", "2012/01/01", "2011/12/01", "2012/06/01"), observations = c(12, 320, 100, 7))) | |
# specifying the format will save you | |
unpadded.ts$time <- as.Date(unpadded.ts$time, format = "%Y/%m/%d") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |