Skip to content

Instantly share code, notes, and snippets.

View ssghost's full-sized avatar
🏠
Working from home

Stardust Song ssghost

🏠
Working from home
View GitHub Profile
@ssghost
ssghost / MD_BUTTONS_DOCS.md
Created May 18, 2024 04:07 — forked from cxmeel/MD_BUTTONS_DOCS.md
Documentation for markdown buttons.

Markdown Buttons

A collection of SVG buttons for displaying custom "buttons" in Markdown content. You are free to use these buttons wherever you like. All buttons were created in Figma, with (most) icons provided by the Iconify plugin.

Sponsor on GitHub View Itch.io Store

The SVG files can be found on this gist. They have been separated in order to reduce the amount of lag when loading this README file.

use std::fs::{File, remove_file};
use std::io::{Read, Write};
use orion::hazardous::{
aead::xchacha20poly1305::{seal, open, Nonce, SecretKey},
mac::poly1305::POLY1305_OUTSIZE,
stream::xchacha20::XCHACHA_NONCESIZE,
};
use orion::hazardous::stream::chacha20::CHACHA_KEYSIZE;
@ssghost
ssghost / chatbot-arena-mle-elo-rating-bradley-terry-model-calculation-apr-9-2024.ipynb
Created April 19, 2024 21:03
Chatbot Arena: MLE Elo Rating (Bradley-Terry model) Calculation (Apr 9, 2024)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ssghost
ssghost / tvta.py
Last active April 14, 2024 00:10
from tradingview_ta import TA_Handler, Interval
import requests
import timeout_decorator
@timeout_decorator.timeout(300)
def tvta():
symbols = ["BTCUSDT", "ETHUSDT", "SOLUSDT", "BCHUSDT"]
for sym in symbols:
handler = TA_Handler(symbol=sym, screener='crypto', exchange='BINANCEUS', interval=Interval.INTERVAL_1_DAY)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ssghost
ssghost / gui.c
Created February 10, 2024 11:07 — forked from nir9/gui.c
Simple X11 Window Creation in C - Not for production, only for fun (gcc gui.c -lX11)
#include <X11/Xlib.h>
int main() {
XEvent event;
Display* display = XOpenDisplay(NULL);
Window w = XCreateSimpleWindow(display, DefaultRootWindow(display), 50, 50, 250, 250, 1, BlackPixel(display, 0), WhitePixel(display, 0));
XMapWindow(display, w);
XSelectInput(display, w, ExposureMask);
for (;;) {
@ssghost
ssghost / rl-baselines-zoo.ipynb
Created January 18, 2024 22:25
rl-baselines-zoo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ssghost
ssghost / commons-proxy.sh
Created January 7, 2024 08:12 — forked from EudesSilva/commons-proxy.sh
Config proxy in Git, Yarn, Bower, NPM, Maven, Docker, Gradle, General
#Configuration Proxy
#Git
git config --global http.proxy http://<username>:<password>@<proxy-port>
git config --global https.proxy http://<username>:<password>@<proxy-port>
@ssghost
ssghost / merge.ipynb
Created December 31, 2023 05:27
merge.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import os
import pickle
from functools import wraps
from typing import Callable, ParamSpec, TypeVar
Param = ParamSpec('Param')
RetType = TypeVar('RetType')
FuncType = Callable[[Param], RetType]
def exportable_cache(func:Callable) -> FuncType: