Skip to content

Instantly share code, notes, and snippets.

@gorn
gorn / input
Created December 9, 2018 16:47
yYzZMmXSsrnNRVOovxInCcQXxOoqNhHBWwbPOoppPjROoBbhHrJdDHhqQcCjJnNdZzDVvKkOivVdDIoXIixlLeEgeEltTLGyYDdiMjJmuoODPpWwdDdiIkgGKrCPpylkKLDdYcWwQqCvIiVcRkKlctTCLNncCQqEwWefAnNaSsnOoNKkwWbBtTNnTtRrbBCcFwWIiqQhOoHUbBEeVXxNoOtWjHhJwTnrRJPpjSZzqQEejJffFyYFJjGgeAaHhEBbGgYyMiImJjsRLlyEeYIihVvohHFfOhHgGdxXvVwWNEenDSszZXSsxUrRvVGiIuUwWacznNZCcCEeylLYTUutfFQsSqyYLlTBbJEenJjNlLjJjWgGwsSVvsSYytAaAnNOzZqQokMmHhCwYEeyWcIiCcuUKgcCCDBbvVYydcmMobBOBiIlLxXbWwXxqFfaARrQbwWBzZlhHHhEeGgUugBqQbBOobWwJjJOojGFfuZzfFsSULlqQJjtSAasHQqjJinNIpPEeQRrtvVmyYMOoasSbBuUArRuUFfkAUVvuWwodDGgOSstXxTGgUuEeaLlkKMmnNKxxQEjJRrQkKqOAgGlLaDdokKfFenlLtTMmYZzygGOooRrONMCQvVqlLeENyYFfnZWwmMZzzXsSxvVSoOPpsJjTtpPFfbumMIiUisSIzhHXxLlzZRrZRrBHUnrRNudDhoObtTBMTtmHFfhtTefFEuDdUcaxXADhHdNmMnLtTlXJiJiqOTQLJjlIiqtokTtKEeIinmMluULzZNQlAaLlLQqGFOaAofwWQqpPhsSEeFfgmMVvGuUVvUugGlIiLvVHNngzZBXxbOSsoXXxxhkKHTHhPpgjJvVIitTGtnNIiKDdkqQmvVMvVRrRPpKkrkfPpFKwQSstTrRqSsSfFiVvXxKkIHhPpooOLJjlVvVvYyDdOMmUudDvVsoDLldOWpPqQmDdMMYXhHxXaAOHhoWwEedZzeEnNgGdDqQDhHNCcniIJBbjBTLlJjEeNnfvVFJ
@gorn
gorn / tw_knp.py
Created October 5, 2018 12:09
Twitter Kámen Nůžky Papír
#Muj pokus
from random import choice
p={'K':'P', 'N':'K', 'P':'N'}
h=['K', 'N', 'P']
while True:
a=input('\nK/N/P?: ')
if a in h:
@gorn
gorn / rustproblem.md
Last active August 13, 2018 16:52
rustproblem
fn main() {
  let adata = Data { number: 1, number2: 7};
  let mut t = Tester {data : None};
  // something

  t.set_data(adata);
  assert_eq!(t.data.unwrap().number, 1);
}
@gorn
gorn / rspreadsheet_advanced.rb
Last active November 2, 2016 02:43
More possibilities with rspreadshhet (https://github.com/gorn/rspreadsheet)
require 'rspreadsheet'
book = Rspreadsheet::Workbook.new
sheet = book.create_worksheet 'Top icecreams'
sheet[1,1] = 'Top icecreams'
p sheet[1,1].class # => String
p sheet[1,1] # => "Top icecreams"
# These are all the same - alternative syntax for VALUE of the cell.
@gorn
gorn / rspreadsheet.rb
Last active November 3, 2015 00:37
rspreadsheet gem usage example (https://github.com/gorn/rspreadsheet)
require 'rspreadsheet'
book = Rspreadsheet.open('./test.ods')
sheet = book.worksheets(1)
# get value of a cell B5 (there are more ways to do this)
sheet.B5 # => 'cell value'
sheet[5,2] # => 'cell value'
sheet.row(5).cell(2).value # => 'cell value'