semvec/pypi-packages huggingface dataset:
cooltime 1.0.3.1
全球最人性化的时间模块

# 项目描述

全球最人性化的时间模块。

# 作者信息

昵称：lcctoor.com

[主页](https://lcctoor.github.io/arts/) \| [微信](https://lcctoor.github.io/arts/arts/static/static-files/WeChatQRC.jpg) \| [Github](https://github.com/lcctoor) \| [PyPi](https://pypi.org/user/lcctoor) \| [Python交流群](https://lcctoor.github.io/arts/arts/static/static-files/PythonWeChatGroupQRC.jpg) \| [邮箱](mailto:lcctoor@outlook.com) \| [域名](http://lcctoor.com) \| [捐赠](https://lcctoor.github.io/arts/arts/static/static-files/DonationQRC-0rmb.jpg)

# Bug提交、功能提议

您可以通过 [Github-Issues](https://github.com/lcctoor/arts/issues)、[微信](https://lcctoor.github.io/arts/arts/static/static-files/WeChatQRC.jpg) 与我联系。

# 安装

```
pip install cooltime
```

# 教程 ([查看美化版](https://lcctoor.github.io/arts/?pk=cooltime)👈)

#### 导入

```python
from cooltime import cooltime
```

#### 生成时间

```python
t1 = cooltime()  # 生成1个当前时间
t2 = cooltime.random()  # 生成1个随机时间
t3 = cooltime(1687271066.000028)  # 从时间戳生成
t4 = cooltime(1687271066)  # 从时间戳生成, 精确到秒
t5 = cooltime(t3)  # 从 cooltime 生成
t6 = cooltime('2023-06-20 22:24:26.000028')  # 从字符串生成
t7 = cooltime('2023-06-20 22:24:26')  # 从字符串生成, 精确到秒
t8 = cooltime('2023-06-20 22:24')  # 从字符串生成, 精确到分
t9 = cooltime('2023-06-20 22')  # 从字符串生成, 精确到时
t10 = cooltime('2023-06-20')  # 从字符串生成, 精确到日
t11 = cooltime([2023, 6, 20, 22, 24, 26, 28])  # 从其它类型生成, 如: list, tuple, datetime, time.localtime ……
```

注：

1、从字符串生成时，生成器会执行 `re.findall('\d+', text)[:7]` 提取前 7 个数字串来生成时间。因此字符串的格式可为任意，比如：`2023/06/20/22/24/26/000028` 、`2023_06_20_22_24_26_000028` 。

2、从 时间戳、cooltime、字符串 以外的其它类型生成时，生成器会先执行 `str(obj)` 将对象转化成字符串，然后按处理字符串的方式生成。

#### 将时间转化为其它类型

| 语法                             | 返回                         | 描述                       |
| -------------------------------- | ---------------------------- | -------------------------- |
| float( t3 )                      | 1687271066.000028            | 转化为时间戳               |
| int( t3 )                        | 1687271066                   | 转化为时间戳，精确到秒     |
| t3.date( )                       | '2023-06-20'                 | 提取日期字符串             |
| str( t3 )                        | '2023-06-20 22:24:26.000028' | 转化为时间字符串           |
| t3.floor( )                      | '2023-06-20 22:24:26'        | 转化为时间字符串，精确到秒 |
| t3.strftime("%Y-%m-%d %H:%M:%S") | '2023-06-20 22:24:26'        | 按指定格式转化为时间字符串 |
| t3.strftime("%Y_%m_%d %H_%M_%S") | '2023_06_20 22_24_26'        | 按指定格式转化为时间字符串 |

#### 比较时间大小

```python
# == 号
assert t3 == t5 == t6 == t11
assert t4 == t7

# > 号
assert t6 > t7 > t8 > t9 > t10

# < 号
assert t10 < t9 < t8 < t7 < t6

# >= 号
assert t3 >= t5 >= t6 >= t11
assert t4 >= t7
assert t6 >= t7 >= t8 >= t9 >= t10

# <= 号
assert t3 <= t5 <= t6 <= t11
assert t4 <= t7
assert t10 <= t9 <= t8 <= t7 <= t6
```

#### 时间的增量操作

```python
t26 = cooltime('2023-06-20 22:24:26')
t23 = t26 - 3  # 增量单位为秒
t29 = t26 + 3
print(t23)  # 2023-06-20 22:24:23
print(t29)  # 2023-06-20 22:24:29
print(t23 < t26 < t29)  # True
```
laminhub_rest 0.14.11
Rest API for the hub.

[![codecov](https://codecov.io/gh/laminlabs/laminhub-rest/branch/main/graph/badge.svg?token=VKMRJ7OWR3)](https://codecov.io/gh/laminlabs/laminhub-rest)

# laminhub-rest: Cross-instance management

Note: For more extensive documentation & testing, see [docs](docs).

## Summary

1. Installation
2. CLI
   1. Run server
   2. Run tests
   3. Launch Jupyter lab
   4. Migrate
3. Deployment
4. Usage
5. Release process

## 1. Installation

1. Clone this repository
2. Navigate to the repository and run:

   ```
   pip install .
   ```

## 2. Dependencies

1. Supabase CLI

   To use lnhub CLI on local environment you will first have to install and configure [Supabase CLI](https://supabase.com/docs/guides/cli).

2. Docker

   You must also have Docker installed to allow
   Supabase CLI to create and run the relevant containers

## 3. Local Development

The [lnhub](laminhub_rest/__main__.py) script serves as the entrypoint for all actions you need to run for local development.

:warning: It is important that you use this entrypoint as it properly configures the settings.

To ensure that the environment is properly configured you can do one of three things:

1. Set `LAMIN_ENV=local` prior to running `lnhub`. This will ensure that a local Supabase instance is started and that the connection strings are properly configured.
2. If you want to connect to an external Supabase (either in the cloud or managed by another process), you can customize `LAMIN_ENV=foobar` (or `prod` or `staging`) and place a corresponding .env file in the root folder. In this case it would be `laminhub-rest--foobar.env`.

   - The .env file must contain values for the following variables:

     ```
     POSTGRES_DSN
     SUPABASE_API_URL
     SUPABASE_ANON_KEY
     SUPABASE_SERVICE_KEY
     ```

### Run the server

```
LAMIN_ENV=local lnhub run
```

### Run tests

```
LAMIN_ENV=local lnhub test -s test_local
```

Any parameters after the `lnhub test` command are passed directly to `nox`

### Launch Jupyter lab

```
LAMIN_ENV=local lnhub jupyter
```

### Open an IPython shell

```
LAMIN_ENV=local lnhub shell
```

### Migrate

See [Migrations](docs/migrations.md)

## 3. Deployment

Push on the `staging` branch to deploy in staging.

Push on the `main` branch to deploy in production.

## 4. Usage

Access API documentation from these endpoints.

Locally:

```
http://localhost:8000/docs
```

On `staging` server :

```
https://laminhub-rest-cloud-run-staging-xv4y7p4gqa-uc.a.run.app/docs
```

On `production` server:

```
https://laminhub-rest-cloud-run-main-xv4y7p4gqa-uc.a.run.app/docs
```

## 5. Release process
usgs-product-finder 0.0.5
USGS Finder Utility that finds USGS datasets based on a user input
Keywords: usgs,landsat,satellite


# usgs-product-finder-pypi

Simple utility to find USGS Landsat products by AOI provided as WKT or shapely object.

## Installation

```bash
pip3 install usgs-product-finder
```

## Usage

```python
from usgs_product_finder import UsgsProductFinder

# Initialize finder
usgs_product_finder = UsgsProductFinder()
# You can also specify a path where to download the products and
# maximum age of the files in days

# usgs_product_finder = UsgsProductFinder(
#                       path_for_usgs_data="/home/user/usgs-product-finder", 
#                       max_age_of_usgs_data=7)


# define aoi in wkt
aoi_wkt = """MULTIPOLYGON (((-175 -12,-179.99999 -12,-179.99999 -20,-175 -20,-175 -12)), ((175 -12,179.99999
    -12,179.99999 -20,175 -20,175 -12))) """
    
# find products
pandas_obj = (usgs_product_finder.find_products_via_wkt(aoi_wkt, 8, minimal_output=False))
list_of_dicts = (usgs_product_finder.find_products_via_wkt(aoi_wkt, 8, minimal_output=True))


```