semvec/pypi-packages huggingface dataset:
sci-dl 0.1.2
sci-dl: help you download SciHub PDF programmatically
License: MIT
Requires Python: >=3.6.0


# sci-dl: help you download SciHub PDF faster

## Features

1. configuration file support.
2. search by Google Scholar(coming soon).
3. download using DOI.
4. custom SciHub mirror url.
5. proxy support.
6. failure retry.
7. captacha support(coming soon).
7. a Python library that can be embedded in your program.

## Installation

### use as command line software

```shell
pip install 'sci-dl[cmd]'
```

### use as Python library

```shell
pip install sci-dl
```

## Usage

### use as command line software

1. initialization configuration file

```shell
sci-dl init-config
```

follow the prompt to create the configuration file.

2. download using DOI

```shell
sci-dl dl -d '10.1016/j.neuron.2012.02.004'
# 10.1016/j.neuron.2012.02.004 is the article DOI you want to download
```

### use as Python library

> sci_dl.SciDlError raises when exception happens.

#### if you don't have a proxy

```python
from sci_dl import dl_by_doi


config = {
    'base_url': 'https://sci-hub.se',  # sci-hub URL
    'retries': 5,  # number of failure retries
    'use_proxy': False  # means you don't want to use a proxy
}

response = dl_by_doi('10.1016/j.neuron.2012.02.004', config)
```

### if you use a proxy

```python
from sci_dl import dl_by_doi


config = {
    'base_url': 'https://sci-hub.se',  # sci-hub URL
    'retries': 5,  # number of failure retries
    'use_proxy': True,  # means you don't want to use a proxy
    'proxy_protocol': 'socks5',  # available protocols: http https socks5
    'proxy_user': None,  # proxy user, if your proxy don't need one, you can pass None
    'proxy_password': None,  # proxy password, if your proxy don't need one, you can pass None
    'proxy_host': '127.0.0.1',  # proxy host
    'proxy_port': 1080  # proxy port
}

response = dl_by_doi('10.1016/j.neuron.2012.02.004', config)
```

### how to save response?

#### get all content one time

```python
with open('xxx.pdf', 'wb') as fp:
    fp.write(response.content)
```

#### chunk by chunk

```python
with open('xxx.pdf', 'wb') as fp:
    for chunk in response.iter_content(1024):  # 1024 is the chunk size
        fp.write(chunk)
```
py3grok 0.2.0
Parse strings and extract information from structured or unstructured data.
License: MIT
Requires Python: >=3.7.*

