Loading...

Grand Theft Auto 5 / GTAV / GTA Online Idle Evasion

I've been playing GTA Online for a while now, and I've noticed that the game is very aggressive about kicking you for being idle. I've been working on a hardware solution to this problem with a Raspberry Pi Pico and MicroPython firmware to emulate a keyboard and keep the game from kicking me. I've been using it for a couple of weeks now and it's been working great!
Read more...

Add files via upload

+{
+ "cells": [
+{
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+"# Setupn",
+"%pip install git
+https://github.com/apple/ml
-stable
-diffusionn",
+"!git clone https://github.com/apple/ml
-stable
-diffusion.git"
+ ]
+},
+{
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+"repo_id = "apple/coreml
-stable
-diffusion
-v1
-4"n",
+"variant = "split_einsum/packages"n",
+"model_path = "models/coreml
-stable
-diffusion
-v1
-4_split_einsum_packages"n",
+"prompt = "A very happy cat smiling at the camera""
+ ]
+},
+{
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+"# Download the modeln",
+"# I am using the torch2coreml script to convert the model to CoreML. n",
+"# Normally I want to use this in the notebook directly, but I can't get it to work.n",
+"#n",
+"# You might need to "huggingface
-cli login" firstn",
+"!python
-m pip install
-r requirements.txtn",
+"!python
-m python_coreml_stable_diffusion.torch2coreml
-convert
-unet
-convert
-text
-encoder
-convert
-vae
-decoder
-convert
-safety
-checker
-model
-version {model_id}
-o {model_path}n",
+"n"
+ ]
+},
+{
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+"from diffusers import StableDiffusionPipelinen",
+"from python_coreml_stable_diffusion.pipeline import get_coreml_pipen",
+"import coremltoolsn",
+"import numpy as npn",
+"n",
+"model_id = "CompVis/stable
-diffusion
-v1
-4"n",
+"pytorch_pipe = StableDiffusionPipeline.from_pretrained(model_id)"
+ ]
+},
+{
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+"coreml_pipe = get_coreml_pipe(pytorch_pipe=pytorch_pipe,n",
+"mlpackages_dir=model_path,n",
+"model_version=model_id,n",
+"compute_unit="ALL")"
+ ]
+},
+{
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+"from tqdm import tqdmn",
+"n",
+"# Set the seed for reproducibility n",
+"np.random.seed(8675309)n",
+"n",
+"images = []n",
+"init_guidance_scale = 1.05n",
+"init_noise_scale = 0.01n",
+"for i in tqdm(range(64)):n",
+"# Disregard the safety checker for nown",
+"coreml_pipe.safety_checker = Nonen",
+"n",
+"# Turn off progress barsn",
+"coreml_pipe.progress = Falsen",
+"n",
+"n",
+"image = coreml_pipe(prompt=prompt,n",
+"num_inference_steps=25,n",
+"guidance_scale=init_guidance_scale,n",
+"noise_scale=init_noise_scale,)n",
+"n",
+"image_data = {n",
+""image": image,n",
+""guidance_scale": init_guidance_scale,n",
+""noise_scale": init_noise_scalen",
+"}n",
+"images.append(image_data)n",
+"n",
+"# Show the imagen",
+"image.images[0].show()n",
+"n",
+"init_guidance_scale *= 1.05n",
+"init_noise_scale *= 1.05n",
+"n",
+""
+ ]
+},
+{
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+"# Show images in a gridn",
+"import matplotlib.pyplot as pltn",
+"import numpy as npn",
+"n",
+"fig, ax = plt.subplots(8, 8, figsize=(64, 64))n",
+"n",
+"# Title the plot with the model name and the promptn",
+"fig.suptitle(f"Model: {model_id}nPrompt: {prompt}", fontsize=48)n",
+"n",
+"# Less space between imagesn",
+"# plt.subplots_adjust(wspace=0.1, hspace=0.1)n",
+"n",
+"# Other common plt tweaksn",
+"# plt.setp(ax, xticks=[], yticks=[], frame_on=False)n",
+"# plt.tight_layout()n",
+"# plt.margins(0, 0)n",
+"n",
+"for i in range(64):n",
+"row = i // 8n",
+"col = i % 8n",
+"ax[row, col].imshow(images[i]["image"][0][0])n",
+"ax[row, col].set_title(f"Guidance: {images[i]['guidance_scale']:.2f}nNoise: {images[i]['noise_scale']:.2f}", fontsize=24)n",
+"ax[row, col].axis("off")n",
+"n",
+"# Save the plotn",
+"plt.savefig("images.png")"
+ ]
+},
+{
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+"images[0]["image"][0][0]"
+ ]
+},
+{
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+}
+ ],
+ "metadata": {
+"kernelspec": {
+ "display_name": "Python 3",
+ "language": "python",
+ "name": "python3"
+},
+"language_info": {
+ "codemirror_mode": {
+"name": "ipython",
+"version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x
-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.11.5"
+}
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}
Read more...

I tried out AWS RDS options

I couldn't size a database small enough to be economical. It seems like even the smallest offering was costing $2/day at idle, so I'm going to stick with the JSON file for now. I'm going to try to do a sort of sync with GitHub instead

Threads is mid

I'm not sure what to think of Threads. It's a bit of a mess. I'm not sure if I'll keep using it. I've returned to posting more often on the Twitter/X site.
Read more...

Another site update

I've updated the Threads and X (Twitter) icons. I'm trying to get access to the TikTok API but they're being kind of unhelpful and I might have to do something hacky with BeautifulSoup like what I'm also working on with my Twitter, Threads, and YouTube accounts. They're all very hostile to scraping, but I'm not sure what else to do. I've also done a bit of CSS work to make things a bit easier to read.

Threads App

I'll be posting more on Threads, I was reluctant to join, since it's just another site made by another unlikable billionaire who wishes to harvest my data, but here we are. Joining out of spite, I suppose. I've been on Instagram for a long time, before it was acquired by Meta, so the base account was already there. Find me @nerdymark
Read more...

Too spicy for Twitter

One of my alt accounts, @ca_cryptids, was suspended while posting a series of 1000 Trump-related AI-generated images. Someone's feelings must have been hurt. I've moved the content to Flickr, and it is being presented here via the API.
Too spicy for Twitter
Read more...

Small site update

I use Flask-Talisman to manage security contexts and I did not have all of my external sources set up correctly. I've fixed that now.

I think I need a database.

I've been trying to avoid using a database, this is running off a JSON file. I think I need to switch to a database. I want persistent comments, image blobs, and other things. I'm going to try to use Amazon RDS for this.