Skip to content

Instantly share code, notes, and snippets.

View CJYLab's full-sized avatar

Jingyong Cai CJYLab

  • Tokyo University of Agriculture and Technology (TUAT)
  • Koganei, Tokyo
View GitHub Profile
@CJYLab
CJYLab / Matrix.md
Created August 18, 2020 19:07 — forked from nadavrot/Matrix.md
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

Set the base image to Ubuntu must be first instruction - use docker search to find images

FROM ubuntu # <image>
FROM ubuntu:latest # - <image>:<tag>
FROM ubuntu:precise (LTS)

Set the maintainer info

@CJYLab
CJYLab / AI-cheatsheet.md
Created July 17, 2019 09:32 — forked from mraza007/AI-cheatsheet.md
A Gist that contains all the cheatsheets related to AI development work
@CJYLab
CJYLab / get_available_gpus.py
Created July 17, 2019 08:50 — forked from jovianlin/get_available_gpus.py
Get List of Devices in TensorFlow
from tensorflow.python.client import device_lib
def get_available_gpus():
local_device_protos = device_lib.list_local_devices()
return [x.name for x in local_device_protos if x.device_type == 'GPU']
get_available_gpus()
@CJYLab
CJYLab / conda-cheatsheet.md
Created July 10, 2019 01:21 — forked from flrntpt/conda-cheatsheet.md
Conda cheatsheet

Conda cheatsheet

Create new environment

conda create -n name python=3.6 numpy scikit-learn

From an environment.yml file:

conda env create -f environment.yml
@CJYLab
CJYLab / vim-cheat-sheet.md
Created June 19, 2019 02:03 — forked from webdevel/vim-cheat-sheet.md
Vim Cheat Sheet

Vim Cheat Sheet

Vim is an advanced CLI based text editor. Many key combinations used in Vim are easily associated with a memorable phrase. One effective way to use Vim is to associate phrases with Operators, Text Objects and Motions. Then compose a phrase for what you want to do. Start with an Operator followed by a Text Object or Motion. Prefix an Operator, Command or Motion with a number/count to extend it.

Table of Contents
@CJYLab
CJYLab / vim-cheat-sheet.md
Created June 19, 2019 01:54 — forked from ummahusla/vim-cheat-sheet.md
Vim Cheat Sheet

Modes

Vim has two modes insertion mode and command mode. The editor begins in command mode, where the cursor movement and text deletion and pasting occur. Insertion mode begins upon entering an insertion or change command. [ESC] returns the editor to command mode (where you can quit, for example by typing :q!). Most commands execute as soon as you type them except for "colon" commands which execute when you press the ruturn key.

Quitting

  • :x Exit, saving changes
  • :q Exit as long as there have been no changes
  • ZZ Exit and save changes if any have been made
  • :q! Exit and ignore any changes

Inserting Text

top (the UNIX process inspector) cheat sheet

This is a list of the most helpful keyboard commands I use within top.

The basics

h shows help on interactive commands. Also see the top manual page

q to quit the program.

@CJYLab
CJYLab / tmux-cheatsheet.markdown
Created April 17, 2019 09:14 — forked from ryerh/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话: