pipx --version
0.16.3
pipx install --include-deps jupyterlab
pipx inject jupyterlab matplotlib numpy jupyter-console scipy simpy sympy
pipx inject jupyterlab arrow pandas tabulate isort black jupyterlab_code_formatter
0<0# : ^ | |
""" | |
:: Keep a python script inside a bat file | |
:: Source https://stackoverflow.com/a/41651933 | |
@SETLOCAL ENABLEEXTENSIONS | |
@py -3 -x -B "%~f0" %* | |
@SET ERR=%ERRORLEVEL% | |
@:: Pause if not interactive | |
@ECHO %cmdcmdline% | FIND /i "%~0" >NUL | |
@IF NOT ERRORLEVEL 1 PAUSE |
#!/usr/bin/env python3 | |
# Based on this (incorrect) response <https://stackoverflow.com/a/43750422> | |
# Changed to always round up size and always display up to 3 decimals. | |
# Shall also work with now retired python 2 language. | |
import math | |
def pp_size(bytes, units=[' bytes','KB','MB','GB','TB', 'PB', 'EB', 'ZB', 'YB'], base=1000.0): | |
""" Returns a human readable string representation of bytes (decimal unit)""" |
//+build mage | |
// https://magefile.org | |
package main | |
import ( | |
"fmt" | |
"github.com/magefile/mage/sh" | |
"os" | |
"regexp" |
@busybox sh -c "dd if=/dev/urandom| tr -d -c 'a-zA-Z0-9' | head -c 18 | awk '{print substr($1,1,6)"""-"""substr($1,7,6)"""-"""substr($1,13,6)}'" |
*.bat eol=crlf | |
*.ps1 eol=crlf |
#!/bin/bash | |
set -eu | |
# DVD images | |
URLS=( | |
"https://cdimage.debian.org/cdimage/weekly-builds/amd64/iso-dvd/SHA256SUMS" | |
"https://cdimage.debian.org/cdimage/weekly-builds/amd64/iso-dvd/SHA256SUMS.sign" | |
"https://cdimage.debian.org/cdimage/weekly-builds/amd64/iso-dvd/debian-testing-amd64-DVD-1.iso" | |
) |
@FOR /F %%t IN ('cscript //nologo //b %~dp0reset-env.vbs') DO @( | |
@CALL "%%t" | |
@DEL /F /Q "%%t" | |
) |
@ECHO OFF | |
VERIFY OTHER 2>nul | |
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION | |
IF ERRORLEVEL 1 ECHO *** Unable to enable extensions | |
SET P=%PATH% | |
IF "%1"=="" GOTO :list | |
IF "%1"=="list" GOTO :list |
@SETLOCAL | |
@IF "%1" == "" @( | |
ECHO missing filename as argument | |
EXIT /B 1 | |
) | |
@IF "%2" == "" (SET "OUTPUT=-o"%~dpn1"") ELSE (SET "OUTPUT=-o"%~2"") | |
7z x "%1" -so | 7z x -aoa -si -ttar %OUTPUT% |