<commit_before>"""
Algorithm Protocol
===================

For a class to be passed as a trading algorithm to the 
:py:class:`zipline.lines.SimulatedTrading` zipline
it must follow an implementation protocol. Examples of this algorithm protocol
are provided below.

The algorithm must expose methods:

  - get_sid_filter: method that takes no args, and returns a list
  of valid sids. List must have a length between 1 and 10. If None is returned
  the filter will block all events.
  
  - handle_frame: method that accepts a :py:class:`pandas.Dataframe` of the 
  current state of the simulation universe. An example frame::
  
    +-----------------+--------------+----------------+--------------------+
    |                 | SID(133)     |  SID(134)      | SID(135)           |
    +=================+==============+=====================================+
    | price	          | $10.10       | $22.50         | $13.37             |
    +-----------------+--------------+----------------+--------------------+
    | volume          | 10,000       | 5,000          | 50,000             |
    +-----------------+--------------+----------------+--------------------+
    | mvg_avg_30      | $9.97        | $22.61         | $13.37             |
    +-----------------+--------------+----------------+--------------------+
    | dt              | 6/30/2012    | 6/30/2011      | 6/29/2012          |
    +-----------------+--------------+----------------+--------------------+
            
  - set_order: method that accepts a callable. Will be set as the value of the 
    order method of trading_client. An algorithm can then place orders with a 
    valid SID and a number of shares::
    
        self.order(SID(133), share_count)
        
  - set_performance: property which can be set equal to the 
    cumulative_trading_performance property of the trading_client. An 
    algorithm can then check position information with the
    Portfolio object::
    
        self.Portfolio[SID(133)]['cost_basis']

"""

import zipline.protocol as zp
<commit_msg>fixed bug in table formatting.<commit_after>"""
Algorithm Protocol
===================

For a class to be passed as a trading algorithm to the 
:py:class:`zipline.lines.SimulatedTrading` zipline
it must follow an implementation protocol. Examples of this algorithm protocol
are provided below.

The algorithm must expose methods:

  - get_sid_filter: method that takes no args, and returns a list
  of valid sids. List must have a length between 1 and 10. If None is returned
  the filter will block all events.
  
  - handle_frame: method that accepts a :py:class:`pandas.Dataframe` of the 
  current state of the simulation universe. An example frame::
  
    +-----------------+--------------+----------------+--------------------+
    |                 | SID(133)     |  SID(134)      | SID(135)           |
    +=================+==============+=====================================+
    | price           | $10.10       | $22.50         | $13.37             |
    +-----------------+--------------+----------------+--------------------+
    | volume          | 10,000       | 5,000          | 50,000             |
    +-----------------+--------------+----------------+--------------------+
    | mvg_avg_30      | $9.97        | $22.61         | $13.37             |
    +-----------------+--------------+----------------+--------------------+
    | dt              | 6/30/2012    | 6/30/2011      | 6/29/2012          |
    +-----------------+--------------+----------------+--------------------+
            
  - set_order: method that accepts a callable. Will be set as the value of the 
    order method of trading_client. An algorithm can then place orders with a 
    valid SID and a number of shares::
    
        self.order(SID(133), share_count)
        
  - set_performance: property which can be set equal to the 
    cumulative_trading_performance property of the trading_client. An 
    algorithm can then check position information with the
    Portfolio object::
    
        self.Portfolio[SID(133)]['cost_basis']

"""

import zipline.protocol as zp

{'fraction_non_alphanumeric': 0.27426773178407166, 'fraction_numerical': 0.03776325344952796, 'mean_word_length': 1.3265765765765767, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6857535', 'n_tokens_mistral': 1137, 'n_tokens_neox': 957, 'n_words': 342}