semvec/pypi-packages huggingface dataset:
otel-django-middleware 0.1
OpenTelemetry Instrumentation for tracing Django Middleware
Requires Python: >=3.7

OpenTelemetry Django Middleware Tracing
========================================

|pypi|

.. |pypi| image:: https://badge.fury.io/py/otel-django-middleware.svg
   :target: https://pypi.org/project/otel-django-middleware/

This package provides instrumentation that allows for tracing Django middleware functions and class hooks on top of the `opentelemetry-instrumentation-django <https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-django>`_ package.
These include the ``process_request``, ``process_view``, ``process_exception``, ``process_template_response``, ``process_response``, and ``__call__`` methods.

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

::

    pip install otel-django-middleware

Instrumenting your Django project
---------------------------------

.. code-block::

    from otel.django.middleware import DjangoMiddlewareInstrumentor

    DjangoMiddlewareInstrumentor().instrument()


Just like the ``opentelemetry-instrumentation-django`` package, when starting your application with ``manage.py`` the ``--noreload`` flag is required to properly inject and instrument the middleware.
typecmd 1.0.1
Command toolset used in my work
Requires Python: >=3.8,<4.0

This is a command tootset used in my work.

## System requirements

[install poetry](https://python-poetry.org/docs/#installation)

## How to install

```sh
pipx install typecmd
```

## How to use

After installed, you can use command directory in this toolset.

For example:

```
yaml2json --help
```

## How to build

clone source

```sh
git clone https://github.com/telesoho/typecmd.git
```

```sh
cd typecmd
poetry install
poetry build
```

Active shell

```sh
poetry shell
```

use pipx to install the cli commands.

```sh
pipx install dist/typecmd-<version>.tar.gz
```

Now you can use `typecmd`.

```sh
typecmd --help
```
feather-api 1.2.0
Python wrapper for Feather's API

# Feather API Python Client
This is the Python client for Feather's API. The API provides access to financial data on equities, institutions, and individuals.

To use the API, you'll need an API key. You can get one by emailing [founders@try-feather.com](mailto:founders@try-feather.com)

## Getting Started

If you're using the Python client, you can set your API key as an environment variable `FEATHER_API_KEY`, or pass in the api key as a parameter to the client, as follows:

```
from featherapi import DataClient

API_KEY = 'xxyourfeatherapikeyherexx'

client = DataClient(api_key=API_KEY)
```

If calling the HTTP endpoints yourself, you need to include your api key as an `x-api-key` header. See the HTTP API documentation for more details.

## Equities

To get all available facts for an equity:

```
facts = client.get_equity_facts('AAPL')

print(facts)
```

This will return a dict of pandas dataframes with the following keys:
- `income`: Company income statements
- `balance`: Company balance sheet
- `cashflow`: Company cashflow statements

Additionally, equity facts can be fetched by range:
    
```
# get reports from 2017 to 2022
results = client.get_equity_facts('AAPL', start=2017, end=2022)

# get the available reporting periods for AAPL
available = client.get_available('AAPL')

# available = [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022]

# get the latest 5 years of facts
end = available[-1]
start = available[-5]

results = client.get_equity_facts('AAPL', start=start, end=end)

print(results)
```

To get the institutional ownership for an equity:

```
holders = client.get_institutional_holders('AAPL')

print(holders)
```

To get insider trades for an equity:
```
trades = client.get_insider_trades('AAPL')
```

To get comparable financials/multiples for an equity:
```
comp_financials = client.get_comparable_financials('AAPL')
comp_multiples = client.get_comparable_multiples('AAPL')
```

To get recent stock prices for an equity:
```
# syntax: client.get_stock_price(ticker, interval)
prices = client.get_stock_price('AAPL', '1m')
```
This will return a list of stock price objects (OLHCV) based on one-minute intervals. Valid intervals are `1m`, `5m`, `15m`, `30m`, `1h`, `4h`.

To get daily historical close prices for an equity:
```
prices = client.get_stock_price_historical('AAPL', start='2021-01-01', end='2021-01-31')
```

To get earnings history for an equity, with beats/misses:
```
earnings = client.get_earnings('AAPL')
```

## Institutions
To get an institution's holdings by CIK:

```
# CIK for Berkshire Hathaway is 1652044

holdings = client.get_institution_holdings(1652044)
```

## News
To get the most recent news articles:
```
articles = client.get_articles()
```

To get articles for a keyword (for example, a ticker, company, or industry):

```
articles = client.get_articles('AAPL')
```
SteamPlayerCharts 0.2.1
A Python wrapper for SteamCharts

# SteamCharts

This module makes it possible to get the player count of a game on Steam using the Steamcharts website. It uses aiohttp, BeautifulSoup and http modules.


## Installation

`pip install SteamPlayerCharts`


## Example
```python
import asyncio
import SteamPlayerCharts as SteamCharts

async def main():
	steamgameID = "4000"
	player_count = await SteamCharts.playercount(steamgameID)
	print(player_count)
	try:
		current_players = player_count['Current Players']
		day_peak = player_count['Peak Players 24h']
		all_time_peak = player_count['Peak Players All Time']
	except:
		error_code = player_count['error']['code']
		error_message = player_count['error']['message']

asyncio.run(main())
```

The playercount function returns a Python dict containing the current player counts, as well as the peak values for the last 24 hours and all time.

If the query fails, an error dict is returned that contains the HTTP error code and message.
SteamCharts 0.2
A Python wrapper for SteamCharts

# SteamCharts

This module makes it possible to get the player count of a game on Steam using the Steamcharts website. It uses aiohttp, BeautifulSoup and http modules.


## Installation

`pip install SteamCharts`


## Example
```python
import asyncio
import SteamCharts

async def main():
	steamgameID = "4000"
	player_count = await SteamCharts.playercount(steamgameID)
	print(player_count)
	try:
		current_players = player_count['Current Players']
		day_peak = player_count['Peak Players 24h']
		all_time_peak = player_count['Peak Players All Time']
	except:
		error_code = player_count['error']['code']
		error_message = player_count['error']['message']

asyncio.run(main())
```

The playercount function returns a Python dict containing the current player counts, as well as the peak values for the last 24 hours and all time.

If the query fails, an error dict is returned that contains the HTTP error code and message.
spycause 0.0.1
A module for spatial causal inference in Python.
Requires Python: >=3.7

# spycause

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

A module for spatial causal inference in Python.
Docs are forthcoming.

For the Python package used to run the simulation experiments in Hoffman and Kedron (2023), please see [`spycause-experiments`](https://github.com/tdhoffman/spycause-experiments).

The regression adjustments provided here address data settings with the following graph structure:

![image](confounding-setting.png)

where $\pi(x, u) = P(Z = 1 \mid X = x, U = u)$ is the propensity score, $X$ is a set of observed confounders, and $U$ stands for all unobserved spatial confounders.
$\pi$ is placed in a square node to indicate that it is not a random variable, and rather a deterministic function of random variables $X$ and $U$.
We also provide adjustments to correct for spatial interference between locations (not depicted).

## Features
- Simulation code for spatially confounded or interfered data
- Bayesian estimation routines (using Stan) for ordinary linear regression (OLS), conditional autoregressive models (CAR), and joint models for propensity score and outcome
- Adjustments for spatial interference
- Spatial and nonspatial first-stage propensity score estimation (also using Stan)
dockyard-cli 0.1.16
CLI for dockyard
Requires Python: >=3.8,<4.0

Usage
======

1. `dcli configure` - Configure dockyard CLI 
2. `dcli login` - Login to dockyard  
3. `dcli list` - List dockyard workspaces
4. `dcli activate` - Set active workspace. Subsequent commands use this workspace if no workspace name is specified.
5. `dcli ssh [workspace name] [command]` - SSH to dockyard workspace
6. `dcli scp <source> <target>` - Transfer files/directories to/from workspace.

    a) source/target could be a local path (including .)

    b) source/target could be a remote relative path inside workspace directory `<workspace_name>:<path>`

    c) source/target could be a remote full path inside workspace `<workspace_name>:/<path>` or `<workspace_name>:~/<path>`

