Skip to content

Instantly share code, notes, and snippets.

View bench_bitboard_iterate.rs
#![feature(test)]
extern crate test;
const NUM_ITER: usize = 10;
#[allow(dead_code)]
#[inline(always)]
fn pop_lsb(n: &mut u64) -> u32 {
let ret = n.trailing_zeros();
*n = *n & n.wrapping_sub(1);
View out.txt
This file has been truncated, but you can view the full file.
+1523KE: ▲2三桂右不成
+3523KE: ▲2三桂左不成
+1624KE: ▲2四桂右
+3624KE: ▲2四桂左
+1725KE: ▲2五桂右
+3725KE: ▲2五桂左
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 {