Skip to content

Instantly share code, notes, and snippets.

View gwpl's full-sized avatar

Grzegorz Wierzowiecki gwpl

  • Europe - usually: Zürich, Warsaw or Berlin
View GitHub Profile
@jlia0
jlia0 / agent loop
Last active April 19, 2025 08:24
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
@gwpl
gwpl / cargo-example-select
Last active February 13, 2025 21:25
cargo-example-select - Script for selecting Rust examples comfortably
#!/bin/bash
# cargo-example-select - Script for selecting Rust examples comfortably
# run with --loop --clear for fun, e.g. in ratatui repo:
# git clone https://github.com/ratatui/ratatui.git && cd ratatui && cargo-example-select --loop --clear
# Published: https://gist.github.com/gwpl/f78af717785959ac81ec1fc21fb6056f
# Retrieve example names via cargo metadata and jq.
examples=$(cargo metadata --no-deps --format-version 1 | jq -r \
@gwpl
gwpl / about.md
Last active November 4, 2024 15:09
wikipedia_multistep_rag.py # Educational example showing how to extend llm_lottery.py [1] example to wikipedia_mini_rag.py example [2] to make agent that will continue searching and reading pages until achieves objective.

Wikipedia Multi-step RAG Example Solution to Task from wiki_mini_rag.py

You may want to see code and task first: wiki_mini_rag

This GitHub gist provides a solution to a task from the wikipedia_mini_rag.py example wiki_mini_rag, which was "How to turn Agent that first searches wikipedia and later reads article to answer query, into one that will continue searching and reading until has sufficient data. Hint: use insight from llm_lottery.py llm_lottery example.".

@gwpl
gwpl / Dockerfile.aur
Last active March 24, 2025 06:32
AUR in Dockerfile ArchLinux -> pacaur yay non-interactive etc (experiment)
# Making AUR work inside Dockerfile in non interactive way.(experiment)
# Use an official Arch Linux runtime as a parent image
FROM archlinux:latest
# Maintainer
LABEL maintainer="[email protected]"
# Update system and install dependencies (we do not modify this step for docker caching)
RUN pacman -Sy --noconfirm archlinux-keyring && \
pacman-key --init && \
@gwpl
gwpl / Example_Outputs.md
Last active September 6, 2024 12:10
Vector Embeddings Algebra Tests

Exmaple outputs

Ollama with mxbai-embed-large

similarities between "queen-woman+man" and ... = {'queen': 0.7664688552859836, 'woman': 0.16067344014964902, 'man': 0.643216410618745, 'king': 0.5296803458540953, 'knight': 0.36225247833752694, 'carpenter': 0.7134908064255635, 'baker': 0.723708193109565, 'girl': 0.734322206946502, 'boy': 0.7525008550380998}
similarities between "queen-girl+boy" and ... = {'queen': 0.9750610709453384, 'woman': 0.5392273263146471, 'man': 0.5579780738003502, 'king': 0.5312961528030734, 'knight': 0.5244125308085369, 'carpenter': 0.8835927517707559, 'baker': 0.9011729720423287, 'girl': 0.9227513575082695, 'boy': 0.9679081680297743}
similarities between "queen-woman-girl+man+boy" and ... = {'queen': 0.7059391012944155, 'woman': 0.11622645526937725, 'man': 0.6346237227600416, 'king': 0.5228061118283761, 'knight': 0.3225914898607214, 'carpenter': 0.6156882192910788, 'baker': 0.6321456800653157, 'girl': 0.6540596727195828, 'boy': 0.7065316024823556}
@lokesh1729
lokesh1729 / notion_rename_exported_files.py
Last active January 8, 2024 12:20
When you export your notion notes, they will be exported with a 32 random character suffix. This script removes them.
import os
import re
import logging
def rename_it(dirpath, path_suffix, is_dir):
pattern = r"([a-zA-Z0-9\s\+\&\']+)\s([a-z0-9]{32})"
match = re.match(pattern, path_suffix)
if match is not None:
if is_dir:
@gwpl
gwpl / Voting for portfolio distribution problem.md
Last active September 11, 2023 09:23
Voting Mechanisms and Weighted Analysis Dilemmas, for Portfolio, Crowdfundig, Majority overshadowing Problem and more.

Voting Mechanisms and Weighted Analysis Dilemmas, for Portfolio, Crowdfundig, Majority overshadowing Problem and more.

Tweet: https://twitter.com/GWierzowiecki/status/1701162675084947892

Introduction:

A decentralized system is envisioned wherein fractional owners of a portfolio contribute to decision-making regarding the distribution of funds among tokens. As a simple example, consider tokens named A, B, C, D...

@veekaybee
veekaybee / normcore-llm.md
Last active April 19, 2025 04:59
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@gwpl
gwpl / by_G_foaf_example.ttl
Created October 30, 2022 15:51
by G foaf example, showing simple queries progressing step by step with outputs; run using Apache Jena ; based on https://jena.apache.org/tutorials/sparql.html and https://gitlab.com/gwpl/rdf_20q4
@prefix dc: <http://purl.org/dc/elements/1.1/>.
@prefix ex: <http://example.org/stuff/1.0/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix vs: <http://www.w3.org/2003/06/sw-vocab-status/ns#>.
@prefix wot: <http://xmlns.com/wot/0.1/>.
@prefix xml: <http://www.w3.org/XML/1998/namespace>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@lmmx
lmmx / diarise.py
Last active April 2, 2025 02:27
Python commands to create speaker diarisation
# ffmpeg -i foo.m4a foo.wav
from pyannote.audio import Pipeline
pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization")
diarization = pipeline("foo.wav")
# RTTM format https://catalog.ldc.upenn.edu/docs/LDC2004T12/RTTM-format-v13.pdf
with open("foo.rttm", "w") as rttm:
diarization.write_rttm(rttm)