sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
version: '3' | |
services: | |
redis: | |
image: redis:5.0.0 | |
container_name: master | |
ports: | |
- "6379:6379" | |
networks: | |
- redis-replication |
import network | |
import socket | |
import time | |
import struct | |
from machine import Pin | |
NTP_DELTA = 2208988800 | |
host = "pool.ntp.org" |
rebase
vs merge
).rebase
vs merge
)reset
vs checkout
vs revert
)git rev-parse
)pull
vs fetch
)stash
vs branch
)reset
vs checkout
vs revert
)All libraries have subtle rules that you have to follow for them to work well. Often these are implied and undocumented rules that you have to learn as you go. This is an attempt to document the rules of React renders. Ideally a type system could enforce it.
A number of methods in React are assumed to be "pure".
On classes that's the constructor, getDerivedStateFromProps, shouldComponentUpdate and render.
import numpy as np | |
class GEPP(): | |
""" | |
Gaussian elimination with partial pivoting. | |
input: A is an n x n numpy matrix | |
b is an n x 1 numpy array | |
output: x is the solution of Ax=b |
// @see https://docs.sendgrid.com/for-developers/tracking-events/event | |
// There is a mistake in the offical doc. Category is array of strings. I took it from the real webhook call. | |
type BaseSendgridEvent = { | |
email: string; | |
timestamp: number; | |
'smtp-id': string; | |
category: string | string[]; | |
sg_event_id: string; | |
sg_message_id: string; |
Run the following in the terminal:
Install the gcc-7 packages:
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-7 -y
Set it up so the symbolic links gcc
, g++
point to the newer version: