semvec/pypi-packages huggingface dataset:
withings2intervals 0.1.4
Sync Withings data to Intervals.icu
Requires Python: <4.0,>=3.12


# Withings2Intervals

A Python script to sync wellness data from Withings to [Intervals.icu](https://intervals.icu).

This script is a fork of [this Gist](https://gist.github.com/fruitloop/7e79eeab9fd4ba7d2be5cdf8175d2267) and has been enhanced with features such as:
- Configurable start dates for syncing.
- Prevention of duplicate syncing using a log file.
- Added debugging support via a `-v` flag.
- Refactored for better maintainability and extensibility.

## Features
- Fetches data from Withings using their API.
- Uploads wellness data (weight, body fat %, muscle mass %, blood pressure, etc.) to Intervals.icu.
- Tracks synced days to avoid duplicate uploads.
- Supports a `--force-resync` option to re-upload data.
- Debugging support with `-v`.

## Installation from pip
You can simply install the package from PyPi
```bash
pip install withings2intervals
```

## Installation from repository

1. **Clone the Repository**:
   ```bash
   git clone https://github.com/your-username/withings_syncer.git
   cd withings_syncer
   ```

2. **Install Dependencies with Poetry**:
   Make sure you have [Poetry](https://python-poetry.org/docs/#installation) installed.
   ```bash
   poetry install
   ```

3. **Build**
   ```bash
   poetry build
   ```

4. **Install**
   ```bash
   pip install dist/withings2intervals-<version>.whl
   ```


## Setup

### 1. Create a Withings Developer App
1. Go to the [Withings Developer Portal](https://developer.withings.com/).
2. Sign in and create a new app:
   - **App Name**: Choose a name (e.g., "Withings Syncer").
   - **Callback URL**: Use `http://localhost:80`.
   - Save the app and copy the **Client ID** and **Client Secret** to the `config.ini`

### 2. Get your intervals.icu keys
1. Go to the [Intervals.icu settings page](https://intervals.icu/settings)
2. Scroll until you see **Developer Settings**
3. Click on "API Key (view)"
4. Click on "Generate"
5. Copy the generated API key to the `config.ini`
6. Copy also the "Athlete ID" to `config.ini`

## 3. Run initial authentication
1. Run `python withings2intervals.py`
2. Follow on screen instructions

Once the initial authentication is successfully completed your OAuth2 token will be saved locally and you will be able to run subsequent synchronizations.

## Usage

Run the script with the following options:

- **Sync Today's Data**:
  ```bash
  withings2intervals
  ```

- **Sync Data from a Specific Date**:
  ```bash
  withings2intervals --start 2024-12-01
  ```

- **Force Resync**:
  ```bash
  withings2intervals --start 2024-12-01 --force-resync
  ```

- **Verbose Debugging**:
  ```bash
  withings2intervals -v
  ```

## Acknowledgments
- [Fruitloop's Original Gist](https://gist.github.com/fruitloop/7e79eeab9fd4ba7d2be5cdf8175d2267)
dadmin-celery 1.0.3
适用于 django-vue-admin 的celery异步插件
Requires Python: <4,>=3.7

# dvadmin_celery

#### 介绍
本包仅因为原仓库长期不更新而自行建库,并开源使用

dadmin-celery 插件是集成 django-celery-beat、tenant-schemas-celery、django-redis、django-celery-results 的一个后端插件，
安装可快速使用异步任务，包含在线添加任务、启停任务、查看任务记录等功能。<br>
与之相对应的是 dvadmin-celery-web 前端插件

## 安装包

使用pip安装软件包：

```python
pip install dadmin-celery
```

目录结构：<br>
```
dvadmin-celery
|   dvdadmin_celery
|   |   fixtures
|   |   |   __init__.py
|   |   |   init_menu.json
|   |   |   initialize.py
|   |   views
|   |   |   __init__.py
|   |   |   crontab_schedule.py
|   |   |   interval_schedule.py
|   |   |   periodic_task.py
|   |   |   task.py
|   |   |   task_detail.py
|   |   __init__.py
|   |   admin.py
|   |   apps.py
|   |   settings.py
|   |   tasks.py
|   |   urls.py
|   setup.py
```

### 方式一: 一键导入注册配置
在 application / settings.py 插件配置中下导入默认配置
```python
...
from dvadmin_celery.settings import *
```
### 方式二: 手动配置
在INSTALLED_APPS 中注册app（注意先后顺序）

```python
INSTALLED_APPS = [
    ...
    'django_celery_beat',
    'django_celery_results',
    'dvadmin_celery',
]
```

在 application / urls.py 中注册url地址

```python
urlpatterns = [
    ...
    path(r'api/dvadmin_celery/', include('dvadmin_celery.urls')),
]
```

如果没有系统redis，请启动redis并添加配置 (./conf/env.example.py 及 ./conf/env.py中添加如下配置)

```python
# redis 配置
REDIS_PASSWORD = '' # 如果没密码就为空
REDIS_HOST = '127.0.0.1'
REDIS_URL = f'redis://:{REDIS_PASSWORD or ""}@{REDIS_HOST}:6379'

```

在 application / settings.py 下添加配置

```python
...
CACHES = { # 配置缓存
    "default": {
        "BACKEND": "django_redis.cache.RedisCache",
        "LOCATION": f'{REDIS_URL}/1', # 库名可自选1~16
        "OPTIONS": {
            "CLIENT_CLASS": "django_redis.client.DefaultClient",
        }
    },
}
BROKER_URL = f'{REDIS_URL}/2' # 库名可自选1~16
CELERY_RESULT_BACKEND = 'django-db' # celery结果存储到数据库中
CELERYBEAT_SCHEDULER = 'django_celery_beat.schedulers.DatabaseScheduler'  # Backend数据库
```

进行迁移及初始化
```python
python3 manage.py makemigrations 
python3 manage.py migrate 
# 注意备份初始化信息
python3 manage.py init -y 
```

其他配置请参考 django_celery_beat 和 celery 文档

#### 使用说明

``` python
mac/linux:
celery -A application.celery worker -B --loglevel=info

win:
需要安装: pip install eventlet,需要启动两个程序（worker + beat 顺序不分先后）
celery -A application.celery worker -P eventlet --loglevel=info
celery -A application.celery beat --loglevel=info
```

#### 注意
``` python
如果 celery worker 报错 KeyError,可尝试在django_vue_admin/application/celery.py文件里将
app = Celery(f"application")
改为
app = Celery(f"application", include=['dvadmin_celery.tasks'])
再重启尝试
```
redis下载地址：<br>
Mac/Linux下载 http://download.redis.io/releases/ <br>
Windows下载 https://github.com/tporadowski/redis/releases/ <br>
enumer 0.1.3
Residue class enumeration given partial information of either end.
Requires Python: >=3.9

<!--

-------------------------------------------------
@author   : Astrageldon
@contact  : astrageldon@gmail.com
@created  : 2024-12-23 17:33
@modified : 2024-12-24 17:01
-------------------------------------------------

-->



# enumer
Residue class enumeration given partial information of either end.


## Getting Started

* pip
```sh
pip install enumer
```

* Clone the repo
```sh
git clone https://github.com/Cosmic-Excalibur/enumer.git
```


## Features
- `enumer`. Perform naive enumerations of representatives.
- `tail_enumer`. With the last few bits specified. This is done by simple modular arithmetic.
- `head_tail_enumer`. With both the last and first few bits specified. This is done by meet-in-the-middle tricks.

## Examples
```python

from secret import secret_message_from_someone
from enumer import *

# E
secret_message = secret_message_from_someone.encode('utf-8')
assert secret_message.startswith(b'Merry Christmas~~~~~~~~~~~~~~~~~~~~')
assert secret_message.endswith(b'padoru padoru!!!!!!!!!!!!!!!!!!!!!!!')
assert len(secret_message) == 191
flag = b2l(secret_message)
mod = int('1337133713371337133713371337133713371337133713371337'
          '1337133713371337133713371337133713371337133713371337'
          '1337133713371337133713371337133713371337133713371337'
          '1337133713371337133713371337133713371337133713371337'
          '1337133713371337133713371337133713371337133713371337'
          '13371337133713371337133713371337133713371337000', 16)
ct = flag % mod
# ct =   0xfcad5e7f12e0fd8a5e8038e0fea85e80031e5e7f06e0fc9a5e7f29
#          e0fd865e7f01e0fca89be0fca25e7f08e0fcbd5e7f2ae0fd875e80
#          0d1e5e810ce0fe875e8126e0fe8f5e8104e0fea89b45dc70e366ed
#          629b70ea6fe476ea1de65ef562e96c9b76ea72e9669b71ee72e666
#          e866e35eed5f3fd20de055822dd862875ed34cce60f11a9d1a9d1a
#          9d1a9d1a9d1a9d1a9d1a9d1a9d1a3ebd0121

# D
head = b'Merry Christmas~~~~~~~~~~~~~~~~~~~~'
tail = b'padoru padoru!!!!!!!!!!!!!!!!!!!!!!!'
length = 191
for pt in head_tail_enumer(ct, mod, head, tail, length, size_limit = 15000):
    if pt == flag:
        print(l2b(pt).decode('utf-8'))

```

For more examples, refer to `enumer/test`.
```python
from enumer import run_enumer_tests

run_enumer_tests()
```

And...
* Merry Xmas 🎄🧑‍🎄
* ~~Merry Ymas 🎄🧑‍🎄~~
* ~~Merry Zmas 🎄🧑‍🎄~~
rabbitmq_umik_producers 0.1.0
producers
Requires Python: <4.0,>=3.8

## Запись строительного шума

Данная программа производит расчёт необходимых метрик, детектирует шумовые события
и производит звукозапись этих событий

Для работы программы в `src/` необходимо добавить текстовый файл `config.txt`:

```
TIMEZONE_DELTA=0
CALIBRATION_CORRECTION=61.1

DAY_NORM=70
NIGHT_NORM=60
SIGNAL_BUFFER_LENGTH=5
WAITING_TIME=5
DURATION_LIMIT=60

RABBITMQ_LOGIN=login
RABBITMQ_PASSWORD=password
RABBITMQ_HOST_OUTER=1.1.1.1
RABBITMQ_PORT_OUTER=0
RABBITMQ_EXCHANGE=exchange

LATITUDE_EQUIP=00.00000
LONGITUDE_EQUIP=00.00000
ALTITUDE_EQUIP=0

MINIO_BUCKET_NAME=any_bucket_name
MINIO_URL=0.0.0.0:0000
MINIO_ACCESS_KEY=any_access_key
MINIO_SECRET_KEY=any_secret_key
```

________
Для работы библиотеки ```pydub```, необходимой для конвертации
wav-файла в mp3-файл, нужно установить программу ```ffmpeg```:
```
sudo apt-get install ffmpeg
```