Changes for page Code description

Last modified by galluzziandrea on 2022/06/20 12:33

From version 2.2
edited by galluzziandrea
on 2021/12/09 12:35
Change comment: There is no comment for this version
To version 4.2
edited by galluzziandrea
on 2021/12/09 14:39
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,27 +1,39 @@
1 -== Code Description ==
1 +== Introduction (path and modules) ==
2 2  
3 +First of all we check the path and import the necessary modules .
3 3  
5 +=== Check where I am and place myself in the right folder : ===
4 4  
5 5  {{code language="python"}}
6 -x = 1
7 -if x == 1:
8 - # indented four spaces
9 - print("x is 1.")
8 +# Import the os module
9 +import os
10 +
11 +#Print the current working directory
12 +print("Current working directory: {0}".format(os.getcwd()))
13 +
14 +# Change the current working directory
15 +os.chdir('/mnt/user/shared/Slow waves in fading anesthesia/Nest3Python3')
16 +
17 +# Print the current working directory
18 +print("Current working directory: {0}".format(os.getcwd()))
10 10  {{/code}}
11 11  
12 -(% class="wikigeneratedid" %)
13 -=== ===
21 +=== import the modules necessary for the simulation ===
14 14  
15 15  {{code language="python"}}
16 -x = 1
17 -if x == 1:
18 - # indented four spaces
19 - print("x is 1.")
24 +import nest
25 +import time
26 +from numpy import exp
27 +import numpy
28 +import math
29 +import random
30 +import multiprocessing
31 +Inizio=time.time()
32 +print('tempo di Inizio:',Inizio)
20 20  {{/code}}
21 21  
22 -(% class="wikigeneratedid" %)
23 -=== ===
35 +=== ===
24 24  
25 -=== Results ===
37 +==== Results ====
26 26  
27 -==== ====
39 +==== ====