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
@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 May 6, 2024 16:10
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 November 7, 2023 21:37
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)
@luisgagocasas
luisgagocasas / docker-compose.yml
Created December 28, 2021 16:43 — forked from stuart-warren/docker-compose.yml
Start chrome with docker-compose (helps with aws greengrass iot core also)
version: "3.8"
services:
chrome:
network_mode: "host"
image: jess/chrome
environment:
DISPLAY: 'unix:0'
volumes:
- /run/dbus/system_bus_socket:/run/dbus/system_bus_socket
@eteplus
eteplus / logseq-enhanced-theme.css
Created November 3, 2021 01:59
logseq enhanced theme
.block-children {
border-left-width: var(--ls-block-bullet-threading-width);
}
.block-content-wrapper {
position: relative;
}
.bullet-container {
height: 14px !important;
#![allow(dead_code)]
// playground: https://gist.github.com/rust-play/6d697a29901d4b82cc8b184526d4b8f1
fn all_postfixes_sorted(arr: &[&str]) -> Vec<String> {
let mut postfixes: std::collections::HashSet<String> = std::collections::HashSet::new();
for &w in arr {
for start_idx in 0..(w.chars().count()) {
let slice: &str = &w[start_idx..];
let w = String::from(slice);
#![allow(dead_code)]
// https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=bda017580640d3b70ea211bec7e9038b
// Task: sorted postfixes for given list of strings
// Example: bcd -> bcd,cd,d
// Example: abc,bcd,xyz -> abc,bc,bcd,c,cd,d,xyz,yz,z
fn all_postfixes_sorted(arr: &[&str]) -> Vec<String> {
let mut postfixes: std::collections::HashSet<String> = std::collections::HashSet::new();
for &w in arr {
@madawei2699
madawei2699 / custom.css
Last active March 11, 2024 07:32
logseq/custom.css
/*
/* Theme custom css start
/* https://raw.githack.com/dracula/logseq/master/custom.css
*/
@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;700&family=Fira+Sans:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap");
:root {
--background: #282a36;
--light-background: #343746;