Skip to content

Instantly share code, notes, and snippets.

@kevinyang007
kevinyang007 / tf-rasp.md
Created November 28, 2019 08:52 — forked from godardt/tf-rasp.md
Building TensorFlow for Raspberry Pi: a Step-By-Step Guide

Building TensorFlow 1.3.0-rc1 for Raspberry Pi/Ubuntu 16.04: a Step-By-Step Guide

Here you'll learn how to build Tensorflow for the raspberry pi 3 with either the Python API or as a standalone shared library which can be interfaced from the C++ API and eventually as a library which can be used in other languages.

For the C++ library this tutorial will show you how extract tensorflow library and headers to use in any environment you want.

(This tutorial couldn't be possible without the help of the people from the References section)

What You Need

@kevinyang007
kevinyang007 / num2chinese.py
Created May 22, 2019 08:41 — forked from gumblex/num2chinese.py
Numbers to Chinese representations converter in Python. 中文数字转换
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Licensed under WTFPL or the Unlicense or CC0.
# This uses Python 3, but it's easy to port to Python 2 by changing
# strings to u'xx'.
import itertools
def num2chinese(num, big=False, simp=True, o=False, twoalt=False):
@kevinyang007
kevinyang007 / 69-language-selector-zh-cn.conf
Created May 22, 2019 08:40 — forked from gumblex/69-language-selector-zh-cn.conf
Ubuntu 界面中文字体fontconfig配置:文泉驿微米黑
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="pattern">
<test name="lang">
<string>zh-cn</string>
</test>
<test qual="any" name="family">
<string>serif</string>
@kevinyang007
kevinyang007 / flaskaudiostream.py
Created April 3, 2019 07:11 — forked from hosackm/flaskaudiostream.py
Flask streaming an audio file
from flask import Flask, Response
app = Flask(__name__)
@app.route("/wav")
def streamwav():
def generate():
with open("signals/song.wav", "rb") as fwav:
data = fwav.read(1024)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kevinyang007
kevinyang007 / Install NVIDIA Driver and CUDA.md
Created March 27, 2019 00:18 — forked from zhanwenchen/Install NVIDIA Driver and CUDA.md
Install NVIDIA CUDA 9.0 on Ubuntu 16.04.4 LTS

###1. 自定义激活函数

可以采用以下几种方法:

from keras import backend as K
from keras.layers.core import Lambda
from keras.engine import Layer
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
@kevinyang007
kevinyang007 / readme.md
Created January 12, 2018 08:55 — forked from baraldilorenzo/readme.md
VGG-19 pre-trained model for Keras

##VGG19 model for Keras

This is the Keras model of the 19-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman