Skip to content

Instantly share code, notes, and snippets.

View suzuken's full-sized avatar

Kenta SUZUKI suzuken

View GitHub Profile
package main
import (
"flag"
"fmt"
"os"
"text/template"
)
func main() {
package main
import (
"flag"
"fmt"
"github.com/cenkalti/backoff"
"log"
"os"
"os/exec"
"time"
package main
import (
"fmt"
"net/http"
"strconv"
"time"
)
func main() {
package main
import "code.google.com/p/go-tour/pic"
func Pic(dx, dy int) [][]uint8 {
rec := make([][]uint8, dy)
for i := 0; i < len(rec); i++ {
x := make([]uint8, dx)
package main
import (
"code.google.com/p/go-tour/wc"
"strings"
)
func WordCount(s string) map[string]int {
ret := make(map[string]int)
words := strings.Fields(s)
package main
import "fmt"
// fibonacci is a function that returns
// a function that returns an int.
func fibonacci() func() int {
i1 := 0
i2 := 1
return func() int {
package main
import "fmt"
func Cbrt(x complex128) complex128 {
var z complex128 = 1
for i:=0; i < 10000000; i++ {
z = z - ((z * z * z - x) / 3 * z * z)
}
return z
package main
import (
"fmt"
"math"
)
type ErrNegativeSqrt float64
func (e ErrNegativeSqrt) Error() string {
package main
import (
"fmt"
"net/http"
)
type String string
type Struct struct {
package main
import (
"code.google.com/p/go-tour/pic"
"image"
"image/color"
)
type Image struct{}