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
r""" | |
This requires to have the library (pkg) pre-installed. | |
Usage: | |
$ python ./py2mermaid.py --pkg pandas | |
$ python ./py2mermaid.py --pkg pandas --base-module pandas.core | |
$ python ./docs/diagrams/py2mermaid.py --pkg pandas --base-module pandas.core | |
$ python ./docs/diagrams/py2mermaid.py --pkg pandas --base-module pandas.core --raw | sed "s/\w\.\(\w\)/\U\1/g" | |
Note: based on https://gist.github.com/Zulko/e0910cac1b27bcc3a1e6585eaee60121 |
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 is an adjusted version of the official simpletreemodel[1] that adds lazy loading and uses a dict as backend. | |
Instead of the dict it could also use a database or similar. Items are only loaded when expanded, which allows | |
for speedy startup-time, even with 2.5m items. | |
1: https://github.com/baoboa/pyqt5/tree/master/examples/itemviews/simpletreemodel | |
""" | |
import sys |
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
def get_window_id(name): | |
import Xlib.display | |
d = Xlib.display.Display() | |
r = d.screen().root | |
window_ids = r.get_full_property( | |
d.intern_atom('_NET_CLIENT_LIST'), Xlib.X.AnyPropertyType | |
).value |
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
""" | |
dpx.py | |
Read Metadata and Image data from 10-bit DPX files in Python 3 | |
Copyright (c) 2016 Jack Doerner | |
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 |
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 | |
# -*- coding: utf-8 -*- | |
""" | |
Memory-aware LRU Cache function decorator | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
A modification of the builtin ``functools.lru_cache`` decorator that takes an | |
additional keyword argument, ``use_memory_up_to``. The cache is considered full | |
if there are fewer than ``use_memory_up_to`` bytes of memory available. |
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
''' | |
Created on Feb 8, 2013 | |
@author: matthieuc | |
@contact: [email protected] | |
''' | |
import PySide.QtGui as QtGui | |
def setNukeZeroMarginsWidget(widget_object): |