<commit_before><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>CurlMulti Objects</title>

  <meta http-equiv="content-type"
 content="text/html; charset=ISO-8859-1">
</head>
  <body>

<h2>CurlMulti Ojects<br>
   </h2>

<p>     CurlMulti objects have the following methods: </p>
        <b>close()</b> -&gt; <i>None</i><br>

<blockquote> Corresponds to <b>curl_multi_cleanup()</b> in libcurl. &nbsp;This
   method is automatically called by pycurl when a CurlMulti object no longer
   has any references to it, but can also be called explicitly.<br>
      </blockquote>
       <b> perform()</b> -&gt; <i>tuple of status and the number of active
 Curl   objects</i><br>

<blockquote>  Corresponds to <b>curl_multi_perform()</b> in libcurl. <br>
       </blockquote>
       <b> add_handle(</b><i>Curl Object</i><b>) </b>-&gt; <i>None</i><br>

<blockquote>   Corresponds to <b>curl_multi_add_handle()</b> in libcurl.
&nbsp;This method  adds an existing and valid Curl object to the CurlMulti
object.</blockquote>
    <b>remove_handle(</b><i>Curl Object</i><b>)</b> -&gt; <i>None</i><br>

<blockquote>  Corresponds to <b>curl_multi_remove_handle()</b> in libcurl.
  &nbsp;This method removes an existing and valud Curl object from the CurlMulti
  object.<br>
       </blockquote>
       <b> fdset()</b> -&gt; <i>triple of lists with active file descriptors,
  readable,  writeable, exceptions.</i><br>

<blockquote>  Corresponds to <b>curl_multi_fdset() </b>in libcurl. &nbsp;This
  method extracts  the file descriptor information from a CurlMulti object.
  &nbsp;The returned  lists can be used with the <b>select</b> module to poll
  for events.<br>
       <br>
       Example usage:<br>

  <pre>import pycurl<br>c = pycurl.Curl()<br>c.setopt(pycurl.URL, 'http://curl.haxx.se')<br>m = pycurl.CurlMulti()<br>m.add_handle(c)<br>while 1:<br>    ret, num_handles = m.perform()<br>    if ret != pycurl.E_CALL_MULTI_PERFORM: break<br>while num_handles:<br>    apply(select.select, m.fdset() + (1,))<br>    while 1:<br>        ret, num_handles = m.perform()<br>        if ret != pycurl.E_CALL_MULTI_PERFORM: break<br></pre>
      </blockquote>
        <b>select(</b><i>timeout</i><b>)</b> -&gt; <i>number of ready file
 descriptors   or -1 on timeout<br>
       </i>
<blockquote>    This is a convenience function which simplifies the combined
 use of <b>fdset()</b>   and the <b>select</b> module. &nbsp;<br>
       <br>
       Example usage:<br>

  <pre>import pycurl<br>c = pycurl.Curl()<br>c.setopt(pycurl.URL, 'http://curl.haxx.se')<br>m = pycurl.CurlMulti()<br>m.add_handle(c)<br>while 1:<br>    ret, num_handles = m.perform()<br>    if ret != pycurl.E_CALL_MULTI_PERFORM: break<br>while num_handles:<br>    ret = m.select(1)<br>    if ret == -1:  continue<br>    while 1:<br>        ret, num_handles = m.perform()<br>        if ret != pycurl.E_CALL_MULTI_PERFORM: break<br></pre>
       </blockquote>
         <b>info_read(</b><i>max</i><b>)</b> -&gt; <i>tuple with number of
 queued messages and a list of at most max messages<br>
  </i>
<blockquote>Corresponds to the <b>curl_multi_info_read</b> function in libcurl.
&nbsp;This method extracts at most <i>max</i> messages from the multi stack
and returns them. &nbsp; The number of queued messages after this method has
been called is also returned. </blockquote>

</body>
</html><commit_msg>updated with the latest information on how info_read works<commit_after><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>CurlMulti Objects</title>
       
  <meta http-equiv="content-type"
 content="text/html; charset=ISO-8859-1">
</head>
  <body>
  
<h2>CurlMulti Ojects<br>
    </h2>
  
<p>     CurlMulti objects have the following methods: </p>
         <b>close()</b> -&gt; <i>None</i><br>
  
