Skip to content

Instantly share code, notes, and snippets.


Zhenglai Zhang zhenglaizhang

View GitHub Profile

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
zhenglaizhang / settings.json
Created May 21, 2020 — forked from thomasmaurer/settings.json
My Windows Terminal Settings settings.json April 2020
View settings.json
// This file was initially generated by Windows Terminal 0.11.1121.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see:
"$schema": "",
zhenglaizhang /
Created Apr 23, 2019 — forked from djonsson/
OS X installation instructions for Elasticsearch + Kibana + Marvel

What is this?

Following this guide will set up a local Elasticsearch with Kibana and Marvel using Homebrew and Homebrew Cask


If you already have Java installed on your system, skip steps Install Cask and Install Java

If you already have Java and Homebrew installed on your system, skip steps Prerequisites, start at Install Elasticsearch and Kibana after running $ brew update

Install Homebrew

  • $ ruby -e "$(curl -fsSL"
zhenglaizhang / 00-install-intel-mkl-64bit
Created Feb 7, 2018 — forked from pachadotdev/00-install-intel-mkl-64bit
Install Intel MKL (64 bit) on Ubuntu 17.10
View 00-install-intel-mkl-64bit
# keys taken from
cd ~/GitHub/r-with-intel-mkl/
sudo sh -c 'echo deb all main > /etc/apt/sources.list.d/intel-mkl.list'
sudo apt-get update && sudo apt-get install intel-mkl-64bit
# alternative (works well on Ubuntu 16.04)
cd ~/GitHub/r-with-intel-mkl/
View Build tensorflow on OSX with NVIDIA CUDA

Build tensorflow on OSX with NVIDIA CUDA support (GPU acceleration)

These instructions are based on Mistobaan's gist but expanded and updated to work with the latest tensorflow OSX CUDA PR.


OS X 10.10 (Yosemite) or newer

zhenglaizhang /
Created Dec 27, 2017 — forked from baraldilorenzo/
VGG-19 pre-trained model for Keras

##VGG19 model for Keras

This is the Keras model of the 19-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition
K. Simonyan, A. Zisserman
zhenglaizhang /
Created Dec 15, 2017 — forked from PatWie/
simple cronjob script to frequently build TensorFlow from source automatically
# Patrick Wieschollek
# =============================================================
# =============================================================
git checkout -- .
git pull origin master
zhenglaizhang /
Last active Nov 8, 2017 — forked from umpirsky/
Install Ubuntu on RAID 0 and UEFI/GPT system
sudo -s
apt-get -y install mdadm
apt-get -y install grub-efi-amd64
sgdisk -z /dev/nvme0n1
sgdisk -z /dev/nvme1n1
sgdisk -n 1:0:+300M -t 1:ef00 -c 1:"EFI System" /dev/nvme1n1
sgdisk -n 2:0:0 -t 2:fd00 -c 2:"Linux RAID" /dev/nvme1n1
zhenglaizhang / arch-linux-install
Created Apr 7, 2017 — forked from binaerbaum/arch-linux-install
Minimal instructions for installing arch linux on an UEFI NVMe system with full system encryption using dm-crypt and luks
View arch-linux-install
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide ( contains a more verbose description.
# Download the archiso image from
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swiss-french keymap