GithubHelp home page GithubHelp logo

for-adaptavist's Introduction

Word Count

SysOps Engineer - Take home assessment

*** Assumptions/Instructions ***

  1. Assuming this application is to be run in Linux/Mac environment.
  2. The application is developed in Python assuming its use for complex tasks as programming languages are more efficient.
  3. Shell script can also be used for the same if you want to run a quick analysis. For more complex scenarios, you might prefer a more specialized tool or a programming language.

This command line application uses python or shell script to take .txt file as input and prints a word count of its contents starting with the most frequent word.

There are two ways to run this application :

  1. Using python

You can run the file 'words_count.py' using command in your terminal: 'python word_count.py path/to/your/file.txt' or 'python3 word_count.py path/to/your/file.txt' depending on your python environment.

It will prompt you for file path input. Replace path/to/your/file.txt with the actual path to the file you want to analyze. The program will then print the word count for each word in the specified file, sorted frequency in descending order.

  1. Running shell script

For that the script has to be executable. Make it uexecutable using 'chmod +x words_count.sh'

You can run the file 'words_count.sh' using command in your terminal: './word_count.sh'.

Again it will prompt you for file path input and print the word count as output.

In any case, if the file path is wrong or if the file does not exists, it will throw an error.

for-adaptavist's People

Contributors

aher24shivani avatar

Watchers

 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.