Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Zhenglai Zhang zhenglaizhang

🎯
Focusing
View GitHub Profile
View Applied-FP-with-Scala.md

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
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: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@zhenglaizhang
zhenglaizhang / install_elasticsearch_osx.md
Created Apr 23, 2019 — forked from djonsson/install_elasticsearch_osx.md
OS X installation instructions for Elasticsearch + Kibana + Marvel
View install_elasticsearch_osx.md

What is this?

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

Prerequisites

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 https://raw.githubusercontent.com/Homebrew/install/master/install)"
@zhenglaizhang
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 https://software.intel.com/en-us/articles/installing-intel-free-libs-and-python-apt-repo
cd ~/GitHub/r-with-intel-mkl/
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
sudo sh -c 'echo deb https://apt.repos.intel.com/mkl 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 support.md

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.

Requirements

OS X 10.10 (Yosemite) or newer

@zhenglaizhang
zhenglaizhang / readme.md
Created Dec 27, 2017 — forked from baraldilorenzo/readme.md
VGG-19 pre-trained model for Keras
View readme.md

##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
zhenglaizhang / update-tensorflow.sh
Created Dec 15, 2017 — forked from PatWie/update-tensorflow.sh
simple cronjob script to frequently build TensorFlow from source automatically
View update-tensorflow.sh
#!/bin/bash
# Patrick Wieschollek
# =============================================================
# UPDATE SOURCE
# =============================================================
git checkout -- .
git pull origin master
@zhenglaizhang
zhenglaizhang / ubuntu-raid.sh
Last active Nov 8, 2017 — forked from umpirsky/ubuntu-raid.sh
Install Ubuntu on RAID 0 and UEFI/GPT system
View ubuntu-raid.sh
# http://askubuntu.com/questions/505446/how-to-install-ubuntu-14-04-with-raid-1-using-desktop-installer
# http://askubuntu.com/questions/660023/how-to-install-ubuntu-14-04-64-bit-with-a-dual-boot-raid-1-partition-on-an-uefi%5D
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
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 (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# 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