semvec/pypi-packages huggingface dataset:
streamlit-label-graph 0.1.2
Plotly graph for labelling timeserie data
Requires Python: >=3.7

# streamlit-label-graph

Plotly graph for labelling timeserie data

```sh
pip install streamlit-label-graph
```

```python
import streamlit as st

import pandas as pd
import numpy as np
import plotly.express as px
import plotly.graph_objects as go
from plotly.subplots import make_subplots

from streamlit_label_graph import label_graph, LabelConfig


@st.cache_data
def weather_data ():
    x = pd.date_range(start='2022-01-01', end='2022-12-31', freq='D')
    y = np.sin(2 * np.pi * x.dayofyear / 365) + np.random.normal(0, 0.1, size=len(x))
    return pd.DataFrame({'date': x, 'temperature': y})

config: LabelConfig = {
    'categories': [
        {'key': 'HOT', 'color': 'rgba(255 110 110,0.1)'},
        {'key': 'COLD', 'color': 'rgba(110,110,255,0.1)'}
    ]
}
df = weather_data()

figure = px.line(df, x=df['date'], y=df['temperature'])
labels = label_graph(figure, config)
df['label'] = labels['series']

fig = make_subplots(specs=[[{"secondary_y": True}]])
fig.add_trace(go.Line(x=df['date'], y=df['temperature'], name='temperature'), secondary_y=False)
fig.add_trace(go.Line(x=df['date'], y=df['label'], name='label'), secondary_y=True)
st.write(fig)
st.write(labels)

```

* Use Ctrl + Mouse-drag to create a new label
* Right click on a label to set the category

![Demo](demo_image.png)


## Run demo

```sh
python -m streamlit_label_graph
```
telewrap 0.2.1
Telewrap CLI
Requires Python: >=3.8

# Telewrap

Telewrap is a Python package that can make your life as a developer so much easier.
With this tool, you don't have to constantly check your shell to see if your code has finished compiling or if your model has finished training.
Telewrap sends notifications straight to your telegram, freeing you up to focus on other tasks or take a break, knowing that you'll be alerted as soon as the job is done.

# Getting started

## TLDR
For those of you that just want it to work:
```bash
pip install telewrap
tl configure # then follow the instructions
tlw sleep 5
```

## Installation

To install Telewrap, run:

```pip install telewrap```

This will install two command line interfaces: `tl` and `tlw`.

## Configuration

To configure Telewrap, run the following command and follow the printed instructions:

``bash
tl configure
``

By default, the configuration file is saved in the expanded path `~/.config/.telewrap.config`. If you want to save it to a different directory, you can use the environment variable `TELEWRAP_CONFIG_DIR`. For example, the following command will save the configuration file under /tmp/.telewrap.config:

```bash
TELEWRAP_CONFIG_DIR=/tmp tl configure
```

## Usage

### Command line

To wrap a command line program until it finishes and get the result in your Telegram chat, run:

```bash
tlw my_program
```

If your command has any flags that are conflicting with `tl` you can use the following forms

```bash
tlw -- my_program --help # preferable as it allows for autocomplete
tlw "my_program --help"
```


### In a Python script

It's possible to use telewrap to keep track of the progress when executing lengthy blocks of code.
The following example works in Python scripts and Python notebooks.

```python
from telewrap import Telewrap

with Telewrap():
    while i < 10:
        long_function()
        i += 1
```

If you're using it in code you can even set the status_func and end_func to change the messages so that they fit your needs:

```python
from telewrap import Telewrap, message_funcs
import time

i = 0
def status_func(x): return f"Current iteration {i}\n{message_funcs.default_status_func(x)}"
def end_func(x): return f"Tada!!"
with Telewrap(status_func=status_func, end_func=end_func):
    while i < 10:
        # A long function
        time.sleep(1)
        i += 1
```

## Some Useful Examples
Telewrap is a valuable tool that for any task that requires waiting, one example is checking the availability of a website. All you need to do is write a script that checks whether a website is ready or you can use the one in  `examples/is_website_ready.py`.
Then just run:

```bash
tlw python examples/is_website_ready.py https://google.com
```

This will provide you with a notification as soon as the website is available.
example-package-lmm 0.0.1
A small example package by limanman
Requires Python: >=3.7

# Example Package

This is a simple example package by limanman. 

.
└── example_package_lmm
    ├── example.py
    └── __init__.py

usage:

pip install example_package_lmm
python3.8
import example_package_lmm.example as e
print("input 2222, output:", e.add_one(2222))
codeforces-translate 0.1.2
codeforces 翻译

# codeforces translate

[Github](https://github.com/therehello/codeforces-translate)

[Blog](https://therehello.top/codeforces-translate)

## 安装

```bash
pip install codeforces-translate
```

如果你换源了，请使用以下命令进行安装

```bash
pip install -i https://pypi.org/simple/ codeforces-translate
```

注意警告，若警告 python script 路径未添加到系统 PATH 中，请及时添加。

## 更新

```bash
pip install --upgrade codeforces-translate
```

## 基本功能

- [x] 翻译一个问题
- [x] 翻译一场比赛
- [ ] 输出为 $pdf$

## 快速使用

```bash
# cf-translate contest_id
# 翻译 Codeforces Round 859 (Div. 4)
# https://codeforces.com/contest/1807/problems
cf-translate 1807
# 翻译 The 2022 ICPC Asia Xian Regional Contest
# https://codeforces.com/gym/104077/problems
cf-translate 104077

# cf-translate contest_id id
# 翻译 Codeforces Round 859 (Div. 4) 的 A 题
# https://codeforces.com/contest/1807/A
cf-translate 1807 A
# 翻译 The 2022 ICPC Asia Xian Regional Contest 的 A 题
cf-translate 104077 A
```

以上命令会在当前路径下生成翻译后的 $markdown$ 文档，然后在支持 $markdown$ 的程序里预览

### 效果

![示例](./example.png)

## 注意

翻译一场比赛时，暂不支持无 problems 的比赛，你可以选择单独翻译一道问题

翻译采用谷歌翻译，请确保你能正常访问谷歌翻译

有时 codeforces 会挂掉，此程序会查询 5 分钟