Packages needed
$ sudo apt install v4l2loopback-dkms v4l2loopback-utils
Create virtual device
$ sudo modprobe -v v4l2loopback exclusive_caps=1 card_label="Virtual Webcam"
| [build-system] | |
| requires = ["hatchling"] | |
| build-backend = "hatchling.build" | |
| [project] | |
| name = "sqlcmdurl" | |
| version = "0.1.0" | |
| description = "Connect to SQL Server using dj-database-url format" | |
| dependencies = [ | |
| "dj-database-url", |
| #!/bin/bash | |
| # Install the Microsoft Aptos Fonts | |
| # Requires: lynx, unzip, unrtf | |
| set -e | |
| URL='https://download.microsoft.com/download/8/6/0/860a94fa-7feb-44ef-ac79-c072d9113d69/Microsoft%20Aptos%20Fonts.zip' | |
| TEMP_DIR=$(mktemp -d) | |
| cd "$TEMP_DIR" | |
| wget -O aptos.zip "$URL" |
| #!/bin/bash | |
| # | |
| # script that paraphtases info from the debian wiki at: https://wiki.debian.org/ppviewerFonts | |
| # | |
| # | |
| set -e | |
| DOWNLOAD_URL="https://archive.org/download/PowerPointViewer_201801/PowerPointViewer.exe" | |
| EXPECTED_CHECKSUM="249473568eba7a1e4f95498acba594e0f42e6581add4dead70c1dfb908a09423" | |
| FONT_DIR="$HOME/.local/share/fonts/ppviewer" |
| def is_container_type(type_hint: Any) -> bool: | |
| """\ | |
| :return: for containers you might add to a dataclass, like List[...] but types like str. | |
| """ | |
| origin = get_origin(type_hint) or type_hint | |
| if origin is str: | |
| return False | |
| if isinstance(origin, type): |
| # Extend https://yeonwoosung.github.io/posts/pydantic-vs-dataclass/ | |
| # to convert nested dataclasses. | |
| from functools import lru_cache | |
| from dataclasses import fields, _MISSING_TYPE, is_dataclass | |
| from typing import Any, Optional | |
| import pydantic |
Packages needed
$ sudo apt install v4l2loopback-dkms v4l2loopback-utils
Create virtual device
$ sudo modprobe -v v4l2loopback exclusive_caps=1 card_label="Virtual Webcam"
| aws-env() { | |
| export AWS_REGION=$(aws configure get region) | |
| export AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text) | |
| export AWS_ACCESS_KEY_ID=$(aws configure get aws_access_key_id) | |
| export AWS_SECRET_ACCESS_KEY=$(aws configure get aws_secret_access_key) | |
| echo "AWS environment variables set:" | |
| echo "AWS_REGION=$AWS_REGION" | |
| echo "AWS_ACCOUNT_ID=$AWS_ACCOUNT_ID" | |
| echo "AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID" | |
| echo "AWS_SECRET_ACCESS_KEY=********" |
| DATA_FILE = "your-file.parquet" | |
| import pandas as pd | |
| # Read the Parquet file | |
| df = pd.read_parquet(DATA_FILE) | |
| def df_schema(df): | |
| # Print the column names and their types | |
| for column in df.columns: |
| #!/bin/bash | |
| # | |
| # Creates a Jupyter kernel for a virtual environment. | |
| # | |
| # Usage: | |
| # ./create_kernel.sh [venv_name] | |
| # | |
| # Arguments: | |
| # venv_name Optional. Name of the virtual environment to create kernel for. | |
| # If not provided, uses currently activated environment. |
UTM is available from the app store for £9, or here: mac.getutm.app
Look up the instructions for installing Ubuntu, install it using Qemu. I used this 22.04 image (As of 3-Aug-2023 I was NOT successful in installing, or upgrading to 23.04) https://cdimage.ubuntu.com/jammy/daily-live/current/jammy-desktop-arm64.iso