semvec/pypi-packages huggingface dataset:
yfbasic 0.2.0
Thin python wrapper to retrieve and work with Yahoo! finance data
Requires Python: >=3.9,<4.0
Keywords: yahoo,finance,stocks,investment

yfbasic
=======

A thin python wrapper to retrieve price action data from the Yahoo! finance API.

There are similar packages available that does this, most notably
[yfinance](https://github.com/ranaroussi/yfinance). The purpose of this package
is to present the raw data as typed objects to be consumed as desired.

# Getting started

The interface is straight forward, just import and query.

``` python
import yfbasic

data = yfbasic.query("GME")
```

The supporting parameters are typed as well.

``` python
import yfbasic
from yfbasic import Range, Interval

data = yfbasic.query("GME", range=Range.r1mo, interval=Interval.i1h)
```

You can use `query_threaded` to parallelise the data retrieval.

``` python
import yfbasic

symbols = ("GME", "AMC", "TSLA")

data = yfbasic.query_threaded(symbols)
```

# Working with the data

The data is modelled directly of the structure returned by the yahoo api. This
makes it a bit more low level to work with, but the package makes no presumptions about
how you intend to work with the data.

The best way to understand the data is to look at the [data structure](yfbasic/models/chart.py)
directly.

## Error handling

If we look at the `Chart` data model it contains two optional parameters, 
`result` and `error` which means we need to do application side checking of the
data. To satisfy type safety we need to at least verify the existence of
results by checking `data.chart.results` . If we want insight into any API side
errors we could verify and action upon `data.chart.error`

``` python
import yfbasic

data = yfbasic.query("GME")

# verifying the API produced results.
if data.chart.result:
    result = data.chart.result[0]
    quotes = result.indicators.quote[0]

    # getting price action data
    timestamps = result.timestamp
    open = quotes.open
    close = quotes.close
    high = quotes.high
    low = quotes.low
    volume = quotes.volume
```
twarc-ids 0.0.3
A twarc plugin to read Twitter data and output the tweet ids
Requires Python: >=3.3

# twarc-ids

This module is a simple example of how to create a plugin for [twarc]. It uses
[click-plugins] to extend the main twarc command, and to manage the command
line options.

First you need to install twarc and this plugin:

    pip install twarc
    pip install twarc-ids

Now you can collect data using the core twarc utility:

    twarc search blacklivesmatter > tweets.jsonl

And you have a new subcommand `ids` that is supplied by twarc-ids.

    twarc ids tweets.jsonl > ids.txt

It's good practice to include some tests for your module. See
[test_twarc_ids.py] for an example. You can run it directly with [pytest] or
using:

    python setup.py test

When creating your setup.py make sure you don't forget the [entry_points magic]
so that twarc will find your plugin when it is installed!

[click-plugins]: https://pypi.org/project/click-plugins/
[pytest]: https://pypi.org/project/pytest/ 
[test_twarc_ids.py]: https://github.com/DocNow/twarc-ids/blob/main/test_twarc_ids.py
[entry_points magic]: https://github.com/DocNow/twarc-ids/blob/main/setup.py#L20-L22
[twarc]: https://github.com/docnow/twarc
pylarization 0.2.1
Package for polarization state calculations
Keywords: polarization light ellipse jones stokes mueller coherency

Pylarization
============

About
-----
Pylarization is a Python module that aids in processing light
polarization states. For given method of polarization description it can 
calculate all parameters of a polarization ellipse.

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

The following should do, as pylarization does not have any
platform-specific dependancies.

.. code-block:: sh

   pip install pylarization

Usage
-----

Polarization Ellipse
~~~~~~~~~~~~~~~~~~~~

PolarizationEllipse is the base class for all classes describing different 
methods of describing the state of polarization.

To create an instance it is necessary to supply light amplitudes along
the X and Y axes and the phase difference between the amplitudes.

.. code-block:: python

   light = PolarizationEllipse(0.445, 0.89, 1.57)


Vectors
~~~~~~~

Jones Vector
^^^^^^^^^^^^

.. code-block:: python

   light = JonesVector(0.445, 0.89j)

Stokes Vector
^^^^^^^^^^^^^

.. code-block:: python

   light = StokesVector(1, 0.6, 0, 0.8)

Matrices
~~~~~~~~

Jonex Matrix
^^^^^^^^^^^^

.. code-block:: python

   matrix_values = numpy.matrix([[1, 0], [0, -1j]])
   light = JonesMatrix(matrix_values) *  JonesVector(1, -1j)
   light.vector
   matrix([[ 1.+0.j],
           [-1.+0.j]])

Mueller Matrix
^^^^^^^^^^^^^^

.. code-block::

   matrix_values = numpy.matrix([[0.5, 0.5, 0, 0], [0.5, 0.5, 0, 0], [0 , 0, 0, 0], [0 , 0, 0, 0]])
   light = MuellerMatrix(matrix_values) *  StokesVector(1, 0, 0, 0)
   light.vector
   matrix([[0.5],
           [0.5],
           [0. ],
           [0. ]])

Coherency Matrix
^^^^^^^^^^^^^^^^

.. code-block:: python

   light = CoherencyMatrix(1, 0 ,0 ,0)

Sources
-------

All sources can be found `here <https://gitlab.com/szuro/pylarization/-/wikis/Sources>`_