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
| 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
| # 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
| 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
| 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
| # | |
| # 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
| 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
| import torch | |
| torch.manual_seed(42) | |
| torch.backends.cudnn.deterministic = True | |
| torch.backends.cudnn.benchmark = False | |
| import numpy as np | |
| np.random.seed(42) |
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 json | |
| from shapely.geometry import shape, Point | |
| with open('./Data/nyc-neighborhoods.geo.json') as f: | |
| js = json.load(f) | |
| def get_nbd(lng, lat): | |
| point = Point(lng, lat) | |
| for feature in js['features']: | |
| polygon = shape(feature['geometry']) |
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-get install libhdf4-dev | |
| pip install pyhdf |