Kernel: Python 2 (system-wide)
In [9]:
('Nur die Variable', 29)
('Addition', 49)
('Addition', 49)
('Multiplikation', 98)
('Multiplikation', 98)
('Division', 32.666666666666664)
('IntegerFloorDivision', 32)
('20 als Buchstabe', '\x14')
('66 als Buchstabe', 'B')
('1 bis und mit 255 jeder 5 Buchstabe:', ['\x01', '\x06', '\x0b', '\x10', '\x15', '\x1a', '\x1f', '$', ')', '.', '3', '8', '=', 'B', 'G', 'L', 'Q', 'V', '[', '`', 'e', 'j', 'o', 't', 'y', '~', '\x83', '\x88', '\x8d', '\x92', '\x97', '\x9c', '\xa1', '\xa6', '\xab', '\xb0', '\xb5', '\xba', '\xbf', '\xc4', '\xc9', '\xce', '\xd3', '\xd8', '\xdd', '\xe2', '\xe7', '\xec', '\xf1', '\xf6', '\xfb'])
('Index 0 der Buchstabenliste', '\x01')
('Verschiedene Indices der Buchstabenliste', '~', '~', '~', ['~'])
(1, 'is the letter', u'\x01')
(6, 'is the letter', u'\x06')
(11, 'is the letter', u'\x0b')
(16, 'is the letter', u'\x10')
(21, 'is the letter', u'\x15')
(26, 'is the letter', u'\x1a')
(31, 'is the letter', u'\x1f')
(36, 'is the letter', u'$')
(41, 'is the letter', u')')
(46, 'is the letter', u'.')
(51, 'is the letter', u'3')
(56, 'is the letter', u'8')
(61, 'is the letter', u'=')
(66, 'is the letter', u'B')
(71, 'is the letter', u'G')
(76, 'is the letter', u'L')
(81, 'is the letter', u'Q')
(86, 'is the letter', u'V')
(91, 'is the letter', u'[')
(96, 'is the letter', u'`')
(101, 'is the letter', u'e')
(106, 'is the letter', u'j')
(111, 'is the letter', u'o')
(116, 'is the letter', u't')
(121, 'is the letter', u'y')
(126, 'is the letter', u'~')
(131, 'is the letter', u'\x83')
(136, 'is the letter', u'\x88')
(141, 'is the letter', u'\x8d')
(146, 'is the letter', u'\x92')
(151, 'is the letter', u'\x97')
(156, 'is the letter', u'\x9c')
(161, 'is the letter', u'\xa1')
(166, 'is the letter', u'\xa6')
(171, 'is the letter', u'\xab')
(176, 'is the letter', u'\xb0')
(181, 'is the letter', u'\xb5')
(186, 'is the letter', u'\xba')
(191, 'is the letter', u'\xbf')
(196, 'is the letter', u'\xc4')
(201, 'is the letter', u'\xc9')
(206, 'is the letter', u'\xce')
(211, 'is the letter', u'\xd3')
(216, 'is the letter', u'\xd8')
(221, 'is the letter', u'\xdd')
(226, 'is the letter', u'\xe2')
(231, 'is the letter', u'\xe7')
(236, 'is the letter', u'\xec')
(241, 'is the letter', u'\xf1')
(246, 'is the letter', u'\xf6')
(251, 'is the letter', u'\xfb')
In [2]:
('Zeige die Liste', [], [])
('Zeige die Liste', [2, 3, 2])
('Mit Indices', 2, 3)
('Mit negativen Indices', 2, 3)
['Hier ist der Anfang', 2, 3, 'Ist hier das Ende?', 2]
('Die Zahl 2 findet sich an der Stelle', 1, 'Zahl an dem Index, nur zur Sicherheit', 2)
('Liste sortiert', [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4])
('Liste erweitet', [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
('Zahl 5 einmal entfernt', [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 0, 1, 2, 3, 4, 6, 7, 8, 9])
('Letztes Element entfernt', [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 0, 1, 2, 3, 4, 6, 7, 8])
('Jedes dritte Element ab Index 5 entfernt', [0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 0, 1, 2, 3, 4, 6, 7, 8])
('Gedrehte Liste', [8, 7, 6, 4, 3, 2, 1, 0, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 0, 0, 0])
('Erste paar Elemente', [8, 7, 6])
('Jedes dritte Element', [8, 4, 1, 4, 3, 3, 2, 1, 0])
('Jedes zweite Element von Ende her', [0, 0, 1, 2, 2, 3, 3, 4, 4, 0, 2, 4, 7])
In [4]:
1 B from 1 Bytes
2 B from 2 Bytes
4 B from 4 Bytes
8 B from 8 Bytes
16 B from 16 Bytes
32 B from 32 Bytes
64 B from 64 Bytes
128 B from 128 Bytes
256 B from 256 Bytes
512 B from 512 Bytes
1 KB from 1024 Bytes
2 KB from 2048 Bytes
4 KB from 4096 Bytes
8 KB from 8192 Bytes
16 KB from 16384 Bytes
32 KB from 32768 Bytes
64 KB from 65536 Bytes
128 KB from 131072 Bytes
256 KB from 262144 Bytes
512 KB from 524288 Bytes
1 MB from 1048576 Bytes
2 MB from 2097152 Bytes
4 MB from 4194304 Bytes
8 MB from 8388608 Bytes
16 MB from 16777216 Bytes
32 MB from 33554432 Bytes
64 MB from 67108864 Bytes
128 MB from 134217728 Bytes
256 MB from 268435456 Bytes
512 MB from 536870912 Bytes
1 GB from 1073741824 Bytes
2 GB from 2147483648 Bytes
4 GB from 4294967296 Bytes
1
In [1]:
('That is', 1000000000000.0, 'B')
('That is', 976562500.0, 'KB')
('That is', 953674.31640625, 'MB')
('That is', 931.3225746154785, 'GB')
('That is', 0.9094947017729282, 'TB')
In [11]:
['.smc', '.2016-09-23-100330.html.sage-chat', '.sage', 'RasterVektor.html', 'aaaaa', '.jupyter', '.2016-10-13-165046.ipynb.sage-jupyter', 'another', '2016-09-23-100330.ipynb', '.2016-10-13-163950.py.sage-chat', '.bashrc', '.RasterVektor.ipynb.sage-jupyter', '.snapshots', '.bash_profile', '.2016-09-23-100330.ipynb.sage-jupyter2', '2016-09-23-100330.html', '.2016-09-23-100330.ipynb.sage-jupyter', '.ipynb_checkpoints', '.local', '.ssh', 'RasterVektor.ipynb', 'HelloWorld']
['__add__', '__class__', '__contains__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__getslice__', '__gt__', '__hash__', '__init__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '_formatter_field_name_split', '_formatter_parser', 'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']
[Errno 21] Is a directory: '/home/user/.smc'
*********************
/home/user/.2016-09-23-100330.html.sage-chat
*********************
[Errno 21] Is a directory: '/home/user/.sage'
In [65]:
['.jupyter', '2016-09-23-100330.ipynb', 'another', '.local', '.sage', 'HelloWorld', '.bash_profile', '.bashrc', '2016-09-23-100330.html', '.smc', '.forever', '.ipynb_checkpoints', '.2016-09-23-100330.ipynb.sage-jupyter', '.2016-09-23-100330.html.sage-chat', 'aaaaa']
**********************************************
('Executing', 'w')
Output is
13:24:48 up 1:14, 1 user, load average: 1.91, 1.50, 1.37
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
**********************************************
('Executing', 'who')
Output is
salvus pts/0 2016-10-12 12:10 (10.240.0.27)
**********************************************
('Executing', 'whoami')
Output is
508423d78ea74c0f917e73085e443415
**********************************************
('Executing', 'users')
Output is
salvus
**********************************************
('Executing', 'ps aux')
Output is
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
1028827+ 5940 0.0 0.1 908884 35092 ? Ssl 12:11 0:00 /usr/bin/nodejs /usr/lib/node_modules/forever/bin/monitor /usr/lib/node_modules/smc-project/local_hub.coffee
1028827+ 5951 0.3 0.3 1264296 88684 ? Sl 12:11 0:13 node /usr/bin/coffee /usr/lib/node_modules/smc-project/local_hub.coffee
1028827+ 8695 0.1 0.1 346600 46244 ? Sl 12:12 0:05 python /projects/sage/sage-7.3/local/bin/ipython notebook --port-retries=0 --no-browser --NotebookApp.mathjax_url=/static/mathjax/MathJax.js --NotebookApp.base_url=/508423d7-8ea7-4c0f-917e-73085e443415/port/jupyter/ --NotebookApp.base_kernel_url=/508423d7-8ea7-4c0f-917e-73085e443415/port/jupyter/ --ip=10.240.0.31 --port=22985
1028827+ 22675 0.0 0.0 17200 2500 ? R 13:24 0:00 ps aux
1028827+ 25561 0.1 0.2 1026780 68208 ? Ssl 12:20 0:04 python -E -m ipykernel --matplotlib=inline -f /projects/508423d7-8ea7-4c0f-917e-73085e443415/.local/share/jupyter/runtime/kernel-674a8ddb-b37d-422b-945a-179f592abba1.json
**********************************************
('Executing', 'df -hl')
Output is
Filesystem Size Used Avail Use% Mounted on
udev 13G 0 13G 0% /dev
tmpfs 2.6G 25M 2.6G 1% /run
/dev/sda1 40G 27G 11G 72% /
tmpfs 13G 0 13G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 13G 0 13G 0% /sys/fs/cgroup
/dev/sdb1 50G 73M 47G 1% /tmp
/dev/sdb2 443G 319G 102G 76% /projects
/dev/sdd 30G 15G 13G 54% /projects/data/RNASEQ
tmpfs 2.6G 0 2.6G 0% /run/user/0
tmpfs 2.6G 0 2.6G 0% /run/user/1001
tmpfs 2.6G 0 2.6G 0% /run/user/1010
**********************************************
('Executing', 'free -hl')
Output is
total used free shared buffers cached
Mem: 25G 23G 1.6G 23M 18M 275M
Low: 25G 23G 1.6G
High: 0B 0B 0B
-/+ buffers/cache: 23G 1.9G
Swap: 63G 1.1G 62G
**********************************************
('Executing', 'ls -lh')
Output is
total 2.8M
-rw-r----- 1 508423d78ea74c0f917e73085e443415 508423d78ea74c0f917e73085e443415 1.5M Oct 12 13:20 2016-09-23-100330.html
-rw-r----- 1 508423d78ea74c0f917e73085e443415 508423d78ea74c0f917e73085e443415 1.3M Oct 12 13:20 2016-09-23-100330.ipynb
drwxr-x--- 2 508423d78ea74c0f917e73085e443415 508423d78ea74c0f917e73085e443415 4.0K Oct 6 14:23 aaaaa
drwxr-x--- 2 508423d78ea74c0f917e73085e443415 508423d78ea74c0f917e73085e443415 4.0K Oct 6 14:23 another
drwxr-x--- 2 508423d78ea74c0f917e73085e443415 508423d78ea74c0f917e73085e443415 4.0K Oct 6 14:23 HelloWorld
**********************************************
('Executing', 'tail 2016-09-23-100330.ipynb')
Output is
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.10"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
In [69]:
('Fakultaet von 1:', 1)
('Fakultaet von 2:', 2)
('Fakultaet von 3:', 6)
('Fakultaet von 4:', 24)
('Fakultaet von 5:', 120)
('Fakultaet von 6:', 720)
('Fakultaet von 7:', 5040)
('Fakultaet von 8:', 40320)
('Fakultaet von 9:', 362880)
In [66]:
11 going down
5 going down
2 going down
1 going down
2 going back up
4 going back up
10 going back up
22 going back up
10 going down
5 going down
2 going down
1 going down
2 going back up
4 going back up
10 going back up
20 going back up
7 going down
3 going down
1 going down
2 going back up
6 going back up
14 going back up
1
In [68]:
('Fakultaet von 1:', 1)
('Fakultaet von 2:', 2)
('Fakultaet von 3:', 6)
('Fakultaet von 4:', 24)
('Fakultaet von 5:', 120)
('Fakultaet von 6:', 720)
('Fakultaet von 7:', 5040)
('Fakultaet von 8:', 40320)
('Fakultaet von 9:', 362880)
In [82]:
Adding 00001111 and 01100000
(1, 2, 'O', 'C')
(1, 0, 0, 0)
(1, 0, 0, 0)
(1, 0, 0, 0)
(1, 0, 0, 0)
(0, 0, 0, 0)
(0, 1, 0, 0)
(0, 1, 0, 0)
(0, 0, 0, 0)
01101111
In [85]:
('Subtracting', '01100000', 'from', '00001111')
(1, 2, 'O', 'B')
(1, 0, 0, 0)
(1, 0, 0, 0)
(1, 0, 0, 0)
(1, 0, 0, 0)
(0, 0, 0, 0)
(0, 1, 0, 1)
(0, 1, 1, 1)
(0, 0, 1, 1)
10101111
In [4]:
('Numbers in array\n', [0, -2, 2, 18, 52, 110, 198, 322, 488, 702, 970, 1298, 1692, 2158, 2702, 3330, 4048, 4862, 5778, 6802])
0
-2
2
18
52
110
198
322
488
702
970
1298
1692
2158
2702
3330
4048
4862
5778
6802
(35530, ' partial sum at index', 20)
1776.5
In [92]:
('Calculating: ', '3332', ' - ', '2333', ' = ', 999)
('New Number is', '999')
('Calculating: ', '999', ' - ', '999', ' = ', 0)
('New Number is', '0')
("Sorry, it doesn't work for", 3233)
-1
In [1]:
Calculating: 3332 - 2333 = 999
New Number is 999
Calculating: 999 - 999 = 0
New Number is 0
Sorry doesn't work for 3233
In [7]:
In [5]:
In [0]:
In [6]:
In [7]:
8.0
[4.000000000000002, 3.2000000000000015, 3.8805700005813293]