-
Notifications
You must be signed in to change notification settings - Fork 0
Add Sentiment Github Dataset Documentation Notebooks #3
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
Open
splimon
wants to merge
8
commits into
main
Choose a base branch
from
1-sentiment-github-dataset-notebook-documentation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
084e29e
Add Documentation Notebooks: Connect GitHub Gold Standard to GHTorren…
splimon 357ac9a
Update Documentation Notebooks
splimon 3b28ffb
Add Notebook 4: Inner Join Kaiaulu Comments
splimon dc8b17c
Add Notebook 4: Join Sentiment Labels with Kaiaulu Output
splimon 95a8f11
Clear all cell outputs from notebooks
splimon 4ad05b6
Add CSVs from Github dataset to /data folder
splimon ecdd1fd
Add Notebook 5 and combined CSVs for all projects
splimon f074356
Fix columns in Notebook 5 combined CSVs
splimon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
19 changes: 19 additions & 0 deletions
19
data/PR inline comments/actionbarsherlock_sentiment_pr_inline_comments_joined.csv
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
6,514 changes: 6,514 additions & 0 deletions
6,514
data/PR inline comments/akka_sentiment_pr_inline_comments_joined.csv
Large diffs are not rendered by default.
Oops, something went wrong.
81 changes: 81 additions & 0 deletions
81
data/PR inline comments/android_sentiment_pr_inline_comments_joined.csv
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| comment_id,polarity,text,created_at_gold,author_login,owner,repo,review_id,html_url,created_at_kaiaulu,updated_at,comment_user_login,author_association,file_path,start_line,line,original_start_line,original_line,position,diff_hunk,body,commit_id | ||
| 1664046,0,"`GitHubAccountAuthenticator` sounds reasonable.""",2012-09-21 06:10:53,kevinsawicki,github,android,,https://github.com/pockethub/PocketHub/pull/224#discussion_r1664046,2012-09-21T18:10:53Z,2012-09-21T18:50:50Z,kevinsawicki,CONTRIBUTOR,app/src/main/java/com/github/mobile/accounts/AccountAuthenticator.java,,,,,1,"@@ -75,7 +85,58 @@ public Bundle editProperties(AccountAuthenticatorResponse response, | ||
| public Bundle getAuthToken(AccountAuthenticatorResponse response, | ||
| Account account, String authTokenType, Bundle options) | ||
| throws NetworkErrorException { | ||
| - return null; | ||
| + | ||
| + final Bundle bundle = new Bundle(); | ||
| + | ||
| + if(!authTokenType.equals(ACCOUNT_TYPE)) return bundle; | ||
| + | ||
| + AccountManager am = AccountManager.get(context); | ||
| + String username = account.name; | ||
| + String password = am.getPassword(account); | ||
| + | ||
| + String authToken = null; | ||
| + DefaultClient client = new DefaultClient(); | ||
| + client.setCredentials(username, password); | ||
| + | ||
| + OAuthService oAuthService = new OAuthService(client); | ||
| + | ||
| + // Get authorizations for app if they exist | ||
| + try { | ||
| + try { | ||
| + List<Authorization> auths = oAuthService.getAuthorizations(); | ||
| + for(Authorization auth : auths) | ||
| + if(auth.getApp().getName().equals(ACCOUNT_NAME)) | ||
| + authToken = auth.getToken(); | ||
| + } | ||
| + catch ( NullPointerException npe ) { } | ||
| + | ||
| + // Setup authorization for app if others didn't exist. | ||
| + if(TextUtils.isEmpty(authToken)) { | ||
| + Authorization auth = oAuthService.createAuthorization( | ||
| + new Authorization().setNote(ACCOUNT_NAME).setUrl(APP_URL) | ||
| + ); | ||
| + if(auth != null) authToken = auth.getToken(); | ||
| + } | ||
| + | ||
| + // If couldn't get authToken | ||
| + if(TextUtils.isEmpty(authToken)) { | ||
| + final Intent intent = new Intent(context, LoginActivity.class); | ||
| + intent.putExtra(PARAM_AUTHTOKEN_TYPE, ACCOUNT_TYPE); | ||
| + intent.putExtra(KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response); | ||
| + bundle.putParcelable(KEY_INTENT, intent); | ||
| + return bundle; | ||
| + } | ||
| + | ||
| + // Assemble and return bundle | ||
| + bundle.putString(AccountManager.KEY_ACCOUNT_NAME, account.name); | ||
| + bundle.putString(AccountManager.KEY_ACCOUNT_TYPE, ACCOUNT_TYPE); | ||
| + bundle.putString(AccountManager.KEY_AUTHTOKEN, authToken); | ||
| + | ||
| + // Clear password from account | ||
| + am.clearPassword(account); | ||
| + return bundle; | ||
| + } catch ( Exception e ) { e.printStackTrace(); }","`GitHubAccountAuthenticator` sounds reasonable. | ||
| ",e70b701b4b7bd5e2dc5cc00ba82605689c3723fb | ||
| 1663939,1,"Yes! I'll do that. On Fri, Sep 21, 2012 at 12:57 PM, Kevin Sawicki <notifications@github.com>wrote: > In app/src/main/java/com/github/mobile/AuthorizationClient.java: > > > @@ -0,0 +1,68 @@ > > +/* > > This class can be removed now right? > >""",2012-09-21 06:00:32,TrevorBasinger,github,android,,https://github.com/pockethub/PocketHub/pull/224#discussion_r1663939,2012-09-21T18:00:32Z,2012-09-21T18:50:50Z,TrevorBasinger,CONTRIBUTOR,app/src/main/java/com/github/mobile/AuthorizationClient.java,,,,,1,"@@ -0,0 +1,68 @@ | ||
| +/*","Yes! I'll do that. | ||
|
|
||
| On Fri, Sep 21, 2012 at 12:57 PM, Kevin Sawicki notifications@github.comwrote: | ||
|
|
||
| > In app/src/main/java/com/github/mobile/AuthorizationClient.java: | ||
| > | ||
| > > @@ -0,0 +1,68 @@ | ||
| > > +/* | ||
| > | ||
| > This class can be removed now right? | ||
| > | ||
| > — | ||
| > Reply to this email directly or view it on GitHubhttps://github.com/github/android/pull/224/files#r1663907. | ||
| ",e70b701b4b7bd5e2dc5cc00ba82605689c3723fb | ||
| 1222306,2,"Shame on me. You are absolutely right. I reworked the commit according to your comments.""",2012-07-23 17:37:37,Bananeweizen,github,android,,https://github.com/pockethub/PocketHub/pull/145#discussion_r1222306,2012-07-24T05:37:37Z,2012-07-24T05:37:37Z,Bananeweizen,CONTRIBUTOR,app/src/main/java/com/github/mobile/ui/commit/DiffStyler.java,,,,,1,"@@ -72,7 +72,10 @@ public DiffStyler setFiles(final Collection<CommitFile> files) { | ||
| StyledText styled = new StyledText(); | ||
| while (end != -1) { | ||
| String line = patch.substring(start, end + 1); | ||
| - switch (patch.charAt(start)) { | ||
| + if (line.length() == 0) { | ||
| + continue;","Shame on me. You are absolutely right. I reworked the commit according to your comments. | ||
| ",d1e578a144299d4a7e1cfcc1705f6d4502152f91 |
18 changes: 18 additions & 0 deletions
18
data/PR inline comments/automapper_sentiment_pr_inline_comments_joined.csv
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be removed from PR