Skip to content

Instantly share code, notes, and snippets.

@danslinky
danslinky / mbox.ipynb
Created June 10, 2024 19:55
exploring an gmail mbox using python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@danslinky
danslinky / runpod-automatic1111.py
Last active June 9, 2024 22:47
A text-to-image toy that creates images on a serverless # [RunPod](https://www.runpod.io/) endpoint.
# %% [markdown]
# # RunPod Automatic1111 Stable Diffusion
#
# A text-to-image toy that creates images on a serverless
# [RunPod](https://www.runpod.io/) endpoint. Enter a prompt,
# using the form or function.
#
# ```py
# new("a cow in space")
# ```
@danslinky
danslinky / multithreaded-job-process.py
Last active June 2, 2024 20:57
Python multi-threaded worker pool to process jobs, with status and execution time.
# %%
from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor, as_completed
import random
import time
import os
import pandas as pd
file_blacklist = ['file2.pdf', 'malware2.txt']
@danslinky
danslinky / falling-slinky-vpython.py
Created May 26, 2024 01:30
A falling Slinky in vpython
from vpython import *
import numpy as np
# Parameters
n = 200 # Increased number of segments for a longer slinky (smoother turns)
radius = 5.0 # Radius of the helical path (width of the slinky)
dt = 0.005 # Time step in seconds
endtime = 1 # Total simulation time in seconds
iters = round(endtime / dt) # Number of iterations to run the simulation, rounded to the nearest integer
@danslinky
danslinky / national-parks.ipynb
Last active May 6, 2024 20:11
Daily Trivia: Do you know your UK National Parks?
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@danslinky
danslinky / 4rxehd0d9sx9cpjz.jpg
Last active March 19, 2024 12:54
python image OCR to detect Etsy scam accounts
4rxehd0d9sx9cpjz.jpg
@danslinky
danslinky / README.md
Created February 28, 2024 18:15
digitalocean_droplet_wireguard_cloud-config_python

Create a DigitalOcean Droplet, using Python and cloud-config and setup some Wireguard

Code Review for DigitalOcean API Integration Script

The provided script is a Python script that interacts with the DigitalOcean API to perform various tasks related to managing resources like account info, SSH keys, VPCs, droplets, and firewalls.

Here are some aspects to consider for a code review:

Code Structure

  • The script is well-structured with functions for different API calls, which helps in maintaining and understanding the code.
@danslinky
danslinky / .co.uk.md
Last active February 25, 2024 22:31

🆂🅼🅰🆁🆃🆈

🆂🅺🅸🅿🅿🆈

🆂🅺🅸🅽🅽🆈

🆂🆃🅸🅽🅺🆈

🆂🅻🅸🅽🅺🆈

click here

@danslinky
danslinky / SlinkedIn.md
Last active February 19, 2024 23:54
SlinkedIn Headline

Headline

HEADLINE=">_ wall GoogleNU/Platform TerraClicking, Skinny Language Model, crying Cthulbernetes, IaC.goesbrrr@vscode.dev, DevSecFinOoops, Cost Exploring Jeffs Cloud Nativity Hellscape Engineer, with Average Intel \& MLaarch64FLOPs"

Test Results

echo $HEADLINE | wc -c
@danslinky
danslinky / hireme.md
Created February 17, 2024 19:05
Dan Slinky

# Hello, Recruiter

I’m an unemployed 🇬🇧 Millenial Linux SysAdmin looking for work.

It’s a Saturday evening in the UK and I’m spending it trying to get facetimehd to work on my debian 2015 macbook pro, and posting on #syadmin #SlinkedIn.

You can follow the breadcrumbs at https://linktr.ee/danslinky or RTFM

Now I should get back to work.