This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--connect to MotherDuck databases | |
-- configure MOTHERDUCK_TOKEN and run DuckDB that connects to all shared Databases with | |
-- `duckdb "md:"` | |
-- and then run this query: | |
WITH language_counts AS ( | |
SELECT | |
language, | |
COUNT(*) AS count | |
FROM ( | |
SELECT UNNEST(STRING_SPLIT(LanguageHaveWorkedWith, ';')) AS language |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Inspired by https://gist.github.com/Bilbottom/e1d3d677d2479e0602132327703ff15d | |
-- Fixed datatypes that don't render in mermaid (structs, decimal etc.) | |
-- Uses 1:n as base, cardinalities are hard to derive | |
-- Looks for column comments | |
-- Avoids regex. | |
COPY ( | |
WITH hlp AS ( | |
SELECT referenced_table, c.table_name, | |
trim(string_agg(d.comment, ' ')) AS comment, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Query the API directly and flatten the nested JSON structure | |
WITH raw_data AS ( | |
SELECT * FROM read_json_auto('https://public.api.bsky.app/xrpc/app.bsky.feed.getAuthorFeed?actor=did:plc:edglm4muiyzty2snc55ysuqx&limit=10') | |
), | |
unnested_feed AS ( | |
SELECT unnest(feed) as post_data FROM raw_data | |
) | |
SELECT | |
-- Post basics | |
post_data.post.uri as post_uri, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
mt940toOFX.py - Dieses Progrtamm liesst MT940 SWIFT Kontostände und konvertiert sie in OFX. | |
OFX wurde mit xero.com getestet. | |
Created by Maximillian Dornseif on 2010-06-05. | |
Copyright (c) 2010, 2013, 2014 HUDORA. All rights reserved. | |
""" |