I needed a whole bunch of sample last names for some bogus data for an app I'm working on. Thankfully, we have Google, and of course, this information is just a query away.
I quickly found the Top 1000 most common surnames in the US (as of the 1990 census).
This should be exactly what I need.
Little known fact - Simon is a more common last name than Frank and Clayton. Not to mention Lloyd and Boone. Heck, we just barely beat out Waters.
As a bonus, here's a little PLT-Scheme app I wrote up to grab and fix the case on the names. No claim that it's especially efficient or compact, it just is.
(module name-grabber mzscheme (require (lib "url.ss" "net") (prefix l: (lib "1.ss" "srfi")) (prefix s: (lib "13.ss" "srfi")) (planet "sxml.ss" ("lizorkin" "sxml.plt" 1 4)) (planet "htmlprag.ss" ("neil" "htmlprag.plt" 1 3)) (lib "26.ss" "srfi")) (provide get-names) (define (fix-case word) (string-append (string-upcase (substring word 0 1)) (string-downcase (substring word 1)))) (define (get-names) (let* ((url (string->url "http://names.mongabay.com/most_common_surnames.htm")) (in-port (get-pure-port url)) (doc (html->sxml in-port))) (close-input-port in-port) (let ((name-rows ((sxpath '("//table[@style = 'boldtable']/tr")) doc))) (l:drop (map (lambda (row) (let ((cols ((sxpath '(// td *text*)) row))) (if (not (null? cols)) (fix-case (l:first cols)) (void)))) name-rows) 1)))) )
Thanks Ben. You don't have a provide clause in there; is that intentional?
ReplyDeleteNo it wasn't intentional - and, I just added it.
ReplyDeleteBut it wasn't completely un-intentional either
Lately, I've found DrScheme I've been using DrScheme as environment where I can quickly whip up little apps to generate stuff - like this list of names, or bulk sets of INSERT statements.
Perhaps because Windows has no Shell, I've been finding that DrScheme can fill that niche.
DrScheme has a "module" mode where the bindings for a given module are visible, which is why what I was using when I wrote the attached code.
In this case, I wrote up the script, kicked off the REPL, use a couple of list operations to take a slice of the 1000 names. And, I was done.
Thanks for the suggestion!
I actually blogged about generating random fake names before (7/2006), because I needed some test data. My solution used curl, grep, and sed (all from a cygwin bash shell) to do very, very basic html scraping.
ReplyDeleteOf course, we all know what's bound to happen when you rely on html scraping: the html eventually changes, and your scripts no longer work [properly].
So, I revised it in 11/2006, but apparently never posted the revised version.
That code no longer works, either, though. I just wanted to share the way I did it, especially the website that I used: www.fakenamegenerator.com
Got to say Dave, FakeNameGenerator.com is impressive. I could do without all the ads, but creating an entire identity is just too cool.
ReplyDeleteActually, the mobile version is pretty clean.
Nice find!
-Ben
hello, I look for people who can make transfers virtual bank to bank.
ReplyDeleteWe will give accounts .The person will receive 40 to 45% of the sum. To trust is to you to see I know you have our money, because I saw it I hope that we will make money much the same. I look forward to the follow
j am someone who don't be afraid by anythink j am ready to add your group and meet all hacker who can make money and want to win money . j will be for you serious partner and j will pay you your part .
j am ready for all trial .
contact me siazoure@yahoo.fr
can you give me a credit card number and a fake name?
ReplyDeleteoh and a sercurity number? Thanks ben. :)
I tried one random id from fakenamegenerator for paypal, but it didn't work!
ReplyDeletedo yu have security too? i jus need a damn card to see something im not gonna buy nothin
ReplyDeletei can generate a valid credit card number but can't get the security pin, cvv, ssn, name of card owner. please anyone with information's on how to get this info please contact me. chukszzi@hotmail.co.uk
ReplyDeleteBen,i want a visa credit card no. with the security code can you pls help me
ReplyDeletei need the expiry date for the vias number given by ben:).THX u very much
ReplyDeletei want to know to generate valid expiry date of master cards. thanks
ReplyDeleteIs it possible to buy stuff with the fake credit card
ReplyDeleteIt seems so, but I don't know if it is risk since fakenamegenerator creates and identity.
ReplyDeleteBanking database should have all those info needed.
ReplyDeletecan i get credit card info ?? whole with card no expiry date cvv and holder name plz... i dont understand this java script or html... or email me @ karanjainniceboy@gmail.com thnx
ReplyDeleteI need fake credit card number to sign up in a porn site. I need cvv2 as well. Would you plz advise if I also need a fake email id?
ReplyDeleteWhat About name of card , city , zip and others ..??
ReplyDeletei cant understand anything can u give me a face card no and its details
ReplyDelete