semvec/pypi-packages huggingface dataset:
njupt 0.2.3
Python API Wrappers for NJUPT.
License: MIT
Requires Python: >=3.0.0



# Python API Wrappers for NJUPT.   南京邮电大学网站接口 Python 封装

[【阅读文档】](http://gaoliang.github.io/NJUPT-API)

## 功能特性

[正方教务](#正方教务)

- [获取课程成绩和绩点](#获取课程成绩和绩点)
- [获取等级考试信息](#获取等级考试信息)
- [获取全部课程](#获取全部课程)
- [获取可选课程](#获取可选课程)
- [获取课表](#获取课表)

[校园卡系统](#校园卡系统)

- [获取校园卡余额](#获取校园卡余额)
- [充值校园卡](#充值校园卡)
- [获取账单](#获取账单)
- [获取网费余额](#获取网费余额)
- [充值网费](#充值网费)
- [充值寝室电费](#充值寝室电费)

[图书馆系统](#图书馆系统)

- [获取基本信息](#获取基本信息)

[早锻炼系统](#早锻炼系统)

- [查询早锻炼次数和记录](#早锻炼系统)

## 安装

```bash
pipenv install njupt # or pip install njupt
# 仅支持python3
```

## 使用示例

这里是一些简单的使用案例
```python
from njupt import Zhengfang
zf = Zhengfang(account='B1xxxxxxx',password='password')
>>> zf.get_courses()
[
    {
        'class_end': 9,
        'class_start': 8,
        'day': 1,
        'name': '市场营销',
        'room': '教4－101',
        'teacher': '王波(男)',
        'week': '第1-15周|单周',
        'interval': 2,
        'week_end': 15,
        'week_start': 1
    },
    ...
]


from njupt import Card
card = Card(account='11020xxxxxxxxxx',password='passwd')

>>> card.recharge_xianlin_elec(amount=2.33,building_name='兰苑11栋',big_room_id='403', small_room_id='1')
{
    'success': True,
    'code' : 0,
    'Msg' : '缴费成功！'
}
```
更多示例参见 [examples](examples/)

## 谁在使用？

- [NJUPT-iCal](https://github.com/shaoye/NJUPT-iCal) : 生成课表ics文件并导入系统日历
py-configfile 0.0.4
python configuration file loading package
License: MIT
Keywords: configfile config json yaml

Python ConfigFile Package
======

### 说明
这是一个 Python 配置文件加载模块，主要解决 Ymal, Json 配置文件的快速加载，同时支持网络配置动态加载。

### 使用
```
from configfile import ConfigFile

configfile = ConfigFile('config_dir')

print(configfile.load_app('config'))
print(configfile.load_app_json('config'))
```

### 加载动态配置
```
import json
import time
from configfile import ConfigFile


timestamp1 = time.time()
timestamp2 = False

configfile = ConfigFile('config_dir)

def callback():
    global timestamp1
    global timestamp2
    if timestamp2 is False:
        timestamp2 = timestamp1
    else:
        timestamp2 = time.time()
    return json.dumps({"timestamp": timestamp2})

print(configfile.load_dynamic_json('config', callback, 3))
time.sleep(1)
print(configfile.load_dynamic_json('config', callback, 3))
time.sleep(3)
print(configfile.load_dynamic_json('config', callback, 3))
```
py-configs-registry 0.0.2
python registry package
License: MIT
Keywords: registry config json yaml

Python Registry Package
======

### 说明
这是一个 Python 配置快速调用模块，主要解决 Json or Yaml 深层次配置调用问题。

### 使用
```python
from registry import Registry

registry = Registry()

registry.set('a', 'a')
registry.set('b', {'bb': 'bbb'})
registry.set('c.h', 'h')

print(registry.get())
print(registry.get('b.bb'))
```

### 加载字典
```python
from registry import Registry

registry = Registry()

registry.load({'a': {'aa': 'aaa'}})

print(registry.get('a.aa'))
```

### 合并字典
```python
from registry import Registry

registry = Registry()

registry.load({'a': {'a1': 'aaa1'}})
registry.merge('a', {'a2': 'aaa2' })

print(registry.get('a'))
```

### 设置默认值
```python
from registry import Registry

registry = Registry()

registry.set('a', 'aaa')
registry.default('a', 'bbb')

registry.default('c', 'ccc')

print(registry.get('a'))
print(registry.get('c'))
```

### 高级用法
```python
### 实例化 Redis
Redis(**registry.get(prefix))

### 初始化 Mysql
Mysql(**registry.get(prefix))
```
cosmosnlp 5.2.0
My short description for my project.
License: MIT
Requires Python: >=3.6.0


# sentence splitting and intent classification

# intent classification

to split a paragraph into sentences, to classify the intent of a sentence, implement the following: 


arr = classification.intent_splitting.split('来点舒缓一点的音乐然后开始导航') 

print(arr)

result: [('来点舒缓一点的音乐', 'genre'),  ('然后开始导航', 'navi')]


#the usage of bert_semantic:
#retrieve qa pairs from solr:
            question, answer = most_similar(s)
            if question:
                user_question = [s] * len(question)
                similarity = bert_semantic.instance.predict(user_question, question)

                for sent, score in zip(question, similarity):
                    print('%s / %s = %f\t%f' % (s, sent, score))

                index = similarity.argmax()
                print('highest score for bert semantic')
                print('%s / %s = %f' % (s, question[index], similarity[index]))
                print('answer = ', answer[index])
                question = question[index]
                answer = answer[index]
                similarity = similarity[index]

                if similarity >= thredshold:
                	return answer            

            return None
backports.time-perf-counter 0.0.4
time.perf_counter() for Python < 3.3
License: MIT

*********************************
 **backports.time_perf_counter**
*********************************

This package contains a backport_ of the `time.perf_counter()`_
function introduced in Python 3.3.  This package is intended for use
with Python versions older than 3.3 but will work just fine under
newer Pythons.  When used with Python 3.3 and newer, the main module
simply exports ``time.perf_counter()``.

The backported functionality is based on the pseudocode_ in :PEP:`418`
that describes how ``time.perf_counter()`` could be implemented.  When
used with Python versions older than 3.3, the exported
``perf_counter()`` function relies on the ``monotonic()`` function
provided by the monotonic_ package.

.. _backport: https://en.wikipedia.org/wiki/Backporting
.. _time.perf_counter(): https://docs.python.org/3.3/library/time.html#time.perf_counter
.. _pseudocode: https://www.python.org/dev/peps/pep-0418/#time-perf-counter
.. _monotonic: https://pypi.org/project/monotonic/

=======
 Usage
=======

I recommend not introducing a dependency on this package under Pythons
which provide ``time.perf_counter()``.  In your package's
``setup.py``:

.. code:: python

   import setuptools
   setuptools.setup(
       install_requires=[
           'backports.time_perf_counter; python_version < "3.3"'
       ]
   )

In the module that relies on ``perf_counter()``:

.. code:: python

   try:
       # Python >= 3.3
       from time import perf_counter
   except ImportError:
       # Python < 3.3
       from backports.time_perf_counter import perf_counter

=======
 Tests
=======

This package's tests use the builtin unittest_ and can be run without
first installing the package:

.. code:: console

   python setup.py test

The test cases are based on tests_ from the Python standard library's
``time`` module that exercise ``time.perf_counter()``.  There are an
admittedly small number of tests; pull requests with more tests are
welcome.

.. _unittest: https://docs.python.org/3/library/unittest.html
.. _tests: https://github.com/python/cpython/blob/master/Lib/test/test_time.py

============
 Change Log
============

--------------------
 0.0.4 - 2019-03-25
--------------------

Fixed
=====

- [`#1`_] import from ``ctypes`` fails

.. _#1: https://github.com/ejd/backports.time_perf_counter/issues/1

--------------------
 0.0.3 - 2019-03-23
--------------------

Fixed
=====

- corrected the trove classifier for the package's license

--------------------
 0.0.2 - 2019-03-23
--------------------

Changed
=======

- ``setup.cfg`` now enables universal wheels

--------------------
 0.0.1 - 2019-03-23
--------------------

Initial release.
pyske 0.1.1
A package for Python Skeletons using mpi4py
License: MIT


# PySke : Library of skeletons on distributed data structure in Python

Version 0.1alpha

- [INSTALLATION]
- [DEVELOPERS]
- [COPYRIGHT]

## INSTALLATION

This installation have been tested on Ubuntu 18.04.1 and macOS 10.14.01
Python version: 3.7.0

### Install MPI

- On Linux:
```
sudo apt-get install libcr-dev mpich2 mpich2-doc
```
- On macOS:
```
curl https://www.open-mpi.org/software/ompi/v3.0/downloads/openmpi-3.0.1.tar.gz -o openmpi-3.0.1.tar.gz
tar zxvf openmpi-13.0.1.tar.gz
cd openmpi-13.0.1
./configure --prefix=/usr/local
make all
sudo make install
```

### Install packages

1. Download get-pip.py: https://bootstrap.pypa.io/get-pip.py
- On Linux: 
```
wget https://bootstrap.pypa.io/get-pip.py
```
- On macOS: 
```
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
```

2. Execute the python script get-pip.py
```
python3 get-pip.py
```

The installation of ```pip``` for python 3 needs to have the package ```launchpadlib```. It can be installed by:
```
pip install launchpadlib
```

To use the ```pip``` command, ```pip``` for python 2 must be installed. 
```
python get-pip.py
```

3. Install the necessary packages
```
pip3 install mpi4py
```
/!/ mpi4py necessists to get mpi (for C).

## DEVELOPERS
DEVELOPED BY
- Jolan Philippe (Northern Arizona University, Flagstaff, AZ, USA)
- Frédéric Loulergue (Northern Arizona University, Flagstaff, AZ, USA)

## COPYRIGHT
PySke is released into the public domain by the copyright holders.

This README file was originally written by [Jolan Philippe](https://github.com/JolanPhilippe) and is likewise released into the public domain.
imgresizer 1.0.0
A package to re-size images
License: MIT

[![Coverage Status](https://coveralls.io/repos/github/UnboxingMinds/ImgReSizer/badge.svg?branch=master)](https://coveralls.io/github/UnboxingMinds/ImgReSizer?branch=master)

# Image ReSizer
This simple package re-sizes images from a given list of urls.

## Installation

`pip install imgresizer`

## Usage
It expects you to pass ita configuration as command line parameter. \
`imgresizer -c <path/to/conf_json>`

A sample json:

```json
{
    "targets": [
        400,
        200,
        100
    ],
    "data": "data",
    "num_threads": 8,
    "input_dir": "incoming",
    "output_dir" : "outgoing",
    "image_urls" : "/path/to/urls.txt"
}
```
Firstly, it downloads them and stores them inside **data/input_dir** directory. Then it starts processing images to re-size and store re-sized image to **data/output_dir** with its new size added to its name.

Additionally, you can pass `-l true` so that it logs the process.

## Issues
Nothing yet. But it will need to speed up.

## Tasks
- [ ] Implement thread pooling
- [ ] Make it re-size local images

## License
ImgReSizer is released under the [MIT license] (https://choosealicense.com/licenses/mit/#)