Python library matplolib
does a pretty good job.
ax.scatter
instead of plt.scatter
(as for 2d plots with import matplotlib.pyplot as plt
)from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = Axes3D(fig) ax.scatter(X, Y, Z, s = 10, linewidth = 1 ) ax.<span...
Say we have a function called write_img(t)
that takes integer values. The for loop
for t in range(starting, ending): write_img(t)
can be replaced by
from multiprocessing import Pool a_pool = Pool() a_pool.map(write_img, range(staring, ending))
If you want to remove a large file from the repository which was accidentally committed and pushed to GitHub (possibly due to a sloppy .gitignore
), do
git filter-branch --force --index-filter \ 'git rm --cached --ignore-unmatch path/to/file.jpg' \ --prune-empty --tag-name-filter cat -- --all
Then, to delete the same in the remote repo,
git push origin --force --all
rm...
If you are working in a linux environment without superuser privileges, you can set up vim (or nvim) and its plugins in the following way.
python3
support~/.local/bin/vim
) to local vim before the system vim path (/usr/bin/vim
) in your $PATH
variablebin
, lib
, share
) of the extracted tar to ~/.local
so that it can be launched.config/nvim/init.vim
according to...
If we want to merge the branch remote_branch
to the branch local_branch
(the terms remote
and local
are well-defined in that sense), we do the following.
git branch local_branch
local
) branch usinggit checkout local_branch
remote
) to the current one (local
)git merge remote_branch
Note: you may get ‘branch does not exist’ error, in that...