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 cv2 | |
import numpy as np | |
img = np.zeros((100, 300, 3), dtype=np.uint8) | |
ft = cv2.freetype.createFreeType2() | |
ft.loadFontData(fontFileName='Ubuntu-R.ttf', | |
id=0) | |
ft.putText(img=img, | |
text='Quick Fox', |
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
# | |
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
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
sudo apt full-upgrade | |
# Add processor.max_cstate=0 intel_idle.max_cstate=0 idle=poll to GRUB_CMDLINE_LINUX in /etc/default/grub | |
update-grub |
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
prefix='/usr/local/' | |
pyver='3.6' | |
sudo rm -rf \ | |
${prefix}bin/python${pyver} \ | |
${prefix}bin/pip${pyver} \ | |
${prefix}bin/include/python${pyver} \ | |
${prefix}lib/libpython${pyver}.a \ | |
${prefix}lib/python${pyver} \ | |
${prefix}bin/python${pyver} \ |
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
# Install | |
sudo apt install tmux | |
# Named Session | |
tmux new -s session_name | |
# Detach | |
[Ctrl-b] d | |
# List |
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
sudo apt update | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DF> | |
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu eoan-> | |
sudo apt install r-base | |
R --version | |
# To use R: | |
# R | |
# Install RStudio Server |
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
sudo apt install build-essential checkinstall | |
sudo apt install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev | |
wget https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tar.xz | |
tar xvf Python-3.6.9.tar.xz | |
cd Python-3.6.9/ | |
./configure | |
sudo make altinstall |
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
# WARNING : This gist in the current form is a collection of command examples. Please exercise caution where mentioned. | |
# Docker | |
sudo apt-get update | |
sudo apt-get remove docker docker-engine docker.io | |
sudo apt install docker.io | |
sudo systemctl start docker | |
sudo systemctl enable docker | |
docker --version |
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
ssh-keygen | |
ssh-copy-id username@host | |
# OR | |
cat ~/.ssh/id_rsa.pub | ssh username@host "mkdir -p ~/.ssh && touch ~/.ssh/authorized_keys && chmod -R go= ~/.ssh && cat >> ~/.ssh/authorized_keys" | |
# Check your GitHub SSH | |
ssh -T [email protected] |
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
sudo apt update | |
sudo apt install software-properties-common apt-transport-https wget | |
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" | |
sudo apt install code |