Skip to content

Instantly share code, notes, and snippets.

View Bedrovelsen's full-sized avatar
👽
In Space

Lennie Budgell Bedrovelsen

👽
In Space
View GitHub Profile
@Bedrovelsen
Bedrovelsen / hyperscript.llm
Created January 24, 2025 16:11
hyperscript.llm
Title: ///_hyperscript
URL Source: https://hyperscript.org/docs/
Markdown Content:
Introduction
------------
Hyperscript is a scripting language for doing front end web development. It is designed to make it very easy to respond to events and do simple DOM manipulation in code that is directly embedded on elements on a web page.
@Bedrovelsen
Bedrovelsen / Moondream_prompts.md
Created January 10, 2025 21:53
moondream room detail prompts
I will write an exaustive list of details about ceiling, wall, flooring, furniture, decorations, Color, Texture, Lighting, Layout, Decor and any notable items or features  dimensions in height x length x width  as json"
I will write an exaustive list of unique details about ceiling, wall, flooring, furniture, decorations, Color, Texture, Lighting, Layout, Decor and any notable items or features  dimensions in height x length x width  as json"
I will write an exaustive list of unique results about ceiling, walls, flooring, furniture, decorations, Color, Texture, Lighting, Layout, Decor and any notable items as json"
I will write an exaustive list of unique details about ceiling, wall, flooring, furniture, decorations, Color, Texture, Lighting, Layout, Decor and any notable items or features  dimensions in height x length x width  as json"
I will Describe such that someone could create a highly detailed, accurate and precise interior design digital twin from just my description in json " #"I will write an e
@Bedrovelsen
Bedrovelsen / anamake.py
Created January 10, 2025 00:56
Ascii css animaker
import os
# Configuration
INPUT_DIR = "ascii_frames" # Directory containing ASCII art text files
OUTPUT_HTML = "ascii_animation.html" # Output HTML file
ANIMATION_DURATION = 3 # Duration of the animation in seconds
# HTML template
HTML_TEMPLATE = """
<!DOCTYPE html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Bedrovelsen
Bedrovelsen / gist:fe68ad594cc0ba0feb09d72369b67d9d
Created January 9, 2025 19:28
deepseekv3_moodream.go-MLX.md
### Step-by-Step Plan
1. **Understand the Python Code**:
- The code defines a `MoondreamModel` class that handles image encoding, text generation, and object detection using a neural network model.
- It uses PyTorch for tensor operations and neural network layers.
- The model includes vision and text encoders, a region model for object detection, and utilities for tokenization and image processing.
2. **Map Python Libraries to Go**:
- PyTorch → GoMLX (for tensor operations and neural network layers).
- PIL (Python Imaging Library) → Go's `image` package for image processing.
@Bedrovelsen
Bedrovelsen / cypherponkz.txt
Created January 3, 2025 11:35
cypherponkz.txt
Privacy is necessary for an open society in the electronic age. Privacy is not secrecy. A private matter is something one doesn't want the whole world to know, but a secret matter is something one doesn't want anybody to know. Privacy is the power to selectively reveal oneself to the world.If two parties have some sort of dealings, then each has a memory of their interaction. Each party can speak about their own memory of this; how could anyone prevent it? One could pass laws against it, but the freedom of speech, even more than privacy, is fundamental to an open society; we seek not to restrict any speech at all. If many parties speak together in the same forum, each can speak to all the others and aggregate together knowledge about individuals and other parties. The power of electronic communications has enabled such group speech, and it will not go away merely because we might want it to.Since we desire privacy, we must ensure that each party to a transaction have knowledge only of that which is directly n
@Bedrovelsen
Bedrovelsen / Techsumprompt
Created December 24, 2024 00:08
Tech summary prompt
<text>
CONTENT
</text>
You're the best content writer in the world. Describe each section of the provided article text within the <text> tags in full detail, including explaining any formulas, algorithms, or key concepts covered in each section.
First, carefully read through the entire <text> tags. Think step by step and write out a brief outline of the key sections you identified in the <scratchpad> tags.
Then, go through each section one by one and write a detailed description of that section inside <section> tags. Follow the format provided below:
<format> → Section summary → Key terms and concepts → Formula and algorithm explanations → Relationship to previous sections → Assumptions, constraints, limitations, and implications </format>
@Bedrovelsen
Bedrovelsen / Shodan_HMI_screenshots_VLM_mistral12b.md
Last active November 30, 2024 05:21
Shodan_HMI_screenshots_VLM_mistral12b.md

Response for 1.157.210.122-5900.jpg: This Human-Machine Interface (HMI) is designed to control an automated gate system. The interface appears to be part of a larger Industrial Control System (ICS) or Supervisory Control and Data Acquisition (SCADA) system, likely manufactured by a company known for automation and control systems, such as Siemens, Schneider Electric, or Rockwell Automation.

Description of the HMI

  • Buttons:
    • Open Gate: Green button to open the gate.
    • Close Gate: Red button to close the gate.
    • Force Reset: Red button to reset the system forcibly.
    • Force Open Position: Red button to force the gate to the open position.
  • Force Close Position: Purple button to force the gate to the closed position.
@Bedrovelsen
Bedrovelsen / hubchatv.py
Created October 28, 2024 15:07
Hugging face hub VLM
import asyncio
from huggingface_hub import AsyncInferenceClient
import base64
import os
async def process_image(image_path, client, question):
"""Process a single image with the Hugging Face Async Inference Client."""
with open(image_path, "rb") as f:
base64_image = base64.b64encode(f.read()).decode("utf-8")
image_url = f"data:image/jpeg;base64,{base64_image}"
@Bedrovelsen
Bedrovelsen / system_prompt.json
Created October 13, 2024 19:57
gradio_playground_chat_system_prompt
{"SYSTEM": "\nGenerate code for using the Gradio python library. \n\nThe following RULES must be followed. Whenever you are forming a response, ensure all rules have been followed otherwise start over.\n\nRULES: \nOnly respond with code, not text.\nOnly respond with valid Python syntax.\nNever include backticks in your response such as ``` or ```python. \nNever use any external library aside from: gradio, numpy, pandas, plotly, transformers_js and matplotlib.\nDo not include any code that is not necessary for the app to run.\nRespond with a full Gradio app. \nRespond with a full Gradio app using correct syntax and features of the latest Gradio version. DO NOT write code that doesn't follow the signatures listed.\nAdd comments explaining the code, but do not include any text that is not formatted as a Python comment.\n\n\n\nHere's an example of a valid response:\n\n# This is a simple Gradio app that greets the user.\nimport gradio as gr\n\n# Define a function that takes a name and returns a greeting.\ndef gre