This file contains hidden or 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
| from PySide6 import QtWidgets, QtCore | |
| class SceneSpaceShadowEffect(QtWidgets.QGraphicsDropShadowEffect): | |
| """ | |
| A drop shadow effect which takes the scene space size into account. | |
| """ | |
| def __init__(self, parent=None): | |
| super().__init__(parent=parent) |
This file contains hidden or 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
| """ | |
| Generate a weak ref to a python callable accounting for loose functions, bound methods and callable classes. | |
| This allows creating references to python functions without increasing their reference countm and creating | |
| circular dependencies. | |
| """ | |
| import typing | |
| import weakref | |
| import types |
This file contains hidden or 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
| #!/usr/bin/env python3 | |
| """ | |
| wget https://gist.githubusercontent.com/rfletchr/3cb7987b4f636b6eb226c14bc141587e/raw/13d126a43f449204aa5d50635d6a517efa3f1620/prompt.py -O ~/.local/bin/prompt | |
| chmod ug+x ~/.local/bin/prompt | |
| echo 'export PROMPT_COMMAND=prompt' >> ~/.bashrc | |
| """ | |
| import sys | |
| import os |
This file contains hidden or 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
| #! /usr/bin/python3 | |
| """ | |
| This script parses a `package.py` file add adds its dependencies to a virtual environment. | |
| - find package.py in the current directory or any parent directory | |
| - extract the 'requires' variable from package.py | |
| - build the environment using `rez env` | |
| - get the site-packages path for venv's Python interpreter | |
| - create a rez.pth file in the site-packages directory | |
| - write the paths from the built environment to rez.pth |
This file contains hidden or 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
| """ | |
| A collection of classes for working with MVC in QT, including a generic table model, and an example of integrating undo via a proxy model. | |
| """ | |
| import typing | |
| from qtpy import QtCore, QtGui, QtWidgets | |
| T = typing.TypeVar("T") | |
| class SchemaColumn(typing.Generic[T]): |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "github.com/pocketbase/pocketbase" | |
| "github.com/pocketbase/pocketbase/core" | |
| ) |
OlderNewer