I lightly tweaked the Pygmalion theme to better suit my needs.
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | def stock_picker(prices) | |
| stock_size = prices.size | |
| results = Array.new(stock_size) { Array.new(3, 0) } | |
| prices.each_with_index do |stock, i| | |
| best_diff = [0, 0, 0] | |
| sub_array = prices[i+1..-1] | |
| sub_array.each do |next_stock| | |
| diff = stock - next_stock | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | def caesar_cipher(msg, shift) | |
| # ascii codes for alphabet | |
| # A - Z : 65 - 90 | |
| # a - z : 97 - 122 | |
| asciis = [] | |
| msg.each_char { |char| asciis << char.ord } | |
| shifted = asciis.map do |ascii| | |
| if ascii.between?(65, 90) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Factorial | |
| def factorial(num) | |
| return 1 if num <= 1 | |
| num * factorial(num - 1) | |
| end | |
| p factorial(3) | |
| # using enumerable: | |
| def fact(num) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | puts 'ANIMALS' | |
| animals = [:dog, :cat, :zebra, :quokka, :unicorn, :bear] | |
| p animals.map(&:to_s) | |
| result = animals.select { |animal| animal.length >= 4 } | |
| p result | |
| nested_animals = [[:dog, :cat, :zebra], [:quokka, :unicorn, :bear]] | |
| p nested_animals.flatten.map(&:to_s) | |
| b = {} | 
