Open
Conversation
| textList.append(tweet.text) | ||
| for text in textList: | ||
| if text[0] == 'R': | ||
| cleaned = (text.split(':')[1]) |
There was a problem hiding this comment.
I'm assuming this has something to do with the specifics of how the Twitter package/api formats things, but this could use a little documentation I think.
GetTweets.py
Outdated
|
|
||
|
|
||
|
|
||
| # print (getTweets()) |
There was a problem hiding this comment.
Generally we want to remove commented code and multiple trailing newlines.
| def PickleBuddy(): | ||
| files = os.listdir(filePath) # make a list of all the files that already exist | ||
| if not "cachedData.pickle" in files: | ||
| api = twitter.Api(consumer_key=CONSUMER_KEY, |
There was a problem hiding this comment.
Proper usage, props for that. Though, it might be a little more clear to clarify that these come from TwitterKeys - e.g. TwitterKeys.CONSUMER_KEY.
That's just a style thing though, personal preference and such.
| # Returns the contents of the file, split into a list of words and | ||
| # (some) punctuation. | ||
| def wordlist(words): | ||
| # f = open(filename, 'r') |
There was a problem hiding this comment.
Often it's better to open and close files as-needed, avoiding this kind of commenting /uncommenting while developing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I uploaded everything in time but I forgot to submit a pull request the day of. Sorry!