Skip to content

Instantly share code, notes, and snippets.

@kygoh
kygoh / running-header.html
Created May 19, 2023 16:33
Table element in running header test for weasyprint
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>PrintCSS: Page Selectors and Page Breaks</title>
<style>
@page {
size: A5;
margin: 20mm;
@kygoh
kygoh / nnaudio_complex_kws_task.py
Created October 2, 2022 00:21
classifier on the Google speech commands dataset v2 for the Key Word Spotting (KWS) using more complex non-linear models based on https://github.com/heungky/nnAudio_tutorial
"""
Step 1: import related libraries
"""
# Libraries related to PyTorch
import torch
from torch import Tensor
import torch.nn as nn
from torch.nn.utils.rnn import pad_sequence
from torch.utils.data import WeightedRandomSampler,DataLoader
@kygoh
kygoh / install.sh
Created December 9, 2020 04:46
Installs psql, gdal, jupyter, R and packages on Ubuntu 20.04.1 LTS
sudo apt update
sudo apt -y upgrade
sudo apt install -y awscli unzip
sudo apt install -y build-essential
sudo apt install -y pkg-config libtiff-dev libcurl4-openssl-dev
sudo apt install -y libudunits2-dev libfontconfig1-dev libcairo2-dev libnetcdf-dev libssl-dev libgeos-dev libxml2-dev unixodbc-dev
sudo apt install -y postgresql-client postgresql-server-dev-all
sudo apt install -y default-jdk
cd
wget https://www.sqlite.org/2020/sqlite-autoconf-3340000.tar.gz
@kygoh
kygoh / setup.sh
Created June 25, 2020 03:47
Installing R, RPostgresql and GIS packages (rgdal, sf)
sudo apt upgrade
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/'
sudo apt update
sudo apt install r-base r-base-core r-recommended
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get -y install libudunits2-dev libfontconfig1-dev libcairo2-dev gdal-bin libgdal-dev proj-bin
sudo RScript -e 'install.packages("rgdal", repos="http://cran.r-project.org", dependencies=TRUE)'
sudo RScript -e 'install.packages("sf", repos="http://cran.r-project.org", dependencies=TRUE)'