Especially good for running on headless devices, such as supercomputers or clusters.
# remote_port should be value between 8888 and 9000
jupyter notebook --no-browser --port=remote_port
| screen -aAxR -S x # Connect without disconnecting | |
| screen -dRaA -S x # Connect and disconnect others | 
| # Add to ~/.zshrc | |
| autoload -U up-line-or-beginning-search | |
| autoload -U down-line-or-beginning-search | |
| zle -N up-line-or-beginning-search | |
| zle -N down-line-or-beginning-search | |
| bindkey "^[[A" up-line-or-beginning-search # Up | |
| bindkey "^[[B" down-line-or-beginning-search # Down | 
| Project Name: stemsalabim_test | |
| 2019-01-10 05:45:34.431 [compute-7-22.local, 0] Hello from compute-7-22.local, MPI rank 0/16, about to spawn 1 threads. | |
| 2019-01-10 05:45:34.431 [compute-7-22.local, 1] Hello from compute-7-22.local, MPI rank 1/16, about to spawn 1 threads. | |
| 2019-01-10 05:45:34.431 [compute-7-22.local, 2] Hello from compute-7-22.local, MPI rank 2/16, about to spawn 1 threads. | |
| 2019-01-10 05:45:34.431 [compute-7-22.local, 3] Hello from compute-7-22.local, MPI rank 3/16, about to spawn 1 threads. | |
| 2019-01-10 05:45:34.431 [compute-7-22.local, 4] Hello from compute-7-22.local, MPI rank 4/16, about to spawn 1 threads. | |
| 2019-01-10 05:45:34.431 [compute-7-22.local, 5] Hello from compute-7-22.local, MPI rank 5/16, about to spawn 1 threads. | |
| 2019-01-10 05:45:34.431 [compute-7-22.local, 6] Hello from compute-7-22.local, MPI rank 6/16, about to spawn 1 threads. | |
| 2019-01-10 05:45:34.431 [compute-7-22.local, 7] Hello from compute-7-22.local, MPI rank 7/16, about to spawn 1 threads. | |
| 2019-01-10 05:45:34.431 [compute- | 
| $ make | |
| [ 5%] Building CXX object src/CMakeFiles/stemsalabim_lib.dir/classes/Crystal.cpp.o | |
| In file included from /usit/abel/u1/thomasaar/software/STEMsalabim/src/classes/Slice.hpp(28), | |
| from /usit/abel/u1/thomasaar/software/STEMsalabim/src/classes/Crystal.cpp(29): | |
| /usit/abel/u1/thomasaar/software/STEMsalabim/src/classes/../utilities/Wave.hpp(110): error: namespace "std" has no member "complex" | |
| typedef std::vector<std::complex<float>, fftwAllocator<std::complex<float>>> data_type; | |
| ^ | |
| In file included from /usit/abel/u1/thomasaar/software/STEMsalabim/src/classes/Slice.hpp(28), | |
| from /usit/abel/u1/thomasaar/software/STEMsalabim/src/classes/Crystal.cpp(29): | 
| # Open terminal, locally call: | |
| ssh-copy-id -i ~/.ssh/id_rsa.pub user@somehost | 
| import matplotlib.pyplot as plt | |
| def save(filepath="image.png", fig=None): | |
| '''Save the current image with no whitespace | |
| Example filepath: "myfig.png" or r"C:\myfig.pdf" | |
| Based on answers from https://stackoverflow.com/questions/11837979/ | |
| ''' | |
| import matplotlib.pyplot as plt | |
| if not fig: | |
| fig = plt.gcf() | 
| --------------------------------------------------------------------------- | |
| ValueError Traceback (most recent call last) | |
| <ipython-input-39-840bfeb05f2a> in <module>() | |
| ----> 1 m.fit_background(bounded=True) | |
| c:\users\me\documents\github\hyperspy\hyperspy\models\edsmodel.py in fit_background(self, start_energy, end_energy, windows_sigma, kind, **kwargs) | |
| 445 windows_sigma[1] * component.sigma.value) | |
| 446 if kind == 'single': | |
| --> 447 self.fit(**kwargs) | |
| 448 if kind == 'multi': | 
| --------------------------------------------------------------------------- | |
| TypeError Traceback (most recent call last) | |
| <ipython-input-4-825396d5c1d6> in <module>() | |
| ----> 1 m.plot() | |
| c:\users\me\documents\github\hyperspy\hyperspy\models\model1d.py in plot(self, plot_components, **kwargs) | |
| 668 # Add the line to the figure | |
| 669 _plot.signal_plot.add_line(l2) | |
| --> 670 l2.plot() | |
| 671 _plot.signal_plot.events.closed.connect(self._close_plot, []) | 
| # Need nodejs version 9, not latest, as of July 2018 | |
| conda install jupyterlab ipywidgets ipympl nodejs=9 | |
| jupyter labextension install @jupyter-widgets/jupyterlab-manager |