Skip to content

Instantly share code, notes, and snippets.

View regonn's full-sized avatar
🍵
Tea.

regonn regonn

🍵
Tea.
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@regonn
regonn / config.yml
Created August 13, 2018 10:17
.circleci/config.yml
version: 2
jobs:
build:
docker:
- image: circleci/ruby:2.5-node-browsers
environment:
RAILS_ENV: test
# https://circleci.com/docs/2.0/faq/#how-can-i-set-the-timezone-in-docker-images
TZ: "/usr/share/zoneinfo/Asia/Tokyo"
- image: circleci/postgres:10-alpine
import gensim
import numpy as np
import csv
from scipy import spatial
class SearchSimilarWords():
def __init__(self, words_csv_path, target_index, model_path):
self.num_features = 300
self.words_array = self.build_words_array(words_csv_path)
@regonn
regonn / box_davfs2
Created May 19, 2018 11:09
google colaboratory box davfs2
# execute this to activate box strage
!apt-get install davfs2
!echo https://dav.box.com/dav [BOXのEmail] [BOXのパスワード] >> /etc/davfs2/secrets
!mkdir /content/box_dir
!mount -t davfs https://dav.box.com/dav/ /content/box_dir
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
require 'fiddle'
require 'fiddle/import'
module Julia
extend Fiddle::Importer
# Linux
dlload Fiddle.dlopen('libjulia.so.0.6')
typealias "uint8_t", "unsigned char"
@regonn
regonn / image_segmentation.ipynb
Created April 1, 2018 03:42
julia image segmentation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
using JSON
using Images
json = JSON.parsefile("./input/train.json")
iamges_json = json["images"][1:10]
for image_json in iamges_json
try
t = tempname()
download(image_json["url"][1], t)
img = load(t)
@regonn
regonn / LightGBM.ipynb
Created February 11, 2018 11:56
LightGBM jl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@regonn
regonn / house_prices.ipynb
Created January 13, 2018 04:32
PCA RandomForest 2018/01/13
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.