Packages needed
$ sudo apt install v4l2loopback-dkms v4l2loopback-utils
Create virtual device
$ sudo modprobe -v v4l2loopback exclusive_caps=1 card_label="Virtual Webcam"
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
#!/bin/bash | |
# Function to handle the download | |
download_file() { | |
local delete_flag="${1:-false}" | |
local url="$2" | |
local filename="$3" | |
# Extract filename from URL if not provided | |
if [ -z "$filename" ]; then |
#!/bin/bash | |
# | |
# Download all the files in a GitHub Gist | |
# | |
# Example usage: | |
# $ download-gist.sh https://gist.github.com/stuaxo/2e110aaa42050490ad3fd73cfbedf76a | |
# | |
# By default, files are not overwritten. The -f option overrides this behavior: | |
# $ download-gist.sh -f https://gist.github.com/stuaxo/2e110aaa42050490ad3fd73cfbedf76a | |
# |
#!/bin/bash | |
# | |
# Download open watcom 1.9 from sourceforge. | |
# | |
# Requires curl or wget | |
FILENAME="open-watcom-c-linux-1.9" | |
URL="https://master.dl.sourceforge.net/project/openwatcom/open-watcom-1.9/$FILENAME" | |
# Check if curl is available | |
if command -v curl >/dev/null 2>&1; then |
#!/usr/bin/env python3 | |
# Usage: python dirtollm.py [files or glob patterns...] [options] | |
# Example: python dirtollm.py "*.py" "*.txt" /path/to/specific/file.py --exclude "*.pyc" --copy --verbose -x --binaries | |
import argparse | |
import pathlib | |
import fnmatch | |
import sys | |
import os |
#!/bin/bash | |
# | |
# hyperlink.sh | |
# | |
# Generate clickable hyperlinks to files in the terminal using OSC-8 standard ANSI. | |
# | |
# Usage: | |
# hyperlink.sh [-t text] [-r relative_folder] [-s] [--help] file | |
# | |
# Many terminals that support OSC-8 hyperlinks including: |