This file contains 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
import inspect | |
import logging | |
import shutil | |
import sys | |
from time import time | |
from types import MethodType | |
from typing import Optional | |
from django.conf import settings | |
from django.db import DEFAULT_DB_ALIAS, connections |
This file contains 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
import proplot as plt, cmasher as cmr, pandas as pd, numpy as np, os, sys, networkx as nx, warnings | |
def multilayer_layout( | |
G: nx.Graph, | |
subset_key="layer", | |
layout=nx.spring_layout, | |
separation: float = 10.0, | |
) -> dict: | |
# set positions |
This file contains 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
# input: all layers | |
# save path: save_layerpath project property / current project majority path | |
# replaces all postgis datasources with gpkg! | |
########################## | |
from qgis.utils import iface | |
from qgis.core import * | |
from qgis.PyQt.QtWidgets import * | |
from PyQt5.QtCore import * | |
from processing.tools import dataobjects |
This file contains 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
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
import uuid | |
from django.db import migrations, models | |
def fill_mymodel_uuid(apps, schema_editor): | |
db_alias = schema_editor.connection.alias | |
MyModel = apps.get_model('myapp', 'MyModel') |