semvec/pypi-packages huggingface dataset:
flow-control 2.0.0
A flow control packages,control QPS
Requires Python: >=2.7

#                                                             Flow Control

- 功能 
  - 这个packages可以控制间隔固定的时间一个函数或者语句的调用次数(QPS)，可以设置访问次数和时间间隔，
  - 访问限制 访问次数/时间间隔

- 使用方法(单进程情况下使用FlowControl 类，多进程情况下使用ProcessFlowControl类)

  ```Python
  # encoding=utf-8
  import os
  import threading
  
  from datetime import datetime
  from flow_control.controller import FlowController
  from flow_control.controller import ProcessFlowController
  from flow_control.controller import AverageFlowControl
  from flow_control.controller import AverageProcessFlowControl
  from threading import Thread

  
  
  def work(flowcontrol):
      while True:
          if flowcontrol.get():
              print("{}--{}--{}".format(os.getpid(), threading.currentThread().ident, datetime.now()))
  
  flow_control = AverageFlowControl(num=0.5, interval=1)
  Thread(target=work, args=(flow_control,)).start()
  work(flow_control)
  ```


  - 创建一个FlowControl (单进程情况下)或者 ProcessFlowControl(多进程情况下) 对象，参数为(num=访问次数,interval=时间间隔)，
  - 然后调用该对象的 get方法
  - 如果get方法返回 True，则说明可以未达到流控限制，如果返回False则说明函数调用次数或者访问次数已经 达到流控限制，应该拒绝调用或访问
CobWeb-lnx 1.1.0
CobWeb is a Python library for web scraping. The library consists of two classes: Spider and Scraper.
Requires Python: >=3.7
Keywords: data,crawler,scraper

# CobWeb

CobWeb is a Python library for web scraping. The library consists of two classes: Spider and Scraper.

## Spider

The Spider class is used to crawl a website and identify internal and external links. It has the following methods:

    __init__(self, url, max_hops = 0): Initializes a Spider object with the given URL and maximum number of links to follow from the initial URL.
    _getLinks(self): Crawls the website and identifies internal and external links.
    _showLinks(self): Returns the set of internal and external URLs found during crawling.
    __str__(self): Returns a string representation of the Spider object.
    __repr__(self): Returns a string representation of the Spider object.

## Scraper

The Scraper class extends the functionality of the Spider class by scraping HTML content from web pages based on user-defined parameters. It has the following methods:

    __init__(self, config): Initializes a Scraper object with the given configuration parameters.
    run(self): A public method to scrape HTML content from web pages based on user-defined parameters.
    __str__(self): Returns a string representation of the Scraper object.
    __repr__(self): Returns a string representation of the Scraper object.

## Installation

You can install CobWeb using pip:

```bash

    pip install CobWeb

```

## Config

Config is either an object in memory or a YAML file you can build by installing YAMLbuilder or by using the provided template!
Example of a complete object:

```python
config = {
            "url": 
            "hops": 
            "tags":
            "classes":
            "attrs":
            "attrV":
            "IDv":
            "selectors":
        }
```

Example of YAML file (If you choose this path call the config_parser function and give it a valid path!):

```yaml
IDv:
attrV: []
attrs: []
classes: []
hops: 
selectors: []
tags:
    - 
    - 
url: 
```

## Example Usage

```python

from CobWeb import Spider, Scraper

# Create a Spider object with a URL and maximum number of hops
spider = Spider("https://example.com", max_hops=10)

# Get the internal and external links
links = spider.run()
print(links)

# Create a Scraper object with a configuration dictionary
# hops defines how deep it will scrape, it uses the Spider internally to get more links and scrape from those pages! If you just want to scrape from a single page set it to 0 or don't provide hops
config = {
    "url": "https://example.com",
    "hops": 2,
    "tags": ["h1", "p"]
    }
scraper = Scraper(config)

# Scrape HTML content from web pages based on user-defined parameters
results = scraper.run()

# Print the results it shall be a dictionary with arrays of scraped content separated by element, attributes, etc provided in the config!
print(results)


```
QtLogger 1.0.3
A simple logger for PyQt6 that also has a nice UI
Keywords: Logger,Qt,PyQt,Qt6,PyQt6,QtLogger


# PyQt-Logger

A small widget to show some logs with basic syntax

