annotate bin/uniqs @ 7449:1c3c4b1a93e5

<b_jonas> learn Church invented a sane model of computation, but Turing was better with marketing, so now people define theoretical computer science using obsolate hardware like tape recorders.
author HackBot
date Sun, 17 Apr 2016 22:22:41 +0000
parents 9bf80fcf858b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5846
aae488a4cfcf <Jafet> ` sed -i -e \'s,python,/usr/bin/python,\' bin/uniqs
HackBot
parents: 5845
diff changeset
1 #!/usr/bin/python
5845
b7c3d318e0e6 <Jafet> ` echo $\'#!python\\ns=set()\\ntry:\\n while True:\\n l=raw_input()\\n if l not in s:\\n s.add(l)\\n print(l)\\nexcept IOError:\\n pass\' > bin/uniqs && chmod +x bin/uniqs
HackBot
parents:
diff changeset
2 s=set()
b7c3d318e0e6 <Jafet> ` echo $\'#!python\\ns=set()\\ntry:\\n while True:\\n l=raw_input()\\n if l not in s:\\n s.add(l)\\n print(l)\\nexcept IOError:\\n pass\' > bin/uniqs && chmod +x bin/uniqs
HackBot
parents:
diff changeset
3 try:
b7c3d318e0e6 <Jafet> ` echo $\'#!python\\ns=set()\\ntry:\\n while True:\\n l=raw_input()\\n if l not in s:\\n s.add(l)\\n print(l)\\nexcept IOError:\\n pass\' > bin/uniqs && chmod +x bin/uniqs
HackBot
parents:
diff changeset
4 while True:
b7c3d318e0e6 <Jafet> ` echo $\'#!python\\ns=set()\\ntry:\\n while True:\\n l=raw_input()\\n if l not in s:\\n s.add(l)\\n print(l)\\nexcept IOError:\\n pass\' > bin/uniqs && chmod +x bin/uniqs
HackBot
parents:
diff changeset
5 l=raw_input()
b7c3d318e0e6 <Jafet> ` echo $\'#!python\\ns=set()\\ntry:\\n while True:\\n l=raw_input()\\n if l not in s:\\n s.add(l)\\n print(l)\\nexcept IOError:\\n pass\' > bin/uniqs && chmod +x bin/uniqs
HackBot
parents:
diff changeset
6 if l not in s:
b7c3d318e0e6 <Jafet> ` echo $\'#!python\\ns=set()\\ntry:\\n while True:\\n l=raw_input()\\n if l not in s:\\n s.add(l)\\n print(l)\\nexcept IOError:\\n pass\' > bin/uniqs && chmod +x bin/uniqs
HackBot
parents:
diff changeset
7 s.add(l)
b7c3d318e0e6 <Jafet> ` echo $\'#!python\\ns=set()\\ntry:\\n while True:\\n l=raw_input()\\n if l not in s:\\n s.add(l)\\n print(l)\\nexcept IOError:\\n pass\' > bin/uniqs && chmod +x bin/uniqs
HackBot
parents:
diff changeset
8 print(l)
5847
9bf80fcf858b <Jafet> ` sed -i -e \'s,IOError,EOFError,\' bin/uniqs
HackBot
parents: 5846
diff changeset
9 except EOFError:
5845
b7c3d318e0e6 <Jafet> ` echo $\'#!python\\ns=set()\\ntry:\\n while True:\\n l=raw_input()\\n if l not in s:\\n s.add(l)\\n print(l)\\nexcept IOError:\\n pass\' > bin/uniqs && chmod +x bin/uniqs
HackBot
parents:
diff changeset
10 pass