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/examples/table.ipynb DELETED
@@ -1,356 +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/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
- },
34
- {
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
- },
43
- "metadata": {},
44
- "output_type": "display_data"
45
- },
46
- {
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
- },
55
- "metadata": {},
56
- "output_type": "display_data"
57
- },
58
- {
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
- },
67
- "metadata": {},
68
- "output_type": "display_data"
69
- },
70
- {
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
- },
79
- "metadata": {},
80
- "output_type": "display_data"
81
- },
82
- {
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,
147
- "metadata": {},
148
- "output_type": "execute_result"
149
- }
150
- ],
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
- ]
309
- },
310
- {
311
- "cell_type": "code",
312
- "execution_count": 6,
313
- "metadata": {
314
- "collapsed": false
315
- },
316
- "outputs": [
317
- {
318
- "data": {
319
- "text/html": [
320
- "<table><tr><th><span style='color:red'>a</span></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><span style='color:red'>4</span></td></tr></table>"
321
- ],
322
- "text/plain": [
323
- "\"<table><tr><th><span style='color:red'>a</span></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><span style='color:red'>4</span></td></tr></table>\""
324
- ]
325
- },
326
- "metadata": {},
327
- "output_type": "display_data"
328
- }
329
- ],
330
- "source": [
331
- "class Red < String\n",
332
- " def to_html\n",
333
- " \"<span style='color:red'>#{self}</span>\"\n",
334
- " end\n",
335
- "end\n",
336
- "\n",
337
- "IRuby.display IRuby.table({Red.new(\"a\") => 1, b:2, c: [3, Red.new(\"4\")]})"
338
- ]
339
- }
340
- ],
341
- "metadata": {
342
- "kernelspec": {
343
- "display_name": "Ruby 2.1.2",
344
- "language": "ruby",
345
- "name": "ruby"
346
- },
347
- "language_info": {
348
- "file_extension": "rb",
349
- "mimetype": "application/x-ruby",
350
- "name": "ruby",
351
- "version": "2.1.2"
352
- }
353
- },
354
- "nbformat": 4,
355
- "nbformat_minor": 0
356
- }
data/logo/favicon.ico DELETED
Binary file
data/logo/iruby.png DELETED
Binary file