GithubHelp home page GithubHelp logo

divyanksingh / svg_generator Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 50 KB

Background: A network monitoring tool collects data regarding whether different systems are running. One view of the data shows a timeline, to visualize the system's status over time. Green means that the status was OK and red means that the system had a problem. This view is called a trend graph. The collected data is saved to a list with events in chronological order. Each event contains a point in time (timestamp) and the system's status (True=OK or False=not OK). In most cases, only a few events are recorded, since most systems have the same state for a long time. However, in some cases, the state can change often which results in hundreds of thousands events. Task The programming task is to visualize the trend graph as a SVG image, given a number of events. Input data: Test data is available in the attached text file testdata_small.txt Each line in the file has the following format: Timestamp True\False True means that the system is OK until the next event False means that the system has a problem until the next event. Timestamp is a unix time stamp (seconds since 1970-01-01 00:00:00 UTC Example: 1429002861 False 1429002965 True 1429002978 False Desired output: The program shall process the input data and generate a SVG with rect elements. Each rect element shall be green or red, depending on the state of the system. The size of the SVG shall be 500x50 pixels. The leftmost position (x=0) is the starting time and the rightmost position (x=500) is the end time. Each rectangle shall fill the entire height of the graph, from top to bottom.

Python 100.00%

svg_generator's People

Contributors

divyanksingh avatar

Stargazers

 avatar  avatar  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.