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
find . -type f -name "*.pyc" -exec rm -f {} \; |
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
\a : an ASCII bell character (07) | |
\d : the date in "Weekday Month Date" format (e.g., "Tue May 26") | |
\D{format} : the format is passed to strftime(3) and the result is inserted into the prompt string; an empty format results in a locale-specific time representation. The braces are required | |
\e : an ASCII escape character (033) | |
\h : the hostname up to the first '.' | |
\H : the hostname | |
\j : the number of jobs currently managed by the shell | |
\l : the basename of the shell’s terminal device name | |
\n : newline | |
\r : carriage return |
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
''' | |
Command line script used to grab synonyms off the web using a thesaurus api. | |
The words come from the "Big Huge Thesaurus", and I make no claims about the | |
results. In order to use this script you will need a valid API key, which is | |
available, for free (up to 10,000 calls / day), from here - http://words.bighugelabs.com/getkey.php | |
If you're really lazy, you can just use my key - eb4e57bb2c34032da68dfeb3a0578b68 | |
but I'd rather you didn't. Thanks. | |
Examples: |
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
from bs4 import BeautifulSoup | |
import json | |
import requests | |
import HTMLParser | |
class FestivalEvent(object): | |
pass | |
def cleanText(txt): | |
return txt.strip().replace(u'\u2013', '-').replace(u'\u2019', '\'') |
NewerOlder