Skip to content

Instantly share code, notes, and snippets.

View gaardhus's full-sized avatar
🐙
Just another octopus floating in space

Tobias Gårdhus gaardhus

🐙
Just another octopus floating in space
View GitHub Profile
@gaardhus
gaardhus / network-0c793dc1-ee7.gexf
Created February 15, 2023 16:26
File sent from Gephi
<?xml version='1.0' encoding='UTF-8'?>
<gexf xmlns="http://gexf.net/1.3" version="1.3" xmlns:viz="http://gexf.net/1.3/viz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://gexf.net/1.3 http://gexf.net/1.3/gexf.xsd">
<meta lastmodifieddate="2023-02-15">
<creator>Gephi 0.10.1</creator>
<title></title>
<description></description>
</meta>
<graph defaultedgetype="undirected" mode="static">
<attributes class="node" mode="static">
<attribute id="d4" title="url" type="string"/>
@gaardhus
gaardhus / network-2e3e88f5-66b.gexf
Last active February 15, 2023 17:22
File sent from Gephi
<?xml version='1.0' encoding='UTF-8'?>
<gexf xmlns="http://gexf.net/1.3" version="1.3" xmlns:viz="http://gexf.net/1.3/viz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://gexf.net/1.3 http://gexf.net/1.3/gexf.xsd">
<meta lastmodifieddate="2023-02-15">
<creator>Gephi 0.10.1</creator>
<title></title>
<description></description>
</meta>
<graph defaultedgetype="undirected" mode="static">
<attributes class="node" mode="static">
<attribute id="d4" title="url" type="string"/>
@gaardhus
gaardhus / network-daaac12e-4a6.gexf
Created March 5, 2023 20:26
File sent from Gephi
This file has been truncated, but you can view the full file.
<?xml version='1.0' encoding='UTF-8'?>
<gexf xmlns="http://gexf.net/1.3" version="1.3" xmlns:viz="http://gexf.net/1.3/viz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://gexf.net/1.3 http://gexf.net/1.3/gexf.xsd">
<meta lastmodifieddate="2023-03-05">
<creator>Gephi 0.10.1</creator>
<title></title>
<description></description>
</meta>
<graph defaultedgetype="undirected" mode="static">
<attributes class="node" mode="static">
<attribute id="d4" title="url" type="string"/>
@gaardhus
gaardhus / Makefile
Created February 7, 2024 15:08
Create an ERD from a sqlite database using schemaspy
db-name=database
path-to-db=./data
db-ext=sqlite
output-directory=./docs/diagrams
output-file=diagram.png
db-diagram:
schemaspy -dp /usr/share/java/sqlite-jdbc/ \
-t sqlite-xerial \
-cat ${db-name} -s ${db-name} -db ${path-to-db}/${db-name}.${db-ext} \
-sso -o /tmp/schemaspy/ && \
@gaardhus
gaardhus / db_client_from_sqlmodels.py
Last active August 16, 2024 13:12
Added sync client as well
from __future__ import annotations
import inspect
from functools import wraps
from typing import List, Optional, Type
from sqlalchemy.ext.asyncio import create_async_engine
from sqlmodel import Session, SQLModel, create_engine, select
from sqlmodel.ext.asyncio.session import AsyncSession