Skip to content

Instantly share code, notes, and snippets.

View jskherman's full-sized avatar
studying for exams

Je Sian Keith Herman jskherman

studying for exams
View GitHub Profile
jskherman / logo.css
Created April 20, 2024 13:32
vscode vtuber logo
.editor-group-watermark > .letterpress {
background-image: url("") !important;
opacity: 0.75;
jskherman /
Created March 7, 2024 16:28
A python script that parses an Atom RSS feed from and exports the data to a CSV file
# =============================================================================
# Author: jskherman
# Date: 2024-03-08
# Description:
# This script parses an XML file from in the Atom format, which
# typically represents an RSS feed. The script extracts relevant information
# from the entries in the feed, such as the title, author, published
# timestamp, content, ID, and link. It then processes this information and
# writes it to a CSV file.
jskherman /
Created March 7, 2023 12:59
Guide to deploying n3d1117's ChatGPT Telegram bot to
jskherman / admonition.lua
Last active May 19, 2024 04:26
A Pandoc Lua filter to convert Callout Blocks to Hugo admonitions (shortcode).
-- Pandoc Lua-filter for Obsidian Callouts
-- Original Source:
-- Notes:
-- Original snippet modified to output Hugo {{< admonition >}} shortcodes with collapse.
-- Make sure to have a blank line before and after the `> [!note]` line of the callout block.
-- The filter works recursively so if you want callouts within callouts, make sure to leave a blank line
-- before and after the `> [!note] Your title here` line of each callout.
-- Usage:
jskherman /
Last active August 5, 2023 12:07
A Python script for exporting a GitHub user's daily commit counts to a CSV file
def get_gh_commit_data(github_username: str) -> list:
Get GitHub commit data for a given username by scraping the GitHub
contribution calendar heatmap for each year of activity.
This function returns a list of dictionaries with the following keys:
- date: The date of the commit
- commits: The number of commits on that date
jskherman / Biomass.json
Last active December 22, 2022 14:06
DWSIM Essential Oil Compound Data (JSON)
"Acentric_Factor": 0.5,
"BO_BSW": 0.0,
"BO_GOR": 0.0,
"BO_OilVisc1": 0.0,
"BO_OilVisc2": 0.0,
"BO_OilViscTemp1": 0.0,
"BO_OilViscTemp2": 0.0,
"BO_PNA_A": 0.0,
"BO_PNA_N": 0.0,
jskherman /
Last active November 27, 2022 10:56
Add a new row in a Notion database using python via notion-df
# Import packages
import os
import dotenv # for .env files
import datetime
import requests
import pandas as pd
# Do `pip install notion-df` first
import notion_df
jskherman /
Last active November 27, 2022 11:07
Reading a csv file on GitHub, appending a new row to it, and committing it back again to GitHub. Might be useful for forms built with python like Streamlit?
# Import packages
import os
import dotenv # For .env files
import datetime
import pandas as pd
# import base64
import requests
import io
jskherman / obsidian-callouts.lua
Last active November 17, 2022 04:02
Pandoc Lua-filter by saf-dmitry for Obsidian Callouts to Quarto Callout Blocks
-- Source:
-- Check if array contains a specific value
local function has_value (tab, val)
for index, value in ipairs(tab) do
if value == val then
return true
return false
import re
text = "Dummy text here with the cards"
# Regex for Basic Card with Extra field using #flashcard
basic_regex = r"((?:[^\n][\n]?)+) #flashcard ?\n*((?:\n(?:^.{1,3}$|^.{4}(?<!<!--)(?<!Extra: ).*)))(?:\nExtra: (.*))+"
# Regex for Cloze Card with Extra field
cloze_extra = r"((?:.+\n)*(?:.*==.*)(?:\n(?:^.{1,6}$|^.{7}(?<!<!--ID:)(?<!Extra: ).*))*)(?:\nExtra: (.*))?"