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
| for ($ContainerType$::iterator $Iter=it$ = $Container$.begin(); | |
| $Iter$!=$Container$.end(); | |
| ++$Iter$) | |
| { | |
| $end$ | |
| } |
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
| # locale string from: http://msdn.microsoft.com/en-us/library/cdax410z(v=VS.80).aspx | |
| if sys.platform in [ 'win32']: | |
| locale.setlocale(locale.LC_ALL, 'fra') |
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 hex_to_rgb(hex_string_color): | |
| """ | |
| Convert a color encoded in an hex string into | |
| an rgb tuple. | |
| Example: | |
| >> hex_to_rgb("5b6eff") | |
| (91, 110, 255) | |
| """ |
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
| select_macpython32() | |
| { | |
| echo "Setting environment for MacPython 3.2" | |
| PATH="/Library/Frameworks/Python.framework/Versions/3.2/bin/:${OLD_PATH}" | |
| export PATH | |
| export PS1="(MacPython 3.2) \h:\W \u\$ " | |
| } |
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
| export OLD_PATH=$PATH | |
| . $HOME/.python_switchers.sh |
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
| export OLD_PATH=$PATH | |
| select_system_python26() | |
| { | |
| echo "Setting environment for System Python 2.6" | |
| PATH="/System/Library/Frameworks/Python.framework/Versions/2.6/bin/:${OLD_PATH}" | |
| export PATH | |
| } |
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
| [Sat Apr 23 11:39:26 2011] [notice] caught SIGTERM, shutting down | |
| [Sat Apr 23 11:39:44 2011] [error] python_init: Python version mismatch, expected '2.6.5', found '2.6.6'. | |
| [Sat Apr 23 11:39:44 2011] [error] python_init: Python executable found '/usr/bin/python'. | |
| [Sat Apr 23 11:39:44 2011] [error] python_init: Python path being used '/usr/lib/python2.6/:/usr/lib/python2.6/plat-linux2:/usr/lib/python2.6/lib-tk:/usr/lib/python2.6/lib-old:/usr/lib/python2.6/lib-dynload'. | |
| [Sat Apr 23 11:39:44 2011] [notice] mod_python: Creating 8 session mutexes based on 6 max processes and 25 max threads. | |
| [Sat Apr 23 11:39:44 2011] [notice] mod_python: using mutex_directory /tmp | |
| [Sat Apr 23 11:39:44 2011] [warn] mod_wsgi: Compiled for Python/2.6.5. | |
| [Sat Apr 23 11:39:44 2011] [warn] mod_wsgi: Runtime using Python/2.6.6. | |
| [Sat Apr 23 11:39:44 2011] [notice] Apache/2.2.16 (Ubuntu) mod_python/3.3.1 Python/2.6.6 mod_wsgi/3.2 configured -- resuming normal operations |
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 __future__ import division | |
| import numpy as np | |
| from scipy.weave import inline, converters | |
| def load_data(filename): | |
| zbuf = np.fromfile(filename, dtype=np.float32, count=128*128*4) | |
| zbuf.shape = (128,128) | |
| return zbuf | |
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
| export OLD_PATH=$PATH | |
| # switching functions | |
| select_epd62() | |
| { | |
| echo "Setting environment for EPD 6.2 (Python 2.6)" | |
| PATH="/Library/Frameworks/Python.framework/Versions/6.2/bin:${OLD_PATH}" | |
| export PATH | |
| } |
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
| @ECHO off | |
| ECHO Setting environment for EPD 6.2.2 (Python 2.6) | |
| @SET PYTHON_ROOT=c:\Python26_EPD622 | |
| @SET PYTHON_INCLUDE=%PYTHON_ROOT%\include | |
| @SET PYTHON_LIB=%PYTHON_ROOT%\python26.lib | |
| @SET PATH=%PYTHON_ROOT%;%PYTHON_ROOT%\Scripts;%PYTHON_ROOT%\Lib;%PATH% | |
| REM Optionnal, uncomment if you want to use a specific startup file | |
| REM @SET PYTHONSTARTUP=%APPDATA%\pythonrc.py |