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 | |
""" | |
contactinfo.py is a simple script to get contact information from | |
Facebook. | |
To use, first install mechanize [1]. Then use the friendstocsv application [2] | |
on Facebook to export a csv file with all of your friends. Be sure | |
to include at least the profile URL. | |
Afterwards, edit this file to put your email, password, and user agent |
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/perl | |
use strict; | |
use warnings; | |
my $x = [qr/([aieou]+)/io, qr/(\d+)/o]; #<- Here is a list of 2 regexes... | |
my $line = <STDIN>; | |
foreach my $regex (@{$x}) { | |
if ($line =~ $regex) { | |
print "a vowel or digit!\n"; |
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 typedispatch import * | |
@dispatch(regexmulti(r'(\d{3})\D{0,2}(\d{3})\D?(\d{4})')) | |
def phone_numbers(phone_numbers): | |
for match in phone_numbers: | |
print '-'.join(match.groups()) | |
@dispatch() | |
def phone_numbers(text): |
NewerOlder