semvec/pypi-packages huggingface dataset:
pythonaoe2 0.2.5
Using Python to interact with the AOE2 API
License: MIT

# python-aoe2
 
## How to Use:

### Import the library:
```python
>>> from pythonaoe2 import aoe2
```

### Initialize the Client:
```python
>>> client = aoe2.Client()
```

Or if you are running your own instance of the api:

```python
>>> client = aoe2.Client("https://your.url.here/"+"api_version")
```

### Get Civilizations:
```python
>>> client.get_all_civilizations()
```

Civilizations are returned as objects:

```python
>>> for civ in client.get_all_civilizations():
>>>     print(civ.name)
Aztecs
...
Vietnamese
```

### Get a Civilization by ID or Name:
```python
>>> client.get_civilization("Aztecs").name
'Aztecs'
>>> client.get_civilization("1").name      
'Aztecs'
>>> 
```

### Get all Units:
```python
>>> for unit in client.get_all_units(): 
>>>     print(unit.name)                  
Archer
...
Elite Woad Raider
```

### Get a Unit by ID or Name:
```python
>>> client.get_unit("1").name 
'Archer'
>>> client.get_unit("Archer").name
'Archer'
```

### Get all structures:
```python
>>> for structure in client.get_all_structures():)  d))
>>>     print(structure.name + "|" + str(structure.id))
Barracks|1
...
Keep|59
>>>
```

### Get Structure by Name or ID:
```python
>>> client.get_structure("59").name
'Keep'
>>> client.get_structure("Keep").name
'Keep'
```

### Get all Technologies:
```python
>>> for tech in client.get_all_technologies(): 
>>>     print(tech.name)
Crossbowman
...
Elite Woad Raider
```

### Get Technology by ID or Name:
```python
>>> client.get_technology("1").name
'Crossbowman'
>>> client.get_technology("Crossbowman").name 
'Crossbowman'
```

### Other Notes:
Some information requires additonal API calls with the provided ID/Name values, and some structures have multiple entries for different ages:

```python
>>> unit = client.get_unit("4")                   
>>> unit.name
'Cavalry Archer'
>>> for structure in client.get_structure(unit.created_in):
>>>     print(structure.name + " | " + structure.age) 
Archery Range | Feudal
Archery Range | Castle
Archery Range | Imperial
```

```python
>>> tech = client.get_technology("3") 
>>> tech.applies_to
['crossbowman']
>>> tech.develops_in
'archery_range'
>>> unit = client.get_unit(tech.applies_to[0])
>>> unit.name
'Crossbowman'
```
spd-trading 0.1.3
Estimates the Risk Neutral Density and Historical Density of an underlying and suggests trading intervals based on the Pricing Kernel.
License: MIT
Requires Python: >=3.9

# spd_trading

This package estimates the Risk Neutral Density (RND) and Historical Density (HD) of an underlying and suggests a trading 
strategy based on the Pricing Kernel:

<a href="https://www.codecogs.com/eqnedit.php?latex=K=\frac{RND}{HD}" target="_blank"><img src="https://latex.codecogs.com/svg.latex?K=\frac{RND}{HD}" title="K=\frac{RND}{HD}" /></a>


The **RND** is estimated by *Rookley's Method*, which uses the option table of one trading day. ``risk_neutral_density.Calculator.get_rnd``

The **HD** is estimated by a *GARCH(1,1) Model*, which uses a timeseries of the underlying. ``historical_density.Calculator.get_hd``

The package is part of a Master Thesis, which will be published after grading [1]_. The thesis explains the theoretical background 
in more detail and gives more references. Furthermore an actual trading strategy was implemented and backtested on real data 
(BTC options March-September 2019). 

The concious desicion of *not* implementing the actual strategy in the package is due to the high responsibility that would come 
with publishing such a risky tool. However, the construction of strategies based on the kernels are explained and analyized in the 
thesis as well. 

## Installation

Via pip
```
    pip install spd_trading
```

Or via download from git:

```
    pip install git+https://github.com/franwe/spd-trading#egg=spd-trading
```

Note that in order to avoid potential conflicts with other packages it is strongly recommended to use a virtual environment (venv) or a conda environment.

![See image in README.md in GitHub repo.](https://github.com/franwe/spd_trading/blob/main/docs/_static/example_kernel.png?raw=true)
asyncgTTS 0.3.1
Async interfaces to the official Google Text to Speech or easygtts APIs
License: MIT
Keywords: async,TTS,gtts,text to speech

# asyncgTTS

Asynchronous interfaces to the [official Google Text to Speech](https://cloud.google.com/text-to-speech) or [easygTTS](https://github.com/Gnome-py/easy-gtts-api) APIs written with aiohttp.  

## Examples

### asyncgTTS
```python
import asyncio
from subprocess import PIPE, run

import aiohttp
import asyncgTTS

async def main():
    async with aiohttp.ClientSession() as session:
        gtts = await asyncgTTS.setup(premium=True, session=session, service_account_json_location="SERVICE_ACCOUNT.json")

        hello_world_ogg = await gtts.get("Hello World", voice_lang=("en-US-Standard-B", "en-us"))
        hello_world_mp3 = await gtts.get("Hello World", voice_lang=("en-US-Standard-A", "en-us"), ret_type="MP3")

    with open("Hello_world.ogg", "wb") as f:
        f.write(hello_world_ogg)
    with open("Hello_world.mp3", "wb") as f:
        f.write(hello_world_mp3)

asyncio.run(main())
```

### easygTTS
```python
import asyncio

import aiohttp
import asyncgTTS

async def main():
    async with aiohttp.ClientSession() as session:
        gtts = await asyncgTTS.setup(premium=False, session=session)
        hello_world = await gtts.get(text="Hello World")

    with open("Hello_world.mp3", "wb") as f:
        f.write(hello_world)

asyncio.run(main())
```
tarcom 0.1.5
TarCo Communication (tarcom) - Communicate with network devices using TCP (Server and Client). Internal Use Only (Use at your own risk)
License: MIT

# TarCo Communication (tarcom)

## TcpClient
Communicate with network devices as TCP client.

## TcpServer
Create a TCP server to communicate with network devices.

&nbsp;
&nbsp;

### Usage
```python
from tarcom import TcpServer, TcpClient

print("Started")

isServer = True

address = "192.168.0.1"
port = 42424

if isServer:
    com = TcpServer(port)
else:
    com = TcpClient(address, port)


def connectionUpdatedEventHandler(sender, args):
    if(args.connected):
        print(args.address + ": " + "Connected")
    else:
        print(args.address + ": " + "Disconnected")


def dataReceivedEventHandler(sender, args):
    print(args.address + ": " + args.data)


com.connectionUpdated = connectionUpdatedEventHandler
com.dataReceived = dataReceivedEventHandler
com.connect()

inputStr = None
while inputStr != "E":
    inputStr = input("Input (E = Exit):\n")
    if inputStr != None:
        com.send(inputStr)

print("Stopped")
```

&nbsp;
&nbsp;
> **Internal Use Only** (Use at your own risk)