Skip to content

Instantly share code, notes, and snippets.

View carbocation's full-sized avatar

James Pirruccello carbocation

View GitHub Profile
@bemasher
bemasher / Subtitle.go
Created November 21, 2011 06:14
Subtitle decoder basic functionality written in Golang.
package main
import (
"io"
"os"
"fmt"
"log"
"bytes"
"image"
"image/png"
@adharris
adharris / postgres_array.go
Created November 28, 2012 19:52
PostgreSQL demo of Array types using Golang
package main
import (
"database/sql"
"errors"
"fmt"
_ "github.com/bmizerany/pq"
"os"
"regexp"
"strings"
@theophoric
theophoric / storage.go
Last active November 17, 2022 13:02
How to store + decode objects in golang using leveldb + gob
package main
import (
"bytes"
"encoding/gob"
"fmt"
"time"
"github.com/syndtr/goleveldb/leveldb"
)
@indraniel
indraniel / tar-gz-reader.go
Created February 23, 2015 19:05
Reading through a tar.gz file in Go / golang
package main
import (
"archive/tar"
"compress/gzip"
"flag"
"fmt"
"io"
"os"
)
func myFunc(i: Int, @noescape f: Int -> Bool) -> Bool {
return f(i)
}
func myFunc(i: Int) -> Bool {
return myFunc(i) { n in n % 2 == 0 }
}
@scottfrazer
scottfrazer / style_guide.md
Last active May 18, 2023 17:37
WDL Best Practices / Style Guide

"My First WDL" Template

task name {
  String in
  command {
    echo '${in}'
  }
  output {
 String out = read_string(stdout())
@Willib
Willib / export images to a video (async)
Last active May 28, 2023 13:24
export images(or one image) to a video in swift 3
//
// CXEImageToVideo.swift
// VideoAPPTest
//
// Created by Wulei on 16/12/14.
// Copyright © 2016年 wulei. All rights reserved.
//
import Foundation
import AVFoundation
@Davor111
Davor111 / sshuttle.sh
Created February 17, 2017 08:34
How to use sshuttle with .key, .csr or .pem files for authentication
#It's not directly mentioned in the documentation on how to do this, so here you go. This command will tunnel everything including DNS:
sshuttle --dns -vr user@yourserver.com 0/0 --ssh-cmd 'ssh -i /your/key/path.pem'
@jcreinhold
jcreinhold / test_transforms.ipynb
Last active April 1, 2019 20:37
test fastai transforms with nifti images
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yang-zhang
yang-zhang / multi-face.ipynb
Last active December 27, 2023 05:28
Multi-task Deep Learning Experiment using fastai Pytorch
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.