Skip to content

Instantly share code, notes, and snippets.

🍙
Working@paper company

Hiroya Kato Hirosaji

🍙
Working@paper company
View GitHub Profile
@Hirosaji
Hirosaji / .block
Last active Jul 7, 2020
Google Earth Engine × Mapbox - Reduction in NO2 by COVID-9
View .block
Google Earth Engine × Mapbox - Reduction in NO2 by COVID-9
license: mit
@Hirosaji
Hirosaji / gist:2a94283486137c77d1cec48837d48737
Created Apr 19, 2020
Route object architecture in Mapbox API
View gist:2a94283486137c77d1cec48837d48737
Route object
└── Route leg object
├── Banner instruction object
└── Route step object
└── Step maneuver object
└── Voice instruction object
@Hirosaji
Hirosaji / .block
Last active Apr 17, 2020
Mapbox - storytelling demo
View .block
Mapbox - storytelling demo
license: mit
@Hirosaji
Hirosaji / .block
Last active Apr 7, 2020
Mapbox - helper.html in Storytelling
View .block
Mapbox - helper.html in Storytelling
license: mit
View modeling.py
BERT_PRAMS = {
'vocab_file': '/efs/sp/vocab.txt',
'bert_config_file': '/efs/config.json',
'init_checkpoint': '/efs/model/bert_model.ckpt',
...
}
View application.py
class convert_to_simlarity:
def __init__(self):
self.output = {"target": None, "texts": None}
def from_texts(self, target, texts):
self.output["target"] = target
self.output["texts"] = texts
self.output["sims"] = self.texts2similarity()
return self.output
@Hirosaji
Hirosaji / .block
Last active Apr 7, 2020
Mapbox GL JS - Simple Map
View .block
# Mapbox GL JS - Simple Map
license: mit
@Hirosaji
Hirosaji / handleTSV.py
Created Jan 25, 2020
handle tsv data (ex. delete column)
View handleTSV.py
import csv
import numpy as np
with open('test.tsv', mode='r', newline='', encoding='utf-8') as f:
raw_input = csv.reader(f, delimiter='\t')
input = [row for row in raw_input]
# handle data (ex. delete column)
output = np.delete(input, 1, 1)
@Hirosaji
Hirosaji / handleSVG.js
Created Dec 24, 2019
read all svg file name in current dir -> edit svg text -> export
View handleSVG.js
const fs = require('fs');
const XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest;
const dirPath = require('path').dirname(require.main.filename);
const mkdirExceptExist = (dirPath) => {
if (!fs.existsSync(dirPath)) { fs.mkdirSync(dirPath); }
};
mkdirExceptExist("output");
@Hirosaji
Hirosaji / .block
Last active Feb 25, 2020
three-vrm - VRM motion capture by PoseNet
View .block
# three-vrm - VRM motion capture by PoseNet
license: mit
You can’t perform that action at this time.