semvec/pypi-packages huggingface dataset:
ldns-explorer 1.3
A public DNS resolver explorer
Requires Python: >=3

# LDNS Explorer

This explorer is executed on a client machine to measure performance implications
of choosing a DNS resolver (“LDNS — Local Domain Name Server”) among various 
alternatives including the ISP-provided resolver and 
several public resolves, namely, Google, OpenDNS, 
Cloudflare and Quad9.

This work was supported in part by NSF through grant CNS-2219736
## Installation

Visit https://pypi.org/project/ldns-explorer/

## Usage

You can invoke the explorer anywhere by the following command. 

```python
python3 -m ldns-explorer
```


## Customized Test Case

We support customized lists of test domains and resolvers beside our
sample test cases.

If you would like to add domains, please create a 
txt file called `domains.txt` under the directory you invoke the 
explorer.

**The file structure is one domain per line.**

`domains.txt`:
```text
example1.com
example2.com
```

If you would like to add DNS resolvers, please create a 
txt file called `resolvers.txt` under the directory you invoke the 
explorer.

**The file structure is one domain per line.**
`resolvers.txt`:
```text
0.0.0.0
1.1.1.1
```


## Disclaimer

The purpose of this project is twofold. On one hand, we hope it will help Internet
users choose a DNS resolver that would improve their own Web browsing experience. On the 
other hand, we would like to obtain general insights about performance 
of DNS resolution infrastructures, which may lead to improvements of the Internet 
for everybody. For the latter purpose, the DNS Explorer will send the result 
of the measurement to us. No personally identifiable information is collected 
or accessed by the application -- only the public IP address and the performance metrics. You can disable this 
functionality by typing `NO` to the corresponding prompt during the application 
execution; however, we hope you choose to participate in this crowdsourced data collection 
in recognition of our effort in creating this application.
ChatGPTOps 0.0.1
Ask chatGPT llm to investigate your unhandled exceptions & file github issues with proposed fixes without filing duplicate issues
Requires Python: >=3.9

# chatGptOps
Devops but with chatGptOoops


# Install

# Setup

In your application, set the following configuration values:

- `OPENAI_API_KEY`
- `GITHUB_FINE_GRAINED_ACCESS_TOKEN` with access to your repo 'issues'
- `GITHUB_ORG_NAME_OR_USERNAME`
- `GIT_REPO_NAME`

> Hint [python-dotenv](https://pypi.org/project/python-dotenv/) is an excellent package for
reading key-value pairs from a .env file (or envrionment) and set them as environment variables.


# Example usage

Capture unhandled exceptions in a python flask application:

- Ask ChatGTP what the problem might be (sending the error context)
- Create a github issue with proposed fix from ChatGPT / llm
- Ensure unique hash of issue is used to avoid filing duplicate issues for that exception

```
import sys
import logging
import os
from ChatGPTHandler import ChatGPTHandler
from flask import Flask
from dotenv import load_dotenv
from unhandled_exception_logger import (
    unhandled_exception_setup,
    handle_exception,
)

load_dotenv()

PYTHON_LOG_LEVEL = os.getenv("PYTHON_LOG_LEVEL", "DEBUG")


# Register chatGPTHandler log handler
chatGPTHandler = ChatGPTHandler()
chatGPTHandler.setLevel("CRITICAL")

unhandled_exception_setup(handler=chatGPTHandler)


logger = logging.getLogger()
logger.setLevel(PYTHON_LOG_LEVEL)
logger.addHandler(chatGPTHandler)


# # Direct all uncaught exceptions to handle_exception
sys.excepthook = handle_exception


# Minimal python app example with example unhandled exception
app = Flask(__name__)
logging.getLogger("werkzeug").disabled = True
app.logger.disabled = True


@app.errorhandler(Exception)
def flask_handle_exception(e):
    handle_exception(
        sys.exc_info()[0],
        sys.exc_info()[1],
        sys.exc_info()[2],
        handler=chatGPTHandler,  # noqa: E501
    )


@app.errorhandler(500)
def error_page(e):
    return "An error occurred"


@app.route("/")
def index():
    return "index"


@app.route("/error")
def error():
    colors = ["Red", "Blue"]
    print(colors[3])
    names = ["Bob", "Alice"]
    print(names[2])
    return "<p>Hello, World!</p>"


if __name__ == "__main__":
    app.run(threaded=True)
```