7. `dcli code` - Start local VSCode and connect to dockyard workspace

8. `dcli vnc` -  VNC connection to dockyard workspace

9. `dcli start` - Start given workspace

10. `dcli stop` - Stop given workspace

11. `dcli hpc create` -    create parallel cluster

12. `dcli hpc delete` -    delete parallel cluster

13. `dcli hpc list` -      list aws parallel clusters

14. `dcli hpc save` -      backup the parallel cluster head node

15. `dcli hpc ssh` -       ssh/run a command inside parallel cluster head node
ddr-python 1.0.16
Distributed Device Reasoning (DDR) IOS-XE runtime
Requires Python: >=3.6




########## Instructions for updating DDR infrastructure files #################

### Make changes in ddr infrastructure files

cd ~/ddr-home/ddr-clips/ddr-packaging/
edit setup.py for new ddr-clips version number
rm -rf dist
python3 -m build
cp ~/ddr-home/ddr-clips/ddr-packaging/dist/ddr_clips-x.y.z-py3-none-any.whl ddr-home/ddr-clips/infra/xe/infra-files

cd ~/ddr-home/ddr-python/ddr-packaging/
edit setup.py for new ddr-python version number
rm -rf dist
python3 -m build
cp ~/ddr-home/ddr-python/ddr-packaging/dist/ddr_python-x.y.z-py3-none-any.whl ddr-home/ddr-python/infra/xe/infra-files

