Skip to content

Instantly share code, notes, and snippets.

@xgroleau
xgroleau / radarr-symlink.sh
Created September 3, 2021 00:36
symlink script for radarr
@youmukonpaku1337
youmukonpaku1337 / beginnerguide.md
Last active December 29, 2024 08:01
Beginner's Guide to Update Skipping

This guide serves as a beginner-friendly introduction to update skipping and how to use it.

Quick note

This guide assumes you have a basic understanding of redstone and block updates.

Quick glossary

Block update - an interaction that generally informs the game something physically changed. Block update detector - something that detects a block update. Quasi connectivity - the functionality of some redstone components to power like doors.

@jinjier
jinjier / javdb-top250.md
Last active December 29, 2024 07:59
JavDB top 250 movies list. [Updated on 2024/12]
import openai
openai.api_key = "YOUR API KEY HERE"
model_engine = "text-davinci-003"
chatbot_prompt = """
As an advanced chatbot, your primary goal is to assist users to the best of your ability. This may involve answering questions, providing helpful information, or completing tasks based on user input. In order to effectively assist users, it is important to be detailed and thorough in your responses. Use examples and evidence to support your points and justify your recommendations or solutions.
<conversation_history>
User: <user input>
// from https://www.klittlepage.com/2013/12/21/twelve-days-2013-de-bruijn-sequences/
import java.util.Random;
/**
* @author Kelly Littlepage
*/
public class DeBruijn {
/***
* Generate a De Bruijn Sequence using the recursive FKM algorithm as given
@cnndabbler
cnndabbler / pydantic_restaurant_context.py
Created December 21, 2024 00:55
This code implements an intelligent restaurant recommendation system that combines Pydantic type safety with sophisticated context management. The system uses Pydantic Agents to interface with an LLM (Large Language Model) while maintaining type safety and data validation throughout the application.
"""
Restaurant recommendation system demonstrating context features with multiple customers.
Shows how context helps personalize and improve recommendations over time.
"""
from typing import List, Optional, Dict, Literal
from pydantic import BaseModel, Field
import asyncio
from datetime import datetime
from pydantic_ai import Agent, RunContext
@mikepruett3
mikepruett3 / shell-setup.ps1
Last active December 29, 2024 07:45
Packages to install via scoop, winget, choco, and other tools...
<#
.SYNOPSIS
Script to Initialize my custom powershell setup.
.DESCRIPTION
Script uses scoop
.NOTES
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted.
Author: Mike Pruett
Date: October 18th, 2018
@983
983 / frag.glsl
Created November 14, 2015 09:39
hsv rgb conversion glsl shader
// because http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl is often down
vec3 rgb2hsv(vec3 c)
{
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
float d = q.x - min(q.w, q.y);
float e = 1.0e-10;
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],