From: Yaroslav Halchenko <debian@onerussian.com>
Subject: Add shebangs to executable scripts and the ones carrying __main__

Origin: Debian
Last-Update: 2012-08-30

--- a/examples/frompapers/Guetig_Sompolinsky_2009.py
+++ b/examples/frompapers/Guetig_Sompolinsky_2009.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 '''
 Implementation of the basic model (no speech recognition, no learning) 
--- a/examples/frompapers/Muller_et_al_2011.py
+++ b/examples/frompapers/Muller_et_al_2011.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 """
 Interplay of STDP and input oscillations
 ----------------------------------------
--- a/examples/misc/stim2d.py
+++ b/examples/misc/stim2d.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 '''
 Example of a 2D stimulus, see the
 `complete description <http://neuralensemble.org/cookbook/wiki/Brian/StimulusArrayGroup>`__
--- a/examples/modelfitting/modelfitting_groups.py
+++ b/examples/modelfitting/modelfitting_groups.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 '''
 Example showing how to fit a single model
 with different target spike trains (several groups).
--- a/examples/modelfitting/modelfitting_machines.py
+++ b/examples/modelfitting/modelfitting_machines.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 '''
 Model fitting example using several machines.
 Before running this example, you must start the Playdoh server on the remote machines.
--- a/examples/modelfitting/modelfitting.py
+++ b/examples/modelfitting/modelfitting.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 '''
 Model fitting example.
 Fit an integrate-and-fire model to an in-vitro electrophysiological 
--- a/examples/multiprocessing/multiple_runs_simple.py
+++ b/examples/multiprocessing/multiple_runs_simple.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 '''
 Example of using Python multiprocessing module to distribute simulations over
 multiple processors.
--- a/examples/multiprocessing/multiple_runs_with_gui.py
+++ b/examples/multiprocessing/multiple_runs_with_gui.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 '''
 A complicated example of using multiprocessing for multiple runs of a simulation
 with different parameters, using a GUI to monitor and control the runs.
--- a/examples/multiprocessing/taskfarm.py
+++ b/examples/multiprocessing/taskfarm.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 '''
 Uses the :func:`~brian.tools.taskfarm.run_tasks` function to run a task on
 multiple CPUs and save the results to a
--- a/examples/twister/anonymous.py
+++ b/examples/twister/anonymous.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 '''
 Anonymous entry for the 2012 Brian twister.
 '''
--- a/examples/frompapers/Brunel_Hakim_1999.py
+++ b/examples/frompapers/Brunel_Hakim_1999.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 """
 Dynamics of a network of sparsely connected inhibitory current-based 
 integrate-and-fire neurons. Individual neurons fire irregularly at 
--- a/examples/frompapers/Rossant_et_al_2011.py
+++ b/examples/frompapers/Rossant_et_al_2011.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 """
 Coincidence detection example
 =============================
--- a/examples/hears/approximate_gammatone.py
+++ b/examples/hears/approximate_gammatone.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 '''
 Example of the use of the class :class:`~brian.hears.ApproximateGammatone`
 available in the library. It implements a filterbank of approximate gammatone
--- a/examples/hears/dcgc.py
+++ b/examples/hears/dcgc.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 '''
 Implementation example of the compressive gammachirp auditory filter as
 described in Irino, T. and Patterson R., "A compressive gammachirp auditory
--- a/examples/hears/drnl.py
+++ b/examples/hears/drnl.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 '''
 Implementation example of the dual resonance nonlinear (DRNL) filter with
 parameters fitted for human as described in Lopez-Paveda, E. and Meddis, R., A
--- a/examples/hears/gammatone.py
+++ b/examples/hears/gammatone.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 '''
 Example of the use of the class :class:`~brian.hears.Gammatone` available in the
 library. It implements a fitlerbank of IIR gammatone filters as 
--- a/examples/hears/linear_gammachirp.py
+++ b/examples/hears/linear_gammachirp.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 '''
 Example of the use of the class :class:`~brian.hears.LinearGammachirp` available
 in the library. It implements a filterbank of FIR gammatone filters with linear
--- a/examples/hears/time_varying_filter1.py
+++ b/examples/hears/time_varying_filter1.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 '''
 This example implements a band pass filter whose center frequency is modulated
 by an Ornstein-Uhlenbeck. The white noise term used for this process is output
--- a/examples/hears/time_varying_filter2.py
+++ b/examples/hears/time_varying_filter2.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 '''
 This example implements a band pass filter whose center frequency is modulated by
 a sinusoid function. This modulator is implemented as a
