iruby 0.1.13 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/examples/table.ipynb CHANGED
@@ -1,301 +1,326 @@
1
1
  {
2
- "metadata": {
3
- "language": "ruby",
4
- "name": ""
5
- },
6
- "nbformat": 3,
7
- "nbformat_minor": 0,
8
- "worksheets": [
2
+ "cells": [
9
3
  {
10
- "cells": [
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {
7
+ "collapsed": false
8
+ },
9
+ "outputs": [
10
+ {
11
+ "data": {
12
+ "text/html": [
13
+ "<table><tr><td>1</td></tr><tr><td>2</td></tr><tr><td></td></tr><tr><td>3</td></tr></table>"
14
+ ],
15
+ "text/plain": [
16
+ "\"<table><tr><td>1</td></tr><tr><td>2</td></tr><tr><td></td></tr><tr><td>3</td></tr></table>\""
17
+ ]
18
+ },
19
+ "metadata": {},
20
+ "output_type": "display_data"
21
+ },
22
+ {
23
+ "data": {
24
+ "text/html": [
25
+ "<table><tr><td colspan='3'>1</td></tr><tr><td colspan='3'>2</td></tr><tr><td>1</td><td>2</td><td>3</td></tr><tr><td>2</td><td>3</td><td></td></tr></table>"
26
+ ],
27
+ "text/plain": [
28
+ "\"<table><tr><td colspan='3'>1</td></tr><tr><td colspan='3'>2</td></tr><tr><td>1</td><td>2</td><td>3</td></tr><tr><td>2</td><td>3</td><td></td></tr></table>\""
29
+ ]
30
+ },
31
+ "metadata": {},
32
+ "output_type": "display_data"
33
+ },
11
34
  {
12
- "cell_type": "code",
13
- "collapsed": false,
14
- "input": [
15
- "IRuby.display IRuby.table([1,2,[],3])\n",
16
- "IRuby.display IRuby.table([1,2,[1,2,3],[2,3]])\n",
17
- "IRuby.display IRuby.table({a:1,b:2,c:3})\n",
18
- "IRuby.display IRuby.table([[11,12,13,14],[21,22,23],'not an Array',[31,32,33,34]])\n",
19
- "IRuby.display IRuby.table({a:[11,12,13,14],b:[21,22,23],c:[31,32,33,34]})\n",
20
- "IRuby.display IRuby.table([{a:1,b:2,c:3},'not an Array',{a:2,b:3,c:4,e:5}])\n",
21
- "IRuby.display IRuby.table([{a:1,b:2,c:3, 0 => 0},{a:2,b:3,c:4,d:5},{0=>:x,1=>:y},[:a,:b,:c]])"
22
- ],
23
- "language": "python",
35
+ "data": {
36
+ "text/html": [
37
+ "<table><tr><th>a</th><th>b</th><th>c</th></tr><tr><td>1</td><td>2</td><td>3</td></tr></table>"
38
+ ],
39
+ "text/plain": [
40
+ "\"<table><tr><th>a</th><th>b</th><th>c</th></tr><tr><td>1</td><td>2</td><td>3</td></tr></table>\""
41
+ ]
42
+ },
24
43
  "metadata": {},
25
- "outputs": [
26
- {
27
- "html": [
28
- "<table><tr><td>1</td></tr><tr><td>2</td></tr><tr><td></td></tr><tr><td>3</td></tr></table>"
29
- ],
30
- "metadata": {},
31
- "output_type": "pyout",
32
- "prompt_number": 1,
33
- "text": [
34
- "\"<table><tr><td>1</td></tr><tr><td>2</td></tr><tr><td></td></tr><tr><td>3</td></tr></table>\""
35
- ]
36
- },
37
- {
38
- "html": [
39
- "<table><tr><td colspan='3'>1</td></tr><tr><td colspan='3'>2</td></tr><tr><td>1</td><td>2</td><td>3</td></tr><tr><td>2</td><td>3</td><td></td></tr></table>"
40
- ],
41
- "metadata": {},
42
- "output_type": "pyout",
43
- "prompt_number": 1,
44
- "text": [
45
- "\"<table><tr><td colspan='3'>1</td></tr><tr><td colspan='3'>2</td></tr><tr><td>1</td><td>2</td><td>3</td></tr><tr><td>2</td><td>3</td><td></td></tr></table>\""
46
- ]
47
- },
48
- {
49
- "html": [
50
- "<table><tr><th>a</th><th>b</th><th>c</th></tr><tr><td>1</td><td>2</td><td>3</td></tr></table>"
51
- ],
52
- "metadata": {},
53
- "output_type": "pyout",
54
- "prompt_number": 1,
55
- "text": [
56
- "\"<table><tr><th>a</th><th>b</th><th>c</th></tr><tr><td>1</td><td>2</td><td>3</td></tr></table>\""
57
- ]
58
- },
59
- {
60
- "html": [
61
- "<table><tr><td>11</td><td>12</td><td>13</td><td>14</td></tr><tr><td>21</td><td>22</td><td>23</td><td></td></tr><tr><td colspan='4'>not an Array</td></tr><tr><td>31</td><td>32</td><td>33</td><td>34</td></tr></table>"
62
- ],
63
- "metadata": {},
64
- "output_type": "pyout",
65
- "prompt_number": 1,
66
- "text": [
67
- "\"<table><tr><td>11</td><td>12</td><td>13</td><td>14</td></tr><tr><td>21</td><td>22</td><td>23</td><td></td></tr><tr><td colspan='4'>not an Array</td></tr><tr><td>31</td><td>32</td><td>33</td><td>34</td></tr></table>\""
68
- ]
69
- },
70
- {
71
- "html": [
72
- "<table><tr><th>a</th><th>b</th><th>c</th></tr><tr><td>11</td><td>21</td><td>31</td></tr><tr><td>12</td><td>22</td><td>32</td></tr><tr><td>13</td><td>23</td><td>33</td></tr><tr><td>14</td><td></td><td>34</td></tr></table>"
73
- ],
74
- "metadata": {},
75
- "output_type": "pyout",
76
- "prompt_number": 1,
77
- "text": [
78
- "\"<table><tr><th>a</th><th>b</th><th>c</th></tr><tr><td>11</td><td>21</td><td>31</td></tr><tr><td>12</td><td>22</td><td>32</td></tr><tr><td>13</td><td>23</td><td>33</td></tr><tr><td>14</td><td></td><td>34</td></tr></table>\""
79
- ]
80
- },
81
- {
82
- "html": [
83
- "<table><tr><th>a</th><th>b</th><th>c</th><th>e</th></tr><tr><td>1</td><td>2</td><td>3</td><td></td></tr><tr><td colspan='4'>not an Array</td></tr><tr><td>2</td><td>3</td><td>4</td><td>5</td></tr></table>"
84
- ],
85
- "metadata": {},
86
- "output_type": "pyout",
87
- "prompt_number": 1,
88
- "text": [
89
- "\"<table><tr><th>a</th><th>b</th><th>c</th><th>e</th></tr><tr><td>1</td><td>2</td><td>3</td><td></td></tr><tr><td colspan='4'>not an Array</td></tr><tr><td>2</td><td>3</td><td>4</td><td>5</td></tr></table>\""
90
- ]
91
- },
92
- {
93
- "html": [
94
- "<table><tr><th>a</th><th>b</th><th>c</th><th>0</th><th>d</th><th>1</th><th>2</th></tr><tr><td>1</td><td>2</td><td>3</td><td>0</td><td></td><td></td><td></td></tr><tr><td>2</td><td>3</td><td>4</td><td></td><td>5</td><td></td><td></td></tr><tr><td></td><td></td><td></td><td>x</td><td></td><td>y</td><td></td></tr><tr><td></td><td></td><td></td><td>a</td><td></td><td>b</td><td>c</td></tr></table>"
95
- ],
96
- "metadata": {},
97
- "output_type": "pyout",
98
- "prompt_number": 1,
99
- "text": [
100
- "\"<table><tr><th>a</th><th>b</th><th>c</th><th>0</th><th>d</th><th>1</th><th>2</th></tr><tr><td>1</td><td>2</td><td>3</td><td>0</td><td></td><td></td><td></td></tr><tr><td>2</td><td>3</td><td>4</td><td></td><td>5</td><td></td><td></td></tr><tr><td></td><td></td><td></td><td>x</td><td></td><td>y</td><td></td></tr><tr><td></td><td></td><td></td><td>a</td><td></td><td>b</td><td>c</td></tr></table>\""
101
- ]
102
- }
103
- ],
104
- "prompt_number": 1
44
+ "output_type": "display_data"
105
45
  },
106
46
  {
107
- "cell_type": "code",
108
- "collapsed": false,
109
- "input": [
110
- "IRuby.table (1..1000).map {|i| (1..1000).map {|j| i * j } }"
111
- ],
112
- "language": "python",
47
+ "data": {
48
+ "text/html": [
49
+ "<table><tr><td>11</td><td>12</td><td>13</td><td>14</td></tr><tr><td>21</td><td>22</td><td>23</td><td></td></tr><tr><td colspan='4'>not an Array</td></tr><tr><td>31</td><td>32</td><td>33</td><td>34</td></tr></table>"
50
+ ],
51
+ "text/plain": [
52
+ "\"<table><tr><td>11</td><td>12</td><td>13</td><td>14</td></tr><tr><td>21</td><td>22</td><td>23</td><td></td></tr><tr><td colspan='4'>not an Array</td></tr><tr><td>31</td><td>32</td><td>33</td><td>34</td></tr></table>\""
53
+ ]
54
+ },
113
55
  "metadata": {},
114
- "outputs": [
115
- {
116
- "html": [
117
- "<table><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td rowspan='7'>&#8230;</td><td>993</td><td>994</td><td>995</td><td>996</td><td>997</td><td>998</td><td>999</td></tr><tr><td>2</td><td>4</td><td>6</td><td>8</td><td>10</td><td>12</td><td>14</td><td>1986</td><td>1988</td><td>1990</td><td>1992</td><td>1994</td><td>1996</td><td>1998</td></tr><tr><td>3</td><td>6</td><td>9</td><td>12</td><td>15</td><td>18</td><td>21</td><td>2979</td><td>2982</td><td>2985</td><td>2988</td><td>2991</td><td>2994</td><td>2997</td></tr><tr><td>4</td><td>8</td><td>12</td><td>16</td><td>20</td><td>24</td><td>28</td><td>3972</td><td>3976</td><td>3980</td><td>3984</td><td>3988</td><td>3992</td><td>3996</td></tr><tr><td>5</td><td>10</td><td>15</td><td>20</td><td>25</td><td>30</td><td>35</td><td>4965</td><td>4970</td><td>4975</td><td>4980</td><td>4985</td><td>4990</td><td>4995</td></tr><tr><td>6</td><td>12</td><td>18</td><td>24</td><td>30</td><td>36</td><td>42</td><td>5958</td><td>5964</td><td>5970</td><td>5976</td><td>5982</td><td>5988</td><td>5994</td></tr><tr><td>7</td><td>14</td><td>21</td><td>28</td><td>35</td><td>42</td><td>49</td><td>6951</td><td>6958</td><td>6965</td><td>6972</td><td>6979</td><td>6986</td><td>6993</td></tr><tr><td colspan='7'>&#8942;</td><td>&#8945;</td><td colspan='7'>&#8942;</td></tr><tr><td>993</td><td>1986</td><td>2979</td><td>3972</td><td>4965</td><td>5958</td><td>6951</td><td rowspan='7'>&#8230;</td><td>986049</td><td>987042</td><td>988035</td><td>989028</td><td>990021</td><td>991014</td><td>992007</td></tr><tr><td>994</td><td>1988</td><td>2982</td><td>3976</td><td>4970</td><td>5964</td><td>6958</td><td>987042</td><td>988036</td><td>989030</td><td>990024</td><td>991018</td><td>992012</td><td>993006</td></tr><tr><td>995</td><td>1990</td><td>2985</td><td>3980</td><td>4975</td><td>5970</td><td>6965</td><td>988035</td><td>989030</td><td>990025</td><td>991020</td><td>992015</td><td>993010</td><td>994005</td></tr><tr><td>996</td><td>1992</td><td>2988</td><td>3984</td><td>4980</td><td>5976</td><td>6972</td><td>989028</td><td>990024</td><td>991020</td><td>992016</td><td>993012</td><td>994008</td><td>995004</td></tr><tr><td>997</td><td>1994</td><td>2991</td><td>3988</td><td>4985</td><td>5982</td><td>6979</td><td>990021</td><td>991018</td><td>992015</td><td>993012</td><td>994009</td><td>995006</td><td>996003</td></tr><tr><td>998</td><td>1996</td><td>2994</td><td>3992</td><td>4990</td><td>5988</td><td>6986</td><td>991014</td><td>992012</td><td>993010</td><td>994008</td><td>995006</td><td>996004</td><td>997002</td></tr><tr><td>999</td><td>1998</td><td>2997</td><td>3996</td><td>4995</td><td>5994</td><td>6993</td><td>992007</td><td>993006</td><td>994005</td><td>995004</td><td>996003</td><td>997002</td><td>998001</td></tr></table>"
118
- ],
119
- "metadata": {},
120
- "output_type": "pyout",
121
- "prompt_number": 2,
122
- "text": [
123
- "\"<table><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td rowspan='7'>&#8230;</td><td>993</td><td>994</td><td>995</td><td>996</td><td>997</td><td>998</td><td>999</td></tr><tr><td>2</td><td>4</td><td>6</td><td>8</td><td>10</td><td>12</td><td>14</td><td>1986</td><td>1988</td><td>1990</td><td>1992</td><td>1994</td><td>1996</td><td>1998</td></tr><tr><td>3</td><td>6</td><td>9</td><td>12</td><td>15</td><td>18</td><td>21</td><td>2979</td><td>2982</td><td>2985</td><td>2988</td><td>2991</td><td>2994</td><td>2997</td></tr><tr><td>4</td><td>8</td><td>12</td><td>16</td><td>20</td><td>24</td><td>28</td><td>3972</td><td>3976</td><td>3980</td><td>3984</td><td>3988</td><td>3992</td><td>3996</td></tr><tr><td>5</td><td>10</td><td>15</td><td>20</td><td>25</td><td>30</td><td>35</td><td>4965</td><td>4970</td><td>4975</td><td>4980</td><td>4985</td><td>4990</td><td>4995</td></tr><tr><td>6</td><td>12</td><td>18</td><td>24</td><td>30</td><td>36</td><td>42</td><td>5958</td><td>5964</td><td>5970</td><td>5976</td><td>5982</td><td>5988</td><td>5994</td></tr><tr><td>7</td><td>14</td><td>21</td><td>28</td><td>35</td><td>42</td><td>49</td><td>6951</td><td>6958</td><td>6965</td><td>6972</td><td>6979</td><td>6986</td><td>6993</td></tr><tr><td colspan='7'>&#8942;</td><td>&#8945;</td><td colspan='7'>&#8942;</td></tr><tr><td>993</td><td>1986</td><td>2979</td><td>3972</td><td>4965</td><td>5958</td><td>6951</td><td rowspan='7'>&#8230;</td><td>986049</td><td>987042</td><td>988035</td><td>989028</td><td>990021</td><td>991014</td><td>992007</td></tr><tr><td>994</td><td>1988</td><td>2982</td><td>3976</td><td>4970</td><td>5964</td><td>6958</td><td>987042</td><td>988036</td><td>989030</td><td>990024</td><td>991018</td><td>992012</td><td>993006</td></tr><tr><td>995</td><td>1990</td><td>2985</td><td>3980</td><td>4975</td><td>5970</td><td>6965</td><td>988035</td><td>989030</td><td>990025</td><td>991020</td><td>992015</td><td>993010</td><td>994005</td></tr><tr><td>996</td><td>1992</td><td>2988</td><td>3984</td><td>4980</td><td>5976</td><td>6972</td><td>989028</td><td>990024</td><td>991020</td><td>992016</td><td>993012</td><td>994008</td><td>995004</td></tr><tr><td>997</td><td>1994</td><td>2991</td><td>3988</td><td>4985</td><td>5982</td><td>6979</td><td>990021</td><td>991018</td><td>992015</td><td>993012</td><td>994009</td><td>995006</td><td>996003</td></tr><tr><td>998</td><td>1996</td><td>2994</td><td>3992</td><td>4990</td><td>5988</td><td>6986</td><td>991014</td><td>992012</td><td>993010</td><td>994008</td><td>995006</td><td>996004</td><td>997002</td></tr><tr><td>999</td><td>1998</td><td>2997</td><td>3996</td><td>4995</td><td>5994</td><td>6993</td><td>992007</td><td>993006</td><td>994005</td><td>995004</td><td>996003</td><td>997002</td><td>998001</td></tr></table>\""
124
- ]
125
- }
126
- ],
127
- "prompt_number": 2
56
+ "output_type": "display_data"
128
57
  },
129
58
  {
130
- "cell_type": "code",
131
- "collapsed": false,
132
- "input": [
133
- "IRuby.table Hash[(1..1000).map {|i| [i, (1..1000).map {|j| i * j }] }]"
134
- ],
135
- "language": "python",
59
+ "data": {
60
+ "text/html": [
61
+ "<table><tr><th>a</th><th>b</th><th>c</th></tr><tr><td>11</td><td>21</td><td>31</td></tr><tr><td>12</td><td>22</td><td>32</td></tr><tr><td>13</td><td>23</td><td>33</td></tr><tr><td>14</td><td></td><td>34</td></tr></table>"
62
+ ],
63
+ "text/plain": [
64
+ "\"<table><tr><th>a</th><th>b</th><th>c</th></tr><tr><td>11</td><td>21</td><td>31</td></tr><tr><td>12</td><td>22</td><td>32</td></tr><tr><td>13</td><td>23</td><td>33</td></tr><tr><td>14</td><td></td><td>34</td></tr></table>\""
65
+ ]
66
+ },
136
67
  "metadata": {},
137
- "outputs": [
138
- {
139
- "html": [
140
- "<table><tr><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th><th>&#8230;</th><th>993</th><th>994</th><th>995</th><th>996</th><th>997</th><th>998</th><th>999</th></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td rowspan='7'>&#8230;</td><td>993</td><td>994</td><td>995</td><td>996</td><td>997</td><td>998</td><td>999</td></tr><tr><td>2</td><td>4</td><td>6</td><td>8</td><td>10</td><td>12</td><td>14</td><td>1986</td><td>1988</td><td>1990</td><td>1992</td><td>1994</td><td>1996</td><td>1998</td></tr><tr><td>3</td><td>6</td><td>9</td><td>12</td><td>15</td><td>18</td><td>21</td><td>2979</td><td>2982</td><td>2985</td><td>2988</td><td>2991</td><td>2994</td><td>2997</td></tr><tr><td>4</td><td>8</td><td>12</td><td>16</td><td>20</td><td>24</td><td>28</td><td>3972</td><td>3976</td><td>3980</td><td>3984</td><td>3988</td><td>3992</td><td>3996</td></tr><tr><td>5</td><td>10</td><td>15</td><td>20</td><td>25</td><td>30</td><td>35</td><td>4965</td><td>4970</td><td>4975</td><td>4980</td><td>4985</td><td>4990</td><td>4995</td></tr><tr><td>6</td><td>12</td><td>18</td><td>24</td><td>30</td><td>36</td><td>42</td><td>5958</td><td>5964</td><td>5970</td><td>5976</td><td>5982</td><td>5988</td><td>5994</td></tr><tr><td>7</td><td>14</td><td>21</td><td>28</td><td>35</td><td>42</td><td>49</td><td>6951</td><td>6958</td><td>6965</td><td>6972</td><td>6979</td><td>6986</td><td>6993</td></tr><tr><td colspan='7'>&#8942;</td><td>&#8945;</td><td colspan='7'>&#8942;</td></tr><tr><td>993</td><td>1986</td><td>2979</td><td>3972</td><td>4965</td><td>5958</td><td>6951</td><td rowspan='7'>&#8230;</td><td>986049</td><td>987042</td><td>988035</td><td>989028</td><td>990021</td><td>991014</td><td>992007</td></tr><tr><td>994</td><td>1988</td><td>2982</td><td>3976</td><td>4970</td><td>5964</td><td>6958</td><td>987042</td><td>988036</td><td>989030</td><td>990024</td><td>991018</td><td>992012</td><td>993006</td></tr><tr><td>995</td><td>1990</td><td>2985</td><td>3980</td><td>4975</td><td>5970</td><td>6965</td><td>988035</td><td>989030</td><td>990025</td><td>991020</td><td>992015</td><td>993010</td><td>994005</td></tr><tr><td>996</td><td>1992</td><td>2988</td><td>3984</td><td>4980</td><td>5976</td><td>6972</td><td>989028</td><td>990024</td><td>991020</td><td>992016</td><td>993012</td><td>994008</td><td>995004</td></tr><tr><td>997</td><td>1994</td><td>2991</td><td>3988</td><td>4985</td><td>5982</td><td>6979</td><td>990021</td><td>991018</td><td>992015</td><td>993012</td><td>994009</td><td>995006</td><td>996003</td></tr><tr><td>998</td><td>1996</td><td>2994</td><td>3992</td><td>4990</td><td>5988</td><td>6986</td><td>991014</td><td>992012</td><td>993010</td><td>994008</td><td>995006</td><td>996004</td><td>997002</td></tr><tr><td>999</td><td>1998</td><td>2997</td><td>3996</td><td>4995</td><td>5994</td><td>6993</td><td>992007</td><td>993006</td><td>994005</td><td>995004</td><td>996003</td><td>997002</td><td>998001</td></tr></table>"
141
- ],
142
- "metadata": {},
143
- "output_type": "pyout",
144
- "prompt_number": 3,
145
- "text": [
146
- "\"<table><tr><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th><th>&#8230;</th><th>993</th><th>994</th><th>995</th><th>996</th><th>997</th><th>998</th><th>999</th></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td rowspan='7'>&#8230;</td><td>993</td><td>994</td><td>995</td><td>996</td><td>997</td><td>998</td><td>999</td></tr><tr><td>2</td><td>4</td><td>6</td><td>8</td><td>10</td><td>12</td><td>14</td><td>1986</td><td>1988</td><td>1990</td><td>1992</td><td>1994</td><td>1996</td><td>1998</td></tr><tr><td>3</td><td>6</td><td>9</td><td>12</td><td>15</td><td>18</td><td>21</td><td>2979</td><td>2982</td><td>2985</td><td>2988</td><td>2991</td><td>2994</td><td>2997</td></tr><tr><td>4</td><td>8</td><td>12</td><td>16</td><td>20</td><td>24</td><td>28</td><td>3972</td><td>3976</td><td>3980</td><td>3984</td><td>3988</td><td>3992</td><td>3996</td></tr><tr><td>5</td><td>10</td><td>15</td><td>20</td><td>25</td><td>30</td><td>35</td><td>4965</td><td>4970</td><td>4975</td><td>4980</td><td>4985</td><td>4990</td><td>4995</td></tr><tr><td>6</td><td>12</td><td>18</td><td>24</td><td>30</td><td>36</td><td>42</td><td>5958</td><td>5964</td><td>5970</td><td>5976</td><td>5982</td><td>5988</td><td>5994</td></tr><tr><td>7</td><td>14</td><td>21</td><td>28</td><td>35</td><td>42</td><td>49</td><td>6951</td><td>6958</td><td>6965</td><td>6972</td><td>6979</td><td>6986</td><td>6993</td></tr><tr><td colspan='7'>&#8942;</td><td>&#8945;</td><td colspan='7'>&#8942;</td></tr><tr><td>993</td><td>1986</td><td>2979</td><td>3972</td><td>4965</td><td>5958</td><td>6951</td><td rowspan='7'>&#8230;</td><td>986049</td><td>987042</td><td>988035</td><td>989028</td><td>990021</td><td>991014</td><td>992007</td></tr><tr><td>994</td><td>1988</td><td>2982</td><td>3976</td><td>4970</td><td>5964</td><td>6958</td><td>987042</td><td>988036</td><td>989030</td><td>990024</td><td>991018</td><td>992012</td><td>993006</td></tr><tr><td>995</td><td>1990</td><td>2985</td><td>3980</td><td>4975</td><td>5970</td><td>6965</td><td>988035</td><td>989030</td><td>990025</td><td>991020</td><td>992015</td><td>993010</td><td>994005</td></tr><tr><td>996</td><td>1992</td><td>2988</td><td>3984</td><td>4980</td><td>5976</td><td>6972</td><td>989028</td><td>990024</td><td>991020</td><td>992016</td><td>993012</td><td>994008</td><td>995004</td></tr><tr><td>997</td><td>1994</td><td>2991</td><td>3988</td><td>4985</td><td>5982</td><td>6979</td><td>990021</td><td>991018</td><td>992015</td><td>993012</td><td>994009</td><td>995006</td><td>996003</td></tr><tr><td>998</td><td>1996</td><td>2994</td><td>3992</td><td>4990</td><td>5988</td><td>6986</td><td>991014</td><td>992012</td><td>993010</td><td>994008</td><td>995006</td><td>996004</td><td>997002</td></tr><tr><td>999</td><td>1998</td><td>2997</td><td>3996</td><td>4995</td><td>5994</td><td>6993</td><td>992007</td><td>993006</td><td>994005</td><td>995004</td><td>996003</td><td>997002</td><td>998001</td></tr></table>\""
147
- ]
148
- }
149
- ],
150
- "prompt_number": 3
68
+ "output_type": "display_data"
151
69
  },
152
70
  {
153
- "cell_type": "code",
154
- "collapsed": false,
155
- "input": [
156
- "IRuby.display IRuby.table [[1,2],[3,4]], header: true\n",
157
- "IRuby.display IRuby.table [[1,2],[3,4]], header: false\n",
158
- "IRuby.display IRuby.table [[1,2],[3,4]]\n",
159
- "\n",
160
- "IRuby.display IRuby.table [{a:1,b:2},{a:3,b:4}], header: true\n",
161
- "IRuby.display IRuby.table [{a:1,b:2},{a:3,b:4}], header: false\n",
162
- "IRuby.display IRuby.table [{a:1,b:2},{a:3,b:4}]\n",
163
- "\n",
164
- "\n",
165
- "IRuby.display IRuby.table({a:[1,3],b:[2,4]}, header: true)\n",
166
- "IRuby.display IRuby.table({a:[1,3],b:[2,4]}, header: false)\n",
167
- "IRuby.display IRuby.table({a:[1,3],b:[2,4]})"
168
- ],
169
- "language": "python",
71
+ "data": {
72
+ "text/html": [
73
+ "<table><tr><th>a</th><th>b</th><th>c</th><th>e</th></tr><tr><td>1</td><td>2</td><td>3</td><td></td></tr><tr><td colspan='4'>not an Array</td></tr><tr><td>2</td><td>3</td><td>4</td><td>5</td></tr></table>"
74
+ ],
75
+ "text/plain": [
76
+ "\"<table><tr><th>a</th><th>b</th><th>c</th><th>e</th></tr><tr><td>1</td><td>2</td><td>3</td><td></td></tr><tr><td colspan='4'>not an Array</td></tr><tr><td>2</td><td>3</td><td>4</td><td>5</td></tr></table>\""
77
+ ]
78
+ },
170
79
  "metadata": {},
171
- "outputs": [
172
- {
173
- "html": [
174
- "<table><tr><th>0</th><th>1</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>"
175
- ],
176
- "metadata": {},
177
- "output_type": "pyout",
178
- "prompt_number": 4,
179
- "text": [
180
- "\"<table><tr><th>0</th><th>1</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>\""
181
- ]
182
- },
183
- {
184
- "html": [
185
- "<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>"
186
- ],
187
- "metadata": {},
188
- "output_type": "pyout",
189
- "prompt_number": 4,
190
- "text": [
191
- "\"<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>\""
192
- ]
193
- },
194
- {
195
- "html": [
196
- "<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>"
197
- ],
198
- "metadata": {},
199
- "output_type": "pyout",
200
- "prompt_number": 4,
201
- "text": [
202
- "\"<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>\""
203
- ]
204
- },
205
- {
206
- "html": [
207
- "<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>"
208
- ],
209
- "metadata": {},
210
- "output_type": "pyout",
211
- "prompt_number": 4,
212
- "text": [
213
- "\"<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>\""
214
- ]
215
- },
216
- {
217
- "html": [
218
- "<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>"
219
- ],
220
- "metadata": {},
221
- "output_type": "pyout",
222
- "prompt_number": 4,
223
- "text": [
224
- "\"<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>\""
225
- ]
226
- },
227
- {
228
- "html": [
229
- "<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>"
230
- ],
231
- "metadata": {},
232
- "output_type": "pyout",
233
- "prompt_number": 4,
234
- "text": [
235
- "\"<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>\""
236
- ]
237
- },
238
- {
239
- "html": [
240
- "<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>"
241
- ],
242
- "metadata": {},
243
- "output_type": "pyout",
244
- "prompt_number": 4,
245
- "text": [
246
- "\"<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>\""
247
- ]
248
- },
249
- {
250
- "html": [
251
- "<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>"
252
- ],
253
- "metadata": {},
254
- "output_type": "pyout",
255
- "prompt_number": 4,
256
- "text": [
257
- "\"<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>\""
258
- ]
259
- },
260
- {
261
- "html": [
262
- "<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>"
263
- ],
264
- "metadata": {},
265
- "output_type": "pyout",
266
- "prompt_number": 4,
267
- "text": [
268
- "\"<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>\""
269
- ]
270
- }
271
- ],
272
- "prompt_number": 4
80
+ "output_type": "display_data"
273
81
  },
274
82
  {
275
- "cell_type": "code",
276
- "collapsed": false,
277
- "input": [
278
- "IRuby.display IRuby.table({a:1,b:2,c:[3,4]})"
279
- ],
280
- "language": "python",
83
+ "data": {
84
+ "text/html": [
85
+ "<table><tr><th>a</th><th>b</th><th>c</th><th>0</th><th>d</th><th>1</th><th>2</th></tr><tr><td>1</td><td>2</td><td>3</td><td>0</td><td></td><td></td><td></td></tr><tr><td>2</td><td>3</td><td>4</td><td></td><td>5</td><td></td><td></td></tr><tr><td></td><td></td><td></td><td>x</td><td></td><td>y</td><td></td></tr><tr><td></td><td></td><td></td><td>a</td><td></td><td>b</td><td>c</td></tr></table>"
86
+ ],
87
+ "text/plain": [
88
+ "\"<table><tr><th>a</th><th>b</th><th>c</th><th>0</th><th>d</th><th>1</th><th>2</th></tr><tr><td>1</td><td>2</td><td>3</td><td>0</td><td></td><td></td><td></td></tr><tr><td>2</td><td>3</td><td>4</td><td></td><td>5</td><td></td><td></td></tr><tr><td></td><td></td><td></td><td>x</td><td></td><td>y</td><td></td></tr><tr><td></td><td></td><td></td><td>a</td><td></td><td>b</td><td>c</td></tr></table>\""
89
+ ]
90
+ },
91
+ "metadata": {},
92
+ "output_type": "display_data"
93
+ }
94
+ ],
95
+ "source": [
96
+ "IRuby.display IRuby.table([1,2,[],3])\n",
97
+ "IRuby.display IRuby.table([1,2,[1,2,3],[2,3]])\n",
98
+ "IRuby.display IRuby.table({a:1,b:2,c:3})\n",
99
+ "IRuby.display IRuby.table([[11,12,13,14],[21,22,23],'not an Array',[31,32,33,34]])\n",
100
+ "IRuby.display IRuby.table({a:[11,12,13,14],b:[21,22,23],c:[31,32,33,34]})\n",
101
+ "IRuby.display IRuby.table([{a:1,b:2,c:3},'not an Array',{a:2,b:3,c:4,e:5}])\n",
102
+ "IRuby.display IRuby.table([{a:1,b:2,c:3, 0 => 0},{a:2,b:3,c:4,d:5},{0=>:x,1=>:y},[:a,:b,:c]])"
103
+ ]
104
+ },
105
+ {
106
+ "cell_type": "code",
107
+ "execution_count": 2,
108
+ "metadata": {
109
+ "collapsed": false
110
+ },
111
+ "outputs": [
112
+ {
113
+ "data": {
114
+ "text/html": [
115
+ "<table><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td rowspan='7'>&#8230;</td><td>993</td><td>994</td><td>995</td><td>996</td><td>997</td><td>998</td><td>999</td></tr><tr><td>2</td><td>4</td><td>6</td><td>8</td><td>10</td><td>12</td><td>14</td><td>1986</td><td>1988</td><td>1990</td><td>1992</td><td>1994</td><td>1996</td><td>1998</td></tr><tr><td>3</td><td>6</td><td>9</td><td>12</td><td>15</td><td>18</td><td>21</td><td>2979</td><td>2982</td><td>2985</td><td>2988</td><td>2991</td><td>2994</td><td>2997</td></tr><tr><td>4</td><td>8</td><td>12</td><td>16</td><td>20</td><td>24</td><td>28</td><td>3972</td><td>3976</td><td>3980</td><td>3984</td><td>3988</td><td>3992</td><td>3996</td></tr><tr><td>5</td><td>10</td><td>15</td><td>20</td><td>25</td><td>30</td><td>35</td><td>4965</td><td>4970</td><td>4975</td><td>4980</td><td>4985</td><td>4990</td><td>4995</td></tr><tr><td>6</td><td>12</td><td>18</td><td>24</td><td>30</td><td>36</td><td>42</td><td>5958</td><td>5964</td><td>5970</td><td>5976</td><td>5982</td><td>5988</td><td>5994</td></tr><tr><td>7</td><td>14</td><td>21</td><td>28</td><td>35</td><td>42</td><td>49</td><td>6951</td><td>6958</td><td>6965</td><td>6972</td><td>6979</td><td>6986</td><td>6993</td></tr><tr><td colspan='7'>&#8942;</td><td>&#8945;</td><td colspan='7'>&#8942;</td></tr><tr><td>993</td><td>1986</td><td>2979</td><td>3972</td><td>4965</td><td>5958</td><td>6951</td><td rowspan='7'>&#8230;</td><td>986049</td><td>987042</td><td>988035</td><td>989028</td><td>990021</td><td>991014</td><td>992007</td></tr><tr><td>994</td><td>1988</td><td>2982</td><td>3976</td><td>4970</td><td>5964</td><td>6958</td><td>987042</td><td>988036</td><td>989030</td><td>990024</td><td>991018</td><td>992012</td><td>993006</td></tr><tr><td>995</td><td>1990</td><td>2985</td><td>3980</td><td>4975</td><td>5970</td><td>6965</td><td>988035</td><td>989030</td><td>990025</td><td>991020</td><td>992015</td><td>993010</td><td>994005</td></tr><tr><td>996</td><td>1992</td><td>2988</td><td>3984</td><td>4980</td><td>5976</td><td>6972</td><td>989028</td><td>990024</td><td>991020</td><td>992016</td><td>993012</td><td>994008</td><td>995004</td></tr><tr><td>997</td><td>1994</td><td>2991</td><td>3988</td><td>4985</td><td>5982</td><td>6979</td><td>990021</td><td>991018</td><td>992015</td><td>993012</td><td>994009</td><td>995006</td><td>996003</td></tr><tr><td>998</td><td>1996</td><td>2994</td><td>3992</td><td>4990</td><td>5988</td><td>6986</td><td>991014</td><td>992012</td><td>993010</td><td>994008</td><td>995006</td><td>996004</td><td>997002</td></tr><tr><td>999</td><td>1998</td><td>2997</td><td>3996</td><td>4995</td><td>5994</td><td>6993</td><td>992007</td><td>993006</td><td>994005</td><td>995004</td><td>996003</td><td>997002</td><td>998001</td></tr></table>"
116
+ ],
117
+ "text/plain": [
118
+ "\"<table><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td rowspan='7'>&#8230;</td><td>993</td><td>994</td><td>995</td><td>996</td><td>997</td><td>998</td><td>999</td></tr><tr><td>2</td><td>4</td><td>6</td><td>8</td><td>10</td><td>12</td><td>14</td><td>1986</td><td>1988</td><td>1990</td><td>1992</td><td>1994</td><td>1996</td><td>1998</td></tr><tr><td>3</td><td>6</td><td>9</td><td>12</td><td>15</td><td>18</td><td>21</td><td>2979</td><td>2982</td><td>2985</td><td>2988</td><td>2991</td><td>2994</td><td>2997</td></tr><tr><td>4</td><td>8</td><td>12</td><td>16</td><td>20</td><td>24</td><td>28</td><td>3972</td><td>3976</td><td>3980</td><td>3984</td><td>3988</td><td>3992</td><td>3996</td></tr><tr><td>5</td><td>10</td><td>15</td><td>20</td><td>25</td><td>30</td><td>35</td><td>4965</td><td>4970</td><td>4975</td><td>4980</td><td>4985</td><td>4990</td><td>4995</td></tr><tr><td>6</td><td>12</td><td>18</td><td>24</td><td>30</td><td>36</td><td>42</td><td>5958</td><td>5964</td><td>5970</td><td>5976</td><td>5982</td><td>5988</td><td>5994</td></tr><tr><td>7</td><td>14</td><td>21</td><td>28</td><td>35</td><td>42</td><td>49</td><td>6951</td><td>6958</td><td>6965</td><td>6972</td><td>6979</td><td>6986</td><td>6993</td></tr><tr><td colspan='7'>&#8942;</td><td>&#8945;</td><td colspan='7'>&#8942;</td></tr><tr><td>993</td><td>1986</td><td>2979</td><td>3972</td><td>4965</td><td>5958</td><td>6951</td><td rowspan='7'>&#8230;</td><td>986049</td><td>987042</td><td>988035</td><td>989028</td><td>990021</td><td>991014</td><td>992007</td></tr><tr><td>994</td><td>1988</td><td>2982</td><td>3976</td><td>4970</td><td>5964</td><td>6958</td><td>987042</td><td>988036</td><td>989030</td><td>990024</td><td>991018</td><td>992012</td><td>993006</td></tr><tr><td>995</td><td>1990</td><td>2985</td><td>3980</td><td>4975</td><td>5970</td><td>6965</td><td>988035</td><td>989030</td><td>990025</td><td>991020</td><td>992015</td><td>993010</td><td>994005</td></tr><tr><td>996</td><td>1992</td><td>2988</td><td>3984</td><td>4980</td><td>5976</td><td>6972</td><td>989028</td><td>990024</td><td>991020</td><td>992016</td><td>993012</td><td>994008</td><td>995004</td></tr><tr><td>997</td><td>1994</td><td>2991</td><td>3988</td><td>4985</td><td>5982</td><td>6979</td><td>990021</td><td>991018</td><td>992015</td><td>993012</td><td>994009</td><td>995006</td><td>996003</td></tr><tr><td>998</td><td>1996</td><td>2994</td><td>3992</td><td>4990</td><td>5988</td><td>6986</td><td>991014</td><td>992012</td><td>993010</td><td>994008</td><td>995006</td><td>996004</td><td>997002</td></tr><tr><td>999</td><td>1998</td><td>2997</td><td>3996</td><td>4995</td><td>5994</td><td>6993</td><td>992007</td><td>993006</td><td>994005</td><td>995004</td><td>996003</td><td>997002</td><td>998001</td></tr></table>\""
119
+ ]
120
+ },
121
+ "execution_count": 2,
122
+ "metadata": {},
123
+ "output_type": "execute_result"
124
+ }
125
+ ],
126
+ "source": [
127
+ "IRuby.table (1..1000).map {|i| (1..1000).map {|j| i * j } }"
128
+ ]
129
+ },
130
+ {
131
+ "cell_type": "code",
132
+ "execution_count": 3,
133
+ "metadata": {
134
+ "collapsed": false
135
+ },
136
+ "outputs": [
137
+ {
138
+ "data": {
139
+ "text/html": [
140
+ "<table><tr><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th><th>&#8230;</th><th>993</th><th>994</th><th>995</th><th>996</th><th>997</th><th>998</th><th>999</th></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td rowspan='7'>&#8230;</td><td>993</td><td>994</td><td>995</td><td>996</td><td>997</td><td>998</td><td>999</td></tr><tr><td>2</td><td>4</td><td>6</td><td>8</td><td>10</td><td>12</td><td>14</td><td>1986</td><td>1988</td><td>1990</td><td>1992</td><td>1994</td><td>1996</td><td>1998</td></tr><tr><td>3</td><td>6</td><td>9</td><td>12</td><td>15</td><td>18</td><td>21</td><td>2979</td><td>2982</td><td>2985</td><td>2988</td><td>2991</td><td>2994</td><td>2997</td></tr><tr><td>4</td><td>8</td><td>12</td><td>16</td><td>20</td><td>24</td><td>28</td><td>3972</td><td>3976</td><td>3980</td><td>3984</td><td>3988</td><td>3992</td><td>3996</td></tr><tr><td>5</td><td>10</td><td>15</td><td>20</td><td>25</td><td>30</td><td>35</td><td>4965</td><td>4970</td><td>4975</td><td>4980</td><td>4985</td><td>4990</td><td>4995</td></tr><tr><td>6</td><td>12</td><td>18</td><td>24</td><td>30</td><td>36</td><td>42</td><td>5958</td><td>5964</td><td>5970</td><td>5976</td><td>5982</td><td>5988</td><td>5994</td></tr><tr><td>7</td><td>14</td><td>21</td><td>28</td><td>35</td><td>42</td><td>49</td><td>6951</td><td>6958</td><td>6965</td><td>6972</td><td>6979</td><td>6986</td><td>6993</td></tr><tr><td colspan='7'>&#8942;</td><td>&#8945;</td><td colspan='7'>&#8942;</td></tr><tr><td>993</td><td>1986</td><td>2979</td><td>3972</td><td>4965</td><td>5958</td><td>6951</td><td rowspan='7'>&#8230;</td><td>986049</td><td>987042</td><td>988035</td><td>989028</td><td>990021</td><td>991014</td><td>992007</td></tr><tr><td>994</td><td>1988</td><td>2982</td><td>3976</td><td>4970</td><td>5964</td><td>6958</td><td>987042</td><td>988036</td><td>989030</td><td>990024</td><td>991018</td><td>992012</td><td>993006</td></tr><tr><td>995</td><td>1990</td><td>2985</td><td>3980</td><td>4975</td><td>5970</td><td>6965</td><td>988035</td><td>989030</td><td>990025</td><td>991020</td><td>992015</td><td>993010</td><td>994005</td></tr><tr><td>996</td><td>1992</td><td>2988</td><td>3984</td><td>4980</td><td>5976</td><td>6972</td><td>989028</td><td>990024</td><td>991020</td><td>992016</td><td>993012</td><td>994008</td><td>995004</td></tr><tr><td>997</td><td>1994</td><td>2991</td><td>3988</td><td>4985</td><td>5982</td><td>6979</td><td>990021</td><td>991018</td><td>992015</td><td>993012</td><td>994009</td><td>995006</td><td>996003</td></tr><tr><td>998</td><td>1996</td><td>2994</td><td>3992</td><td>4990</td><td>5988</td><td>6986</td><td>991014</td><td>992012</td><td>993010</td><td>994008</td><td>995006</td><td>996004</td><td>997002</td></tr><tr><td>999</td><td>1998</td><td>2997</td><td>3996</td><td>4995</td><td>5994</td><td>6993</td><td>992007</td><td>993006</td><td>994005</td><td>995004</td><td>996003</td><td>997002</td><td>998001</td></tr></table>"
141
+ ],
142
+ "text/plain": [
143
+ "\"<table><tr><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th><th>&#8230;</th><th>993</th><th>994</th><th>995</th><th>996</th><th>997</th><th>998</th><th>999</th></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td rowspan='7'>&#8230;</td><td>993</td><td>994</td><td>995</td><td>996</td><td>997</td><td>998</td><td>999</td></tr><tr><td>2</td><td>4</td><td>6</td><td>8</td><td>10</td><td>12</td><td>14</td><td>1986</td><td>1988</td><td>1990</td><td>1992</td><td>1994</td><td>1996</td><td>1998</td></tr><tr><td>3</td><td>6</td><td>9</td><td>12</td><td>15</td><td>18</td><td>21</td><td>2979</td><td>2982</td><td>2985</td><td>2988</td><td>2991</td><td>2994</td><td>2997</td></tr><tr><td>4</td><td>8</td><td>12</td><td>16</td><td>20</td><td>24</td><td>28</td><td>3972</td><td>3976</td><td>3980</td><td>3984</td><td>3988</td><td>3992</td><td>3996</td></tr><tr><td>5</td><td>10</td><td>15</td><td>20</td><td>25</td><td>30</td><td>35</td><td>4965</td><td>4970</td><td>4975</td><td>4980</td><td>4985</td><td>4990</td><td>4995</td></tr><tr><td>6</td><td>12</td><td>18</td><td>24</td><td>30</td><td>36</td><td>42</td><td>5958</td><td>5964</td><td>5970</td><td>5976</td><td>5982</td><td>5988</td><td>5994</td></tr><tr><td>7</td><td>14</td><td>21</td><td>28</td><td>35</td><td>42</td><td>49</td><td>6951</td><td>6958</td><td>6965</td><td>6972</td><td>6979</td><td>6986</td><td>6993</td></tr><tr><td colspan='7'>&#8942;</td><td>&#8945;</td><td colspan='7'>&#8942;</td></tr><tr><td>993</td><td>1986</td><td>2979</td><td>3972</td><td>4965</td><td>5958</td><td>6951</td><td rowspan='7'>&#8230;</td><td>986049</td><td>987042</td><td>988035</td><td>989028</td><td>990021</td><td>991014</td><td>992007</td></tr><tr><td>994</td><td>1988</td><td>2982</td><td>3976</td><td>4970</td><td>5964</td><td>6958</td><td>987042</td><td>988036</td><td>989030</td><td>990024</td><td>991018</td><td>992012</td><td>993006</td></tr><tr><td>995</td><td>1990</td><td>2985</td><td>3980</td><td>4975</td><td>5970</td><td>6965</td><td>988035</td><td>989030</td><td>990025</td><td>991020</td><td>992015</td><td>993010</td><td>994005</td></tr><tr><td>996</td><td>1992</td><td>2988</td><td>3984</td><td>4980</td><td>5976</td><td>6972</td><td>989028</td><td>990024</td><td>991020</td><td>992016</td><td>993012</td><td>994008</td><td>995004</td></tr><tr><td>997</td><td>1994</td><td>2991</td><td>3988</td><td>4985</td><td>5982</td><td>6979</td><td>990021</td><td>991018</td><td>992015</td><td>993012</td><td>994009</td><td>995006</td><td>996003</td></tr><tr><td>998</td><td>1996</td><td>2994</td><td>3992</td><td>4990</td><td>5988</td><td>6986</td><td>991014</td><td>992012</td><td>993010</td><td>994008</td><td>995006</td><td>996004</td><td>997002</td></tr><tr><td>999</td><td>1998</td><td>2997</td><td>3996</td><td>4995</td><td>5994</td><td>6993</td><td>992007</td><td>993006</td><td>994005</td><td>995004</td><td>996003</td><td>997002</td><td>998001</td></tr></table>\""
144
+ ]
145
+ },
146
+ "execution_count": 3,
281
147
  "metadata": {},
282
- "outputs": [
283
- {
284
- "html": [
285
- "<table><tr><th>a</th><th>b</th><th>c</th></tr><tr><td>1</td><td>2</td><td>3</td></tr><tr><td></td><td></td><td>4</td></tr></table>"
286
- ],
287
- "metadata": {},
288
- "output_type": "pyout",
289
- "prompt_number": 5,
290
- "text": [
291
- "\"<table><tr><th>a</th><th>b</th><th>c</th></tr><tr><td>1</td><td>2</td><td>3</td></tr><tr><td></td><td></td><td>4</td></tr></table>\""
292
- ]
293
- }
294
- ],
295
- "prompt_number": 5
148
+ "output_type": "execute_result"
296
149
  }
297
150
  ],
298
- "metadata": {}
151
+ "source": [
152
+ "IRuby.table Hash[(1..1000).map {|i| [i, (1..1000).map {|j| i * j }] }]"
153
+ ]
154
+ },
155
+ {
156
+ "cell_type": "code",
157
+ "execution_count": 4,
158
+ "metadata": {
159
+ "collapsed": false
160
+ },
161
+ "outputs": [
162
+ {
163
+ "data": {
164
+ "text/html": [
165
+ "<table><tr><th>0</th><th>1</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>"
166
+ ],
167
+ "text/plain": [
168
+ "\"<table><tr><th>0</th><th>1</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>\""
169
+ ]
170
+ },
171
+ "metadata": {},
172
+ "output_type": "display_data"
173
+ },
174
+ {
175
+ "data": {
176
+ "text/html": [
177
+ "<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>"
178
+ ],
179
+ "text/plain": [
180
+ "\"<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>\""
181
+ ]
182
+ },
183
+ "metadata": {},
184
+ "output_type": "display_data"
185
+ },
186
+ {
187
+ "data": {
188
+ "text/html": [
189
+ "<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>"
190
+ ],
191
+ "text/plain": [
192
+ "\"<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>\""
193
+ ]
194
+ },
195
+ "metadata": {},
196
+ "output_type": "display_data"
197
+ },
198
+ {
199
+ "data": {
200
+ "text/html": [
201
+ "<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>"
202
+ ],
203
+ "text/plain": [
204
+ "\"<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>\""
205
+ ]
206
+ },
207
+ "metadata": {},
208
+ "output_type": "display_data"
209
+ },
210
+ {
211
+ "data": {
212
+ "text/html": [
213
+ "<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>"
214
+ ],
215
+ "text/plain": [
216
+ "\"<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>\""
217
+ ]
218
+ },
219
+ "metadata": {},
220
+ "output_type": "display_data"
221
+ },
222
+ {
223
+ "data": {
224
+ "text/html": [
225
+ "<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>"
226
+ ],
227
+ "text/plain": [
228
+ "\"<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>\""
229
+ ]
230
+ },
231
+ "metadata": {},
232
+ "output_type": "display_data"
233
+ },
234
+ {
235
+ "data": {
236
+ "text/html": [
237
+ "<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>"
238
+ ],
239
+ "text/plain": [
240
+ "\"<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>\""
241
+ ]
242
+ },
243
+ "metadata": {},
244
+ "output_type": "display_data"
245
+ },
246
+ {
247
+ "data": {
248
+ "text/html": [
249
+ "<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>"
250
+ ],
251
+ "text/plain": [
252
+ "\"<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>\""
253
+ ]
254
+ },
255
+ "metadata": {},
256
+ "output_type": "display_data"
257
+ },
258
+ {
259
+ "data": {
260
+ "text/html": [
261
+ "<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>"
262
+ ],
263
+ "text/plain": [
264
+ "\"<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>\""
265
+ ]
266
+ },
267
+ "metadata": {},
268
+ "output_type": "display_data"
269
+ }
270
+ ],
271
+ "source": [
272
+ "IRuby.display IRuby.table [[1,2],[3,4]], header: true\n",
273
+ "IRuby.display IRuby.table [[1,2],[3,4]], header: false\n",
274
+ "IRuby.display IRuby.table [[1,2],[3,4]]\n",
275
+ "\n",
276
+ "IRuby.display IRuby.table [{a:1,b:2},{a:3,b:4}], header: true\n",
277
+ "IRuby.display IRuby.table [{a:1,b:2},{a:3,b:4}], header: false\n",
278
+ "IRuby.display IRuby.table [{a:1,b:2},{a:3,b:4}]\n",
279
+ "\n",
280
+ "\n",
281
+ "IRuby.display IRuby.table({a:[1,3],b:[2,4]}, header: true)\n",
282
+ "IRuby.display IRuby.table({a:[1,3],b:[2,4]}, header: false)\n",
283
+ "IRuby.display IRuby.table({a:[1,3],b:[2,4]})"
284
+ ]
285
+ },
286
+ {
287
+ "cell_type": "code",
288
+ "execution_count": 5,
289
+ "metadata": {
290
+ "collapsed": false
291
+ },
292
+ "outputs": [
293
+ {
294
+ "data": {
295
+ "text/html": [
296
+ "<table><tr><th>a</th><th>b</th><th>c</th></tr><tr><td>1</td><td>2</td><td>3</td></tr><tr><td></td><td></td><td>4</td></tr></table>"
297
+ ],
298
+ "text/plain": [
299
+ "\"<table><tr><th>a</th><th>b</th><th>c</th></tr><tr><td>1</td><td>2</td><td>3</td></tr><tr><td></td><td></td><td>4</td></tr></table>\""
300
+ ]
301
+ },
302
+ "metadata": {},
303
+ "output_type": "display_data"
304
+ }
305
+ ],
306
+ "source": [
307
+ "IRuby.display IRuby.table({a:1,b:2,c:[3,4]})"
308
+ ]
299
309
  }
300
- ]
301
- }
310
+ ],
311
+ "metadata": {
312
+ "kernelspec": {
313
+ "display_name": "Ruby",
314
+ "language": "ruby",
315
+ "name": "ruby"
316
+ },
317
+ "language_info": {
318
+ "file_extension": "rb",
319
+ "mimetype": "text/ruby",
320
+ "name": "ruby",
321
+ "version": "2.1.2"
322
+ }
323
+ },
324
+ "nbformat": 4,
325
+ "nbformat_minor": 0
326
+ }