Skip to content

Instantly share code, notes, and snippets.

Steven Silvester blink1073

Block or report user

Report or block blink1073

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@blink1073
blink1073 / pypi_binary_downloader.py
Last active Dec 11, 2015
PyPi Binary Downloader Pulls the latest binary package from pypi, and installs it intelligently Accounts for current python version and path (including virtualenv), and system architecture (32 vs 64 bit) If an alternate filename is provided, it will use that instead of the default created by distutils (<package>-<version>.win**-py*.*.exe)
View pypi_binary_downloader.py
'''
PyPi Binary Downloader
Pulls the latest binary package from pypi, and installs it intelligently
Accounts for current python version and path (including virtualenv), and
system architecture (32 vs 64 bit)
If an alternate filename is provided, it will use that instead of the default
created by distutils (<package>-<version>.win**-py*.*.exe)
@blink1073
blink1073 / anaconda_bash_script_maker.py
Last active Feb 19, 2016
Generate Bash scripts to run the Anaconda Batch Scripts on Windows
View anaconda_bash_script_maker.py
''' Python Shell-Script Maker for Windows MSYS
Creates a bash shell script for all the `.bat` files in the Scripts directory.
This allows for compatibility with MSYS bash.
For example, `spyder.bat` would yield a file called `spyder`:
#!/bin/bash
cmd //c "spyder" "$@"
See http://sourceforge.net/p/mingw/bugs/1902/ for an explanation.
@blink1073
blink1073 / Atom PyQtGraph Scatter3D Plot Example
Last active Dec 27, 2015
Demonstration of the pyqtgraph.opengl.GLScatterPlotItem in a pyqtgraph.opengl.GLViewWidget with Atom bindings. This is meant to be used as the basis of a point cloud GUI in Enaml.
View Atom PyQtGraph Scatter3D Plot Example
# -*- coding: utf-8 -*-
"""
Created on Sat Jul 20 14:27:48 2013
@author: silvester
Demonstration of Point Cloud tool using OpenGL bindings in PyQtGraph
Based on GLScatterPlotItem.py example from PyQtGraph
License: MIT
@blink1073
blink1073 / gl_mesh_item.enaml
Last active Dec 28, 2015
Demonstrate an OpenGL example in enaml. This is a port of the PyQtGraph GLMesh Example to Enaml.
View gl_mesh_item.enaml
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 11 04:16:39 2013
@author: silvester
@license: MIT
"""
from enaml.qt import QtCore, QtGui
from enaml.widgets.api import *
from pyqtgraph import opengl as gl
@blink1073
blink1073 / gl_demo.enaml
Created Nov 11, 2013
Demonstration of PyQt4.OpenGL.QGLWidget in enaml
View gl_demo.enaml
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 11 04:16:39 2013
@author: Steven Silvester (steven.silvester@iee.org)
@license: Public Domain
Based on: http://www.siafoo.net/snippet/316
Created on Jul 7, 2009
View javascript_in_enaml.enaml
# -*- coding: utf-8 -*-
"""
Created on Sun Nov 17 09:15:29 2013
@author: Steven Silvester <steven.silvester@ieee.org>
@license: MIT
Adapted from @pedrotechless answer:
http://stackoverflow.com/questions/6447011/pyqt-pyside-webkit-and-exposing-methods-from-to-javascript
"""
@blink1073
blink1073 / enaml_snapshot.py
Last active Dec 29, 2015
Take a snapshot of an enaml application.
View enaml_snapshot.py
# -*- coding: utf-8 -*-
"""
Created on Fri Nov 29 07:29:42 2013
@author: Steven Silvester <steven.silvester@ieee.org>
@license: MIT
Take a snapshot of an enaml application.
Open an enaml application, save a snapshot, and optionally close it.
@blink1073
blink1073 / picker_demo.enaml
Created Dec 6, 2013
Enaml MPLCanvas Event Demo
View picker_demo.enaml
# -*- coding: utf-8 -*-
"""
Created on Fri Dec 06 06:07:21 2013
@author: Steven Silvester <steven.silvester@ieee.org>
@license: MIT
"""
import functools
import matplotlib.pyplot as plt
@blink1073
blink1073 / jedi_memory.py
Last active Dec 30, 2015
Test Jedi Memory Usage
View jedi_memory.py
# -*- coding: utf-8 -*-
"""
@author Steven Silvester <steven.silvester@ieee.org>
@license MIT
"""
import pkgutil
import os
from wmi import WMI # pip install wmi (windows only)
# see http://stackoverflow.com/questions/938733/total-memory-used-by-python-process
import jedi
@blink1073
blink1073 / jedi_mem_profiler.py
Created Jan 12, 2014
Profiling Jedi Memory using memory_profiler
View jedi_mem_profiler.py
# -*- coding: utf-8 -*-
"""
@author Steven Silvester <steven.silvester@ieee.org>
@license MIT
"""
import pkgutil
import os
from memory_profiler import memory_usage
import jedi
You can’t perform that action at this time.