semvec/pypi-packages huggingface dataset:
mongo-lambda-backup 0.3.0
Backup MongoDB databases using AWS Lambda functions

# mongo-lambda-backup
[![Build Status](https://travis-ci.org/m90/mongo-lambda-backup.svg?branch=master)](https://travis-ci.org/m90/mongo-lambda-backup)
> Backup MongoDB databases using AWS Lambda functions

The code in this repo allows running the backup of a MongoDB database to S3 on AWS Lambda by emulating a `mongodump` using `pymongo` and `boto3`. By default the function will create a JSON file for every collection in the database and save them in a `/backup` folder.

## Install from pip

```
pip install mongo_lambda_backup
```

## Configuration

All configuration values are passed using environment variables.

The following values are required:

- `MONGO_URI`: The URI (including authentication credentials if needed) of the MongoDB host to be backed up. In case this **contains credentials** you can encrypt this value using AWS KMS and set `MONGO_URI_IS_ENCRYPTED` to tell the Lambda it needs to decrypt the given value.
- `BUCKET_NAME`: The name of the S3 bucket to store the backup files in.

The following values are optional:

- `MONGO_URI_IS_ENCRYPTED`: In case this environment variable is set, the handler assumes the URI (which potentially contains credentials) needs to be encrypted using the KMS key associated with the Lambda.
- `MONGO_DATABASE`: The name of the database to back up. In case this is not set, it will be read from the path of `MONGO_URI`.
- `BUCKET_FOLDER`: The folder in the bucket to store the JSON files in. Defaults to `backups`.
- `COLLECTION_BLACKLIST`: A comma-separated collection of collection names to skip when performing the back up (e.g. for skipping indices or vendor specific databases).
- `IN_MEMORY`: If set, the collection to be dumped to S3 will be handled in the Lambda's memory before writing. This might affect both backup speed as well as Lambda Limits in certain scenarios.

### License
MIT © [Frederik Ring](http://www.frederikring.com)
nzproxy 1b0.dev1
Proxies for python objects

|pipeline| |coverage| |rtd|

.. |pipeline| image:: https://framagit.org/1ohmatr/sw/py/nzproxy/badges/master/pipeline.svg

.. |coverage| image:: https://framagit.org/1ohmatr/sw/py/nzproxy/badges/master/coverage.svg

.. |rtd| image:: https://readthedocs.org/projects/nzproxy/badge/?version=latest

Proxies for python objects.
qpso 0.0.1
A Python implementation of quantum particle swarm optimization (QPSO).
Keywords: optimization qpso swarm

# qpso
A Python implementation of quantum particle swarm optimization (QPSO).

    pip install qpso

This is a black-box optimization package built upon the quantum paricle swarm
optimization [1].

## Quickstart
The usage of this package is very simple.
For example, the following code shows how to solve a 10-dimensional opmitzation
problem by using QPSO with Delta potential well (QDPSO) proposed in [1].

```python
import numpy as np
from qpso import QDPSO


def sphere(args):
    f = sum([np.power(x, 2.) for x in args])
    return f


def log(s):
    best_value = [p.best_value for p in s.particles()]
    best_value_avg = np.mean(best_value)
    best_value_std = np.std(best_value)
    print("{0: >5}  {1: >9}  {2: >9}  {3: >9}".format("Iters.", "Best", "Best(Mean)", "Best(STD)"))
    print("{0: >5}  {1: >9.3E}  {2: >9.3E}  {3: >9.3E}".format(s.iters, s.gbest_value, best_value_avg, best_value_std))


NParticle = 40
MaxIters = 1000
NDim = 10
bounds = [(-2.56, 5.12) for i in range(0, NDim)]
g = 0.96
s = QDPSO(sphere, NParticle, NDim, bounds, MaxIters, g)
s.update(callback=log, interval=100)
print("Found best position: {0}".format(s.gbest))
```

## Bibliography 

[1] Jun Sun, Bin Feng and Wenbo Xu, "Particle swarm optimization with particles having quantum behavior," Proceedings of the 2004 Congress on Evolutionary Computation (IEEE Cat. No.04TH8753), Portland, OR, USA, 2004, pp. 325-331 Vol.1.
doi: 10.1109/CEC.2004.1330875
prof-checker 1.0.2
Wrapper for profanity checker that can work on python services/scripts, similar to linters (e.g. pylint)

# pro-checker

[![Build Status](https://travis-ci.com/ozychhi/prof-checker.svg?branch=master)](https://travis-ci.com/ozychhi/prof-checker)


## Prof-checker

This is wrapper over [profanity-check](https://github.com/vzhou842/profanity-check/) by [vzhou842](https://github.com/vzhou842)

`prof-checker` is meant to work the same way as other python linters work. Depending on how big your codebase
is, it might take quite a bit of time to run this. I would not recommend running it on every PR.


## Installation

```
$ pip install prof-checker
```

## Rough benchmarks

As this is wrapper around `profanity-check` the performance greatly depends on the package. These benchmarks
are only rought estimates.

| Files | LoC | Time (ms)
| --------|-------------------|---------------------
| 500 | 250K | 7230
| 22 | 4.3K | 1200
| 70 | 20.6K | 1510

## Usage

For help
```
prof_checker -h
```

To check `test.py`:
```
prof_checker test.py
```

To check all files in directory:
```
find . -name \*.py | xargs prof_checker
```

To override threshold:
```
prof_checker -P 0.5 test.py
```
archive-cdx 0.2.0
A library to interact with the archive.org Wayback Machine CDX server.
Keywords: wayback-machine cdx

archive-cdx
===========

A library to interact with the archive.org Wayback Machine CDX server.

How to
------

``archivecdx.Listing`` is the basic list class.

Pass `CDX URL
arguments <https://github.com/internetarchive/wayback/tree/master/wayback-cdx-server#intro-and-usage-1>`__
as keyword args. (For arguments that are Python keywords, append an
underscore and the library will automatically remove it for you.)

Special args:

-  ``url`` - the ``url`` param
-  ``delay`` - the delay between automatic page count detection and
   grabbing the first page

.. code:: python

    import archivecdx

    listing = archivecdx.Listing("archive.org",fl=["original","timestamp","digest"])

    print(listing[0]) # "Row(original='http://www.archive.org:80/',timestamp='19970126045828',digest='Q4YULN754FHV2U6Q5JUT6Q2P57WEWNNY')"

``archivecdx.PaginatedListing`` uses the `Pagination
API <https://github.com/internetarchive/wayback/tree/master/wayback-cdx-server#pagination-api>`__
to return less values at once.

It supports the ``page`` keyword argument and adds a ``next_page``
attribute, which will automatically pull the next page from the API.

.. code:: python

    import archivecdx

    listing = archivecdx.PaginatedListing("archive.org",page=1,fl=["original","timestamp","digest"])

    print(len(listing.listing)) # 15000
vcomp 1.1.0
Video Compressor (VComp)
Requires Python: >=3.2

# VComp    

## A video compressor with bitrate and size selection.  

[Github](https://github.com/poyynt/vcomp)  
[PyPI](https://pypi.org/project/vcomp)

### To execute:  
#### In Linux|Unix|macOS:  
##### GUI:  
Run `vcomp` in a shell.  
#### In Windows:
##### Method 1:
In a `cmd` window, execute `vcomp`.  
##### Method 2:
Copy the file `vcomp.exe` from `pythoninstallation\Scripts\` to your desired folder and double-click it.  
#### To use in your python code:  
A code that the **user** sets the compression level.
###### GUI
```python
import vcomp.main
vcomp.main.run()
```
#### To be quiet:  
A code that **you** set the compression level.
Set size to your desired height and bitrate to your desired bitrate, and f to the path of the file.
```python
import vcomp.compress
vcomp.compress.compress(size,bitrate,f)
```
json2db 3.2.3
convert json to relational db
Requires Python: >=3.6.0

# Json2DB

> Python3.6+


Just need defined a json object, then you can save it in to a relational DB like MySQL PostgreSQL or other DB.

## Reason To Write This FrameWork

Although NoSQL Database like MongoDB is popular, we still need SQL DataBase for analyze data,
so this module is helping us store json to database, and help us build them in  db.


## Feature

- support mostly common database (`MySQL`, `PostgreSQL`, `MSSQL`, `SQLite`),

just set `database` like

    JFactory(database='mysql')

See more in [types](json2db/types.py)

You can set `str2col` control Database Column Type like `Text` or `VARCHAR` and other.You can see more
example in [tests/test_comom_factory.py](tests/test_comom_factory.py)





- Support Different Style of database column

If you want your db column like `some_thing` style

    from json2db import JFactory, ColumnFormat
    JFactory(column_fmt=ColumnFormat.UNDERLINE)

If you want your db column to be `someThing` style, use `ColumnFormat.CAMEL`

Default we do nothing as the json format.


- Support Add a TimeStamp for your first table

- Support set table args for your each table init

- Support add comment to your field

Just Use `{"field": {":my comment": "real value"}}`, it can take the `my comment` to this `field`

- Support Control the `max_depth` of your json table

PS: min is `0` which meaning it only one table for all json

- Support Restore your data to anther table

if your data like `d = {"father_id": 1, "father_name": "father", "brother": {"brother_name": "jack"}, 'sons': [{"son_name": "aa"}}`, You can save it to a 
new table like `father - son ` framework like `{"father_id": 1, "brother_name": "jack", 'sons': [{"son_name": "aa", "father_name": "father"}]}`

PS: you move `brother` field to `father` table, and move `father` field to `son` table,you can use 

    model.store(data=new_d, is_press=True)

See more sample please see [tests](tests)


## A Simple Example 

> For create_table ,store data and search data 


    from json2db import JFactory, ColumnFormat
    d = {"aa": 1, "bb": 2, "brother": {"name": "jack", "namess": [{"other": "jack"}]}, 'sons': [{"son_name": "aa"}]}

    factory = JFactory()
    model = factory.from_json(data=d, root_name="data")
    model.create_tables_in_db()
    model.store(data=d)
    model.search(search_args=[("aa", 1)], limit=2)

 You can save your data to any `sqlalchemy` support database like MySQL, PostgreSQL,Oracle,SQLite(Default stored if you not set `db_url`) and so on.
 The `db_url` format please see more detail see [https://docs.sqlalchemy.org/en/latest/core/engines.html](https://docs.sqlalchemy.org/en/latest/core/engines.html)
IRACCGateway-python 0.0.12
Driver for IRACCGateway(Daikin Specified Version)

# Introduction

An unofficial driver for IRACC Gateway (Daikin Specified Version)

Note that the Daikin specified version have WIFI as the only External Interface, and have ***no*** RS485,RS232,etc.



The driver is tested on the IRACC Gateway connected to Daikin VRV-N (RQZQ10AAYN) with **16** AC units. **It may not behave well for different unit numbers** because the protocol is only partially known.



Feel free to [contact](mailto:yangziy@outlook.com) if bugs detected.



# Usage

Install via

```shell
pip install IRACCGateway-python
```



Then consult *test.py* inside the package.



# Special Thanks

Kind [IRACC reseller on Taobao](https://item.taobao.com/item.htm?spm=a230r.1.14.1.6e776978lt8r5i&id=540472456531&ns=1&abbucket=11#detail), who offered some technical documents, given that I didn't buy the device from him.
pyhkconnect 0.0.1
香港交易所 沪港通 深港通 数据接口 HKC
Keywords: Financial Data,HKEX,HKC,沪港通,深港通,Python Api


# pyhkconnect

香港交易所 沪港通 深港通 数据接口

## Demo

```python
>>> import pyhkconnect as hkc
>>> dp = hkc.northbound_shareholding_sh() # dataframe from pandas
>>> dp
      code                                               name   shareholding shareholding_percent
0    90000  SHANGHAI PUDONG DEVELOPMENT BANK CO., LTD. (A ...    379,430,135                1.35%
1    90004  GUANGZHOU BAIYUN INTERNATIONAL AIRPORT CO.,LTD...    282,353,856               13.64%
2    90006            DONGFENG AUTOMOBILE CO.,LTD (A #600006)      7,461,913                0.37%
3    90007  CHINA WORLD TRADE CENTER COMPANY LTD. (A #600007)     13,202,103                1.31%
4    90008                BEIJING CAPITAL CO.,LTD (A #600008)     63,689,287                1.32%
5    90009  SHANGHAI INTERNATIONAL AIRPORT CO., LTD. (A #6...    316,733,029               28.96%
6    90010  INNER MONGOLIA BAOTOU STEEL UNION CO.,LTD. (A ...    215,362,295                0.67%
7    90011      HUANENG POWER INTERNATIONAL, INC. (A #600011)     42,917,773                0.40%
8    90012       ANHUI EXPRESSWAY COMPANY LIMITED (A #600012)      6,149,168                0.52%
9    90015              HUA XIA BANK CO., LIMITED (A #600015)     83,923,960                0.65%
10   90016     CHINA MINSHENG BANKING CORP., LTD. (A #600016)    594,264,189                1.67%
..     ...                                                ...            ...                  ...
840  93979        JCHX MINING MANAGEMENT CO.,LTD. (A #603979)        191,590                0.03%
841  93986  GIGADEVICE SEMICONDUCTOR(BEIJING) INC (A #603986)        358,240                0.17%
842  93989             HUNAN AIHUA GROUP C0.,LTD. (A #603989)      5,537,526                1.41%
843  93993             CHINA MOLYBDENUM CO., LTD. (A #603993)    133,230,718                0.75%
844  93997       NINGBO JIFENG AUTO PARTS CO.,LTD (A #603997)        100,463                0.01%

[845 rows x 4 columns]
>>>
>>>json_obj=dp.to_json(orient='index') # return json data
```