Skip to content

Instantly share code, notes, and snippets.

View rexissimus's full-sized avatar
💭
I may be slow to respond.

Tommy Ellqvist rexissimus

💭
I may be slow to respond.
  • Inify LAboratories AB
  • Sweden
View GitHub Profile
0 sip.so 0x0000000102fd0fe7 convertSubClass + 90
1 sip.so 0x0000000102fd0eca sip_api_convert_from_type + 139
2 sip.so 0x0000000102fd34b7 buildObject + 2241
3 sip.so 0x0000000102fd2b98 sip_api_call_method + 188
4 QtCore.so 0x0000000106202c4a sipVH_QtCore_18(PyGILState_STATE, void (*)(_sipSimpleWrapper*, PyGILState_STATE), _sipSimpleWrapper*, _object*, QObject*, QEvent*) + 106
5 QtGui.so 0x0000000103a602ca sipQMainWindow::eventFilter(QObject*, QEvent*) + 106
6 QtCore 0x0000000104ef80c7 QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject*, QEvent*) + 167
7 QtGui 0x0000000104157a76 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 38
8 QtGui 0x000000010415bd68 QApplication::notify(QObject*, QEvent*) + 232
9 QtGui.so 0x000000010390799a sipQAp
@rexissimus
rexissimus / __init__.py
Created January 29, 2015 12:55
minconn
identifier = 'org.vistrails.vistrails.minconn'
name = 'minconn'
version = '0.1'
@rexissimus
rexissimus / gist:8272d3c776ccfa115d82
Created February 11, 2015 15:45
vtk wrapping xml reading and class creation
2892199 function calls (2868430 primitive calls) in 3.761 seconds
Ordered by: cumulative time
List reduced from 70 to 20 due to restriction <20>
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.026 0.026 3.774 3.774 init.py:94(_init)
1 0.004 0.004 2.758 2.758 specs.py:57(read_from_xml)
1806 0.009 0.000 2.191 0.001 specs.py:250(from_xml)
1806 0.064 0.000 2.135 0.001 specs.py:151(from_xml)
@rexissimus
rexissimus / gist:16b74693545b5e7c1035
Created February 18, 2015 15:07
compare old and new vtk package loading time
NEW:
6222671 function calls (6195508 primitive calls) in 10.524 seconds
Ordered by: internal time
List reduced from 428 to 20 due to restriction <20>
ncalls tottime percall cumtime percall filename:lineno(function)
119/4 1.326 0.011 4.281 1.070 {__import__}
16347 0.717 0.000 1.946 0.000 specs.py:299(internal_from_xml)
Porting to Python 3
-------------------
2to3 transforms most py2 strings to py3 strings with unicode support
use bytes in module hasher
use encode=unicode in elementtree.serialize
New ordering logic
Porting to PytQt5
-----------------
Building Python 3 with PyQt5, QWebEngine, QScintilla, VTK on Windows 64bit
Install Visual C++ 2013 (I failed to get MingW working with PyQt5)
Install the vs2013 version of Qt5
Install Python 3.4 64bit
Get sip (4.17), PyQt5 (5.5.1), and QScintilla sources
Add path to qmake to PATH
@rexissimus
rexissimus / combined_rendering.py
Created June 29, 2016 14:31
Terminator Combined Rendering as python script
# Prelude
from vistrails.packages.vtk.vtk_wrapper import vvtk
# Prelude
import requests
# Prelude
from vistrails.packages.vtk.vtk_wrapper import vvtk
# Prelude
@rexissimus
rexissimus / api_example.py
Created July 6, 2016 14:56
api scripting example
import vistrails.core.api as API
from vistrails.core.modules.basic_modules import create_constant
org_vistrails_vistrails_vtk = API.load_package('org.vistrails.vistrails.vtk')
org_vistrails_vistrails_vtk_2 = API.load_package('org.vistrails.vistrails.vtk')
import requests
org_vistrails_vistrails_vtk_3 = API.load_package('org.vistrails.vistrails.vtk')
org_vistrails_vistrails_vtk_4 = API.load_package('org.vistrails.vistrails.vtk')
import vtk
org_vistrails_vistrails_vtk_5 = API.load_package('org.vistrails.vistrails.vtk')
from vistrails.core.modules.vistrails_module import ModuleConnector
@rexissimus
rexissimus / hybrid_script.py
Created July 6, 2016 14:58
hybrid scripting
import vistrails.core.api as API
from vistrails.core.modules.basic_modules import create_constant
from vistrails.core.modules.vistrails_module import ModuleConnector
org_vistrails_vistrails_url = API.load_package('org.vistrails.vistrails.url')
from vistrails.packages.vtk.vtk_wrapper import vvtk
import vtk
# MODULE 364 org.vistrails.vistrails.url:DownloadFile
# FUNCTION url url
url = 'http://www.vistrails.org/download/download.php?type=DATA&id=head.120.vtk'
@rexissimus
rexissimus / api_example2.py
Created July 13, 2016 14:53
API script example
import vistrails.core.api as API
org_vistrails_vistrails_url = API.load_package('org.vistrails.vistrails.url')
from vistrails.packages.vtk.vtk_wrapper import vvtk
import vtk
# MODULE 364 org.vistrails.vistrails.url:DownloadFile
# FUNCTION url url
url = 'http://www.vistrails.org/download/download.php?type=DATA&id=head.120.vtk'
# DEFAULT insecure insecure
insecure = False