Create and activate an environment
conda create -n python2 python=2.7 anaconda
source activate python2
Deactivate environment
| import torch | |
| import torch.nn as nn | |
| import torch.optim as optim | |
| import segmentation_models_pytorch as smp | |
| from torchmetrics import Accuracy | |
| from tqdm import tqdm | |
| from torchgeo.datasets import ETCI2021 | |
| from torchgeo.datamodules import ETCI2021DataModule |
| # This isn't supposed to run as a bash script, i named it with ".sh" for syntax highlighting. | |
| # https://developer.nvidia.com/nsight-systems | |
| # https://docs.nvidia.com/nsight-systems/profiling/index.html | |
| # My preferred nsys (command line executable used to create profiles) commands | |
| # | |
| # In your script, write | |
| # torch.cuda.nvtx.range_push("region name") | |
| # ... |
| { | |
| // The following are sample configurations for common case scenarios of debugging | |
| // Rust in Visual Studio Code | |
| // | |
| // For syntax, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| // | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Launch an application", |
| # Instructions for installing GCC 4.9 on various platforms. | |
| # The commands show instructions for GCC 4.9, but any higher version will also work! | |
| # Ubuntu (https://askubuntu.com/questions/466651/how-do-i-use-the-latest-gcc-on-ubuntu/581497#581497) | |
| sudo apt-get install software-properties-common | |
| sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
| sudo apt-get update | |
| sudo apt-get install gcc-4.9 g++-4.9 | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9 |
| import imageio | |
| import os, sys | |
| class TargetFormat(object): | |
| GIF = ".gif" | |
| MP4 = ".mp4" | |
| AVI = ".avi" | |
| def convertFile(inputpath, targetFormat): | |
| """Reference: http://imageio.readthedocs.io/en/latest/examples.html#convert-a-movie""" |
The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
git clone --bare git@github.com:usi-systems/easytrace.git
To remove a submodule you need to: