Skip to content

Instantly share code, notes, and snippets.

View un1tz3r0's full-sized avatar
😵
Distracted

Victor Condino un1tz3r0

😵
Distracted
View GitHub Profile
@un1tz3r0
un1tz3r0 / README.md
Created June 29, 2024 02:29
Python: get list of ollama models from ollama.com/library

Scrape model listings from ollama.com/library

This is some helper code I wrote to list models available on ollama.com. It returns a list of models with a little metadata about each one, just what's visible on the site.

Useful mostly for command line junkies like myself, so you can see what options you have for doing ollama pull <modelname> when downloading new models to try out.

@un1tz3r0
un1tz3r0 / journal-reactor.py
Created May 8, 2024 20:46 — forked from leoluk/journal-reactor.py
Example code that demonstrates how to listen to journald using Python 3 + asyncio.
#!/usr/bin/python3 -u
import asyncio
import sh
from systemd import journal
from systemd.daemon import notify
GATEWAY_IP = "192.168.10.1"
@un1tz3r0
un1tz3r0 / refusal_demo.ipynb
Last active June 21, 2024 07:17
refusal_demo.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@un1tz3r0
un1tz3r0 / README.md
Created February 23, 2024 08:07
Gemini Generated Prompts

A Series Of Essays By Gemini AI

2024-02-23

These prompts were generated by Gemini, using the prompt, "generate some prompts that might give interesting results when fed into an llm like yourself, gemini". The resulting list was then split and fed back into Gemini as prompts. This has recently been studied as a technique to improve LLM output quality. Here are the prompts and results...


Imagine a world where humans and AI coexist peacefully, and collaborate on creative projects. How would this impact society, culture, and the future of humanity?

In a world where humans and AI coexist peacefully and collaborate on creative projects, the impact on society, culture, and the future of humanity would be profound:

@un1tz3r0
un1tz3r0 / README.md
Created February 21, 2024 06:47
Q&A With Gemini Advanced

Question:

What is a single belief that, if changed, would drastically alter the way you live your life?

Answer:

Belief to be Changed:

"I am not capable of achieving great things."

Altered Lifestyle:

@un1tz3r0
un1tz3r0 / README.md
Last active October 8, 2023 23:44
Poetry generated by the new streaming-llm code and paper out of MIT this week... Did some prompt engineering and used a word list compiled by my dear friend and wordsmith Craig Leaf. Enjoy.

Poetry generated by the new streaming-llm code and paper out of MIT this week... Did some prompt engineering and used a word list compiled by my dear friend and wordsmith Craig Leaf. Enjoy. - Victor Condino, Oct 8th, 2023

The model used was stability.ai's vicuna-13b, running on a single 3090ti GPU.

Write a verse of a poem using the following list of phrases: Last Call, Last Night, Free food, Pizza, Non Stop

Last call for all the hungry souls,
Last night we feasted on pizza rolls,
Free food flowing like a river,
Non-stop laughter and joy ever-presenter.

At the time of my writing this October 7th, 2023, a viral reddit post to /r/midjourney of some AI art has inspired a slew of spin-offs and a huge number of views and replies.

"Is this AI or not? This is the first thing I've ever seen where I can't tell if it's AI or not and it's really bugging me, help!"

These have really led me to question some of my exuberance and optimism that I had for AI art initially when I started making it with neural style transfer and stylegan, then moved up to fine-tuning disco diffusion. Until recently I had held out hope that, that lowering the barrier to entry for making art and self expression would be a wonderful thing, and that it would make the world a more beautiful place. This sentiment was generally shared among the smallish community of brilliant ML researchers and developers that were laying the foundations, conceptually, of the powerful generative tools we hav

@un1tz3r0
un1tz3r0 / getpngmetadata.py
Created September 30, 2022 05:14
Example of how to extract prompt and seed (and other parameters) from PNG files generated by stablediffusion
import png, pathlib
def getpngmetadata(filename):
d = {}
with open(filename, "rb") as fh:
try:
for chnk in png.Reader(fh).chunks():
if chnk[0] == b'tEXt' and b'\x00' in chnk[1]:
k, v = chnk[1].split(b'\x00', 1)
d[k] = v
@un1tz3r0
un1tz3r0 / randomcrops.py
Last active August 15, 2022 03:16
generate a dataset for clip diffusion from images in a directory
from PIL import Image
from io import BytesIO
def pure_pil_alpha_to_color_v2(image, color=(255, 255, 255)):
"""Alpha composite an RGBA Image with a specified color.
Simpler, faster version than the solutions above.
Source: http://stackoverflow.com/a/9459208/284318