<commit_before><html>
  <head>
	<link href="/css/bootstrap.css" rel="stylesheet">
	<link href="/css/angular-ui.css" rel="stylesheet">
	<link rel="stylesheet/less" type="text/css" href="/components/toolbar/toolbar.less">
	<link rel="stylesheet/less" type="text/css" href="css/service_twitter.less">	
	<title>Twitter Service</title>
  </head>
  <body ng-app="service_twitter" ng-controller="ConfigPage" ng-cloak>
	<toolbar box-var='selectedBox' username-var='selectedUser'></toolbar>
	<div class="main" ng-show="selectedUser && selectedBox">
		<h2>Twitter Service</h2>
		<h4>Please enter the required credentials in order to configure your Twitter Service.</h4>

		<div class="status">
			<table>
				<tr>
					<td> {{ runstate }} </td>
					<td><div class="btn btn-success" ng-click="doStart()">Start</div></td>
					<td><div class="btn btn-danger" ng-click="doStop()">Stop</div></td> 
				</tr>
			</table>
		</div>
		<table class='security'>
			<tr><td>Service User</td><td><select ng-model="app.user" ng-options='u.name for u in users'></select></td></tr>
			<tr><td>Service User's Password</td><td><input type="password" ng-model='app.password'></td></tr>
			<tr><td>Service's Box</td><td><select ng-model="app.box" ng-options='b for b in boxes'></select></td></tr>
			<tr><td><td>
			<div class="btn btn-warning" 
			ng-show="app.user && app.box && (app.user['@id'] !== selectedUser.id) && !granted"
			ng-click="grantACL(app.user, app.box)">Authorise {{ app.user.name }} to have access to {{ app.box }}</div>
			<div ng-show="granted" class="granted"> {{ granted_status }} </div>
		</td></tr>
		</table>
		<h4>In order to get these credentials, please visit <a href="https://dev.twitter.com/user/login?" target="_blank"> here</a> and create a Twitter Application</h4>
		<table ng-show="!consumer_key && !consumer_secret && !access_token && !access_token_secret" class='params'>
		    <tr><td>Consumer Key: </td><td><input type="text" name="consumer_key" ng-model="consumer_key"></input></td></tr>
		    <tr><td>Consumer Secret: </td><td><input type="text" name="consumer_secret" ng-model="consumer_secret"></input></td></tr>
		    <tr><td>Access Token: </td><td><input type="text" name="access_token" ng-model="access_token"></input></td></tr>
		    <tr><td>Access Token Secret: </td><td><input type="text" name="access_token_secret" ng-model="access_token_secret"></input></td></tr>
	    </table>
	    <h4>In order to search, please enter your Twitter handle and some search terms (seperated by commas)!</h4>
		<table class='search_params'>
		    <tr><td>Twitter Username :</td><td><input type="text" name="twitter_username" ng-model="twitter_username"></input></td></tr>
		    <tr><td>Twitter Search Words : </td><td><input type="text" name="twitter_search_words" ng-model="twitter_search_words"></input></td></tr>
		    <tr><td>Harvest Twitter Timeline: </td><td> <input type="checkbox" ng-model="twitter_status" ng-true-value="True" ng-false-value="False"></input></td></tr>
		    <tr><td>Harvest Twitter Network: </td><td> <input type="checkbox" ng-model="twitter_network" ng-true-value="True" ng-false-value="False"></input></td></tr>
	    </table>
	    <div class='submits'>
		    <div class="btn btn-default" ng-click="setConfig({consumer_key:consumer_key, consumer_secret:consumer_secret, access_token:access_token, access_token_secret:access_token_secret, box:app.box, user:app.user['@id'], password:<PASSWORD>, twitter_username:twitter_username, twitter_search_words:twitter_search_words, twitter_status:twitter_status, twitter_network:twitter_network})">Set config</div>
		    <div class="status">{{ status }}</div>
		</div>
	</div>	
	<div ng-show="!(selectedUser && selectedBox)">
		<h1>Please log in and select a box </h1>
	</div>
  </body>
  <script src="/js/vendor/lesscss.min.js" type="text/javascript"></script>  
  <script src="/js/vendor/jquery.min.js" type="text/javascript"></script>
  <script src="/js/vendor/underscore.min.js" type="text/javascript"></script>
  <script src="/js/vendor/backbone.min.js" type="text/javascript"></script>
  <script src="/js/vendor/bootstrap.min.js" type="text/javascript"></script>
  <!-- angular --> 
  <script src="/js/vendor/angular.min.js" type="text/javascript"></script>
  <script src="/js/vendor/angular-ui.js" type="text/javascript"></script>
  <!-- indx --> 
  <script src="/js/indx.js" type="text/javascript"></script>
  <script src="/js/indx-utils.js" type="text/javascript"></script>
  <script src="/components/toolbar/toolbar.js" type="text/javascript"></script>
  <script src="js/service_twitter.js" type="text/javascript"></script>  
