Giter Club home page Giter Club logo

tweetgen's People

Contributors

dependabot[bot] avatar tempor1s avatar

Stargazers

 avatar  avatar

Watchers

 avatar

tweetgen's Issues

Linked List Submission

  • Clean code and great variable names, makes it easy to understand
  • Great work on implementing the stretch challenges.
  • You might want to create a test file for your doublylinkedlist class if you want to make sure it 100% robust.

Final Project Submission Review

  • All tests pass and sampling works as expected.
  • Some buttons on heroku app appear non-functional. I recommend removing those or adding functionality so users do not think your site is non-functional.
  • Great job implementing 2nd order markov chains!
  • Here is one possible way to refactor your _create_chainmethod to be n-th order rather than just 2nd:
        n_words = len(word_list)
        for i, key1 in enumerate(word_list):
            if n_words > (i + self.order): # TODO: use order
                key2 = word_list[i + 1]
                word = word_list[i + 2]
                words = []
                for j in range(self.order):
                    words.append(word_list[i + j])

                entry = tuple(words)
                print(entry)
                if entry not in self:
                    self[entry] = [word]
                else:
                    self[entry].append(word)

I encourage you to think of how you can modify your walk method to work with any order as well.

Code review of Tweet Generator Submission 1

  1. dictionary_words works well and is optimized for run time. Try adding benchmarking to see if there are alternative ways to choose random words. One possibility is to randomly select words as you are reading in to avoid going through the list an additional time.
  2. All types of histogram work as intended. I recommend adding benchmarking not only for creating the different types of histograms, but also for sampling them. While it might be fastest to create a dictionary histogram, sampling can be faster for other types. Also, your list of counts utilized the dictionary histogram in it's creation. While reusing code is generally good practice, it defeats the purpose of the exercise to attempt other solutions. I encourage you to try to find a solution that does not utilize your other histogram functions.
  3. Sampling function works as expected. I encourage you to try it with the list of counts histogram and compare it's run time to the others.
  4. Heroku app is live and looks great, nice job!
  5. Markov chain works as expected. Try the stretch challenge of including start and stop tokens!

Code Review of Hashtables

  • Great job adding additional tests to check the robustness of your code! One thing to note is that python's hashing function uses the time of day for it's calculation, so it is important to test any code that uses hash multiple times to make sure it works whether there are collisions or not, something to keep in mind!
  • Good work adding functions to make your hash table more useable, a great next step is adding methods such as __getitem__ to allow your hash table to be used like python's dictionary.
  • Excellent comments, keep up the good work!
  • In your clear method, you go through and manually delete every key in the hash table. Unless you are worried about pointers from previously "deleted" nodes sticking around, it can be much faster to simply create a new linked list for each bucket, as that will always take O(b) time rather than depend on the number of entries. As such it might be worth checking the size and then either deleting each entry or recreating a new linked list for each bucket.

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.