Skip to content

Instantly share code, notes, and snippets.

View Rachel030219's full-sized avatar
😶‍🌫️
Working

Rachel Tang Rachel030219

😶‍🌫️
Working
  • A planet in the solar system
View GitHub Profile
@Anthony-Hoo
Anthony-Hoo / picture_to_cie_diagram.py
Created December 19, 2023 06:51
Converts image input to CIE xy chromaticity coordinates with original pixel colour
from PIL import Image
import numpy as np
import matplotlib.pyplot as plt
import time
from colour.plotting import *
def plot_xy_coordinates_with_color(xy_and_rgb_np, output_png_path):
start_time = time.time()
xy = xy_and_rgb_np[:, :2]
@feklee
feklee / README.md
Last active January 6, 2026 00:59
GnuPG on Termux for accessing USB smart card reader

Prerequisites

  • smart card reader supported by GnuPG

    I use [0.332][4], a mod of the [SCM332 V2][1] which is comparatively light and small. Previously, I was simply using the SCM332 V2 directly with an OTG adapter.

  • root access from Termux

Install Android SDK CLI Ubuntu 20.04 WSL2 (Work in Progress)

Install Java 8

sudo apt install openjdk-8-jdk-headless

Android SDK

@jkitching
jkitching / combine_photo_video.sh
Created May 27, 2024 07:31
Combine a photo (HEIC or JPEG) and a video into a file which Google Photos will recognize as a motion photo
#!/bin/bash
# Inline XMP data
inline_xmp='<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.1.0-jc003">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:GCamera="http://ns.google.com/photos/1.0/camera/"
xmlns:Container="http://ns.google.com/photos/1.0/container/"
xmlns:Item="http://ns.google.com/photos/1.0/container/item/"
xmlns:xmpNote="http://ns.adobe.com/xmp/note/"