| import debug from "debug"; | |
| import type { Sensor } from "./types"; | |
| let dbg = debug("sauter:LineProtocol"); | |
| // Log to stdout instead of stderr by default | |
| dbg.log = console.log.bind(console); | |
| // Escape special chars depending on the field (see https://is.gd/wdaALB) | |
| const escape = { |
| #!/usr/bin/env bash | |
| # Fail on first non-zero exit code | |
| set -e | |
| setup_colors() { | |
| if [[ -t 2 ]] && [[ -z "${NO_COLOR-}" ]] && [[ "${TERM-}" != "dumb" ]]; then | |
| NOFORMAT='\033[0m' RED='\033[0;31m' GREEN='\033[0;32m' ORANGE='\033[0;33m' BLUE='\033[0;34m' PURPLE='\033[0;35m' CYAN='\033[0;36m' YELLOW='\033[1;33m' | |
| else | |
| NOFORMAT='' RED='' GREEN='' ORANGE='' BLUE='' PURPLE='' CYAN='' YELLOW='' |
| diff --git a/PKGBUILD b/PKGBUILD | |
| index 6cecc0f..72c3be0 100644 | |
| --- a/PKGBUILD | |
| +++ b/PKGBUILD | |
| @@ -1,7 +1,7 @@ | |
| # Maintainer: Matthew Hiles <[email protected]> | |
| pkgname=via | |
| -pkgver=4.2.0.2105106 | |
| -pkgrel=4 | |
| +pkgver=4.5.0.2301032 |
The following is a code snippet that installs torch along with a full cuda environment that takes precedence over the host's.
The only problem is that $TORCH_VERSION must be compatible with/compiled against $CUDA_VERSION, and the latter should be available in conda's nvidia channel (older CUDA versions are not available).
ENV_NAME=segformer CUDA_VERSION=11.1 TORCH_VERSION=1.9 cli=mamba
$cli deactivate
$cli env remove -n $ENV_NAME
$cli create -n $ENV_NAME -c conda-forge -c nvidia python=3.10 gcc=11 gxx cuda-runtime=$CUDA_VERSION cuda-nvcc=$CUDA_VERSION cudatoolkit=$CUDA_VERSION cuda-libraries=$CUDA_VERSION cuda-libraries-dev=$CUDA_VERSION cuda-cudart=$CUDA_VERSION cudnn && \| // Glossary code by Hugo Cartigny (BlueskyFR) 🍉 | |
| #let glossary(indent-defs: false, doc) = { | |
| // ✨ The glossary displays its items using level 99 headings | |
| let glossary = state("wow", (:)) | |
| // Hide the numbering for level 99 titles | |
| show heading.where(level: 99): it => text(weight: "regular", it.body) | |
| let page-refs-color = rgb("#7630EA") |
| #!/bin/bash | |
| # The proxy url to use when enabled | |
| proxy=http://<proxy_ip>:<proxy_port>/ | |
| # ----------------------------------------------------- | |
| # Set proxy to "" if arg is "off" | |
| # If arg is neither "on" or "off", exit | |
| [[ $1 = "off" ]] && proxy= || ([[ $1 = "on" ]] || exit) |
| # To add a new cell, type '# %%' | |
| # To add a new markdown cell, type '# %% [markdown]' | |
| # %% | |
| import time | |
| global_start_time = time.time() | |
| # %% | |
| import tensorflow as tf | |
| print(f"✨ Using TensorFlow {tf.__version__}!") | |
| for device in tf.config.experimental.list_physical_devices('GPU'): |