semvec/pypi-packages huggingface dataset:
sc-excel-splitter 0.0.11
Excel splitter according to a specific column
License: MIT
Requires Python: >=3.6
Keywords: python excel splitter

.. image:: https://badge.fury.io/py/sc-excel-splitter.svg
    :target: https://badge.fury.io/py/sc-excel-splitter
.. image:: https://img.shields.io/pypi/pyversions/sc-excel-splitter
    :alt: PyPI - Python Version

A simple Python project sample structure
========================================

This project provides a sample structure for creating python project.


Installation
------------

It is possible to install the tool with `pip`::

    pip install sc-excel-splitter

Configuration
-------------

Configuration files reading in this order, the first is the top most priority:

#. production.xml in current directory,
#. production.xml in <project_name> directory under User directory,
#. production.xml in <project_name> directory under /var/opt/sc/ directory,
#. default.xml in <project_name> directory under /var/opt/sc/ directory.

The default configuration file looks like this::

    dev:
      # whether this program is running is development mode
      dev_mode: False

    excel:
      # 源文件路径
      source_file_path: "/path/to/source_excel_file.xlsx"
      # 导出文件的保存路径
      target_directory: "/path/to/target/"
      # 网点名称列表
      branch_list:
        - "A支行"
        - "B支行"
      # 需要按列拆分的Sheet以及拆分所在列
      sheet_config:
        # 需要拆分的Sheet名称，用双引号包围
        "Sheet1":
          # 机构列所在列的索引（从0开始计数，第一列为0，依此类推）
          branch_column: 3
          # 表头所在行的索引（从0开始计数，第一列为0，依此类推）
          header: 2
        # 需要拆分的Sheet名称，用双引号包围
        "Sheet2":
          # 机构列所在列的索引（从0开始计数，第一列为0，依此类推）
          branch_column: 17
          # 表头所在行的索引（从0开始计数，第一列为0，依此类推）
          header: 0
        # 其他需要导出的Sheet名称列表
        other_sheets:
          # Sheet名称
          - "Sheet3"
          # Sheet名称
          - "Sheet4"

License
-------

The script is released under the MIT License.  The MIT License is registered
with and approved by the Open Source Initiative [1]_.

.. [1] https://opensource.org/licenses/MIT
file-operations 1.0.5
Simple API for performing file and directory operations
License: MIT
Requires Python: >=3

# File Operations

Simple python API for performing directory and file-based operations.

## Installation

You can install the `file_operations` library with the following command:

    pip install file_operations==1.0.5

Then import into your program as:

    import file_operations

    def main():
        data = "aabaaba"
        src_file = "hello.src"
        dest_file = "hello.dest"

        file_operations.write_file(src_file, data, mode='w')
        file_operations.copy_file(src_file, dest_file)

    if __name__ == '__main__':
        main()


## API Architecture

The following discusses the available methods in this library:

    read_bytes(src_file, offset, limit)

    copy_file(src_file, dest_file)
    write_file(dest_file, data, mode ='w', overwrite = False)
    move_file(src_file, dest_file)
    remove_file(src_file)

    create_dir(dest_dir)
    copy_dir(src_dir, dest_dir, overwrite = False)
    move_dir(src_dir, dest_dir)
    remove_dir(dest_dir)

    buffered_reader(file_name, buffer_size, mode ='rb'):
    buffered_reader.has_next()
    buffered_reader.read()
    buffered_reader.close()

The `_file` methods require both `src_file` and `dest_file` to be formatted as `path/file_name.extension`.
Note the `buffered_reader` is a class which is used for reading a large file in chunks, the size of each chunk is `buffer_size`.
If an operation is successfully applied, then the function returns `True` and `False` otherwise.

For coding interview preparation, please visit [algorithmspath.com] (https://algorithmspath.com).