I find the system Python I want to use by doing
$ module avail python
Then we can load Python 3.6 with
$ module load python/3.6.1
''' | |
Non-parametric computation of entropy and mutual-information | |
Adapted by G Varoquaux for code created by R Brette, itself | |
from several papers (see in the code). | |
These computations rely on nearest-neighbor statistics | |
''' | |
import numpy as np |
library(psych) | |
" | |
Analyze the difference between change and initial value. | |
Source: | |
Tu, Y. K. (2016). Testing the relation between percentage change | |
and baseline value. Scientific reports, 6. | |
" |
import numpy as np | |
n_stim = 3 | |
n_responses = 2 | |
trial_size = 10 | |
n_trials_per_stimtype = 50 | |
n_neurons = 84 | |
single_trial_data = np.zeros([n_trials_per_stimtype, n_neurons, n_stim, n_responses, trial_size]) | |
single_trial_data.fill(np.NaN) |
import numpy as np | |
n_stim = 3 | |
n_responses = 2 | |
trial_size = 10 | |
n_trials_per_stimtype = 50 | |
n_neurons = 4 | |
single_trial_data = np.zeros([n_trials_per_stimtype, n_neurons, n_stim, n_responses, trial_size]) | |
single_trial_data.fill(np.NaN) |
There are different tools for managing virtual Python environments (see this answer on Stack Overflow for an overview). Here we give some instructions on how to get started using virtual environments on the JULIA system using venv
(Python 3 support only) and virtualenvwrapper
(an extension of the popular virtualenv
, which can be used with both Python 2 and 3).
venv
is a package automatically shipped with Python 3. This method is quite straightforward, but it does not support Python 2 (for that, you can look at the second method using virtualenvwrapper
which works for both Python 2 and 3).
To begin, we find the Python installation that we want to use by doing
$ module avail python
There are different tools for managing virtual Python environments (see this answer on Stack Overflow for an overview). Here we give some instructions on how to get started using virtual environments on the JULIA system using venv
(Python 3 support only) and virtualenvwrapper
(an extension of the popular virtualenv
, which can be used with both Python 2 and 3).
venv
is a package automatically shipped with Python 3. This method is quite straightforward, but it does not support Python 2 (for that, you can look at the second method using virtualenvwrapper
which works for both Python 2 and 3).
To begin, we find the Python installation that we want to use by doing
$ module avail python
import os | |
import luigi | |
import sciluigi | |
class MyWorkflow(sciluigi.WorkflowTask): | |
runmode = luigi.Parameter() | |
def workflow(self): | |
if self.runmode == 'local': |