### Make changes in DDR automation to use the updated ddr-clips and ddr-python packages
### Copy new ddr-clips and ddr-python .whl files

rm ~/ddr-home/ddr-lm/files/xe/infra-files/ddr_*
cp ~/ddr-home/ddr-clips/ddr-packaging/dist/ddr_clips-x.y.z-py3-none-any.whl ~/ddr-home/ddr-lm/files/xe/infra-files
cp ~/ddr-home/ddr-python/ddr-packaging/dist/ddr_python-x.y.z-py3-none-any.whl ~/ddr-home/ddr-lm/files/xe/infra-files

### Edit pipfiles.sh to include new ddr-clips and ddr-python .whl names

~/ddr-home/ddr-lm/files/xe/infra-files/pipfiles.sh

Push changes to ddr-clips repository
Push changes to ddr-python repository
Push changes to ddr-pyats repository

### Make changes in ddr-clips and ddr-python usecases
### Copy selected usecases that will be used with ddr-pyats

cp ~/ddr-home/ddr-clips/usecases/xe/USECASE_Directory ~/ddr-home/ddr-pyats/usecases/xe
cp ~/ddr-home/ddr-python/usecases/xe/USECASE.py ~/ddr-home/ddr-pyats/usecases/xe

### update DDR repositories

git add and git commit changes to repositories and push

~/ddr-home/ddr-clips  git push
~/ddr-home/ddr-python git push
~/ddr-home/ddr-pyats  git push

### update ADS machine DDR repositories
### Assumes that all repositories are stored on ADS in /nobackup/USERNAME/ddr-home...

/nobackup/USERNAME/ddr-home/ddr-clips  git pull
/nobackup/USERNAME/ddr-home/ddr-python git pull
/nobackup/USERNAME/ddr-home/ddr-pyats  git pull
hf4q 0.0.7
A package that generates question papers as HTML files to be distributed over the network and grades the answers in text files submitted by students.
Requires Python: >=3.7

# hf4q

<strong>What is it?</strong>

hf4q is a package that generates question papers as HTML files to be distributed over the network and grades the answers in text files submitted by students.

<strong>Help</strong>
<ul>
<li><a href="https://github.com/generateNscore/hf4q/wiki">Documentation</a></li>
</ul>

<strong>Features</strong>
<ul>
<li>Generates as many personalized question sheets in HTML files as one wants with a few strings of text.</li>
<li>The amount of random personalization is under total control of users.</li>
<li>Each HTML file with a name corresponding to the identification number.</li>
<li>Multi-choice as well as short, default, questions can be made.</li>
<li>A figure, although a pre-made image can be used, can be varied as well as questions.</li>
<li>Mathematical equations can be included in questions with Latex.</li>
<li>User defined functions can be used.</li>
<li>With the question sheets in HTML files, students require only a web browser to answer and send text files including the answers over the network.</li>
<li>Scoring all different answers in text files submitted can be done in a second.</li>
</ul>

<strong>Where to get it</strong>
<ul>
<li>The source code is currently hosted on GitHub at: <a href="https://github.com/generateNscore/quizhtml">https://github.com/generateNscore/hf4q</a></li>
<br>

<pre lang=sh>pip install hf4q</pre>

</ul>

<strong>Dependencies</strong>
<ul><li>None</li></ul>

<strong>Example shots</strong>
<li>A short-answer question</li>
<img src="https://generateNscore.github.io/hf4q/img/example1-3.png">
<li>A multiple-choice question</li>
<img src="https://generateNscore.github.io/hf4q/img/example1-6.png">
<li>A multiple-choice question with a figure</li>
<img src="https://generateNscore.github.io/hf4q/img/example1-2.png">
<li>A question with multiple-choice figures</li>
<img src="https://generateNscore.github.io/hf4q/img/example1-1.png">
<li>A question with equation and with multiple-choices</li>
<img src="https://generateNscore.github.io/hf4q/img/example1-4.png">
<li>A question with equation and with multiple-choice figures</li>
<img src="https://generateNscore.github.io/hf4q/img/example1-5.png">