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, QtGui | |
reference_date = QtCore.QDate(2025, 4, 7) | |
SAMPLE_TICKET_DATA = [ | |
{ | |
"id": "PIPE-101", | |
"summary": "Fix pipeline issue", | |
"assignee": "Alice Tinker", | |
"comments": 2, |
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 QtCore | |
from types import SimpleNamespace | |
from dataclasses import dataclass | |
from typing import Dict, List, Optional, Union | |
WidgetType = SimpleNamespace( | |
TEXT_INPUT="text_input", | |
DROPDOWN="dropdown", | |
SPINBOX="spinbox", | |
CHECKBOX="checkbox", |
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
# Copyright CC-BY 4.0 Alex Telford, minimaleffort.tech | |
""" This is the code used to create the minimap in the graph editor, | |
It was just a quick test so this code is a bit shit, but it works. | |
If you want to take this further and make it a proper tool go for it, | |
I appreciate attribution or a linkback but don't care that much. | |
""" | |
from PySide2 import QtWidgets, QtGui, QtCore | |
from maya import OpenMaya, OpenMayaAnim | |
from maya import cmds |
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
import os | |
import sys | |
import time | |
import random | |
from pathlib import Path | |
import threading | |
from typing import List, IO, Optional | |
# Global registry of open file handles | |
open_file_handles: List[IO[bytes]] = [] |
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
# CC-0 license, I put very little effort into setting this up so it may behave sporadically at times. | |
# To run this you need to install the following: | |
# pip install requests PySide6 difflib psutil | |
# You also need to install ollama from https://ollama.ai/ | |
# Then pull the following models: | |
# ollama pull gemma3:1b | |
# see more models at https://ollama.ai/models |
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
""" | |
This example demonstrates aims to deomonstrate three simple concepts: | |
1. How we can retrieve data from a remote network asyncronously | |
1a. How we can load and display images from a remote network asynchronously | |
2. How to display remote images inside a model view | |
3. How to use data model mapping to edit a model | |
I have not added any "prettty visuals" or error checking. | |
This is purely to get you started with the concepts, it is on you to take this further depending on your own requirements. |
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 difflib import SequenceMatcher | |
try: | |
from PySide6 import QtCore, QtGui, QtWidgets | |
except ImportError: | |
from PySide2 import QtCore, QtGui, QtWidgets | |
class FilterModel(QtCore.QSortFilterProxyModel): | |
""" A simple filter model based on sequencematcher quick_ratio. |
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 PySide2 import QtWidgets, QtCore # or PySide6 for Maya 2025+ | |
import maya.cmds as mc | |
import maya.mel as mm | |
def my_super_long_function(): | |
print("Running a long function here") | |
# Do some initial prep | |
cube, _ = mc.polyCube() | |
sphere, _ = mc.polySphere() | |
cone, _ = mc.polyCone() |
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
# Copyright (C) 2024 Alex Telford | |
# http://minimaleffort.tech | |
# This work is licensed under the Creative Commons Attribution 4.0 International License. | |
# To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ or send a letter to Creative Commons, | |
# PO Box 1866, Mountain View, CA 94042, USA. | |
# Distributed without any warranty or liability, use at your own risk | |
# This is an example of deffering code using Qt event loops | |
try: | |
from PySide6 import QtCore, QtWidgets |
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
# Copyright (C) 2024 Alex Telford | |
# http://minimaleffort.tech | |
# This work is licensed under the Creative Commons Attribution 4.0 International License. | |
# To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ or send a letter to Creative Commons, | |
# PO Box 1866, Mountain View, CA 94042, USA. | |
# Distributed without any warranty or liability, use at your own risk | |
# This script allows you to click a widget to get information about it's internals in Qt. | |
# There is so much more you can do with the metaobject system in Qt, but hopefully this gets you started |