{ "metadata": { "language": "ruby", "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "code", "collapsed": false, "input": [ "IRuby.display IRuby.table([1,2,[],3])\n", "IRuby.display IRuby.table([1,2,[1,2,3],[2,3]])\n", "IRuby.display IRuby.table({a:1,b:2,c:3})\n", "IRuby.display IRuby.table([[11,12,13,14],[21,22,23],'not an Array',[31,32,33,34]])\n", "IRuby.display IRuby.table({a:[11,12,13,14],b:[21,22,23],c:[31,32,33,34]})\n", "IRuby.display IRuby.table([{a:1,b:2,c:3},'not an Array',{a:2,b:3,c:4,e:5}])\n", "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]])" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "
1
2
3
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 1, "text": [ "\"
1
2
3
\"" ] }, { "html": [ "
1
2
123
23
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 1, "text": [ "\"
1
2
123
23
\"" ] }, { "html": [ "
abc
123
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 1, "text": [ "\"
abc
123
\"" ] }, { "html": [ "
11121314
212223
not an Array
31323334
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 1, "text": [ "\"
11121314
212223
not an Array
31323334
\"" ] }, { "html": [ "
abc
112131
122232
132333
1434
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 1, "text": [ "\"
abc
112131
122232
132333
1434
\"" ] }, { "html": [ "
abce
123
not an Array
2345
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 1, "text": [ "\"
abce
123
not an Array
2345
\"" ] }, { "html": [ "
abc0d12
1230
2345
xy
abc
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 1, "text": [ "\"
abc0d12
1230
2345
xy
abc
\"" ] } ], "prompt_number": 1 }, { "cell_type": "code", "collapsed": false, "input": [ "IRuby.table (1..1000).map {|i| (1..1000).map {|j| i * j } }" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "
1234567993994995996997998999
24681012141986198819901992199419961998
369121518212979298229852988299129942997
4812162024283972397639803984398839923996
51015202530354965497049754980498549904995
61218243036425958596459705976598259885994
71421283542496951695869656972697969866993
993198629793972496559586951986049987042988035989028990021991014992007
994198829823976497059646958987042988036989030990024991018992012993006
995199029853980497559706965988035989030990025991020992015993010994005
996199229883984498059766972989028990024991020992016993012994008995004
997199429913988498559826979990021991018992015993012994009995006996003
998199629943992499059886986991014992012993010994008995006996004997002
999199829973996499559946993992007993006994005995004996003997002998001
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 2, "text": [ "\"
1234567993994995996997998999
24681012141986198819901992199419961998
369121518212979298229852988299129942997
4812162024283972397639803984398839923996
51015202530354965497049754980498549904995
61218243036425958596459705976598259885994
71421283542496951695869656972697969866993
993198629793972496559586951986049987042988035989028990021991014992007
994198829823976497059646958987042988036989030990024991018992012993006
995199029853980497559706965988035989030990025991020992015993010994005
996199229883984498059766972989028990024991020992016993012994008995004
997199429913988498559826979990021991018992015993012994009995006996003
998199629943992499059886986991014992012993010994008995006996004997002
999199829973996499559946993992007993006994005995004996003997002998001
\"" ] } ], "prompt_number": 2 }, { "cell_type": "code", "collapsed": false, "input": [ "IRuby.table Hash[(1..1000).map {|i| [i, (1..1000).map {|j| i * j }] }]" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "
1234567993994995996997998999
1234567993994995996997998999
24681012141986198819901992199419961998
369121518212979298229852988299129942997
4812162024283972397639803984398839923996
51015202530354965497049754980498549904995
61218243036425958596459705976598259885994
71421283542496951695869656972697969866993
993198629793972496559586951986049987042988035989028990021991014992007
994198829823976497059646958987042988036989030990024991018992012993006
995199029853980497559706965988035989030990025991020992015993010994005
996199229883984498059766972989028990024991020992016993012994008995004
997199429913988498559826979990021991018992015993012994009995006996003
998199629943992499059886986991014992012993010994008995006996004997002
999199829973996499559946993992007993006994005995004996003997002998001
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 3, "text": [ "\"
1234567993994995996997998999
1234567993994995996997998999
24681012141986198819901992199419961998
369121518212979298229852988299129942997
4812162024283972397639803984398839923996
51015202530354965497049754980498549904995
61218243036425958596459705976598259885994
71421283542496951695869656972697969866993
993198629793972496559586951986049987042988035989028990021991014992007
994198829823976497059646958987042988036989030990024991018992012993006
995199029853980497559706965988035989030990025991020992015993010994005
996199229883984498059766972989028990024991020992016993012994008995004
997199429913988498559826979990021991018992015993012994009995006996003
998199629943992499059886986991014992012993010994008995006996004997002
999199829973996499559946993992007993006994005995004996003997002998001
\"" ] } ], "prompt_number": 3 }, { "cell_type": "code", "collapsed": false, "input": [ "IRuby.display IRuby.table [[1,2],[3,4]], header: true\n", "IRuby.display IRuby.table [[1,2],[3,4]], header: false\n", "IRuby.display IRuby.table [[1,2],[3,4]]\n", "\n", "IRuby.display IRuby.table [{a:1,b:2},{a:3,b:4}], header: true\n", "IRuby.display IRuby.table [{a:1,b:2},{a:3,b:4}], header: false\n", "IRuby.display IRuby.table [{a:1,b:2},{a:3,b:4}]\n", "\n", "\n", "IRuby.display IRuby.table({a:[1,3],b:[2,4]}, header: true)\n", "IRuby.display IRuby.table({a:[1,3],b:[2,4]}, header: false)\n", "IRuby.display IRuby.table({a:[1,3],b:[2,4]})" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "
01
12
34
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 4, "text": [ "\"
01
12
34
\"" ] }, { "html": [ "
12
34
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 4, "text": [ "\"
12
34
\"" ] }, { "html": [ "
12
34
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 4, "text": [ "\"
12
34
\"" ] }, { "html": [ "
ab
12
34
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 4, "text": [ "\"
ab
12
34
\"" ] }, { "html": [ "
12
34
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 4, "text": [ "\"
12
34
\"" ] }, { "html": [ "
ab
12
34
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 4, "text": [ "\"
ab
12
34
\"" ] }, { "html": [ "
ab
12
34
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 4, "text": [ "\"
ab
12
34
\"" ] }, { "html": [ "
12
34
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 4, "text": [ "\"
12
34
\"" ] }, { "html": [ "
ab
12
34
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 4, "text": [ "\"
ab
12
34
\"" ] } ], "prompt_number": 4 }, { "cell_type": "code", "collapsed": false, "input": [ "IRuby.display IRuby.table({a:1,b:2,c:[3,4]})" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "
abc
123
4
" ], "metadata": {}, "output_type": "pyout", "prompt_number": 5, "text": [ "\"
abc
123
4
\"" ] } ], "prompt_number": 5 } ], "metadata": {} } ] }