Skip to content

Instantly share code, notes, and snippets.

@arosh
arosh / queue_test.go
Created January 25, 2017 18:08
type assertion is too slow
package main
import (
"testing"
"errors"
)
var (
ErrQueueEmpty = errors.New("Queue is empty")
)
@arosh
arosh / main.go
Created December 30, 2016 16:58
read until EOF
package main
import (
"bufio"
"fmt"
"os"
"io"
"log"
)
@arosh
arosh / main.go
Created December 18, 2016 07:14
image server
package main
import (
"net/http"
"log"
"runtime/debug"
"io/ioutil"
"strconv"
)
@arosh
arosh / main.go
Last active December 17, 2016 17:13
goroutine cancel
package main
import (
"fmt"
"time"
)
func main() {
cancel := make(chan struct{})
go func() {
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arosh
arosh / advent2.ipynb
Created December 12, 2016 07:10
Jupyter Notebook Advent Calendar 2016, Dec, 13th (2)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arosh
arosh / advent1.ipynb
Last active December 12, 2016 07:09
Jupyter Notebook Advent Calendar 2016, Dec, 13th (1)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arosh
arosh / anaconda.diff
Created November 11, 2016 07:24
Anaconda VS pyenv+Anaconda
@@ -30,6 +30,8 @@ conda-server
conda-sign
conda-skeleton
cq
+curl
+curl-config
cwutil
cygdb
cython
@@ -48,6 +50,7 @@ fitsdiff
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.