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
| // ==UserScript== | |
| // @name Display pronounciation for all vocabulary | |
| // @namespace https://www.japanesepod101.com/2007/05/24/lower-intermediate-25-tempura-tantrum/ | |
| // @version 0.1 | |
| // @description Display pronounciation for all vocabulary | |
| // @license GNU Lesser General Public License (LGPL) | |
| // @author pgreze | |
| // @copyright pgreze, GNU Lesser General Public License (LGPL) | |
| // @include https://japanesepod101.com/* | |
| // @include https://www.japanesepod101.com/* |
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
| >>> def show(i): print(''.join(("1" if i & mask else "0") for mask in (0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01))) | |
| ... | |
| >>> show(0x40) | |
| 01000000 | |
| >>> show(1) | |
| 00000001 | |
| >>> show(24) | |
| 00011000 | |
| >>> show(ord('a')) | |
| 01100001 |
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
| #!/usr/bin/env python3 | |
| """Skyline solutions. | |
| See https://pykello.github.io/programming/2015/12/12/haskell-skyline/ | |
| Bench with ipython: | |
| %timeit -r 10 skyline.skyline1(skyline.buildings) | |
| 10000 loops, best of 10: 19.6 µs per loop |
NewerOlder