Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #451 - getIcons (include, grid size=3)

Lua code

1  
function getIcons()
2  
  hashes = otherresults["#442"] or error("Need result of #442, please recalc")
3  
  
4  
  j, icons = nil, {}
5  
  while true do
6  
    i, j, r, hash = string.find(hashes, "(%d+, %d+, %d+, %d+) %-> ([a-f0-9]+)", j)
7  
    if i == nil then break end
8  
    
9  
    icons[hash] = r
10  
  end
11  
end

test run  test run with input  download  show line numbers   

Travelled to 9 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #451
Snippet name: getIcons (include, grid size=3)
Eternal ID of this version: #451/1
Text MD5: 959adb88a043d8129268fb2a260f5c8e
Author: stefan
Category: image recognition
Type: Lua code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-02-12 23:53:32
Source code size: 297 bytes / 11 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 592 / 104
Referenced in: [show references]

Formerly at http://tinybrain.de/451 & http://451.tinybrain.de