</html>
<commit_msg>replaced && with || in twitter index.html so that the text fields for credentials remain visible after the first code is input<commit_after><html>
  <head>
	<link href="/css/bootstrap.css" rel="stylesheet">
	<link href="/css/angular-ui.css" rel="stylesheet">
	<link rel="stylesheet/less" type="text/css" href="/components/toolbar/toolbar.less">
	<link rel="stylesheet/less" type="text/css" href="css/service_twitter.less">	
	<title>Twitter Service</title>
  </head>
  <body ng-app="service_twitter" ng-controller="ConfigPage" ng-cloak>
	<toolbar box-var='selectedBox' username-var='selectedUser'></toolbar>
	<div class="main" ng-show="selectedUser && selectedBox">
		<h2>Twitter Service</h2>
		<h4>Please enter the required credentials in order to configure your Twitter Service.</h4>

		<div class="status">
			<table>
				<tr>
					<td> {{ runstate }} </td>
					<td><div class="btn btn-success" ng-click="doStart()">Start</div></td>
					<td><div class="btn btn-danger" ng-click="doStop()">Stop</div></td> 
				</tr>
			</table>
		</div>
		<table class='security'>
			<tr><td>Service User</td><td><select ng-model="app.user" ng-options='u.name for u in users'></select></td></tr>
			<tr><td>Service User's Password</td><td><input type="password" ng-model='app.password'></td></tr>
			<tr><td>Service's Box</td><td><select ng-model="app.box" ng-options='b for b in boxes'></select></td></tr>
			<tr><td><td>
			<div class="btn btn-warning" 
			ng-show="app.user && app.box && (app.user['@id'] !== selectedUser.id) && !granted"
			ng-click="grantACL(app.user, app.box)">Authorise {{ app.user.name }} to have access to {{ app.box }}</div>
			<div ng-show="granted" class="granted"> {{ granted_status }} </div>
		</td></tr>
		</table>
		<h4>In order to get these credentials, please visit <a href="https://dev.twitter.com/user/login?" target="_blank"> here</a> and create a Twitter Application</h4>
		<table ng-show="!consumer_key || !consumer_secret || !access_token || !access_token_secret" class='params'>
		    <tr><td>Consumer Key: </td><td><input type="text" name="consumer_key" ng-model="consumer_key"></input></td></tr>
		    <tr><td>Consumer Secret: </td><td><input type="text" name="consumer_secret" ng-model="consumer_secret"></input></td></tr>
		    <tr><td>Access Token: </td><td><input type="text" name="access_token" ng-model="access_token"></input></td></tr>
		    <tr><td>Access Token Secret: </td><td><input type="text" name="access_token_secret" ng-model="access_token_secret"></input></td></tr>
	    </table>
	    <h4>In order to search, please enter your Twitter handle and some search terms (seperated by commas)!</h4>
		<table class='search_params'>
		    <tr><td>Twitter Username :</td><td><input type="text" name="twitter_username" ng-model="twitter_username"></input></td></tr>
		    <tr><td>Twitter Search Words : </td><td><input type="text" name="twitter_search_words" ng-model="twitter_search_words"></input></td></tr>
		    <tr><td>Harvest Twitter Timeline: </td><td> <input type="checkbox" ng-model="twitter_status" ng-true-value="True" ng-false-value="False"></input></td></tr>
		    <tr><td>Harvest Twitter Network: </td><td> <input type="checkbox" ng-model="twitter_network" ng-true-value="True" ng-false-value="False"></input></td></tr>
	    </table>
	    <div class='submits'>
		    <div class="btn btn-default" ng-click="setConfig({consumer_key:consumer_key, consumer_secret:consumer_secret, access_token:access_token, access_token_secret:access_token_secret, box:app.box, user:app.user['@id'], password:<PASSWORD>, twitter_username:twitter_username, twitter_search_words:twitter_search_words, twitter_status:twitter_status, twitter_network:twitter_network})">Set config</div>
		    <div class="status">{{ status }}</div>
		</div>
	</div>	
	<div ng-show="!(selectedUser && selectedBox)">
		<h1>Please log in and select a box </h1>
	</div>
  </body>
  <script src="/js/vendor/lesscss.min.js" type="text/javascript"></script>  
  <script src="/js/vendor/jquery.min.js" type="text/javascript"></script>
  <script src="/js/vendor/underscore.min.js" type="text/javascript"></script>
  <script src="/js/vendor/backbone.min.js" type="text/javascript"></script>
  <script src="/js/vendor/bootstrap.min.js" type="text/javascript"></script>
  <!-- angular --> 
  <script src="/js/vendor/angular.min.js" type="text/javascript"></script>
  <script src="/js/vendor/angular-ui.js" type="text/javascript"></script>
  <!-- indx --> 
  <script src="/js/indx.js" type="text/javascript"></script>
  <script src="/js/indx-utils.js" type="text/javascript"></script>
  <script src="/components/toolbar/toolbar.js" type="text/javascript"></script>
  <script src="js/service_twitter.js" type="text/javascript"></script>  
</html>

{'fraction_non_alphanumeric': 0.20840892113968626, 'fraction_numerical': 0.0021342439440828085, 'mean_word_length': 5.202514890800794, 'pattern_counts': {'":': 0, '<': 361, '<?xml version=': 0, '>': 361, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5919558', 'n_tokens_mistral': 3299, 'n_tokens_neox': 3080, 'n_words': 581}