Skip to content

Instantly share code, notes, and snippets.

# We declare an abstract type, that contains the nodes and the leaves of the tree
abstract TreePart
type TreeNode{K,V} <: TreePart
key:: K
value:: V
isRed::Bool
left:: TreePart
right:: TreePart
end
@epaaso
epaaso / receiver.py
Created August 11, 2020 22:02
customer receiver
@receiver(post_save, sender=UserProfile)
def create_PLD_Customer(sender, instance, created, **kwargs):
user = instance.user
# admin_Util = adminUtils.objects.get(id=1)
customer = CustomerD.objects.get(pk=1)
# if not created:
# customer = user.Ucustomer
url_customer = UrlsPLD.objects.get(pk=2)
url_auth = UrlsPLD.objects.get(pk=5)
@epaaso
epaaso / readleaf.user.js
Last active January 25, 2023 00:11 — forked from tillahoffmann/readleaf.user.js
Readcube-Overleaf integration: Adds an "Update Library" button to Overleaf that allows you to import your Readcube library.
// ==UserScript==
// @name Readcube-Overleaf integration
// @namespace https://tillahoffmann.github.io/
// @version 0.1
// @description Adds an "Update Library" button to Overleaf that allows you to import your Readcube library.
// @author Till Hoffmann
// @match https://www.overleaf.com/*
// @connect readcube.com
// @grant GM_xmlhttpRequest
// ==/UserScript==