Guest User

Untitled

a guest
Jan 17th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. cat<<_|grep -o 'x=.*>'|cut -c4-|sort -n|grep -o '>.</t'|cut -c2
  2.  
  3. grep -o 'x=.*>'|cut -c4-|sort -n|grep -o '>.</t'|cut -c2
  4.  
  5. <?xml...
  6. </svg>
  7. _
  8.  
  9. q"x="/2>{'"/1=i}${'>/1=c}/
  10.  
  11. q e# Read all input from STDIN.
  12. "x="/ e# Split it at occurrences of "x=".
  13. 2> e# Discard the first two chunks (head and container).
  14. { e# Sort the remaining chunks by the following key:
  15. '"/ e# Split at occurrences of '"'.
  16. 1= e# Select the second chunk (digits of x="<digits>").
  17. i e# Cast to integer.
  18. }$ e#
  19. { e# For each of the sorted chunks:
  20. '>/ e# Split at occurrences of '>'.
  21. 1= e# Select the second chunk.
  22. c e# Cast to character.
  23. }/ e#
  24.  
  25. l=[],r=/x="(d*).*>(.)/g;while(e=r.exec(document.lastChild.innerHTML))l[e[1]]=e[2];l.join``
  26.  
  27. import re,sys
  28. print''.join(t[1] for t in sorted(re.findall(r'(d+), -d+)">(.)</t',sys.stdin.read()),key=lambda t:int(t[0])))
  29.  
  30. ""<>(v=ImportString[#~StringDrop~157,"XML"][[2,3,4;;;;2]])[[;;,3]][[Ordering[FromDigits/@v[[;;,2,2,2]]]]]&
Add Comment
Please, Sign In to add comment