semvec/pypi-packages huggingface dataset:
cnlunardate 0.0.4
A Chinese lunar date Python library
Requires Python: >=3.6
Keywords: Chinese lunar date

# A Chinese lunar date Python library 中国农历日期 Python 库

[![Build Status](https://travis-ci.org/YuBPan/cnlunardate.svg?branch=master)](https://travis-ci.org/YuBPan/cnlunardate)
[![codecov](https://codecov.io/gh/YuBPan/cnlunardate/branch/master/graph/badge.svg)](https://codecov.io/gh/YuBPan/cnlunardate)

## Installation

```console
$ pip install cnlunardate
```

## Usage

Basic operations:

```python
>>> from cnlunardate import cnlunardate

>>> # Basic constructors
>>> cnlunardate(2017, 6, 1) # 4th attribute defaults to False (month is not leap)
cnlunardate.cnlunardate(2017, 6, 1, False)
>>> cnlunardate(2017, 6, 1, True) # (month is leap)
cnlunardate.cnlunardate(2017, 6, 1, True)

>>> # Conversions from/to solar date
>>> from datetime import date
>>> d = cnlunardate.fromsolardate(date(2017, 6, 24))
>>> d
cnlunardate.cnlunardate(2017, 6, 1, False)
>>> d.tosolardate()
datetime.date(2017, 6, 24)
```

Other supported operations as datetime.date (including pickling):

```python
>>> d = cnlunardate.fromordinal(736504) # 736504th day after 0001, 1, 1
>>> d
cnlunardate.cnlunardate(2017, 6, 1, False)
>>> d.toordinal()
736504

>>> # A cnlunardate object is immutable; all operations produce a new object
>>> d.replace(year=2018)
cnlunardate.cnlunardate(2018, 6, 1, False)
>>> d.replace(isLeapMonth=True)
cnlunardate.cnlunardate(2017, 6, 1, True)

>>> d
cnlunardate.cnlunardate(2017, 6, 1, False)
>>> d.weekday() # 0 = Monday
5
>>> d.isoweekday() # 1 = Monday
6
>>> t = d.timetuple()
>>> for i in t:
...     print(i)
...
2017            # year
6               # month
24              # day
0
0
0
5               # weekday (0 = Monday)
175             # 175th day in the year
-1
>>> ic = d.isocalendar()
>>> for i in ic:
...     print(i)
...
2017            # ISO year
25              # ISO week number
6               # ISO day number ( 1 = Monday )

>>> today = cnlunardate.today()
>>> today
cnlunardate.cnlunardate(2019, 11, 22, False)
>>> import time
>>> today == cnlunardate.fromtimestamp(time.time())
True

>>> cnlunardate.min
cnlunardate.cnlunardate(1900, 1, 1, False)
>>> cnlunardate.max
cnlunardate.cnlunardate(2100, 12, 1, False)
```

Errors:

```python
>>> cnlunardate(2101, 1, 1)
ValueError: year 2101 must be in 1900..2100
>>> cnlunardate(2017, 13, 1)
ValueError: month 13 must be in 1..12
>>> cnlunardate(2017, 1, 30)
ValueError: day 30 must be in 1..29
>>> cnlunardate(2017, 1, 1, True)
ValueError: month 1 is not leap in 2017

>>> from datetime import timedelta
>>> cnlunardate.min - timedelta(days=1)
OverflowError: result out of range
>>> cnlunardate.max + timedelta(days=1)
OverflowError: result out of range

>>> cnlunardate("Hello")
TypeError: an integer is required (got type str)
```

## Testing

```console
$ pytest

```

## License

MIT

## Reference

- [Chinese calendar Wiki](https://en.wikipedia.org/wiki/Chinese_calendar)
- [公曆與農曆對照表 - 香港天文台](https://www.hko.gov.hk/tc/gts/time/conversion.htm)
alpha2fasta 1.448
Encode text written in natural language in a FASTA-based format

PyInstaller Overview
====================
The alpha2fasta library can be used to encode texts written in natural language to a FASTA-based format. The purpose of coding is to enable the application of various bioinformatics tools in text mining.

Installation
------------
You can install alpha2fasta through `pip`::

      pip install alpha2fasta


Tested Platforms
----------------
- Python:

 - 3.7.4

- Windows (64bit):

 - 10

Required external libraries
---------------------------
- numpy
- unidecode

Functions
---------------
- :code:`AMINOcode(text,simplified=False)`
- :code:`AMINOcode_reverse(coded_text,simplified=False)`
- :code:`DNAbits(text)`
- :code:`DNAbits_reverse(coded_text)`
dingapi 0.0.6
lightweight dingtalk api for python
Requires Python: >=3.6
Keywords: dingding,ding,dtalk,dingtalk,sdk,api

### 描述

基于 [钉钉开放平台](https://ding-doc.dingtalk.com/doc#/serverapi2/gh60vz) 封装的 轻量级Python-Sdk

因目前个人需求 只需要发送工作通知到钉钉,所以目前只封装了工作通知消息的接口和部分用户相关的接口

### 安装

```tex
pip install -U dingapi
```

### 使用

```
from dingapi.client import DingApi

AppKey = 'xxxxx'
AppSecret = 'xxxxx'
AgentId = 'xxxxx'
# 创建一个客户端
dingApi = DingApi(AppKey, AppSecret, AgentId)

# 获取用户信息
r = dingApi.user.get(user_id)
print(r)

# 发送工作通知给钉钉用户
r = dingApi.message.asyncsend_v2({
"msgtype": "text",
"text": {
"content": "消息内容",
},
},
userid_list='' # 用户 id列表
)
print(r)

```