semvec/pypi-packages huggingface dataset:
Horizon-CLI 0.11
A command line interface for Oracle Horizon Platform
Requires Python: >=3.9

# Prerequisites
1. Connect to OCNA VPN
2. Environment (will probably use virtualenv in final version)
    - Python3 3.9.1
    - pip3 20.3.4
    - requests 2.25.1
3. Add certificate to Python (will probably count on REQUESTS_CA_BUNDLE instead in final version)
    - Without this step, you will get `[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)`
      Guid to add certificate are show below:
    1. Find `cacert.pem` on your local machine. [How to - Step #1 in top answer](https://stackoverflow.com/questions/51925384/unable-to-get-local-issuer-certificate-when-using-requests-in-python)
    2. Append the content in `DigiCert.pem` by the end of `cacert.pem` you just find, and save the change.
4. We assume the customer is already onboarded

# Prepare Config File 
Config file defines the contract and data set. It provides nessessary information about the feed to control plane.

Sample config files which define single files are given under `config` folder. Template for creating and enabling single Parquet feed is also provided.

## Guid to Fill Config File
1. If contract already exists but contract details are given, will neither update the contract detail nor create a duplicate contract - Instead, existing 
contract will be attached to the feed.
2. If contract doesn't exist but contract details are not given, will stop the process and ask customers to update config file with contract details.
3. When specify sampleFilePath, please use absolute path.
4. `batchType` options: `"SNAPSHOT"`, `"APPEND"`
5. `cadence` options: `"HOURLY"`, `"DAILY"`, `"WEEKLY"`
6. `retain` options: `24`, `72`, `168`, `336`, `720`. These are numbers of hours, they represents 1, 3, 7, 14, 30 days respectively.

# Usage
To run this tool, run below command under the directory where `createAndEnableParquetFeeds.py` sits:
```
python3 createAndEnableParquetFeeds.py <config file, required> <horizon environment, optional> 
```
When you specify config file location, there are 2 options:
1. Relative path to this python script. Sample: `config/single-feed-config-V1-existing-contract.json`. No "/" in the beginning.
2. Absolute path.

You can also choose environment, 3 options are given: 1) `unstable`, 2) `staging`, 3) `prod`. If environment is not provided, this program will take effect
to `prod` by default.

## Retry
If failure heppens, you can modify your config file based on the given error message, then retry with the updated config file. Or, you can go to Horizon
website to retry with a few clicks.

# Troubleshooting
1. Failure when creating feed `{'code': 'InvalidParameter', 'message': 'The data set TEST_CE_VIA_SCRIPT_V6 already exists'}`,  which means the given data 
set name already exists.
2. Failure when creating feed `{'errors': ['name must match ".*(?:^[a-zA-Z]+[a-zA-Z0-9_]*$).*"']}`, which means data set name must follow this pattern.
pypdf-lib 0.0.3
pypdf
Requires Python: >=3.6

# pypdf-lib
 
A (maybe) Better PDF Parsing for Python focused on textual extraction. WIP. 

This library is a Python Wrapper built around [PdfAct](https://github.com/ad-freiburg/pdfact), which is built using Java.

## Pre-requisites

- `Java`

```bash
# Linux
apt-get update && apt-get install -y default-jre # openjdk-8-jre-headless / openjdk-11-jdk / openjdk-11-jre-headless

# Mac
brew install java

# Windows
# idk
```

## Installation

```python
!pip install --upgrade git+https://github.com/trisongz/pypdf-lib.git
!pip install --upgrade pypdf-lib

```

## Usage

```python
from pypdf import PyPDF
from fileio import File

base_dir = '/content/output'
File.mkdirs(base_dir)

# Using a remap function expects the file extension to be mapped properly - i.e. if 'txt' is selected, .txt file extension should be returned.

def remap_fnames(fname):
    fname = File.base(fname).replace('- ', '').replace(' ', '_').strip().replace('.pdf', '.json')
    return File.join(base_dir, fname)

converter = PyPDF(input_dir='/content/inputs', output_dir='/content/output', units=['paragraphs', 'blocks'], visualize=True)

# remap_funct is optional. 
for res in converter.extract(remap_funct=remap_fnames):
    print(res)
    # > /content/output/your_json_file_1.json

converter.extracted
'''
{'/content/inputs/input_1.pdf': '/content/output/your_json_file_1.json',
 '/content/inputs/input_2.pdf': '/content/output/your_json_file_2.json',
 '/content/inputs/input_3.pdf': '/content/output/your_json_file_3.json',
 'params': {'exclude_roles': None,
  'format': 'json',
  'include_roles': ['title',
   'body',
   'appendix',
   'keywords',
   'heading',
   'general_terms',
   'toc',
   'caption',
   'table',
   'other',
   'categories',
   'keywords',
   'page_header'],
  'units': ['paragraphs', 'blocks'],
  'visualize': True,
  'with_control_characters': False}}
'''
```