Git Product home page Git Product logo

namecombiner's Introduction

namecombiner

Python program to create married hybrid names.

My wife's last name is "Kindler," and years ago we tried to create the worst mash-up of her name with "Clark," part of my last name. We arrived at "Clardler."

Yesterday I learned that friends had unexpectedly wed, so I wanted to find all possible combinations of their names; hence, this program, which uses itertools.product to combine all possible beginning and ending strings from the two given names.

$ ./namecombiner.py Clark Kindler
C-Kindler
C-dler
C-er
C-indler
C-ler
C-ndler
C-r
Cl-Kindler
Cl-dler
Cl-er
Cl-indler
Cl-ler
Cl-ndler
Cl-r
Cla-Kindler
Cla-dler
Cla-er
Cla-indler
Cla-ler
Cla-ndler
Cla-r
Clar-Kindler
Clar-dler
Clar-er
Clar-indler
Clar-ler
Clar-ndler
Clar-r
Clark-Kindler
Clark-dler
Clark-er
Clark-indler
Clark-ler
Clark-ndler
Clark-r
K-Clark
K-ark
K-k
K-lark
K-rk
Ki-Clark
Ki-ark
Ki-k
Ki-lark
Ki-rk
Kin-Clark
Kin-ark
Kin-k
Kin-lark
Kin-rk
Kind-Clark
Kind-ark
Kind-k
Kind-lark
Kind-rk
Kindl-Clark
Kindl-ark
Kindl-k
Kindl-lark
Kindl-rk
Kindle-Clark
Kindle-ark
Kindle-k
Kindle-lark
Kindle-rk
Kindler-Clark
Kindler-ark
Kindler-k
Kindler-lark
Kindler-rk

Source contains both unit and integration tests.

To test:

$ pytest -xv namecombiner.py test.py
============================= test session starts ==============================
...

namecombiner.py::test_beginnings PASSED                                  [ 20%]
namecombiner.py::test_endings PASSED                                     [ 40%]
test.py::test_exists PASSED                                              [ 60%]
test.py::test_usage PASSED                                               [ 80%]
test.py::test_clardler PASSED                                            [100%]

============================== 5 passed in 0.16s ===============================

namecombiner's People

Contributors

kyclark avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.