semvec/pypi-packages huggingface dataset:
retico-core 0.2.10
A framework for real time incremental dialogue processing.
Requires Python: >=3.6, <4
Keywords: retico,framework,incremental,dialogue,dialog

# retico-core

[![Documentation Status](https://readthedocs.org/projects/retico-core/badge/?version=latest)](https://retico-core.readthedocs.io/en/latest/?badge=latest)

This project includes the core functionality of the retico framework. This includes the
abstract, general definitions of incremental modules and incremental units (IUs), as
well as modules and IUs for audio input/output, debugging, dialogue, and text
processing. Also, some tools for saving and loading modules to and from file are
available.

For the main repository that includes a variety of useful modules and IU definitions, 
go to [github.com/retico-team/retico](https://github.com/retico-team/retico).

## How to install

For installing retico-core, you need to have `portaudio` installed. See the
documentation for a detailed description of how to install it. Then, you can install it
via pip:

```bash
$ pip install retico-core
```

## Documentation

The documentation of retico-core can be found at [https://retico-core.readthedocs.io/](https://retico-core.readthedocs.io/)
ellipticipy 1.0.0
Package for the calculation of ellipticity corrections for teleseismic waves
Requires Python: >=3.6

# EllipticiPy

A python package for the calculation of ellipticity corrections for seismic phases in elliptical planetary models.

Authors:
- Stuart Russell
- John F. Rudge
- Jessica C. E. Irving
- Sanne Cottaar

The workings of this package are described in the main paper:

Russell, S., Rudge, J., Irving, J. and Cottaar, S., 2022. A re-examination of ellipticity corrections for seismic phases. Geophysical Journal International, 231(3), pp.2095-2101.
https://doi.org/10.1093/gji/ggac315

Please cite this publication when publishing work that has made use of this package.


## Installation

The package can be installed using pip, the same as many python packages:

```
pip install ellipticipy
```

This package depends on ObsPy. For information regarding ObsPy please see the relevant documentation: https://docs.obspy.org/

## Usage

This package is intended to be used in Python:

```
>>> from obspy.taup import TauPyModel
>>> from ellipticipy import ellipticity_correction
>>> model = TauPyModel('prem')
>>> arrivals = model.get_ray_paths(source_depth_in_km = 124,
    distance_in_degree = 65, phase_list = ['pPKiKP'])
>>> ellipticity_correction(arrivals, azimuth = 39, source_latitude = 45)
[-0.7731978967098823]
```

For users that do not wish to directly interact with Python, there is a command line wrapper for calculating ellipticity corrections in [src/ellip](src/ellip). The Python package must be installed before the wrapper can be used.

```
> ./ellip -d 134 -deg 64 -az 15 -sl 23 -ph P,PcP,PKiKP -mod ak135
    
Model: ak135
Distance   Depth   Phase        Ray Param   Spherical   Ellipticity   Elliptical
  (deg)     (km)   Name         p (s/deg)   Travel      Correction    Travel    
                                            Time (s)        (s)       Time (s)  
--------------------------------------------------------------------------------
   64.00   134.0   P                6.536     619.05        -0.45       618.60
   64.00   134.0   PcP              4.110     653.31        -0.48       652.83
   64.00   134.0   PKiKP            1.307    1020.55        -0.75      1019.80    
```

## Examples

Further examples of code usage in Jupyter Notebook format can be found in [src/](src/). The first of these demonstrates the main usage case.

- [src/example_corrections.ipynb](src/example_corrections.ipynb)
- [src/example_coefficients.ipynb](src/example_coefficients.ipynb)
- [src/ellipticity_of_figure.ipynb](src/ellipticity_of_figure.ipynb)


## License

This package is licenced under the GNU Lesser General Public License v3.0.
base64file 0.0.12
An IO wrapper that reads/writes binary data as base64 into a text file

# Base64File

An IO wrapper that but reads/writes binary data as base64 text, supporting concurrent reading and writing. Similar
to [`GzipFile`](https://docs.python.org/3/library/gzip.html#gzip.GzipFile), it simulates most of the methods of a
standard file object (with the exception of `readline`).

## Usage

### base64file.open()

* Similar to `gzip.open()` or `io.open()`

```python
import base64file

# to write text
with base64file.open('some-file.txt', 'rt', encoding='utf8') as f:
    f.write('1234567890')

# to write binary
with base64file.open('some-file.txt', 'rb') as f:
    f.write(b'\1\2\3\4\5')
```

### base64file.Base64File

* When opening a Base64File without specifying an underlying file, a filename must be provided, and the usual binary
  modes are supported: `r`, `rb`,  `w`,  `wb`, `a`, `ab`, `x`, and `xb` (optional `+` to enable concurrent
  reading/writing, e.g. `wb+`).
* When opening a Base64File with a specified underlying file, the mode is inherited from the specified file (replacing
  text-mode with binary-mode). If a binary-mode file is provided, it is automatically wrapped with
  a [`TextIOWrapper`](https://docs.python.org/3/library/io.html#io.TextIOWrapper).

```python
from base64file import Base64File

# open a new/existing file for concurrent reading and writing
with Base64File('some-file.txt', 'w+') as b:
    b.write(b'\0\1\2\3\4')
    b.seek(0)
    b.write(b'\n')
    print(b.read(2))  # prints b'\1\2'

# wrap an existing file (in this example, open for reading)
with open('some-file.txt', 'r') as f:
    with Base64File(file_obj=f) as b:
        print(b.read(2))  # prints b'\n\1'
        print(b.read())  # prints b'\2\3\4'

# if you need to keep the file open, remember to close it
f = open('some-file.txt', 'w+')
b = Base64File(file_obj=f)
b.write(b'\0\1\2\3\4')
b.seek(0)
b.write(b'\n')
print(b.read(2))  # prints b'\1\2'
b.close()  # this is necessary, otherwise the final 1-2 bytes may not be written
f.close()
```

### base64file.Base85File and base64file.Ascii85File

* The same as base64file.Base64File, but instead
  uses [`b85encode()`](https://docs.python.org/3/library/base64.html#base64.b85encode)
  or [`a85encode()`](https://docs.python.org/3/library/base64.html#base64.a85encode)
* Note that many implementations of base85 are actually Ascii85 (for example, CyberChef.io)


```python
from base64file import Ascii85File
from base64file import Base85File
```