Skip to content

Instantly share code, notes, and snippets.

Avatar

Sihyung Park naturale0

View GitHub Profile
@naturale0
naturale0 / install_ds_packages.sh
Last active Jun 1, 2021
install basic ds packages in termux
View install_ds_packages.sh
pkg update
pkg install python build-essential freetype libpng libzmq libcrypt libjpeg-turbo libxml2 libxslt
pip install bs4 requests lxml
curl -LO https://its-pointless.github.io/setup-pointless-repo.sh
bash setup-pointless-repo.sh
pkg install numpy scipy
pip install matplotlib jupyter
View nonparametric function estimation.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View translation_char_example.py
import itertools
from torchtext.experimental.datasets import TextClassificationDataset
from torchtext.vocab import build_vocab_from_iterator
from torchtext.experimental.functional import sequential_transforms
from torchtext.experimental.datasets import IMDB
from torchtext.data.utils import get_tokenizer
from torch.nn.utils.rnn import pack_padded_sequence
def build_char_vocab(data, index, bow="<w>", eow="</w>"):
@naturale0
naturale0 / NLPM_pytorch.ipynb
Last active Feb 5, 2021
implementation of NPLM (pytorch & tensorflow)
View NLPM_pytorch.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View DxOCrawler.py
import re
import requests
import datetime as dt
from bs4 import BeautifulSoup
# Crawl DxOMark Mobile data
class DxOCrawler():
def __init__(self):
self.baseurl = "https://www.dxomark.com/category/mobile-reviews/page"
self.links = []
@naturale0
naturale0 / Understaning_ANN_2.ipynb
Last active Oct 31, 2020
Implementation of (1) softmax classifier with polynomial kernel function, (2) 2-layer neural network
View Understaning_ANN_2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@naturale0
naturale0 / Understanding_ANN_1.ipynb
Last active Oct 22, 2020
Implementation of linear (Softmax) classifier with python 2.7.
View Understanding_ANN_1.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View quantile_normalize_example.py
# In []:
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import scipy as sp
A = np.random.normal(5, 1, 100)
B = np.random.normal(3, 1.5, 100)
C = np.random.normal(4, 2, 100)
@naturale0
naturale0 / MCP_simulation.ipynb
Last active Dec 19, 2018
python class for converting p-values to adjusted p-values (or q-values) for multiple comparison correction.
View MCP_simulation.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@naturale0
naturale0 / pretrain-WSL.ipynb
Created Jun 17, 2018
Chest X-ray (Pneumonia) - WSL
View pretrain-WSL.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.