![python_7Z3AFD1Nlw.png](https://i.imgur.com/6h16OaY.png)



## Features



- Show logs with different colors based on their log level

- Customizable log level colors

- Auto archive the logs

- Ability to read and display older logs



## Installation



```bash

pip install QtLogger

```



## Usage



> Importing

```python

from QtLogger import QtLogger

```



> Full usage example

```python

from QtLogger import QtLogger

from PyQt6.QtWidgets import QApplication, QMainWindow, QPushButton, QVBoxLayout, QWidget



class MainWindow(QMainWindow):

    def __init__(self):

        super().__init__()

        self.setWindowTitle("QtLogger Example")

        self.resize(500, 500)



        self.central_widget = QWidget()

        self.setCentralWidget(self.central_widget)



        self.layout = QVBoxLayout()

        self.central_widget.setLayout(self.layout)



        self.button = QPushButton("Log something")

        self.button.clicked.connect(self.log_something)

        self.layout.addWidget(self.button)



        self.logger = QtLogger()

        self.layout.addWidget(self.logger)



    def log_something(self):

        self.logger.log("This is a log", "info")



app = QApplication([])

window = MainWindow()

window.show()

app.exec()

```
xgrid 0.0.5
Domain-specific language for developing partial differential equation solvers
Requires Python: >=3.10

# XGrid

## Installation

```
pip install xgrid
```

## Test

Invoke `python3 test.py` in the root folder to perform the test cases.

## Usage

See document for more information. Let's start with a simple kernel, the element-wise multiplication of two grid:

```python
import xgrid
import numpy as np
import random

xgrid.init()

fvec = xgrid.grid[float, 1]

@xgrid.kernel()
def elementwise_mul(result: fvec, a: fvec, b: fvec) -> None:
    result[0] = a[0] * b[0]
```

and let's define some data:

```python
a = xgrid.Grid((10000, ), float)
b = xgrid.Grid((10000, ), float)

for i in range(10000):
    a[i] = random.random()
    b[i] = random.random()
```

and the result:

```python
result = xgrid.Grid((10000, ), float)
```

and invoke the kernel:

```python
elementwise_mul(result, a, b)
```

We could check the result using numpy dot:

```
assert np.sum(result.now) == np.dot(a.now, b.now)
```

## Examples

Solve the 2D Cavity flow with `xgrid`, see in examples folder.

![cavity](https://github.com/yhl1219/xgrid/blob/main/imgs/cavity.png)
sknrf-core 1.1.1
Object Oriented Nonlinear RF/Microwave Engineering
Keywords: 'Nonlinear RF Device System Characterization Modeling Electronic Design Automation'

# scikit-nrf-core

## Build Flow

Building and Deploying Python code with native shared libraries
a continuously involving ordeal, hence I have provided the equivalent
CMake/Makefile command in comments to be relatable to C++. Internally
Cmake and Make are invoked. The build-flow currently uses setuptools,
which is deprecated in Python 3.12.

### Install Dependencies

See requirements.txt

### Environment Variables

   <table>
       <tr>
           <th> Variable </th>
           <th> Default Value </th>
           <th> Description </th>
       </tr>
       <tr>
           <td> LLVM_INSTALL_DIR </td>
           <td> ${HOME}/libclang </td>
           <td> libclang directory </td>
       </tr>
       <tr>
           <td> SKNRF_DIR </td>
           <td> import site ; site.getsitepackages()[0] </td>
           <td> Python sknrf-core Module Directory </td>
       </tr>
       <tr>
           <td> CONDA_PREFIX </td>
           <td> /usr/local </td>
           <td> C++ Sysroot </td>
       </tr>
       <tr>
           <td> VISA_LIB </td>
           <td> @py </td>
           <td> Visa Library Location </td>
       </tr>
   </table>

### Release Build

```bash
   python3 setup.py clean                                   # sudo make clean
   python3 setup.py config    `                             # cmake ..
   python3 setup.py build                                   # make
   python3 setup.py install                                 # sudo make install
 ```

`python3 setup.py install` will take a while to execute because it builds the python documentation. As an alternative `python3 setup.py develop`
creates the same outcome by symbolicly linking the src directory `sknrf` to a file in the `site-packages` folder. NOTE: This is a PYTHON-SPECIFIC
symbolic link that works cross-platform for PYTHON ONLY. You still need to `install` all other files as follows!

```bash
   python3 setup.py clean                                   # sudo make clean
   python3 setup.py config    `                             # cmake ..
   python3 setup.py build                                   # make
   python3 setup.py install_clib                            # sudo make install
   python3 setup.py install_data                            # sudo make install
   python3 setup.py develop                                 # All changes in the source directory are now installed instantly
   python3 setup.py install_doc                             # sudo make install
 ```

### Example

```bash
   python3 ${SKNRF_DIR}/sknrf/main.py
```

### Tests

```bash
   cd ${SKNRF_DIR}/sknrf ; nosetests --config=nose.cfg
```

### Runtime Configuration

`${SKNRF_DIR}/sknrf/sknrf.yml` contains runtime configuration settings. Beware of Environment Variables set in this file.