Skip to content

Instantly share code, notes, and snippets.

@doxy-ai
doxy-ai / twitch_nonodes.py
Last active August 26, 2023 18:29
ZatsuDachi Twitch Plugin (old No Nodes!)
# Requirements: pip install twitchapi
# A seperate credentials/twitch.py file needs to be created with the following contents without the leading hashtags (#):
#clientID = "<your twitch client id here>"
#clientSecret = "<your twitch client scret here>"
# Twitch provides a guide on how to create these here: https://dev.twitch.tv/docs/authentication/register-app/
# Note when creating a new application you need to make sure the OAuth Redirect URLs are set to: http://localhost:17563
# You will also need to change the `targetChanel = "<your channel>"` below, the rest of this file can be safely ignored!
@doxy-ai
doxy-ai / bttv_emotes.py
Created May 13, 2023 21:15
ZatsuDachi Better TTV Emotes Plugin
from api import PluginBase, Message, Color
from itertools import chain
import requests, asyncio
class Plugin(PluginBase):
"""A plugin that adds Better Twitch.tv emotes to messages."""
name = "Better Twitch.tv Emotes Plugin"
platform = "twitch"
# platformID = "818635195" # Can be found from: https://www.streamweasels.com/tools/convert-twitch-username-to-user-id/
@doxy-ai
doxy-ai / twitch_w_bttv_nonodes.py
Last active August 26, 2023 18:29
ZatsuDachi Twitch Plugin w/ Inbuilt Better TTV Emotes
# Requirements: pip install twitchapi
# A seperate credentials/twitch.py file needs to be created with the following contents without the leading hashtags (#):
#clientID = "<your twitch client id here>"
#clientSecret = "<your twitch client scret here>"
# Twitch provides a guide on how to create these here: https://dev.twitch.tv/docs/authentication/register-app/
# Note when creating a new application you need to make sure the OAuth Redirect URLs are set to: http://localhost:17563
# You will also need to change the `targetChanel = "<your channel>"` below, the rest of this file can be safely ignored!
@doxy-ai
doxy-ai / vstream.py
Last active February 25, 2024 03:35
ZatsuDachi Vstream Plugin
# Requirements: pip install websocket-client cbor2
# Import required packages
from api import PluginBase, Message, Color
from flask import escape
import threading
import asyncio
import json
import websocket
import base64
@doxy-ai
doxy-ai / youtube.py
Last active August 31, 2023 06:34
Youtube Zatsudachi Plugin
# Requirements: pip install git+https://github.com/KaitoCross/pytchat.git@developing
# Importing required packages
from api import PluginBase, Message, Color
from flask import escape
from pytchat import LiveChatAsync, ChatDataFinished
import asyncio
class Plugin(PluginBase):
@doxy-ai
doxy-ai / repeat.hpp
Created July 4, 2023 18:58
A simple file that creates a repeat loop which simply repeats the provided code the specified number of times!
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute
this software, either in source code form or as a compiled binary, for any
purpose, commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of
this software dedicate any and all copyright interest in the software to
the public domain. We make this dedication for the benefit of the public
@doxy-ai
doxy-ai / defer.hpp
Created July 4, 2023 19:02
C++20 defer implementation, causes the provided code to be executed at the end of the scope... useful when working with C libraries that need things to be destroyed!
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute
this software, either in source code form or as a compiled binary, for any
purpose, commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of
this software dedicate any and all copyright interest in the software to
the public domain. We make this dedication for the benefit of the public
@doxy-ai
doxy-ai / twitch.py
Last active January 17, 2024 05:13
ZatsuDachi Twitch Plugin (readonly)
# NOTE: You must update your twitch URL by editing this file!
# Import required packages
from api import PluginBase, Message, Color
from flask import escape
import threading
import itertools
import asyncio
import irc.client_aio
import irc.client
@doxy-ai
doxy-ai / kick.py
Created October 28, 2023 01:26
ZatsuDachi Kick Plugin (readonly)
# Requirements: pip install tls_client
# Import required packages
from api import PluginBase, Message, Color
from flask import escape
import asyncio
import websockets
import json
import sys
import tls_client
@doxy-ai
doxy-ai / webgpu-helpers.hpp
Created November 19, 2023 22:03
Some helpers to make https://github.com/eliemichel/WebGPU-Cpp a tiny bit easier to use (as well as a simple fullscreen texture/manual rasterizer system)
#include <webgpu/webgpu.hpp>
#include <utility>
#include <string_view>
#include <span>
#include <cmath>
#include <iostream>
namespace helpers {
constexpr static size_t invalid = std::numeric_limits<size_t>::max();