<commit_before><?xml version="1.0" encoding="UTF-8" ?> 
<Module>
  <ModulePrefs title="daybyday_gadget" scrolling="true" author_email="<EMAIL>" height="500">
    <Require feature="opensocial-0.8" />
    <Require feature="locked-domain"/>
      <OAuth>
      <Service name="google">
        <Access url="https://www.google.com/accounts/OAuthGetAccessToken" method="GET" /> 
            <Request url="https://www.google.com/accounts/OAuthGetRequestToken?scope=https://www.googleapis.com/auth/tasks" method="GET" /> 
        <Authorization url="https://www.google.com/accounts/OAuthAuthorizeToken?oauth_callback=http://oauth.gmodules.com/gadgets/oauthcallback" /> 
      </Service>
    </OAuth>
  </ModulePrefs>
  <Content type="html">
  <![CDATA[ 
  

  <style>
  	#main {
	  margin: 0px;
	  padding: 0px;
          font-size: small;
	}
	
	#listId {
  	  margin: 0;
  	  padding: 0;
	}

	.collapsibleList li{
    	  list-style-image:none; 
    	  list-style-type:none;
          cursor:auto;
          list-style: none;
  	      padding: 0;
  	      margin: 0;
	}

        li.collapsibleListOpen{
           cursor:pointer;
           background: url('https://raw.githubusercontent.com/Appiens/daybyday_gadget/master/images/button-minus.png'); <!--no-repeat top left;-->
           background-position: 0 5px;
           background-size: 12px 12px;
           background-repeat: no-repeat;
  	       margin: 0;
  	       list-style: none;
  	       padding: 0 0 0 15px;
          }

        li.collapsibleListClosed{
           cursor:pointer;
           background: url('https://raw.githubusercontent.com/Appiens/daybyday_gadget/master/images/button-plus.png'); <!--no-repeat top left;-->
           background-position: 0 5px;
           background-size: 12px 12px;
           background-repeat: no-repeat;
  	       margin: 0;
  	       list-style: none;
  	       padding: 0 0 0 15px;
         }
       
	ul {
    		padding: 0; /* Убираем поля */
    		margin-left: 5px; /* Отступ слева */
	}

	.myStyle span {
    		text-indent:25px;
    		display:inline-block;
    		cursor:pointer;
	}
  </style>
  <script type="text/javascript" src="https://rawgit.com/Appiens/daybyday_gadget/master/javascript/CollapsibleLists.js"></script>
  <script type="text/javascript" src="https://rawgit.com/Appiens/daybyday_gadget/master/javascript/shindig.js"></script>
  <script type="text/javascript" src="https://rawgit.com/Appiens/daybyday_gadget/master/javascript/WinFuncs.js"></script>
  <script type="text/javascript">
  
    var taskLists = [];
    var errorOccured = false;

    // Invoke makeRequest() to fetch data from the service provider endpoint.
    // Depending on the results of makeRequest, decide which version of the UI
    // to ask showOneSection() to display. If user has approved access to his
    // or her data, display data.
    // If the user hasn't approved access yet, response.oauthApprovalUrl contains a
    // URL that includes a Google-supplied request token. This is presented in the 
    // gadget as a link that the user clicks to begin the approval process. 
       
    function fetchData() {
      errorOccured = false;
      var params = {};
      url = "https://www.googleapis.com/tasks/v1/users/@me/lists?key=" + API_KEY;
      params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.JSON;
      params[gadgets.io.RequestParameters.AUTHORIZATION] = gadgets.io.AuthorizationType.OAUTH;
      params[gadgets.io.RequestParameters.OAUTH_SERVICE_NAME] = "google";
      params[gadgets.io.RequestParameters.OAUTH_USE_TOKEN] = "always";
      params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.GET;

      gadgets.io.makeRequest(url, function (response) { 
        if (response.oauthApprovalUrl) {
          // Create the popup handler. The onOpen function is called when the user
          // opens the popup window. The onClose function is called when the popup
          // window is closed.
          var popup = shindig.oauth.popup({
            destination: response.oauthApprovalUrl,
            windowOptions: null,
            onOpen: function() { showOneSection('waiting'); },
            onClose: function() { fetchData(); }
          });
          // Use the popup handler to attach onclick handlers to UI elements.  The
          // createOpenerOnClick() function returns an onclick handler to open the
          // popup window.  The createApprovedOnClick function returns an onclick 
          // handler that will close the popup window and attempt to fetch the user's
          // data again.
          var personalize = document.getElementById('personalize');
          personalize.onclick = popup.createOpenerOnClick();
          var approvaldone = document.getElementById('approvaldone');
          approvaldone.onclick = popup.createApprovedOnClick();
          showOneSection('approval');
        } else if (response.data) {
            alert('13:45');
            init(makePOSTRequest);
            taskLists = [];
            taskLists = response.data.items;
            for(var i=0; i< taskLists.length; i++) {
               taskLists[i].isLoading = true;
               getTasksForTaskList(taskLists[i]);
            }
        } else {
            // The response.oauthError and response.oauthErrorText values may help debug
            // problems with your gadget.
            var main = document.getElementById('main');
            var err = document.createTextNode('OAuth error: ' +
              response.oauthError + ': ' + response.oauthErrorText);
            main.appendChild(err);<commit_msg>l5k4io546k<commit_after><?xml version="1.0" encoding="UTF-8" ?> 
<Module>
  <ModulePrefs title="daybyday_gadget" scrolling="true" author_email="<EMAIL>" height="500">
    <Require feature="opensocial-0.8" />
    <Require feature="locked-domain"/>
      <OAuth>
      <Service name="google">
        <Access url="https://www.google.com/accounts/OAuthGetAccessToken" method="GET" /> 
            <Request url="https://www.google.com/accounts/OAuthGetRequestToken?scope=https://www.googleapis.com/auth/tasks" method="GET" /> 
        <Authorization url="https://www.google.com/accounts/OAuthAuthorizeToken?oauth_callback=http://oauth.gmodules.com/gadgets/oauthcallback" /> 
      </Service>
    </OAuth>
  </ModulePrefs>
  <Content type="html">
  <![CDATA[ 
  

  <style>
  	#main {
	  margin: 0px;
	  padding: 0px;
          font-size: small;
	}
	
	#listId {
  	  margin: 0;
  	  padding: 0;
	}

	.collapsibleList li{
    	  list-style-image:none; 
    	  list-style-type:none;
          cursor:auto;
          list-style: none;
  	      padding: 0;
  	      margin: 0;
	}

        li.collapsibleListOpen{
           cursor:pointer;
           background: url('https://raw.githubusercontent.com/Appiens/daybyday_gadget/master/images/button-minus.png'); <!--no-repeat top left;-->
           background-position: 0 5px;
           background-size: 12px 12px;
           background-repeat: no-repeat;
  	       margin: 0;
  	       list-style: none;
  	       padding: 0 0 0 15px;
          }

        li.collapsibleListClosed{
           cursor:pointer;
           background: url('https://raw.githubusercontent.com/Appiens/daybyday_gadget/master/images/button-plus.png'); <!--no-repeat top left;-->
           background-position: 0 5px;
           background-size: 12px 12px;
           background-repeat: no-repeat;
  	       margin: 0;
  	       list-style: none;
  	       padding: 0 0 0 15px;
         }
       
	ul {
    		padding: 0; /* Убираем поля */
    		margin-left: 5px; /* Отступ слева */
	}

	.myStyle span {
    		text-indent:25px;
    		display:inline-block;
    		cursor:pointer;
	}
  </style>
  <script type="text/javascript" src="https://rawgit.com/Appiens/daybyday_gadget/master/javascript/CollapsibleLists.js"></script>
  <script type="text/javascript" src="https://rawgit.com/Appiens/daybyday_gadget/master/javascript/shindig.js"></script>
  <script type="text/javascript" src="https://rawgit.com/Appiens/daybyday_gadget/master/javascript/WinFuncs.js"></script>
  <script type="text/javascript">
  
    var taskLists = [];
    var errorOccured = false;

    // Invoke makeRequest() to fetch data from the service provider endpoint.
    // Depending on the results of makeRequest, decide which version of the UI
    // to ask showOneSection() to display. If user has approved access to his
    // or her data, display data.
    // If the user hasn't approved access yet, response.oauthApprovalUrl contains a
    // URL that includes a Google-supplied request token. This is presented in the 
    // gadget as a link that the user clicks to begin the approval process. 
       
    function fetchData() {
      errorOccured = false;
      var params = {};
      url = "https://www.googleapis.com/tasks/v1/users/@me/lists?key=" + API_KEY;
      params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.JSON;
      params[gadgets.io.RequestParameters.AUTHORIZATION] = gadgets.io.AuthorizationType.OAUTH;
      params[gadgets.io.RequestParameters.OAUTH_SERVICE_NAME] = "google";
      params[gadgets.io.RequestParameters.OAUTH_USE_TOKEN] = "always";
      params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.GET;

      gadgets.io.makeRequest(url, function (response) { 
        if (response.oauthApprovalUrl) {
          // Create the popup handler. The onOpen function is called when the user
          // opens the popup window. The onClose function is called when the popup
          // window is closed.
          var popup = shindig.oauth.popup({
            destination: response.oauthApprovalUrl,
            windowOptions: null,
            onOpen: function() { showOneSection('waiting'); },
            onClose: function() { fetchData(); }
          });
          // Use the popup handler to attach onclick handlers to UI elements.  The
          // createOpenerOnClick() function returns an onclick handler to open the
          // popup window.  The createApprovedOnClick function returns an onclick 
          // handler that will close the popup window and attempt to fetch the user's
          // data again.
          var personalize = document.getElementById('personalize');
          personalize.onclick = popup.createOpenerOnClick();
          var approvaldone = document.getElementById('approvaldone');
          approvaldone.onclick = popup.createApprovedOnClick();
          showOneSection('approval');
        } else if (response.data) {
            alert('13:47');
            init(makePOSTRequest);
            taskLists = [];
            taskLists = response.data.items;
            for(var i=0; i< taskLists.length; i++) {
               taskLists[i].isLoading = true;
               getTasksForTaskList(taskLists[i]);
            }
        } else {
            // The response.oauthError and response.oauthErrorText values may help debug
            // problems with your gadget.
            var main = document.getElementById('main');
            var err = document.createTextNode('OAuth error: ' +
              response.oauthError + ': ' + response.oauthErrorText);
            main.appendChild(err);
{'fraction_non_alphanumeric': 0.11858486341244961, 'fraction_numerical': 0.009046126287505597, 'mean_word_length': 2.4346354967702246, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 2, '>': 55, 'https://': 20, 'lorem ipsum': 0, 'www.': 10, 'xml': 2}, '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': '5960805', 'n_tokens_mistral': 3435, 'n_tokens_neox': 3288, 'n_words': 729}