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 http://ubuntuforums.org/archive/index.php/t-375563.html | |
#!/usr/bin/env python | |
''' | |
This script assumes that all the network shares in /etc/fstab are accessible | |
to the current user. In addition, the shares need to be CIFS (not SMBFS) in | |
order to correctly allow unmounting by the user in the event the share is | |
disconnected. /sbin/mount.cifs & /sbin/umount.cifs must be suid root. |
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 python | |
"""Count imports in *.py files in a given directory recursively. | |
Each name is counted once per file. | |
""" | |
import ast | |
import os | |
import sys | |
from collections import Counter |