iruby 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc DELETED
@@ -1,45 +0,0 @@
1
- <b>The current master branch and gem version >= 0.2 are compatible with IPython3/Jupyter. If you require IPython2 support, please install an older gem version < 0.2 or use the branch ipython2</b>
2
-
3
- = IRuby
4
-
5
- This is a Ruby kernel for IPython/Jupyter and is part of SciRuby[http://sciruby.com/]. You can try it at http://try.jupyter.org/.
6
-
7
- link:screenshot.png
8
-
9
- === Quick start
10
-
11
- At first install IPython/Jupyter. I recommend an installation using virtualenv.
12
-
13
- apt-get install python3-dev virtualenv libzmq3-dev
14
- virtualenv -p python3 venv
15
- source venv/bin/activate
16
- pip install 'ipython[notebook]'
17
-
18
- After that, install the Ruby gem.
19
-
20
- gem install iruby
21
-
22
- Now you can run iruby with:
23
-
24
- iruby
25
- iruby notebook
26
-
27
- Take a look at the Example[http://nbviewer.ipython.org/urls/raw.github.com/SciRuby/iruby/master/IRuby-Example.ipynb].
28
-
29
- === Required dependencies
30
-
31
- * IPython/Jupyter >= 3.0.0
32
- * libzmq >= 3.2
33
- * Ruby >= 2.0.0
34
-
35
- === Authors
36
-
37
- See the link:CONTRIBUTORS file.
38
-
39
- === License
40
-
41
- Copyright © 2013-15, IRuby contributors and the Ruby Science Foundation.
42
-
43
- All rights reserved.
44
-
45
- IRuby, along with SciRuby[http://sciruby.com/], is licensed under the MIT license. See the link:LICENSE.txt file for details.
@@ -1,129 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": 1,
6
- "metadata": {
7
- "collapsed": false
8
- },
9
- "outputs": [
10
- {
11
- "data": {
12
- "text/latex": [
13
- "$1+2\\imath$"
14
- ],
15
- "text/plain": [
16
- "(1+2i)"
17
- ]
18
- },
19
- "metadata": {},
20
- "output_type": "display_data"
21
- }
22
- ],
23
- "source": [
24
- "IRuby.display(Complex(1,2))"
25
- ]
26
- },
27
- {
28
- "cell_type": "code",
29
- "execution_count": 2,
30
- "metadata": {
31
- "collapsed": false
32
- },
33
- "outputs": [
34
- {
35
- "data": {
36
- "text/latex": [
37
- "$$\\left(\\begin{array}{cc}\n",
38
- " 1&2\\\\\n",
39
- " 3&4\\\\\n",
40
- "\\end{array}\\right)$$"
41
- ],
42
- "text/plain": [
43
- "Matrix[[1, 2], [3, 4]]"
44
- ]
45
- },
46
- "metadata": {},
47
- "output_type": "display_data"
48
- },
49
- {
50
- "data": {
51
- "text/latex": [
52
- "$$\\left(\\begin{array}{cc}\n",
53
- " 1&2\\\\\n",
54
- " 3&4\\\\\n",
55
- "\\end{array}\\right)$$"
56
- ],
57
- "text/plain": [
58
- "Matrix[[1, 2], [3, 4]]"
59
- ]
60
- },
61
- "metadata": {},
62
- "output_type": "display_data"
63
- },
64
- {
65
- "data": {
66
- "text/plain": [
67
- "Matrix[[1, 2], [3, 4]]"
68
- ]
69
- },
70
- "metadata": {},
71
- "output_type": "display_data"
72
- },
73
- {
74
- "data": {
75
- "text/plain": [
76
- "Matrix[[1, 2], [3, 4]]"
77
- ]
78
- },
79
- "metadata": {},
80
- "output_type": "display_data"
81
- },
82
- {
83
- "data": {
84
- "text/html": [
85
- "<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>"
86
- ],
87
- "text/plain": [
88
- "Matrix[[1, 2], [3, 4]]"
89
- ]
90
- },
91
- "metadata": {},
92
- "output_type": "display_data"
93
- }
94
- ],
95
- "source": [
96
- "require 'matrix'\n",
97
- "IRuby.display(Matrix[[1,2],[3,4]])\n",
98
- "IRuby.display(Matrix[[1,2],[3,4]],format:'latex')\n",
99
- "IRuby.display(Matrix[[1,2],[3,4]],'text/plain')\n",
100
- "IRuby.display(Matrix[[1,2],[3,4]],mime:'text/plain')\n",
101
- "IRuby.display(Matrix[[1,2],[3,4]],'html')"
102
- ]
103
- },
104
- {
105
- "cell_type": "code",
106
- "execution_count": null,
107
- "metadata": {
108
- "collapsed": false
109
- },
110
- "outputs": [],
111
- "source": []
112
- }
113
- ],
114
- "metadata": {
115
- "kernelspec": {
116
- "display_name": "Ruby 2.1.2",
117
- "language": "ruby",
118
- "name": "ruby"
119
- },
120
- "language_info": {
121
- "file_extension": "rb",
122
- "mimetype": "application/x-ruby",
123
- "name": "ruby",
124
- "version": "2.1.2"
125
- }
126
- },
127
- "nbformat": 4,
128
- "nbformat_minor": 0
129
- }
@@ -1,171 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": 1,
6
- "metadata": {
7
- "collapsed": false
8
- },
9
- "outputs": [
10
- {
11
- "data": {
12
- "text/plain": [
13
- ":out1"
14
- ]
15
- },
16
- "execution_count": 1,
17
- "metadata": {},
18
- "output_type": "execute_result"
19
- }
20
- ],
21
- "source": [
22
- ":out1"
23
- ]
24
- },
25
- {
26
- "cell_type": "code",
27
- "execution_count": 2,
28
- "metadata": {
29
- "collapsed": false
30
- },
31
- "outputs": [
32
- {
33
- "data": {
34
- "text/plain": [
35
- ":out2"
36
- ]
37
- },
38
- "execution_count": 2,
39
- "metadata": {},
40
- "output_type": "execute_result"
41
- }
42
- ],
43
- "source": [
44
- ":out2"
45
- ]
46
- },
47
- {
48
- "cell_type": "code",
49
- "execution_count": 3,
50
- "metadata": {
51
- "collapsed": false
52
- },
53
- "outputs": [
54
- {
55
- "data": {
56
- "text/plain": [
57
- ":out3"
58
- ]
59
- },
60
- "execution_count": 3,
61
- "metadata": {},
62
- "output_type": "execute_result"
63
- }
64
- ],
65
- "source": [
66
- ":out3"
67
- ]
68
- },
69
- {
70
- "cell_type": "code",
71
- "execution_count": 4,
72
- "metadata": {
73
- "collapsed": false
74
- },
75
- "outputs": [
76
- {
77
- "name": "stdout",
78
- "output_type": "stream",
79
- "text": [
80
- ":out1\n",
81
- ":out2\n",
82
- ":out3\n",
83
- ":out1\n",
84
- ":out2\n",
85
- ":out3\n",
86
- ":out1\n",
87
- ":out2\n",
88
- ":out3\n",
89
- ":out1\n",
90
- ":out2\n",
91
- ":out3\n",
92
- ":out1\n",
93
- ":out2\n",
94
- ":out3\n",
95
- "out1\n",
96
- "out2\n",
97
- "out3\n",
98
- "out1\n",
99
- "out2\n",
100
- "out3\n",
101
- "out1\n",
102
- "out2\n",
103
- "out3\n",
104
- "out1\n",
105
- "out2\n",
106
- "out3\n",
107
- "out1\n",
108
- "out2\n",
109
- "out3\n"
110
- ]
111
- }
112
- ],
113
- "source": [
114
- "puts _iii\n",
115
- "puts _ii\n",
116
- "puts _i\n",
117
- "\n",
118
- "puts _i1\n",
119
- "puts _i2\n",
120
- "puts _i3\n",
121
- "\n",
122
- "puts _ih[1]\n",
123
- "puts _ih[2]\n",
124
- "puts _ih[3]\n",
125
- "\n",
126
- "puts In[1]\n",
127
- "puts In[2]\n",
128
- "puts In[3]\n",
129
- "\n",
130
- "puts In[-3]\n",
131
- "puts In[-2]\n",
132
- "puts In[-1]\n",
133
- "\n",
134
- "puts ___\n",
135
- "puts __\n",
136
- "puts _\n",
137
- "\n",
138
- "puts _1\n",
139
- "puts _2\n",
140
- "puts _3\n",
141
- "\n",
142
- "puts _oh[1]\n",
143
- "puts _oh[2]\n",
144
- "puts _oh[3]\n",
145
- "\n",
146
- "puts Out[1]\n",
147
- "puts Out[2]\n",
148
- "puts Out[3]\n",
149
- "\n",
150
- "puts Out[-3]\n",
151
- "puts Out[-2]\n",
152
- "puts Out[-1]"
153
- ]
154
- }
155
- ],
156
- "metadata": {
157
- "kernelspec": {
158
- "display_name": "Ruby 2.1.2",
159
- "language": "ruby",
160
- "name": "ruby"
161
- },
162
- "language_info": {
163
- "file_extension": "rb",
164
- "mimetype": "application/x-ruby",
165
- "name": "ruby",
166
- "version": "2.1.2"
167
- }
168
- },
169
- "nbformat": 4,
170
- "nbformat_minor": 0
171
- }
@@ -1,93 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "markdown",
5
- "metadata": {},
6
- "source": [
7
- "# Standard input and output"
8
- ]
9
- },
10
- {
11
- "cell_type": "code",
12
- "execution_count": 1,
13
- "metadata": {
14
- "collapsed": false
15
- },
16
- "outputs": [
17
- {
18
- "name": "stdout",
19
- "output_type": "stream",
20
- "text": [
21
- "Hello, world!\n"
22
- ]
23
- }
24
- ],
25
- "source": [
26
- "puts 'Hello, world!'"
27
- ]
28
- },
29
- {
30
- "cell_type": "code",
31
- "execution_count": 2,
32
- "metadata": {
33
- "collapsed": false
34
- },
35
- "outputs": [
36
- {
37
- "name": "stdout",
38
- "output_type": "stream",
39
- "text": [
40
- "stdout\n"
41
- ]
42
- },
43
- {
44
- "name": "stderr",
45
- "output_type": "stream",
46
- "text": [
47
- "stderr\n"
48
- ]
49
- }
50
- ],
51
- "source": [
52
- "$stdout.puts 'stdout'\n",
53
- "$stderr.puts 'stderr'"
54
- ]
55
- },
56
- {
57
- "cell_type": "code",
58
- "execution_count": 3,
59
- "metadata": {
60
- "collapsed": false
61
- },
62
- "outputs": [
63
- {
64
- "name": "stdout",
65
- "output_type": "stream",
66
- "text": [
67
- "print\n",
68
- "write\n"
69
- ]
70
- }
71
- ],
72
- "source": [
73
- "print \"print\\n\"\n",
74
- "$stdout.write \"write\\n\""
75
- ]
76
- }
77
- ],
78
- "metadata": {
79
- "kernelspec": {
80
- "display_name": "Ruby 2.1.2",
81
- "language": "ruby",
82
- "name": "ruby"
83
- },
84
- "language_info": {
85
- "file_extension": "rb",
86
- "mimetype": "application/x-ruby",
87
- "name": "ruby",
88
- "version": "2.1.2"
89
- }
90
- },
91
- "nbformat": 4,
92
- "nbformat_minor": 0
93
- }