Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.52 KB | None | 0 0
  1. {
  2. "cells": [
  3. {
  4. "cell_type": "code",
  5. "source": [
  6. "puts 'test'"
  7. ],
  8. "outputs": [
  9. {
  10. "output_type": "stream",
  11. "name": "stdout",
  12. "text": [
  13. "test\n"
  14. ]
  15. }
  16. ],
  17. "execution_count": 3,
  18. "metadata": {
  19. "collapsed": false,
  20. "outputHidden": false,
  21. "inputHidden": false
  22. }
  23. },
  24. {
  25. "cell_type": "code",
  26. "source": [
  27. "'test'"
  28. ],
  29. "outputs": [
  30. {
  31. "output_type": "execute_result",
  32. "execution_count": 4,
  33. "data": {
  34. "text/plain": [
  35. "\"test\""
  36. ]
  37. },
  38. "metadata": {}
  39. }
  40. ],
  41. "execution_count": 4,
  42. "metadata": {
  43. "collapsed": false,
  44. "outputHidden": false,
  45. "inputHidden": false
  46. }
  47. },
  48. {
  49. "cell_type": "code",
  50. "source": [
  51. "'test'.methods.sort"
  52. ],
  53. "outputs": [
  54. {
  55. "output_type": "execute_result",
  56. "execution_count": 5,
  57. "data": {
  58. "text/plain": [
  59. "[:!, :!=, :!~, :%, :*, :+, :+@, :-@, :<, :<<, :<=, :<=>, :==, :===, :=~, :>, :>=, :[], :[]=, :__binding__, :__id__, :__send__, :ascii_only?, :b, :between?, :bytes, :bytesize, :byteslice, :capitalize, :capitalize!, :casecmp, :center, :chars, :chomp, :chomp!, :chop, :chop!, :chr, :class, :clear, :clone, :codepoints, :concat, :count, :crypt, :define_singleton_method, :delete, :delete!, :display, :downcase, :downcase!, :dump, :dup, :each_byte, :each_char, :each_codepoint, :each_line, :empty?, :encode, :encode!, :encoding, :end_with?, :enum_for, :eql?, :equal?, :extend, :force_encoding, :freeze, :frozen?, :getbyte, :gsub, :gsub!, :hash, :hex, :include?, :index, :insert, :inspect, :instance_eval, :instance_exec, :instance_of?, :instance_variable_defined?, :instance_variable_get, :instance_variable_set, :instance_variables, :intern, :is_a?, :itself, :kind_of?, :length, :lines, :ljust, :lstrip, :lstrip!, :match, :method, :methods, :next, :next!, :nil?, :object_id, :oct, :ord, :partition, :prepend, :pretty_inspect, :pretty_print, :pretty_print_cycle, :pretty_print_inspect, :pretty_print_instance_variables, :private_methods, :protected_methods, :pry, :public_method, :public_methods, :public_send, :remove_instance_variable, :replace, :respond_to?, :reverse, :reverse!, :rindex, :rjust, :rpartition, :rstrip, :rstrip!, :scan, :scrub, :scrub!, :send, :setbyte, :shellescape, :shellsplit, :singleton_class, :singleton_method, :singleton_methods, :size, :slice, :slice!, :split, :squeeze, :squeeze!, :start_with?, :strip, :strip!, :sub, :sub!, :succ, :succ!, :sum, :swapcase, :swapcase!, :taint, :tainted?, :tap, :to_c, :to_enum, :to_f, :to_i, :to_json, :to_json_raw, :to_json_raw_object, :to_r, :to_s, :to_str, :to_sym, :tr, :tr!, :tr_s, :tr_s!, :trust, :unicode_normalize, :unicode_normalize!, :unicode_normalized?, :unpack, :untaint, :untrust, :untrusted?, :upcase, :upcase!, :upto, :valid_encoding?]"
  60. ]
  61. },
  62. "metadata": {}
  63. }
  64. ],
  65. "execution_count": 5,
  66. "metadata": {
  67. "collapsed": false,
  68. "outputHidden": false,
  69. "inputHidden": false
  70. }
  71. },
  72. {
  73. "cell_type": "code",
  74. "source": [
  75. "puts 'test'.methods.sort"
  76. ],
  77. "outputs": [
  78. {
  79. "output_type": "stream",
  80. "name": "stdout",
  81. "text": [
  82. "[:!, :!=, :!~, :%, :*, :+, :+@, :-@, :<, :<<, :<=, :<=>, :==, :===, :=~, :>, :>=, :[], :[]=, :__binding__, :__id__, :__send__, :ascii_only?, :b, :between?, :bytes, :bytesize, :byteslice, :capitalize, :capitalize!, :casecmp, :center, :chars, :chomp, :chomp!, :chop, :chop!, :chr, :class, :clear, :clone, :codepoints, :concat, :count, :crypt, :define_singleton_method, :delete, :delete!, :display, :downcase, :downcase!, :dump, :dup, :each_byte, :each_char, :each_codepoint, :each_line, :empty?, :encode, :encode!, :encoding, :end_with?, :enum_for, :eql?, :equal?, :extend, :force_encoding, :freeze, :frozen?, :getbyte, :gsub, :gsub!, :hash, :hex, :include?, :index, :insert, :inspect, :instance_eval, :instance_exec, :instance_of?, :instance_variable_defined?, :instance_variable_get, :instance_variable_set, :instance_variables, :intern, :is_a?, :itself, :kind_of?, :length, :lines, :ljust, :lstrip, :lstrip!, :match, :method, :methods, :next, :next!, :nil?, :object_id, :oct, :ord, :partition, :prepend, :pretty_inspect, :pretty_print, :pretty_print_cycle, :pretty_print_inspect, :pretty_print_instance_variables, :private_methods, :protected_methods, :pry, :public_method, :public_methods, :public_send, :remove_instance_variable, :replace, :respond_to?, :reverse, :reverse!, :rindex, :rjust, :rpartition, :rstrip, :rstrip!, :scan, :scrub, :scrub!, :send, :setbyte, :shellescape, :shellsplit, :singleton_class, :singleton_method, :singleton_methods, :size, :slice, :slice!, :split, :squeeze, :squeeze!, :start_with?, :strip, :strip!, :sub, :sub!, :succ, :succ!, :sum, :swapcase, :swapcase!, :taint, :tainted?, :tap, :to_c, :to_enum, :to_f, :to_i, :to_json, :to_json_raw, :to_json_raw_object, :to_r, :to_s, :to_str, :to_sym, :tr, :tr!, :tr_s, :tr_s!, :trust, :unicode_normalize, :unicode_normalize!, :unicode_normalized?, :unpack, :untaint, :untrust, :untrusted?, :upcase, :upcase!, :upto, :valid_encoding?]\n"
  83. ]
  84. }
  85. ],
  86. "execution_count": 6,
  87. "metadata": {
  88. "collapsed": false,
  89. "outputHidden": false,
  90. "inputHidden": false
  91. }
  92. },
  93. {
  94. "cell_type": "code",
  95. "source": [
  96. "'test'.methods.sort.each { |m| puts m };nil"
  97. ],
  98. "outputs": [
  99. {
  100. "output_type": "stream",
  101. "name": "stdout",
  102. "text": [
  103. "!\n",
  104. "!=\n",
  105. "!~\n",
  106. "%\n",
  107. "*\n",
  108. "+\n",
  109. "+@\n",
  110. "-@\n",
  111. "<\n",
  112. "<<\n",
  113. "<=\n",
  114. "<=>\n",
  115. "==\n",
  116. "===\n",
  117. "=~\n",
  118. ">\n",
  119. ">=\n",
  120. "[]\n",
  121. "[]=\n",
  122. "__binding__\n",
  123. "__id__\n",
  124. "__send__\n",
  125. "ascii_only?\n",
  126. "b\n",
  127. "between?\n",
  128. "bytes\n",
  129. "bytesize\n",
  130. "byteslice\n",
  131. "capitalize\n",
  132. "capitalize!\n",
  133. "casecmp\n",
  134. "center\n",
  135. "chars\n",
  136. "chomp\n",
  137. "chomp!\n",
  138. "chop\n",
  139. "chop!\n",
  140. "chr\n",
  141. "class\n",
  142. "clear\n",
  143. "clone\n",
  144. "codepoints\n",
  145. "concat\n",
  146. "count\n",
  147. "crypt\n",
  148. "define_singleton_method\n",
  149. "delete\n",
  150. "delete!\n",
  151. "display\n",
  152. "downcase\n",
  153. "downcase!\n",
  154. "dump\n",
  155. "dup\n",
  156. "each_byte\n",
  157. "each_char\n",
  158. "each_codepoint\n",
  159. "each_line\n",
  160. "empty?\n",
  161. "encode\n",
  162. "encode!\n",
  163. "encoding\n",
  164. "end_with?\n",
  165. "enum_for\n",
  166. "eql?\n",
  167. "equal?\n",
  168. "extend\n",
  169. "force_encoding\n",
  170. "freeze\n",
  171. "frozen?\n",
  172. "getbyte\n",
  173. "gsub\n",
  174. "gsub!\n",
  175. "hash\n",
  176. "hex\n",
  177. "include?\n",
  178. "index\n",
  179. "insert\n",
  180. "inspect\n",
  181. "instance_eval\n",
  182. "instance_exec\n",
  183. "instance_of?\n",
  184. "instance_variable_defined?\n",
  185. "instance_variable_get\n",
  186. "instance_variable_set\n",
  187. "instance_variables\n",
  188. "intern\n",
  189. "is_a?\n",
  190. "itself\n",
  191. "kind_of?\n",
  192. "length\n",
  193. "lines\n",
  194. "ljust\n",
  195. "lstrip\n",
  196. "lstrip!\n",
  197. "match\n",
  198. "method\n",
  199. "methods\n",
  200. "next\n",
  201. "next!\n",
  202. "nil?\n",
  203. "object_id\n",
  204. "oct\n",
  205. "ord\n",
  206. "partition\n",
  207. "prepend\n",
  208. "pretty_inspect\n",
  209. "pretty_print\n",
  210. "pretty_print_cycle\n",
  211. "pretty_print_inspect\n",
  212. "pretty_print_instance_variables\n",
  213. "private_methods\n",
  214. "protected_methods\n",
  215. "pry\n",
  216. "public_method\n",
  217. "public_methods\n",
  218. "public_send\n",
  219. "remove_instance_variable\n",
  220. "replace\n",
  221. "respond_to?\n",
  222. "reverse\n",
  223. "reverse!\n",
  224. "rindex\n",
  225. "rjust\n",
  226. "rpartition\n",
  227. "rstrip\n",
  228. "rstrip!\n",
  229. "scan\n",
  230. "scrub\n",
  231. "scrub!\n",
  232. "send\n",
  233. "setbyte\n",
  234. "shellescape\n",
  235. "shellsplit\n",
  236. "singleton_class\n",
  237. "singleton_method\n",
  238. "singleton_methods\n",
  239. "size\n",
  240. "slice\n",
  241. "slice!\n",
  242. "split\n",
  243. "squeeze\n",
  244. "squeeze!\n",
  245. "start_with?\n",
  246. "strip\n",
  247. "strip!\n",
  248. "sub\n",
  249. "sub!\n",
  250. "succ\n",
  251. "succ!\n",
  252. "sum\n",
  253. "swapcase\n",
  254. "swapcase!\n",
  255. "taint\n",
  256. "tainted?\n",
  257. "tap\n",
  258. "to_c\n",
  259. "to_enum\n",
  260. "to_f\n",
  261. "to_i\n",
  262. "to_json\n",
  263. "to_json_raw\n",
  264. "to_json_raw_object\n",
  265. "to_r\n",
  266. "to_s\n",
  267. "to_str\n",
  268. "to_sym\n",
  269. "tr\n",
  270. "tr!\n",
  271. "tr_s\n",
  272. "tr_s!\n",
  273. "trust\n",
  274. "unicode_normalize\n",
  275. "unicode_normalize!\n",
  276. "unicode_normalized?\n",
  277. "unpack\n",
  278. "untaint\n",
  279. "untrust\n",
  280. "untrusted?\n",
  281. "upcase\n",
  282. "upcase!\n",
  283. "upto\n",
  284. "valid_encoding?\n"
  285. ]
  286. }
  287. ],
  288. "execution_count": 10,
  289. "metadata": {
  290. "collapsed": false,
  291. "outputHidden": false,
  292. "inputHidden": false
  293. }
  294. },
  295. {
  296. "cell_type": "code",
  297. "source": [
  298. "require 'date'\n",
  299. "Time.new.utc"
  300. ],
  301. "outputs": [
  302. {
  303. "output_type": "execute_result",
  304. "execution_count": 7,
  305. "data": {
  306. "text/plain": [
  307. "2017-02-24 21:05:37 UTC"
  308. ]
  309. },
  310. "metadata": {}
  311. }
  312. ],
  313. "execution_count": 7,
  314. "metadata": {
  315. "collapsed": false,
  316. "outputHidden": false,
  317. "inputHidden": false
  318. }
  319. },
  320. {
  321. "cell_type": "code",
  322. "source": [
  323. "require 'active_support/inflector'\n",
  324. "'Time'.pluralize"
  325. ],
  326. "outputs": [
  327. {
  328. "output_type": "execute_result",
  329. "execution_count": 10,
  330. "data": {
  331. "text/plain": [
  332. "\"Times\""
  333. ]
  334. },
  335. "metadata": {}
  336. }
  337. ],
  338. "execution_count": 10,
  339. "metadata": {
  340. "collapsed": false,
  341. "outputHidden": false,
  342. "inputHidden": false
  343. }
  344. },
  345. {
  346. "cell_type": "code",
  347. "source": [
  348. "require 'active_support/core_ext'\n",
  349. "[].present?"
  350. ],
  351. "outputs": [
  352. {
  353. "output_type": "execute_result",
  354. "execution_count": 11,
  355. "data": {
  356. "text/plain": [
  357. "false"
  358. ]
  359. },
  360. "metadata": {}
  361. }
  362. ],
  363. "execution_count": 11,
  364. "metadata": {
  365. "collapsed": false,
  366. "outputHidden": false,
  367. "inputHidden": false
  368. }
  369. },
  370. {
  371. "cell_type": "code",
  372. "source": [],
  373. "outputs": [],
  374. "execution_count": null,
  375. "metadata": {
  376. "collapsed": false,
  377. "outputHidden": false,
  378. "inputHidden": false
  379. }
  380. }
  381. ],
  382. "metadata": {
  383. "kernelspec": {
  384. "name": "ruby",
  385. "language": "ruby",
  386. "display_name": "Ruby 2.3.1"
  387. },
  388. "kernel_info": {
  389. "name": "ruby"
  390. },
  391. "language_info": {
  392. "name": "ruby",
  393. "version": "2.3.1",
  394. "mimetype": "application/x-ruby",
  395. "file_extension": ".rb"
  396. }
  397. },
  398. "nbformat": 4,
  399. "nbformat_minor": 4
  400. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement