Skip to content

Instantly share code, notes, and snippets.

@inyl
inyl / package.json
Last active August 21, 2017 06:16
webpack2
{
"name": "cnn_api",
"version": "1.0.0",
"description": "1. cd {project_folder} 2. ./start.sh 3. http://localhost:5000/input_test",
"main": "app.bundle.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
@inyl
inyl / BUILD
Last active July 1, 2020 18:08
tensor models im2txt python3 version
package(default_visibility = [":internal"])
licenses(["notice"]) # Apache 2.0
exports_files(["LICENSE"])
package_group(
name = "internal",
packages = [
"//im2txt/...",
@inyl
inyl / gist:6dc252dc1f8e3c12903e1bb9cc95ca71
Last active January 23, 2017 07:04
pom.xml migration to gradle
gradle init --type pom
sudo pm2 start process.json --only development
@inyl
inyl / pandas_join.py
Last active November 18, 2016 06:51
pandas join
df.join(df2.set_index('column_name'), rsuffix='_parent', on='column_name')
@inyl
inyl / ignore.py
Created November 7, 2016 06:51
python warning ignore
import warnings
warnings.filterwarnings('ignore')
sudo pip install --upgrade virtualenv
virtualenv --system-site-packages ~/tensorflow
source ~/tensorflow/bin/activate
@inyl
inyl / Rx.java
Created October 14, 2016 06:05
RxJava await example
Completable som1 = Completable.fromAction(() -> System.out.println("Hello World")).subscribeOn(Schedulers.io());
Completable som2 = Completable.fromAction(() -> System.out.println("Foo bar")).subscribeOn(Schedulers.io());
Completable.merge(som1, som2).await();
System.out.println("await done");
@inyl
inyl / gist:cb240fee7675ea4fb531a072d89f2edc
Last active October 12, 2016 09:39
docker run mariadb
docker run --name mariadb -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=1234 mariadb
@inyl
inyl / reduce.java
Created October 12, 2016 00:02
List<String> distinct count
List<String> list = new ArrayList<String>();
list.add("A");
list.add("A");
list.add("B");
list.add("C");
Map<String, Integer> cntMap = list.stream().collect(
Collectors.groupingBy(
Function.identity(),