GNU Octave is a high-level interpreted language, primarily intended for numerical computations.
(via GNU Octave)
- not equal
~=
- logical AND
&&
GNU Octave is a high-level interpreted language, primarily intended for numerical computations.
(via GNU Octave)
~=
&&
Ref: https://www.makeuseof.com/tag/raspberry-pi-update-raspbian-os/
sudo apt-get update && sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get clean
sudo reboot
import concurrent.futures | |
import time | |
start = time.perf_counter() | |
def do_something(seconds): | |
print(f'Sleeping {seconds} second(s)...') | |
time.sleep(seconds) | |
return 'Done Sleeping...' |
import os | |
from functools import wraps, partial | |
from inspect import signature | |
# https://stackoverflow.com/questions/55748500/simulate-the-assignment-of-function-arguments-to-args-and-kwargs | |
try: | |
module = os.path.basename(__file__) | |
except: | |
module = 'some_plain_str' |
#### cat /etc/systemd/system/jupyter_self_restart.service | |
[Unit] | |
Description= pi_kk start Jupyter Notebook on system boot | |
[Service] | |
Type=simple | |
PIDFile=/run/jupyter.pid | |
ExecStart=/home/pi/.local/bin/jupyter-notebook --config=/home/pi/.jupyter/jupyter_notebook_config.py | |
User=pi | |
Group=pi |
## if not yet done | |
## $ jupyter notebook --generate-config | |
## $ jupyter notebook password | |
## $ python | |
## [1] from notebook.auth import passwd | |
## [2] passwd() # fill in correct password | |
## [3] exit() | |
## $ sudo nano ~/.jupyter/jupyter_notebook_config.py | |
c.NotebookApp.allow_remote_access = True |
#### cat /etc/systemd/system/ngrok_8888_self_restart.service | |
[Unit] | |
Description= bachkukkik_xavier start ngork on system boot | |
[Service] | |
Type=simple | |
PIDFile=/run/ngrok_jupyter.pid | |
ExecStart=/home/<your username>/ngrok http http://localhost:8888 | |
User=<your username> | |
Group=<your group> |
### !pip install pathos | |
import multiprocessing | |
import concurrent.futures | |
from pathos.multiprocessing import ProcessingPool | |
workers = int(multiprocessing.cpu_count()) | |
@errors_pusher | |
def parallel_threading(main_func, | |
lst_args: list, |