Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweet Generator Project Check-in #1

Open
Sukhrobjon opened this issue Nov 17, 2019 · 0 comments
Open

Tweet Generator Project Check-in #1

Sukhrobjon opened this issue Nov 17, 2019 · 0 comments

Comments

@Sukhrobjon
Copy link

Sukhrobjon commented Nov 17, 2019

UPDATED
Random dictionary words:

  • If you pass an argument into your read_words(), it would be modular and you can pass any file and read from it. e.g. read_words(pathname)

Histogram:

  • If you see 1 code is repeated multiple places consider if you can make a helper function and reuse the same code. It helps you write DRY code. Learn here more about it here.
  • Most of your functions in your word_count.py don't take any parameters, if you pass parameters thoughtfully you can make your code much more modular.
  • Pay attention to your syntax, I saw on multiple places you left space after function parentheses. E.g. def frequency (word, histogram): should be def frequency(word, histogram):

Sample words by frequency:

  • Seems like your code is working but to make 100% sure test your code by running your sample function like 1000 times or so. and see if it is working.
  • Add comments if line of code needs explanation. E.g. random_word = random.randint(0,7) you can explain why you are using 0 and 7 as a range?

Create Flask Web App

  • Don't forget to add app.run() line in your main function to run your flask app.
  • You shouldn't be pushing your venv folders to your GitHub it should live in your local machine. Because it takes a memory and slows down when you are pushing to github. Learn more here why it is not recommended to push your venv folder to Github.

Markov chain

  • Not attempted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant