semvec/pypi-packages huggingface dataset:
django-highlightselect-model-admin 1.0.0
A Django App that highlights selected rows on the admin UI.
Requires Python: >=3.6

# django-highlightselect-model-admin

## Description
A Django App that highlights selected rows on the admin UI.

### Usage

#### in settings.py

    INSTALLED_APPS = [
    ...
    'highlightselect_model_admin',
    ...
    ]
    
### collect statics

    python manage.py collectstatic
    
#### in admin.py
    
    from highlightselect_model_admin import HighLightSelectModelAdmin
    from .model import MyModel
    
    @admin.register(MyModel)
    class MyModelAdmin(HighLightSelectModelAdmin):
        """
        Inherit from HighLightSelectModelAdmin insead of django.contrib.admin.ModelAdmin
        """
        ...
        action = ('my_action', )
        
        def my_action(self, request, queryset):
            selected_ids = []
            for q in queryset:
                selected_ids.append(q.id)
            
             self.highlight_message_user(request, 'Selected!', selected_ids)

### Issues
https://github.com/laonan/django-highlightselect-model-admin/issues
django-hightlightselect-model-admin 1.0.0
A Django App that highlights selected rows on the admin UI.
Requires Python: >=3.6

# django-hightlightselect-model-admin

## Description
A Django App that highlights selected rows on the admin UI.

### Usage

#### in settings.py

    INSTALLED_APPS = [
    ...
    'highlightselect_model_admin',
    ...
    ]
    
### collect statics

    python manage.py collectstatic
    
#### in admin.py
    
    from highlightselect_model_admin import HighLightSelectModelAdmin
    from .model import MyModel
    
    @admin.register(MyModel)
    class MyModelAdmin(HighLightSelectModelAdmin):
        """
        Inherit from HighLightSelectModelAdmin insead of django.contrib.admin.ModelAdmin
        """
        ...
        action = ('my_action', )
        
        def my_action(self, request, queryset):
            selected_ids = []
            for q in queryset:
                selected_ids.append(q.id)
            
             self.highlight_message_user(request, 'Selected!', selected_ids)

### Issues
https://github.com/laonan/django-highlightselect-model-admin/issues
AnkiSiyuan 0.0.6
Sync SiYuan with Anki
Requires Python: >=3.6

# AnkiSiyuan

