Skip to content

Instantly share code, notes, and snippets.

View hotentry.go
package main
import (
"encoding/xml"
"io"
"log"
"net/http"
"time"
)
View fitbit.go
package main
import (
"context"
"encoding/json"
"log"
"golang.org/x/oauth2"
"golang.org/x/oauth2/fitbit"
)
View trend.go
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"strings"
"golang.org/x/oauth2/clientcredentials"
View app.go
package app
import (
"bytes"
"image/gif"
"image/jpeg"
"image/png"
"net/http"
"path"
"strings"
View hit-a-hint.css
.hometype-hit-a-hint-base {
border-radius: 5px;
border: 1px gray solid;
padding: 3px 4px;
}
.hometype-hit-a-hint-base span {
font-family: 'Bitstream Vera Sans Mono';
font-size: 15px;
}
@sugyan
sugyan / main.go
Created Oct 19, 2016
TensorFlow Go
View main.go
$ go run main.go
2016/10/19 20:07:55 value: 7
View decode_image.py
import tensorflow as tf
with open('./image.jpg', 'rb') as f:
data = f.read()
image = tf.image.decode_jpeg(data)
print(image.eval(session=tf.Session()))
View read-cifar10.java
import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import javax.imageio.ImageIO;
public class Main {
View line-bot.rb
require 'sinatra'
require 'json'
get '/send' do
text = params[:text]
send(text) unless text.nil?
'OK'
end
post '/callback' do
View fibonacci.pl6
::(':'~^'('~^(~::((~(^(''~~'')))~^'~'~')'~^'('~^(~(^(''~~'')))~^'~'~^':'~':'~^')'~^'~')(')'~^(~(^(''~~'')))~^'('~'~'~^':'~^'^'~^(~(^(''~~'')))~'~'~^'^'~^':'~^'('~'~'~^':'~^'^'~^(~(^(''~~'')))~'~'~^':'~^'^'~^(~(^(''~~'')))~'~'~^'^'~^':'~^'('))~'~'~^':'~^'('~^')'~'('~^'~'~'('~^'~'~^':'~^(~(^(''~~'')))~^(~::((~(^(''~~'')))~^'~'~')'~^'('~^(~(^(''~~'')))~^'~'~^':'~':'~^')'~^'~')(')'~^(~(^(''~~'')))~^'('~'~'~^':'~^'^'~^(~(^(''~~'')))~'~'~^'^'~^':'~^'('~'~'~^':'~^'^'~^(~(^(''~~'')))~'~'~^':'~^'^'~^(~(^(''~~'')))~'~'~^'^'~^':'~^'('))~^')'~'^'~^':'~^'(')(':'~^'('~^(~(^(''~~'')))~'('~')'~^(~(^(''~~'')))~^'('~(~::((~(^(''~~'')))~^'~'~')'~^'('~^(~(^(''~~'')))~^'~'~^':'~':'~^')'~^'~')(')'~^(~(^(''~~'')))~^'('~'~'~^':'~^'^'~^(~(^(''~~'')))~'~'~^'^'~^':'~^'('~'~'~^':'~^'^'~^(~(^(''~~'')))~'~'~^':'~^'^'~^(~(^(''~~'')))~'~'~^'^'~^':'~^'('))~^(~(^(''~~'')))~^'('~')'~^(~(^(''~~'')))~^'('~(~::((~(^(''~~'')))~^'~'~')'~^'('~^(~(^(''~~'')))~^'~'~^':'~':'~^')'~^'~')(')'~^(~(^(''~~'')))~^'('~'~'~^':'~^'^'~^(~(^(''~~'')))~'~'~^'^'~^':