Skip to content

Instantly share code, notes, and snippets.

@kyhoolee
kyhoolee / pytorch_to_tflite.py
Created August 26, 2020 06:39
Using mmdnn to convert pytorch model to tensorflow and tflite
from dotmap import DotMap
import os
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
import time
import PIL.Image as Image
from tensorflow.keras.preprocessing import image
using namespace std;
int main() {
cout << "Hello world";
}
int add(int a, int b) {
return a+b;
@kyhoolee
kyhoolee / ranking.py
Created October 2, 2019 02:19 — forked from fabianp/ranking.py
Pairwise ranking using scikit-learn LinearSVC
"""
Implementation of pairwise ranking using scikit-learn LinearSVC
Reference:
"Large Margin Rank Boundaries for Ordinal Regression", R. Herbrich,
T. Graepel, K. Obermayer 1999
"Learning to rank from medical imaging data." Pedregosa, Fabian, et al.,
Machine Learning in Medical Imaging 2012.
@kyhoolee
kyhoolee / nginxproxy.md
Created July 23, 2018 08:49 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

_end = '_end_'
def make_trie(words):
root = dict()
for word in words:
current_dict = root
for letter in word:
current_dict = current_dict.setdefault(letter, {})
current_dict[_end] = _end

Experiencing

Lộ trình

  • Bắt xe khách lên gần Tà năng: 9h30 tối khởi hành - 3h sáng tới nơi
  • Đi xe trung chuyển tới điểm tập kết:
    • 5h tới nơi
    • thay đồ trekking, chuẩn bị hành lý
  • Đi xe tới điểm bắt đầu trekking
  • Đứng ăn sáng dưới chân đồi