[![Build Status](https://github.com/ztroop/py3grok/actions/workflows/build.yml/badge.svg)](https://github.com/ztroop/py3grok/actions/workflows/build.yml)
[![codecov](https://codecov.io/gh/ztroop/py3grok/branch/master/graph/badge.svg?token=9IMVSWC2GH)](https://codecov.io/gh/ztroop/py3grok)

# py3grok

A Python library to parse strings and extract information from structured or unstructured data. This library is based on [pygrok](https://github.com/garyelephant/pygrok).

## Why?

* Parsing and matching patterns from a string.
* Relieving from complex regular expressions.
* Extracting information from structured/unstructured data.

## Installation

```sh
pip install py3grok
```

## Getting Started

When using this library, you will want to first create an instance of `GrokEnvironment`.
That will load the default and custom grok pattern files. Whenever you want to create a new
pattern, you can run `GrokEnvironment.create(pattern)` which returns an instance of `Grok`,
where you can simply run `Grok.match(text)`.

For flexibility, you can also modify a `Grok` instance's `pattern` property as well if needed.

### Code Example

```python
from py3grok import GrokEnvironment

grok_env = GrokEnvironment()
pattern = '%{WORD:name} is %{WORD:gender}, %{NUMBER:age} years old and weighs %{NUMBER:weight} kilograms.'

# Regex flags can be used, like: grok_env.create(pattern, flags=re.IGNORECASE)
grok = grok_env.create(pattern)

text = 'Gary is male, 25 years old and weighs 68.5 kilograms.'
print(grok.match(text))

# {'gender': 'male', 'age': '25', 'name': 'Gary', 'weight': '68.5'}
```

Numbers can be converted from string to `int` or `float` if you use `%{pattern:name:type}` syntax, such as `%{NUMBER:age:int}`

See all available patterns [here](./py3grok/patterns)!

## Additional Notes

The python `re` module does not support regular expression syntax atomic grouping `(?>)`, so pygrok requires [regex](https://pypi.python.org/pypi/regex) to be installed.

Grok is a simple software that allows you to easily parse strings, logs and other files. With grok, you can turn unstructured log and event data into structured data.

I recommend you to have a look at [logstash filter grok](https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html), it explains how Grok works.

Pattern files come from [logstash filter grok's pattern files](https://github.com/logstash-plugins/logstash-patterns-core/tree/master/patterns).
kkbtools 0.1.5
爬虫业务中，常用的工具集
License: MIT
Requires Python: >=3.6
Keywords: kkb tools kkbtools

# kkbtools
![](https://img.shields.io/badge/python-3.6-brightgreen)

## Introduction
公司爬虫业务中，常用的工具集
## Requirement
```shell
Python >= 3.6
```

## Install
```shell
pip install kkbtools
```
## Usage
安装后将需要用到的类导入即可，更多方法，请查看源码
```python
from kkbtools import PandasPro, Tools, OssUpload

```

## Example
```python
from kkbtools import PandasPro, Tools, OssUpload

# 将 list[dict] 数据插入excel
PandasPro.insert_lists_dict_to_excel(lists=[{'a': 1, 'b': 2}, {'a': 3, 'b': 4}], table_name='test')

# 将mysql数据插入excel中，数据库连接信息，默认读取环境变量 ~/.bash_profile
PandasPro.mysql_to_execl('test')

# 获取一天前时间戳，默认00：0:0：00时刻
# 1649734882
print(Tools.get_off_days_timestamp(-1))

# 拆分可迭代对象
# [[1, 2], [3, 4], [5]]
print(Tools.cut([1, 2, 3, 4, 5], 2))

# 把文件上传到oss中，生成直链后，发送到钉钉群,并删除本地文件
OssUpload.send_file_and_remove_oss('test.xlsx', 'https://此处写钉钉群连接')

# 依次为文件路径，Webhook地址,需要发送的消息,钉钉安全设置自定义关键字
# 这种方式直接发送文件到群里，文件有效期2小时，不经过oss存储，发送完毕后，删除本地文件
OssUpload.send_file_and_remove_ding('test.xlsx', 'https://此处写钉钉群连接')
```

## Help Document
```Shell
kkbtools [-h] [--help]
# 待完善。。。
```

## Thanks
wshuo
PEMFileGenerator 0.0.3
This package will help to generate SSH PEM File for access server
License: MIT

## PEM File Generator

Basically this library will help user to generate SSH PEM file for access remote server and disable password login to
remote server. But If user want to keep password login option enable.It can be also available

## Example

```python
"""
Generate SSH PEM File Example
"""
from PEMFileGenerator.ssh_pem import Generate

# Password login disable
gen = Generate(ip="192.168.56.15", user="vagrant", password="vagrant")
try:
    gen.run()
except Exception as err:
    print(err)

# Password login enable
gen1 = Generate(ip="192.168.56.15", user="vagrant", password="vagrant", password_auth_disable=False)
try:
    gen1.run()
except Exception as err:
    print(err)

```

To learn more [Documentation](https://github.com/vubon/PEMFileGenerator/blob/main/docs/GUIDE.md).

## Changelog

See [Changelog](CHANGELOG.md)

## License

MIT


## Changelog
All notable changes to this project will be documented in this file. <br/>
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
scarfs 0.1.1
find approximate fixed points of bounded vector valued functions
License: MIT
Requires Python: >=3.8,<3.11

Scarfs
======
[![pypi](https://img.shields.io/pypi/v/scarfs)](https://pypi.org/project/scarfs/)
[![build](https://github.com/erikbrinkman/scarfs/actions/workflows/build.yml/badge.svg)](https://github.com/erikbrinkman/scarfs/actions/workflows/build.yml)

A library to find an approximate fixed point for a for a bounded vector valued
function.

Installation
------------
```bash
pip install scarfs
```

Usage
-----

Define the function you want to find a fixed point of using numba:
```python
from numba import njit

@njit
def roll(simp: np.ndarray) -> np.ndarray:
    return np.roll(simp, 1)
```
For performance reasons, this function must be compiled by numba as a cfunc or
in nopython mode. Jitclass functions are currently not supported. The function
must also lie in a bounded space, three default spaces are provided: the
simplex, the simplotope, and the unit hypercube. If your bounded space is not
one of these, you'll need to first compute a homeomorphism between your space
and one of these. The main algorithm runs on the simplex, so you may find it
faster if you can project there directly.

Once your function is defined, simply call one of the fixed point functions
with an initial position and a discretization:
```python
from scarfs import simplex_fixed_point

sol = simplex_fixed_point(roll, np.array([1, 0, 0, 0], float), 100)
```
The result is guaranteed to be within `1 / discretization` of a true fixed
point (or a little larger for the other bounded spaces).

Note that fixed points are difficult to approximate generally, so this may run
for a very long time.

Also note that this library "trusts" you, so if you pass in invalid inputs, you
may get arcane errors.
uranium-image-cleanup 1.0.0
Remove text/noise from grayscale uranium photos
License: MIT
Requires Python: >=2.7, <4
Keywords: image processing filtering

# Uranium Image Cleanup
--------

This package was developed to process grayscale uranium images in a specified directory to remove text/labels.

You should already have installed Python 2.7 - 4.0 with PIP. Python will need to be added as an environment variable.

On Window's start Command Prompt or PowerShell. On Linux open up a terminal. 

## To install:
```
    >>> pip install uranium-image-cleanup
```

## Run on Windows:
Type "uic".
```
    >>> uic
    >>>
    >>> *** Uranium Image Cleanup  ***
    >>> Enter Image/s Retrieval Directory:
```

## How to find the uic.exe on Windows:
In case you wanted to move it to the desktop for easy access. 
```
    >>> where uic
    #Output: C:\Users\your_username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.       9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts\uic.exe
    >>>
```

## Alternative way of running:
On Window's start Command Prompt or PowerShell. On Linux open up a terminal. 

Run python.

```
    >>> python
```

Import the package then call main.

```
    >>> import uic_package as uic
    >>> 
    >>> uic.main()
    >>>
    >>> *** Uranium Image Cleanup  ***
    >>> Enter Image/s Retrieval Directory:
```

## This package is also capable of:

- Removing text/noise on a single image of uranium.
- Detecting white pixels on a single image.

Below are examples on how to implement these.

###### Remove labels on a single image:

``` 
    >>> import uranium_image_cleanup_package as uic
    >>> import opencv as cv2
    >>>
    >>> image uranium_nucleus_10593520                  
    >>> result_image = uic.removeLabel(uranium_nucleus_10593520)

```
###### Detect white pixels on a single image:
``` 
    >>> import uranium_image_cleanup_package as uic
    >>> import opencv as cv2
    >>>
    >>> image uranium_nucleus_10593520                  
    >>> white_pixel_image = uic.detectWhite(img)
```

For more info and access to all the methods available, consult the removeLabel.py script found in the uic_package folder.

----------------------------