Skip to content

Instantly share code, notes, and snippets.

View xarical's full-sized avatar
:shipit:
I exist, probably

xarical

:shipit:
I exist, probably
View GitHub Profile
@xarical
xarical / load_dataset.py
Created June 23, 2025 00:38
Using a Hugging Face dataset as a database
"""
Dependencies: datasets, huggingface_hub
Environment variables: HF_API_KEY, DATASET_ID
"""
import os
import json
from datasets import load_dataset
from huggingface_hub import HfApi
@xarical
xarical / automatic-detection-of-readable-text.ipynb
Last active May 1, 2025 18:16
Testing various methods of automatically detecting readable text: frequency analysis using a custom frequency table, word detection using spaCy and the NLTK words corpus, nonsense string evaluation using Nostril, and using an LLM (GPT-4o-mini, served through G4F)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@xarical
xarical / java-google-colab.ipynb
Last active May 1, 2025 18:09
Get started with using Java in Google Colab (iPython-like through jupyter-java and running files through the jdk)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@xarical
xarical / masm32-google-colab-easy-masm-quickstart.ipynb
Last active May 7, 2025 00:28
masm32-google-colab-easy-masm-quickstart.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
require.config({paths: {'vs': 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.33.0/min/vs'}});
require(['vs/editor/editor.main'], function() {
const editor = monaco.editor.create(document.getElementById('editor'), {
value: '',
language: 'python',
theme: 'vs-dark',
automaticLayout: true
});
const myself = Math.random();
import discord
from discord.ext import commands, tasks
import requests
bot = commands.Bot(command_prefix='/', intents=discord.Intents.default())
user_id = "" # Discord user ID
bot_token = "" # Discord bot token
api_url = "" # API url
api_key = "" # API key
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.