semvec/pypi-packages huggingface dataset:
ilinq 0.4.2
linq library

ILinq
=====

.. image:: https://gitlab.com/yassu/ilinq/badges/master/pipeline.svg

This project provides the module like linq of C# for Python.

`Documentation <https://yassu.gitlab.io/ilinq/>`_


How To Install
--------------

::

    $ pip install ilinq

For developers, we enter

::

    $ pip install pipenv
    $ pipenv install --dev

First Example
-------------

::

    #!/usr/bin/env python
    # -*- coding: utf-8 -*-

    from ilinq.ilinq import Linq


    def is_prime(n):
        if n < 2:
            return False

        for j in range(2, n):
            if n % j == 0:
                return False

        return True


    if __name__ == '__main__':
        print(
            Linq(range(10**4))
            .last(is_prime))
        # => 9973

LICENSE
-------

Apache 2.0
min-rss 0.0.3
A correct and minimal RSS 2.0 generator.
Requires Python: >=3.6

# min-rss-gen
A minimal RSS 2.0 generator. Follows guidelines from https://validator.w3.org/feed/docs/rss2.html

# XML Implementations
Accepts any implementation that fulfills Python's ElementTree API. Due to this, `lxml` is supported. 

# Installation
```
pip install min-rss
```

# Usage

The following script powers the RSS feed at https://nwalsh1995.github.io/rss.xml

```python
from min_rss_gen.generator import start_rss, gen_item

import xml.etree.ElementTree
from glob import glob
from pathlib import PurePath

SITE = "https://nwalsh1995.github.io"
RSS_FILENAME = "rss.xml"
rss_items = []


# Generate all items
for f in glob("**/*.html", recursive=True):
    path = PurePath(f)
    title = path.with_suffix("").name.replace("-", " ").title()
    rss_items.append(gen_item(title=title, link=f"{SITE}/{str(path)}"))


# Generate the <rss> XML element and subelements.
rss_xml_element = start_rss(title="nwalsh1995.github.io", link="nwalsh1995.github.io", description="A collection of thoughts.", items=rss_items)

# You can add custom subelements onto the returned <rss> element if you choose.

with open(RSS_FILENAME, "wb") as f:
    f.write(xml.etree.ElementTree.tostring(rss_xml_element))
```