Code Monkey home page Code Monkey logo

image_data's People

Contributors

emzilla-01 avatar

Watchers

 avatar

image_data's Issues

no test cases

Business requirements details are private & might not be available to all engineering teams.

Therefore, we shall freeze the output result as test cases.

repeated `order by score desc`

This ROW_NUMBER() OVER (order by score desc) repeats - it is a kludge to complete all objectives in the coding challenge.

        ROW_NUMBER() OVER (order by score desc) as row_number_desc,     
        1 + tablecount.table_count - ROW_NUMBER() OVER (order by score desc)  as row_number_asc,
        MOD( 1 + tablecount.table_count - ROW_NUMBER() OVER (order by score desc), 3)-1 as subsample_asc,
        MOD(ROW_NUMBER() OVER (order by score desc), 3)-1 as subsample_desc,

https://github.com/Emzilla-01/image_data/blob/c1b886b510db91cb6a4748d5ac6271d73bb5f3b0/fb_data_sql.sql#L62C1-L67

It would scale poorly until fixed.

hero_box.py has inefficient n*4 traversal for min,max of x,y

https://github.com/Emzilla-01/LnT_imagedata/blob/master/hero_box.py#L13-L16

in a rush to produce results, we traverse the list_of_4tupls 4 times instead of once

    least_x = min([t[0] for t in list_of_4tupls])
    least_y = min([t[1] for t in list_of_4tupls])
    greatest_x = max([t[2] for t in list_of_4tupls])
    greatest_y = max([t[3] for t in list_of_4tupls])

todo: rewrite as one pass over iterable list_of_4tupls

eg:

def get_min_max_of_axes(iterable, axes*):
.....
least_x=float('inf')
least_y=float('inf')
greatest_x=float('-inf')
greatest_y=float('-inf')
for i in range(iterable):
    # compare & replace each x,y,z axis

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.