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
"""Implement a memorable ID string. | |
The original idea for this comes from Asana where it is documented on their | |
blog: | |
http://blog.asana.com/2011/09/6-sad-squid-snuggle-softly/ | |
There are other partial implementations of this and can be found here: | |
Node.js: https://github.com/linus/greg | |
Java: https://github.com/PerWiklander/IdentifierSentence |
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 bytes_to_bitstring(bytes, size=32): | |
"""A simple helper function that takes some input data (bytes) and converts | |
it to a string of "bits" for debugging purposes. | |
Args: | |
bytes: The data to convert to a string of bits | |
size: The size (in bits) of the input data. | |
Returns: | |
A str of length `size` with the bytes converted into a string of bits. | |
""" |
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/python | |
""" | |
Create a 'pretty' webpage for all of the moives in a directory by getting the | |
movie poster from IMDB. | |
Since it depends on the OMDB API, not all posters that are returned are correct. | |
That being said, it's good enough for a start. =) | |
""" |
NewerOlder