Giter Site home page Giter Site logo

maybelinot / redhat_interns_rock Goto Github PK

View Code? Open in Web Editor NEW

This project forked from calmrat/redhat_interns_rock

0.0 2.0 0.0 85 KB

A simple homework assignment to demonstrate your Python skillz and general ambitions to impress me.

License: MIT License

Python 100.00%

redhat_interns_rock's Introduction

Hi! My name is Chris Ward. I'm working on a data mining, analytic's and communications related projects at Red Hat.

If you are reading this, it likely means I've seen your CV and believe you could be a great match for type of work my team is looking for some help with.

The following is a simple homework assignment I've cooked up for you to demonstrate your Python skillz and general ambitions to impress me and other folks here at Red Hat.

If you're interested, please fork this repo and solve the following problem as best as you can within 24 hours of forking the repo.

Ping me with a 'pull request' when your solution is ready for review.

Assignment:

Write a single python 2.7 compatible class that is capable
of generating an arbitrary data structure filled with
(pseudo)random string data inside it, with a special
string hidden somewhere (pseudo)randomly inside.

Write tests that can be run to verify all Requirements
have been met, automtically.

Requirements:

* The special string
 + must be 'I am Red Hat'
 + must live >= 3 (nested) levels deep within
   the data structure

* The nested data structure must be made up of >= 1 "container" instances:
  + *Mapping (eg, dict)
  + *Sequence (eg, tuple)

* Each node within the data structure must have either 2 or 4
  branches/sub-nodes

* The data structure should be no more than 5 (nested) levels deep

* The output must be in the form of a JSON compatible string dump

Example execution:

$> python assignment.py
{
    "BCAYP": {
        "84": 85,
        "MRWM?": {
            "68": "I am Red Hat",
            "98": [
                "IZHIZ",
                [
                    ">UJJJ",
                    "U@NJ@",
                    "[45GG",
                    "53",
                ]
            ]
        },
        "RRSBM": 61,
        "26": "SDFFF"
    },
    "94": "LPTVR"
}

$> py.test tests.py
==================== test session starts =====================
platform linux2 -- Python 2.7.8 -- py-1.4.26 -- pytest-2.7.0
rootdir: /home/$HOME/repos/redhat_interns_rock, inifile:
collected 8 items

tests.py ......

================= 8 passed in 0.83 seconds ==================

If you have any questions, file an issue in GitHub.

Looking forward to hearing from you! Good luck!

-Chris <[email protected]>

redhat_interns_rock's People

Contributors

calmrat avatar

Watchers

 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.