Skip to content

Instantly share code, notes, and snippets.

@KorigamiK
KorigamiK / add_answers.py
Last active February 28, 2025 12:59
GATE 2025 score calculator
import re
import csv
from pathlib import Path
def parse_questions(content):
questions = []
# Look for question patterns - Q.1, Q.2, etc. and capture the content until the next question
question_pattern = re.compile(r'(Q\.\s*\d+(?:\s*–\s*Q\.\s*\d+)?\s+(?:Carry|carry)\s+(?:ONE|TWO|one|two)\s+marks?(?:\s+Each)?|Q\.\s*\d+(?:\s*–\s*Q\.\s*\d+)?)')
@KorigamiK
KorigamiK / custom-yt-speed.user.js
Last active February 13, 2025 06:44
set custom playback speed on youtube
// ==UserScript==
// @name CustomYTSpeed
// @version 0.4
// @description Allows the user to set a custom playback speed on YouTube.com videos
// @match *://*.youtube.com/watch*
// @grant none
// ==/UserScript==
// deno-lint-ignore-file no-window
(function () {
@KorigamiK
KorigamiK / .gitignore
Last active January 25, 2025 22:04
pw course content userscript
pw_all_content_2025-01-25.json
pw_downloads.crawljob
@KorigamiK
KorigamiK / bsky-comments.js
Created December 25, 2024 21:41 — forked from LoueeD/bsky-comments.js
bluesky comments web component - inspired by emilyliu and coryzue
// Moved to a github repo for versioning, the file can now be loaded from a CDN
// <script type="module" src="https://esm.sh/gh/loueed/bsky@v1.0.0/comments"></script>
class BskyComments extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: "open" });
this.visibleCount = 3;
this.thread = null;
this.error = null;
#!/bin/bash
# Check if required tools are installed
command -v pdfimages >/dev/null 2>&1 || { echo "pdfimages is required but not installed. Install poppler-utils."; exit 1; }
command -v img2pdf >/dev/null 2>&1 || { echo "img2pdf is required but not installed. Install img2pdf."; exit 1; }
# Create output directory if it doesn't exist
mkdir -p output_pdfs
mkdir -p temp_images
#!/usr/bin/env bash
# Loop through all week* directories
for dir in week*/; do
# Extract week number from directory name
week_num=$(echo "$dir" | grep -o '[0-9]\+')
# Enter directory
cd "$dir"
@KorigamiK
KorigamiK / hci.md
Last active November 1, 2024 20:43
nptel

title: Design & Implementation of Human-Computer Interfaces papersize: a4 numbersections: false documentclass: scrartcl toc: false toc-title: 'Contents' geometry:

  • margin=0.5in colorlinks: true
@KorigamiK
KorigamiK / keybindings.json
Last active September 19, 2024 11:52
vscode vim keybinds
// Place your key bindings in this file to override the defaultsauto[]
[
{
"command": "workbench.action.nextEditor",
"key": "shift+l",
"when": "vim.mode == 'Normal' && (editorTextFocus || !inputFocus)"
},
{
"command": "workbench.action.previousEditor",
"key": "shift+h",
@KorigamiK
KorigamiK / cmd.sh
Created August 18, 2024 13:15
how to select vulkan graphic card
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json vulkaninfo --summary
@KorigamiK
KorigamiK / claude_tex.user.js
Created August 17, 2024 19:19
Claude TeX rendering
// ==UserScript==
// @name New script github.com
// @namespace Violentmonkey Scripts
// @match https://claude.ai/*
// @grant none
// @version 1.0
// @author -
// @description 8/18/2024, 12:49:16 AM
// ==/UserScript==