Skip to content

Instantly share code, notes, and snippets.

@Bahus
Bahus / json_schemed_field.py
Last active February 28, 2025 10:07
Django JSONField with Pydantic schema support
from functools import partial
import pydantic
import logging
from django.contrib.postgres.fields import JSONField
from typing import Type, Union, Tuple
from django.core.serializers.json import DjangoJSONEncoder
@christippett
christippett / rclone-cron.sh
Last active February 1, 2025 22:21 — forked from jaredmales/rclone-cron.sh
An rclone backup script for cron
#!/bin/bash
##############################################################################
# An rclone backup script by Chris Tippett ([email protected])
#
# Originally adapted from the great work by Jared Males ([email protected])
# https://gist.github.com/jaredmales/2f732254bb10002fc0549fa9aa0abdd7
#
# Copyright (C) 2020 Chris Tippett ([email protected])
#
@codingforentrepreneurs
codingforentrepreneurs / Django for Jupyter.md
Last active April 11, 2025 05:02
Django Setup for use in Jupyter Notebooks

Django for Jupyter

It's true packages exist to make it "easy" to use Django inside of a jupyter notebook. I seem to always run into issues successfully running these packages. I've found the below method useful although I cannot recall how I discovered how this works (aka attribution needed).

Requirements

  • Virtual Environment (virtualenv, venv, pipenv, etc)
  • Django installed & project created (we'll use the project name cfehome)
  • Jupyter installed at least in the virtual environment
@flcong
flcong / fast_split_apply_combine.ipynb
Last active March 26, 2024 02:24
Fast Split-Apply-Combine using Numba
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.