同步[思源笔记](https://github.com/siyuan-note/siyuan)中的数据到 Anki 中。

[开发笔记](https://ld246.com/article/1627227554664) [AnkiLink 完全体构想](https://www.codein.icu/ankilink-complete/)

相关项目：[AnkiIn 导入 Anki 的 Python 工具库](https://github.com/Clouder0/AnkiIn) [AnkiLink Markdown 导入 Anki](https://github.com/Clouder0/AnkiLink)

- 按需导入
- 增量同步
- 勉强能用

尚在早期开发阶段，勉强能用。

## 安装

使用 pip 安装。

```bash
pip install AnkiSiyuan
```

需要在 Anki 中安装 anki-connect 拓展。

基础使用方法：

```bash
python -m AnkiSiyuan -p password
```

**需要在 Anki 与思源笔记同时运行时使用。**

其中 password 为你的思源授权码。**似乎目前不输入也能用，可以忽略掉。**

请自行承担数据风险。

## 思源侧标记

需要对某个容器块进行标记，才会被同步到 Anki 中。

具体地，创建 `ankilink` 的属性，填写相应的配置。

如果对标题标记，则标题下的所有内容都会被同步。超级块同理，文档块亦同理。递归同步，请自行把控好范围。  
**尽量使用超级块，避免嵌套，以后可能有相关的调整。**

![例子](https://user-images.githubusercontent.com/41664195/131253057-a6ae22d0-02ce-4ad7-9757-43f7b1fb5c28.png)

有关的内容语法，请查看 [AnkiLink Wiki](https://github.com/Clouder0/AnkiLink/wiki) 与 [AnkiIn Wiki](https://github.com/Clouder0/AnkiIn/wiki)  

## 同步范围

首次同步会消耗较长时间，之后会在执行目录下保存 `last_sync_time` 文件，保存上次同步的时间。

也就是说，只有新增、修改了的块才会被处理，以避免无谓的重复运算。

## 图片

目前的图片是通过思源提供的图床嵌入到 Anki 中。

在运行目录下创建 `config.toml` 文件，写入：

```ini
[siyuan]
assets_replacement = "https://b3logfile.com/siyuan/1609132319768/assets"
```

请将 `1609132319768` 替换为你的图床链接中对应的 id.
autumn-rain-py-sdk 0.0.1
python相关的通用工具集合
Requires Python: >=3.8

# autumn_rain_py_sdk

#### 介绍
python通用模块

#### 软件架构
软件架构说明
积累的python工具接口，便于开发复用

#### 安装教程

1.  暂无
2.  暂无
3.  暂无

#### 使用说明

1.  暂无
2.  暂无
3.  暂无

#### 参与贡献

1.  Fork 本仓库
2.  新建 Feat_xxx 分支
3.  提交代码
4.  新建 Pull Request


#### 特技

1.  使用 Readme\_XXX.md 来支持不同的语言，例如 Readme\_en.md, Readme\_zh.md
2.  Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
3.  你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
4.  [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目，是综合评定出的优秀开源项目
5.  Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6.  Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
tornado_xstatic 0.3
Utilities for using XStatic in Tornado applications
Requires Python: >= 3.4

Utilities for using XStatic in Tornado applications
---------------------------------------------------

`XStatic <http://xstatic.readthedocs.org/en/latest/index.html>`_ is a means of
packaging static files, especially JS libraries, for Python applications.
`Tornado <http://www.tornadoweb.org/en/latest/>`_ is a Python web framework.

This integration provides:

- ``XStaticFileHandler`` to serve static files from XStatic packages.
- ``xstatic_url`` ui method to build URLs for XStatic files, including
  the ``?v=...`` tag  that Tornado uses for cache invalidation.

To use these:

.. code:: python

    import tornado.ioloop
    import tornado.web
    from tornado_xstatic import XStaticFileHandler, xstatic_url

    class MyHandler(tornado.web.RequestHandler):
        def get(self):
            self.render("mytemplate.html")


    if __name__ == "__main__":
        application = tornado.web.Application(
            [
                (r"/", MyHandler),
                (r"/xstatic/(.*)", XStaticFileHandler,
                    {"allowed_modules": ["jquery", "bootstrap"]}),
            ],
            ui_methods={'xstatic_url': xstatic_url('/xstatic/')}
        )
        application.listen(8888)
        tornado.ioloop.IOLoop.instance().start()

Passing ``allowed_modules`` is optional: if it is not provided, files from any
XStatic module may be served.

In your template, you can then do this::

    <script src="{{ xstatic_url('jquery', 'jquery.min.js') }}"></script>
    <script src="{{ xstatic_url('bootstrap', 'js/bootstrap.min.js') }}"></script>

    <link href="{{ xstatic_url('bootstrap', 'css/bootstrap.min.css') }}" rel="stylesheet">
feature-flags-co 0.0.21
A Python SDK for feature-flags.co project
Requires Python: >=3.6

# 敏捷开关 Python SDK 

本项目为 [敏捷开关 https://www.feature-flags.co](https://www.feature-flags.co) 的 Python SDK

This is a Python SDK for [https://www.feature-flags.co](https://www.feature-flags.co), a feature flag management system

## 安装

```
  pip install feature-flags-co
  or
  python3 -m pip install feature-flags-co
```

## 简易教程

以下为一个简单例子，对于 Web API, 一个 User Session 只需要初始化一次
The following is a simple example, for Web API, only need to initialize once for a single User Session

```python
    from feature_flags_co import FfcClient, FfcUser
  
    ffc_user = FfcUser(
        user_name='user_name', # 必填
        email='email', # 可空 
        key='key', # userId, 必填
        customize_properties= [ # 可以为空 (Can be omitted)
            {'name':'phoneNumber', 'value':'13895462538'},
            {'name':'tenantId', 'value':'123'}
        ]
    )
    
    # 初始化 Client， 针对一个终端用户只需要初始化一次 
    # Initialization of the client
    ffc_client = FfcClient('environment_secret', ffc_user)
    
    # 调用 variation 方法， 获取具体某一个 feature flag 的值，defaultResult 为当服务器返回异常时默认的返回值
    # Call variation method to get the value of a specific feature flag, defaultResult would be result if any exception happened during the call
    result = ffc_client.variation('feature-flag-key', default_result='False')
    
    # 接下来根据 result 打开或者关闭某功能
    # Now we can use the value of result to switch on/off some fonctionalities
    if result:
        pass

    # 获取当前所有 feature flag 及其值
    # results 为 list, 其中的元素为如下的 dict
    # {'key_name': '', 'variation': ''} 
    results = ffc_client.variations()
        
```
spark-pit 0.5.0
PIT join library for PySpark
Keywords: PySpark,point-in-time,joins,SparkSQL

# Spark-PIT - Utility library for PIT-joins in PySpark

## Description

This projects aims to expose different ways of executing PIT-joins, also called ASOF-joins, in PySpark. This project is created as a part of a research project to evaluate different ways of executing Spark PIT joins.

## Prerequisite

In order to run this project in PySpark, you will need to have the JAR file of the Scala implementation be available inside you Spark Session.

## Quickstart

### 1. Creating the context

The object `PitContext` is the entrypoint for all of the functionality of the lirary. You can initialize this context with the following code:

```py
from pyspark import SQLContext
from ackuq.pit import PitContext

sql_context = SQLContext(spark.sparkContext)
pit_context = PitContext(sql_context)
```

### 2. Performing a PIT join

There are currently 3 ways of executing a PIT join, using an early stop sort merge, union asof algorithm, or with exploding intermediate tables.

#### 2.1. Early stop sort merge

```py
pit_join = df1.join(df2,  pit_context.pit_udf(df1.ts, df2.ts) & (df1.id == df2.id))
```

##### 2.1.2. Adding tolerance

In this implementation, tolerance can be added to not allow matches whose timestamp differ by at most some value. To utilize this, set the third argument of the UDF to the desired integer value of the maximum different between two timestamps.

```py
pit_join = df1.join(df2,  pit_context.pit_udf(df1.ts, df2.ts, 100) & (df1.id == df2.id))
```

##### 2.1.3. Left outer join

Left outer joins are supported in this implementation, the main difference between a regular inner join and a left outer join is that whether or not a left row gets matched with a right row, it will still be a part of the resulting table. In the resulting table, all the left rows that did not find a match have the values of the right columns set to `null`.

```py
pit_join = df1.join(
    df2,
    pit_context.pit_udf(df1.ts, df2.ts, 100) & (df1.id == df2.id),
    "left"
)
```

#### 2.2. Union merge

```py
pit_join = pit_context.union(
        left=df1,
        right=df2,
        left_prefix="df1_",
        right_prefix="df2_",
        left_ts_column = "ts",
        right_ts_column = "ts",
        partition_cols=["id"],
)
```

#### 2.3. Exploding PIT join

```py
pit_join = pit_context.exploding(
    left=df1,
    right=df2,
    left_ts_column=df1["ts"],
    right_ts_column=df2["ts"],
    partition_cols = [df1["id"], df2["id"]],
)
```

## Development

### Testing

To run the tests for this package, you must first package the Scala package to a JAR file and export its path as an environment variable:

```bash
export SCALA_PIT_JAR=<PATH_TO_JAR_FILE>
```

To run all the tests, run the following command in the Python directory:

```bash
python -m unittest discover -s tests
```
qcrandom 0.3.post1
qcrandom is a python library which provides easy way to generate random numbers on quantum computers.
Requires Python: >=3.7
Keywords: python,random,quantum

# qcrandom
## Overview
qcrandom is a python library which provides easy way to generate random numbers on quantum computers. Quantum computers allow us to generate truly random numbers.

## Setup
Setup instructions are avaliable [here](https://github.com/pk8868/qc-random/wiki/Setup).

## Learn
Check out our [Wiki page](https://github.com/pk8868/qc-random/wiki)!

## Any problems?
If you find a bug, feel free to post an [issue](https://github.com/pk8868/qc-random/issues)!