Code Monkey home page Code Monkey logo

Comments (15)

michellymenezes avatar michellymenezes commented on August 18, 2024 1

Ok. I'll take this issue.

from motivate.

mubaris avatar mubaris commented on August 18, 2024 1

@michellymenezes I think I have fixed this issue. Let me know if there's any problem. Clone and install again

from motivate.

apex-omontgomery avatar apex-omontgomery commented on August 18, 2024 1

#40

Issue was still open, you mentioned there were issues with previous implementation. In this case it's better to not worry about cost, but worry about ease of the database. Maintaining multiple json files only makes sense if there is a difference between them (001 = science quotes, 002 = history quotes, 007 = james bond quotes). If you wish for randomization it'll be easier if you don't have to randomize file in addition to the quote.

If you'd like I can do the same refactoring to your same quote as this one. It ends up improving readability.

from motivate.

michellymenezes avatar michellymenezes commented on August 18, 2024

Is it to remove duplicated quotes in an unique file or among all files? Is the script allowed to edit the files in data folder?

from motivate.

mubaris avatar mubaris commented on August 18, 2024

We want to remove duplicate quotes from all the json files in data folder. We already have a script to find duplicate entries. That script will be useful.

Yes, the script is allowed to edit the files in data folder. Whenever there's a duplicate entry in json file, it should be removed.

from motivate.

michellymenezes avatar michellymenezes commented on August 18, 2024

Can't run $ motivate

TypeError: join() argument must be str or bytes, not 'PosixPath'

from motivate.

michellymenezes avatar michellymenezes commented on August 18, 2024

@mubaris I've made a script to create a new json file with all unique quotes #25

from motivate.

mubaris avatar mubaris commented on August 18, 2024

@michellymenezes It would be very useful instead creating new json file, if we could remove the entry from existing json files.

from motivate.

Souvikray avatar Souvikray commented on August 18, 2024

Can I take this up?

from motivate.

mubaris avatar mubaris commented on August 18, 2024

There's already a PR. There's a small problem with it. If you can find a method to eliminate that issue, let me know.

from motivate.

Souvikray avatar Souvikray commented on August 18, 2024

What's the problem?

from motivate.

mubaris avatar mubaris commented on August 18, 2024

Check #25

from motivate.

Souvikray avatar Souvikray commented on August 18, 2024

Hey in your find_dupes.py file,can you explain me in this line of code
dupes = sorted([x for x in quotes if x['quote'] in seen or seen.add(x['quote'])], key=lambda x:x['quote'])
What do the 'key=lambda x:x['quote']' does?

from motivate.

michellymenezes avatar michellymenezes commented on August 18, 2024

@mubaris I think removing repeated quotes from each file will cost more than computing unique quotes and getting everything from a unique file.

from motivate.

Souvikray avatar Souvikray commented on August 18, 2024

@mubaris Hey is the issue still open?I made a fix for what you want to achieve.

from motivate.

Related Issues (20)

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.