pipx --version
0.16.3
pipx install --include-deps jupyterlab
pipx inject jupyterlab matplotlib numpy jupyter-console scipy simpy sympy
pipx inject jupyterlab arrow pandas tabulate isort black jupyterlab_code_formatter
""" | |
Add `# noqa: FXXX` comments to all lines with violations from flake8 | |
""" | |
# MIT License | |
# | |
# Copyright (c) 2022 Alex Riina | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal |
[Interface] | |
# Configuration for the server | |
# Set the IP subnet that will be used for the WireGuard network. | |
# 10.222.0.1 - 10.222.0.255 is a memorable preset that is unlikely to conflict. | |
Address = 10.222.0.1/24 | |
# The port that will be used to listen to connections. 51820 is the default. | |
ListenPort = 51820 |
#!/usr/bin/env python | |
# file : nagiosTelegram.py | |
# purpose : send nagion notifications via Telegram bot | |
# | |
# author : harald van der laan | |
# date : 2017/04/01 | |
# version : v1.0.1 | |
# | |
# changelog: |
# This file provides a base Command class that handles sending errors via mail_admins | |
# Make sure to adjust the LOGGING variable in settings | |
# Credit to Abdulla Diab: https://mpcabd.xyz/make-django-management-commands-send-errors-email-admins/ | |
import sys | |
import logging | |
from django.core.management import BaseCommand | |
logger = logging.getLogger('management.command') |
Recently, I deleted some files by mistake in a Ubuntu machine with an ext4 fs. These notes document the steps I took to get them back.
With that out the way, let's begin.
""" | |
Logical deletion for Django models. Uses is_void flag | |
to hide discarded items from queries. Overrides delete | |
methods to set flag and soft-delete instead of removing | |
rows from the database. | |
""" | |
from django.apps import apps | |
from django.contrib.admin.utils import NestedObjects | |
from django.db import models | |
from django.db.models import signals |