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
class Getitem(object): | |
def __init__(self, a): | |
self.a = a | |
def __getitem__(self, attr): | |
print(f"__getitem__ {attr}") | |
return getattr(self, attr) | |
class Setitem(Getitem): | |
def __setitem__(self, attr, value): |
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
#!/bin/bash | |
split () { grep -o .; } | |
remove_spaces () { grep -vP '[[:space:]]+'; } | |
count () { sort | uniq -c; } | |
read -r _ # just ignore and halt on EoF | |
while read -r sentence | |
do |
OlderNewer