Skip to content

Instantly share code, notes, and snippets.

View naturale0's full-sized avatar

Sihyung Park naturale0

View GitHub Profile
@naturale0
naturale0 / backup_reMarkable.py
Last active June 7, 2024 12:46
Backup reMarkable documents as PDFs
#!/usr/bin/env python
# coding: utf-8
## =============== REQUIREMENTS =============== ##
## rmrl: https://github.com/naturale0/rmrl
## rsync (for rM):
## - https://github.com/JBBgameich/rsync-static/releases/download/continuous/rsync-arm
## - https://www.reddit.com/r/RemarkableTablet/comments/hetyfa/comment/fvu1fy3/?utm_source=share&utm_medium=web2x&context=3
# In[36]:
@naturale0
naturale0 / NLPM_pytorch.ipynb
Last active December 8, 2023 04:36
implementation of NPLM (pytorch & tensorflow)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@naturale0
naturale0 / MCP_simulation.ipynb
Last active May 19, 2023 05:08
python class for converting p-values to adjusted p-values (or q-values) for multiple comparison correction.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@naturale0
naturale0 / send_pdf2rM.py
Created December 4, 2021 14:06
Convert PDF to reMarkable notebook, then send it to rM device
#!/usr/bin/env python
# coding: utf-8
# <h1>Table of Contents<span class="tocSkip"></span></h1>
# <div class="toc"><ul class="toc-item"></ul></div>
# In[36]:
import os
@naturale0
naturale0 / install_ds_packages.sh
Last active June 1, 2021 10:59
install basic ds packages in termux
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 / DxOCrawler.py
Last active November 18, 2020 02:14
Crawl DxOMark Mobile (smartphones camera benchmark) data: https://de-novo.org/2017/12/29/efa로-내게-맞는-스마트폰-카메라-찾기/
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 October 31, 2020 23:04
Implementation of (1) softmax classifier with polynomial kernel function, (2) 2-layer neural network
Loading
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 October 22, 2020 12:14
Implementation of linear (Softmax) classifier with python 2.7.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.