Skip to content

Instantly share code, notes, and snippets.

View zxshinxz's full-sized avatar

Andy (Yoon Yong) Shin zxshinxz

View GitHub Profile
library(readr)
library(keras)
library(purrr)
FLAGS <- flags(
flag_integer("vocab_size", 50000),
flag_integer("max_len_padding", 20),
flag_integer("embedding_size", 256),
flag_numeric("regularization", 0.0001),
flag_integer("seq_embedding_size", 512)
@zxshinxz
zxshinxz / 00_nginx.config
Created September 13, 2018 05:31 — forked from 480/00_nginx.config
자주 쓰는 ebextensions 설정
# 장시간 http 연결로 인한 끊어짐을 방지키 위해 long idle time out 허용 하기
# nginx proxy 에 셋팅 + ELB 의 idle timeout 수정
#
# https://medium.com/tomincode/extending-gateway-timeouts-with-node-js-elastic-beanstalk-applications-5cb256f08f4b
# https://cloudavail.com/2015/10/18/allowing-long-idle-timeouts-when-using-aws-elasticbeanstalk-and-docker/
# https://github.com/metabase/metabase/tree/b9533d43881090a72d97562fb112a6133cd94127/bin/aws-eb-docker
files:
"/etc/nginx/conf.d/proxy.conf":
mode: "000644"
@zxshinxz
zxshinxz / unique_hash_objects.py
Created November 26, 2018 01:27 — forked from 9b/unique_hash_objects.py
Goes through MongoDB store and checks if any object hash is duplicated
import pymongo
import json
from pymongo import Connection
def connect_to_mongo(host, port, database, collection):
connection = Connection(host, port)
db = connection[database]
collection = db[collection]
return collection
@zxshinxz
zxshinxz / gist:69035e877b18def1efe4902cc9626092
Created April 17, 2019 02:35 — forked from tzapu/gist:f47924daae9d64b65fdfaf92b64f587c
connecting to a kubernets hosted kafka cluster from macOS
# you will need to alias the internal kube IPs to your loopback interface
# get pods with IPs
kubectl get pods -n kafka -o wide
# add aliases
sudo ifconfig lo0 100.101.168.109 alias
sudo ifconfig lo0 100.117.38.251 alias
sudo ifconfig lo0 100.121.158.154 alias
@zxshinxz
zxshinxz / shrink_embeddings.ipynb
Created March 4, 2020 12:24 — forked from generall/shrink_embeddings.ipynb
Shrinking Fasttext embeddings
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zxshinxz
zxshinxz / nested.txt
Created April 29, 2020 09:01 — forked from alexey-milovidov/nested.txt
Example of Nested data type in ClickHouse.
:) CREATE TABLE test.nested (EventDate Date, UserID UInt64, Attrs Nested(Key String, Value String)) ENGINE = MergeTree(EventDate, UserID, 8192)
CREATE TABLE test.nested
(
EventDate Date,
UserID UInt64,
Attrs Nested(
Key String,
Value String)
) ENGINE = MergeTree(EventDate, UserID, 8192)