<commit_before>#
# This file is licensed under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""SMV PartialTime and TimePanel Framework

This module defines the most used PartialTime including `Day`, `Month`, `Quarter`, and the TimePanel
"""

from smvapp import SmvApp

def Quarter(year, quarter):
    """Define an smv.panel.Quarter

        As added to a DF as column `smvTime`, the value format will look like "Q201201"

        Args:
            year (int):
            quarter (int):

        Returns:
            (java object smv.panel.Quarter)
    """
    return SmvApp.getInstance()._jvm.Quarter(year, quarter)

def Month(year, month):
    """Define an smv.panel.Month

        As added to a DF as column `smvTime`, the value format will look like "M201212"

        Args:
            year (int):
            month (int):

        Returns:
            (java object smv.panel.Month)
    """
    return SmvApp.getInstance()._jvm.Month(year, month)

def Day(year, month, day):
    """Define an smv.panel.Day

        As added to a DF as column `smvTime`, the value format will look like "D20121231"

        Args:
            year (int):
            month (int):
            day (int):

        Returns:
            (java object smv.panel.Day)
    """
    return SmvApp.getInstance()._jvm.Day(year, month, day)

def TimePanel(start, end):<commit_msg>Added more docstr in panel.py<commit_after>#
# This file is licensed under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""SMV PartialTime and TimePanel Framework

This module defines the most used PartialTime including `Day`, `Month`, `Quarter`, and the TimePanel
"""

from smvapp import SmvApp

def Quarter(year, quarter):
    """Define an smv.panel.Quarter

        Quarter extends smv.panel.PartialTime base class. It has the following methods,
            * smvTime(): returns (str), will be the value of the `smvTime` column if added to a DF
            * timeIndex(): returns (int), an integer incremental by one as the PartialTime increase
                by one unit
            * timeLabel(): returns (str), a human readable string
            * timeType(): returns (str), the type of the PartialTime

        Args:
            year (int):
            quarter (int):

        Example:

            >>> q = Quarter(2012, 1)
            >>> q.smvTime()
            u'Q201201'
            >>> q.timeIndex()
            168
            >>> q.timeLabel()
            u'2012-Q1'
            >>> q.timeType()
            u'quarter'

        Returns:
            (java object smv.panel.Quarter)
    """
    return SmvApp.getInstance()._jvm.Quarter(year, quarter)

def Month(year, month):
    """Define an smv.panel.Month

        Quarter extends smv.panel.PartialTime base class. It has the following methods,
            * smvTime(): returns (str), will be the value of the `smvTime` column if added to a DF
            * timeIndex(): returns (int), an integer incremental by one as the PartialTime increase
                by one unit
            * timeLabel(): returns (str), a human readable string
            * timeType(): returns (str), the type of the PartialTime

        Args:
            year (int):
            month (int):

        Example:

            >>> m = Month(2012, 5)
            >>> m.smvTime()
            u'M201205'
            >>> m.timeIndex()
            508
            >>> m.timeLabel()
            u'2012-05'
            >>> m.timeType()
            u'month'

        Returns:
            (java object smv.panel.Month)
    """
    return SmvApp.getInstance()._jvm.Month(year, month)

def Day(year, month, day):
    """Define an smv.panel.Day

        Quarter extends smv.panel.PartialTime base class. It has the following methods,
            * smvTime(): returns (str), will be the value of the `smvTime` column if added to a DF
            * timeIndex(): returns (int), an integer incremental by one as the PartialTime increase
                by one unit
            * timeLabel(): returns (str), a human readable string
            * timeType(): returns (str), the type of the PartialTime

        Args:
            year (int):
            month (int):
            day (int):

        Example:

            >>> d = Day(2012, 5, 31)
            >>> d.smvTime()
            u'D20120531'
            >>> d.timeIndex()
            15491
            >>> d.timeLabel()
            u'2012-05-31'
            >>> d.timeType()
            u'day'

        Returns:
            (java object smv.panel.Day)
    """
    return SmvApp.getInstance()._jvm.Day(year, month, day)

def TimePanel(start, end):
{'fraction_non_alphanumeric': 0.10012628540501534, 'fraction_numerical': 0.01713873353779542, 'mean_word_length': 2.119864940911649, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 48, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '748749', 'n_tokens_mistral': 1596, 'n_tokens_neox': 1490, 'n_words': 585}