Version: 1.0.0 Protocol Version: 2024-11-05 Last Updated: 2026-01-10
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
| import datetime | |
| import io | |
| import os | |
| import requests | |
| import shutil | |
| import time | |
| class ShotgunMediaIO: | |
| # Note: chunk_size must be greater than 5,000,000 |
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
| ''' | |
| Template class for docking a Qt widget to maya 2017+. | |
| Author: Lior ben horin | |
| 12-1-2017 | |
| ''' | |
| import weakref | |
| import maya.cmds as cmds | |
| import maya.OpenMayaUI as omui |
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
| """ | |
| MIT License | |
| Copyright (c) [year] [fullname] | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is |
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
| ''' pqt_tableview3.py | |
| explore PyQT's QTableView Model | |
| using QAbstractTableModel to present tabular data | |
| allow table sorting by clicking on the header title | |
| used the Anaconda package (comes with PyQt4) on OS X | |
| (dns) | |
| ''' | |
| #coding=utf-8 |
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
| // fragment shader one-liners | |
| // note: some might break for timing reasons (iDate.a/iDate.w) and some for compatibility reasons ("f+=" on a Mac, f.e.) | |
| // | |
| // void mainImage( out vec4 f, vec2 p ) | |
| // and then... | |
| // "flames (red)" | |
| {f=vec4(p.x/p.y*mod(sin(p.x-iDate.a),.001*length(p-.9)),.2,.5,1.0);} | |
| // "rain (small)" |
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
| <?php | |
| // Add Downloadable Products to Woocommerce Completed Order & Invoice Emails as Attachments | |
| function woocommerce_emails_attach_downloadables($attachments, $status, $order) { | |
| if ( ! is_object( $order ) || ! isset( $status ) ) { | |
| return $attachments; | |
| } | |
| if ( empty( $order ) ) { | |
| return $attachments; |
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 math | |
| def rgb_to_hsv(r, g, b): | |
| r = float(r) | |
| g = float(g) | |
| b = float(b) | |
| high = max(r, g, b) | |
| low = min(r, g, b) | |
| h, s, v = high, high, high |
NewerOlder