vamshikr / people_name_program

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

People Name Program 1.0

Usage

To get help on options run

python3 people_names.py --help

Example:

python3 people_names.py --names-file ./coding-test-data.txt

Example 2:

python3 people_names.py --names-file ../vamshi_interviews_2020/coding-test-data.txt --max-count 50

Sample Output:

Command:

python3 people_names.py --names-file ../vamshi_interviews_2020/coding-test-data.txt --max-count 10

Output

### Cardinality
Number of unique full names: 49157
Number of unique last names: 475
Number of unique first names: 3007

### most common last names sorted in descending order
Barton: 143
Lang: 136
Ortiz: 135
Hilll: 134
Hills: 130
Terry: 129
Becker: 128
Johns: 128
Romaguera: 128
Batz: 127

### most common first names sorted in descending order
Tara: 34
Andreanne: 32
Stephania: 31
Keon: 31
Manley: 30
Kayley: 30
Ulices: 30
Summer: 30
Kaycee: 30
Milo: 29

### Unique (last name, first name) set
Graham, Mckenna
Marvin, Garfield
McLaughlin, Mariah
Lang, Agustina
Bradtke, Nikko
Adams, Luis
Lehner, Matilde
Ortiz, Anita
Koch, Berry
Cartwright, Nicolas

### Modified (last name, first name) set
Graham, Garfield
Marvin, Mariah
McLaughlin, Agustina
Lang, Nikko
Bradtke, Luis
Adams, Matilde
Lehner, Anita
Ortiz, Berry
Koch, Nicolas
Cartwright, Mckenna

Modified Names List Logic

Table 1. Unique names list:
Last name First name

a

1

b

2

c

3

d

4

e

5

After rotating the first name list

Table 2. Modified names list:
Last name First name

a

2

b

3

c

4

d

5

e

1

About

License:MIT License


Languages

Language:Python 100.0%