- Keep your system up to date:
$ sudo apt-get update$ sudo apt-get upgrade$ sudo reboot
- Make sure you've got an internet connection.
- Make sure you've got
- wget
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def relative_symlink(target: Union[Path, str], destination: Union[Path, str]): | |
| """Create a symlink pointing to ``target`` from ``location``. | |
| Args: | |
| target: The target of the symlink (the file/directory that is pointed to) | |
| destination: The location of the symlink itself. | |
| """ | |
| target = Path(target) | |
| destination = Path(destination) | |
| target_dir = destination.parent |
Find the node assigned to a job
$ sacct -j <jobid> --format NodeList
NodeList
---------------
dgj213
dgj213
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| from PIL import Image | |
| def vstack(images): | |
| if len(images) == 0: | |
| raise ValueError("Need 0 or more images") | |
| if isinstance(images[0], np.ndarray): | |
| images = [Image.fromarray(img) for img in images] | |
| width = max([img.size[0] for img in images]) |
Install OpenCV 4.1.2 on Raspbian Buster
$ chmod +x *.sh
$ ./download-opencv.sh
$ ./install-deps.sh
$ ./build-opencv.sh
$ cd ~/opencv/opencv-4.1.2/build
$ sudo make install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Ruby is our language as asciidoctor is a ruby gem. | |
| lang: ruby | |
| before_install: | |
| - sudo apt-get install pandoc | |
| - gem install asciidoctor | |
| script: | |
| - make | |
| after_success: | |
| - .travis/push.sh | |
| env: |
- Create a separate boot partition, arch manual suggests using ESP as boot partition but this leads to headaches.
- Skip the autodetect functionality of refind and use a manual stanza
- Ensure you change the
volumeentry in refind's boot stanza to the label of your boot device.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from io import BytesIO | |
| import av | |
| import numpy as np | |
| def video_array_to_mp4_blob(video: np.ndarray, fps: float = 24) -> bytes: | |
| """ | |
| Args: | |
| video: Video array of shape :math:`(T, H, W, 3)` and range :math:`[0, 255]` with type ``np.uint8``. |
NewerOlder