semvec/pypi-packages huggingface dataset:
datetime-extractor 0.5
Extracts timestamp from a given text/string

# datetime_extractor
The main intent of this project is to extract mostly all possible timestamps from a given string where date and time written together. It extracts timestaamps in a string format. Later one can convert extracted timestamp to python timestamp using pandas datetime package.

# How to install the package
		pip install datetime-extractor

# Example1
``` python
  from datetime_extractor import DateTimeExtractor

  import pandas as pd
  import re

  samplestring = 'scala> val xorder= new order(1,"2016-02-22 00:00:00.00",100,"COMPLETED")'

  DateTimeExtractor(samplestring)

  Out: ['2016-02-22 00:00:00.00']
```

# Example2
Suppose if one has a dataframe with text column where timestamps written, the above function can be used to create a new column with extracted timestamp strings. One can use below command in this case
``` python
  data = pd.read_csv('sampledata.csv')
  data['textcolumn'] = data['textcolumn'].fillna('')

  data['ExtractedTimestamp'] = data['textcolumn'].apply(lambda x: DateTimeExtractor(str(x)))
```
c3linear 0.1.1
A naive implementation of C3 linearization algorithm used in Python's MRO
Requires Python: >=3.6

# C3 Linearization Algorithm

`c3linear` is a naïve implementation of
[C3 linearization](https://en.wikipedia.org/wiki/C3_linearization)
algorithm. C3 used in Python 2.3+ for
[Method Resolution Order](https://www.python.org/download/releases/2.3/mro/).
See Raymond Hettinger's
[Python’s super() considered super!](https://rhettinger.wordpress.com/2011/05/26/super-considered-super/)
for more information.

# Motivation

The project has come to life as a byproduct of debugging an
overcomplicated hierarchy of mixin classes.  I thought I knew how
exactly MRO is computed, but it turned out I didn't.

I've tried to keep the code idiomatic and easy to follow at the
expense of performance. The project is really took a couple of hours
to complete.  Although I didn't care about time complexity and didn't
check correctness as thoroughly as I should, I think the project may
help someone who wants to learn how Python's Method Resolution Order
works.

# Usage

## Library

* Get the code and install it with `python setup.py install` (Python
  3.6+ required)
* Import `from c3linear.mro import mro`
* Check against built-in MRO:
```python
>>> class A: pass
>>> class B(A): pass
>>> mro(B) == B.mro()
True 
``` 

Take a look at `tests` for more examples.

## Testing

* Install dependencies:
```shell
pip install -e .
```
* (Optional) Install extra packages:
```shell
pip install -e .[extra]
```
* Run tests with:
```shell
python setup.py test
```
* Run `flake8` for PEP8 compliance testing:
```shell
python setup.py flake8
```
* Run `mypy`:
```shell
mypy c3linear/
```

# Contributing

If you've found a bug, please open an issue describing the problem first.


# Licence

The project is licensed under MIT License. For further information see
`LINCENSE` file.
mkdict 1.0
A multi-key dictionary with wildcard lookup.
Requires Python: >=3.5

`mkdict`: a multi-key dictionary
================================

Usage
-----

The ``mkdict.MultiKeyDict`` provides a multiple keyed dictionary.

When adding an element you can specify a tuple of keys:

``` python
d = MultiKeyDict()

d[1,2,3] = 123
d[1,2,4] = 124
d[2,3,4] = 234
d[3,3,4] = 334
```
All keys should have the same length otherwise a `KeyError` will be raised. 

To retrieve values you can use `None` as a wildcard character.
``` python
d[1,2,3]  -> 123
d[1,None,None] -> {(2,3): 123, (2,4): 124}
d[1,None,3] -> {(2,): 123}
```
When a wildcard is used the dictionary returns a new view on the dictionary with that key eliminated.  
When no wildcard is used the result is a single item.

Modifications of the resulting dictionary will update the parent dictionary.
For example,
``` python
d[2,None,None][4,5] = 245
```
will add the value 245 with key (2, 4, 5) in the original dictionary.

License
-------

MIT License

Copyright (c) 2019 Anton Dries

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
yamlenv 0.7.1
Interpolate Yaml files with env vars

Yamlenv
=======

|Build Status| |PyPi package|

Interpolate YaML files with environmental variables and other YaML
files.

Given a YaML string like:

.. code-block:: yaml

    a: ${A}
    b: 2

and an environmental variable ``$A`` with value ``hello``,
``yamlenv.load`` would return:

.. code-block:: python

    {
        a: 'hello',
        b: 2
    }

Including YAML literals as environment variables is also
supported - so if the environment variable ``$A`` was set to
``false``, ``yamlenv.load`` would return:

.. code-block:: python

    {
        a: False,
        b: 2
    }


Default values are supported:

.. code-block:: python

    yamlenv.load('''
        a: ${A:-hello}
        b: 2
    ''') == {
        'a': 'hello',
        'b': 2
    }

As in Bash, defaulting can be done with either `:-` (to not allow empty
defaults) or with `-` to allow empty values.

The environmental variable can be embedded in a larger string, too:

.. code-block:: python

    yamlenv.load('''
        a: foo ${A:-bar} baz
        b: 2
    ''') == {
        'a': 'foo bar baz',
        'b': 2
    }

More than one environmental variable can appear in a string:

.. code-block:: python

    yamlenv.load('''
        a: foo ${A:-bar} ${B:-baz}
        b: 2
    ''') == {
        'a': 'foo bar baz',
        'b': 2
    }

YaML files can include other YaML files, too. E.g. if ``b.yaml``
contains "2", then:

.. code-block:: python

    yamlenv.load('''
        a: 1
        b: !include b.yaml
    ''') == {
        'a': 1
        'b': 2
    }

The included YaML file can be as complex as necessary.

More examples are available in the tests.

.. |Build Status| image:: https://travis-ci.org/lbolla/yamlenv.svg?branch=master
   :target: https://travis-ci.org/lbolla/yamlenv

.. |PyPi package| image:: https://badge.fury.io/py/yamlenv.svg
    :target: https://badge.fury.io/py/yamlenv