In Sep, 2021, Jupyterlab Desktop App (electron) was released by Mehmet Bektas (github repo).
brew install --cask jupyterlab
""" | |
This code computes pi. It's not the first python | |
pi computation tool that I've written. This program | |
is a good test of the mpi4py library, which is | |
essentially a python wrapper to the C MPI library. | |
To execute this code: | |
mpiexec -np NUMBER_OF_PROCESSES -f NODES_FILE python mpipypi.py |
=begin | |
Find pi by the Monte-Carlo method. | |
area of a circle = pi r^2 | |
area of a square = (2r)^2 = 4 r^2 | |
Perform random uniform sampling between -1 and 1. | |
The proportion of points in the unit circle is: | |
p = (pi r^2) / (4r^2) |
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
letters-to-100.py | |
""" | |
import string | |
letter_values = dict((l, i) for i, l in enumerate(string.lowercase, start=1)) | |
english_dict = open('/usr/share/dict/words', 'rU') |
# install anaconda | |
jupyter-lab --generate-config | |
edit ~/.jupyter/jupyter_notebook_config.py, add lines: | |
c.NotebookApp.token = '' #you can set password here. | |
#https://github.com/jiahaog/nativefier | |
npm install nativefier -g | |
nativefier "http://localhost:8888" |
In Sep, 2021, Jupyterlab Desktop App (electron) was released by Mehmet Bektas (github repo).
brew install --cask jupyterlab
.vscode-body .markdown-body { | |
font-family: "PingFang SC" | |
} | |
.vscode-body strong {color:#6392BF;} | |
.vscode-body em {color: #A9312A; font-style: normal !important;} | |
.vscode-body table {font-size: 95% !important;} | |
.vscode-body .CodeMirror, .vscode-body pre {font-size: 90%;} | |
.vscode-body pre { |
search regex: | |
~*(?:^|[^~])(~~(\\w+(\\s\\w+)*)~~) | |
# replace with (attention: there's a white space at the end) | |
**$1** |
audible-converter "*.aax" -a <your-activation-bytes>
# 替换brew.git:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
# 替换homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
# 替换homebrew-bottles:
耶鲁公开课,幸福课,免费了 —— 可以通过以下方法批量下载。
https://www.coursera.org/learn/the-science-of-well-being/