<blockquote> Corresponds to <b>curl_multi_cleanup()</b> in libcurl. &nbsp;This 
   method is automatically called by pycurl when a CurlMulti object no longer 
   has any references to it, but can also be called explicitly.<br>
       </blockquote>
        <b> perform()</b> -&gt; <i>tuple of status and the number of active 
 Curl   objects</i><br>
  
<blockquote>  Corresponds to <b>curl_multi_perform()</b> in libcurl. <br>
        </blockquote>
        <b> add_handle(</b><i>Curl Object</i><b>) </b>-&gt; <i>None</i><br>
  
<blockquote>   Corresponds to <b>curl_multi_add_handle()</b> in libcurl. &nbsp;This
method  adds an existing and valid Curl object to the CurlMulti object.</blockquote>
     <b>remove_handle(</b><i>Curl Object</i><b>)</b> -&gt; <i>None</i><br>
  
<blockquote>  Corresponds to <b>curl_multi_remove_handle()</b> in libcurl. 
  &nbsp;This method removes an existing and valud Curl object from the CurlMulti 
  object.<br>
        </blockquote>
        <b> fdset()</b> -&gt; <i>triple of lists with active file descriptors, 
  readable,  writeable, exceptions.</i><br>
  
<blockquote>  Corresponds to <b>curl_multi_fdset() </b>in libcurl. &nbsp;This 
  method extracts  the file descriptor information from a CurlMulti object. 
  &nbsp;The returned  lists can be used with the <b>select</b> module to
poll   for events.<br>
        <br>
        Example usage:<br>
    
  <pre>import pycurl<br>c = pycurl.Curl()<br>c.setopt(pycurl.URL, 'http://curl.haxx.se')<br>m = pycurl.CurlMulti()<br>m.add_handle(c)<br>while 1:<br>    ret, num_handles = m.perform()<br>    if ret != pycurl.E_CALL_MULTI_PERFORM: break<br>while num_handles:<br>    apply(select.select, m.fdset() + (1,))<br>    while 1:<br>        ret, num_handles = m.perform()<br>        if ret != pycurl.E_CALL_MULTI_PERFORM: break<br></pre>
       </blockquote>
         <b>select(</b><i>timeout</i><b>)</b> -&gt; <i>number of ready file 
 descriptors   or -1 on timeout<br>
        </i> 
<blockquote>    This is a convenience function which simplifies the combined 
 use of <b>fdset()</b>   and the <b>select</b> module. &nbsp;<br>
        <br>
        Example usage:<br>
    
  <pre>import pycurl<br>c = pycurl.Curl()<br>c.setopt(pycurl.URL, 'http://curl.haxx.se')<br>m = pycurl.CurlMulti()<br>m.add_handle(c)<br>while 1:<br>    ret, num_handles = m.perform()<br>    if ret != pycurl.E_CALL_MULTI_PERFORM: break<br>while num_handles:<br>    ret = m.select(1)<br>    if ret == -1:  continue<br>    while 1:<br>        ret, num_handles = m.perform()<br>        if ret != pycurl.E_CALL_MULTI_PERFORM: break<br></pre>
        </blockquote>
          <b>info_read(</b><i>max</i><b>)</b> -&gt; <i>number of  queued
messages, a list of successful objects, a list of failed objects<br>
   </i> 
<blockquote>Corresponds to the <b>curl_multi_info_read</b> function in libcurl. 
&nbsp;This method extracts at most <i>max</i> messages from the multi stack 
and returns them in two lists. &nbsp;The first list contains the handles
which completed successfully and the second list contains a tuple <i>&lt;curl
error number, curl error message, curl object&gt;</i> for each failed curl
object. &nbsp; The number of queued messages after this method has been called
is also returned.<br>
</blockquote>
</body>
</html>
{'fraction_non_alphanumeric': 0.1566638489715413, 'fraction_numerical': 0.005353620738236123, 'mean_word_length': 3.745320855614973, 'pattern_counts': {'":': 0, '<': 286, '<?xml version=': 0, '>': 286, 'https://': 0, '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': '3275575', 'n_tokens_mistral': 2689, 'n_tokens_neox': 2549, 'n_words': 687}