semvec/pypi-packages huggingface dataset:
iflow-mcp_geeknews-mcp-server 0.1.1
Add your description here
Requires Python: >=3.12

# GeekNews MCP Server

[![smithery badge](https://smithery.ai/badge/@the0807/geeknews-mcp-server)](https://smithery.ai/server/@the0807/geeknews-mcp-server)

이 프로젝트는 [GeekNews](https://news.hada.io)에서 아티클을 가져오는 Model Context Protocol(MCP) 서버입니다. Python으로 구현되었으며, BeautifulSoup을 사용하여 웹 스크래핑을 수행합니다. 서버 부하를 줄이기 위해 하루에 한 번 자동으로 데이터를 파싱하고 캐시에 저장하는 기능을 제공합니다.

## 기능
|![tool1](img/tool1.png)    |![tool2](img/tool2.png)    |
|:-------------------------:|:-------------------------:|
|![example](img/example1.png)|![example](img/example2.png)|

### 도구 (Tools)

- `get_articles` 도구: GeekNews에서 아티클을 가져오는 기능
  - 아티클 유형(top, new, ask, show)과 반환할 아티클 수를 지정할 수 있음
  - 각 응답에는 제목, URL, 포인트, 작성자, 시간, 댓글 수, 순위 정보가 포함됨
  - 캐시된 데이터를 사용하여 서버 부하 감소

- `get_weekly_news` 도구: GeekNews에서 주간 뉴스를 가져오는 기능
  - 특정 주간 뉴스 ID를 지정하거나 가장 최근 주간 뉴스를 가져올 수 있음
  - 주간 뉴스의 제목, 번호, ID, 내용, URL, 아이템 목록 등의 정보를 제공
  - 각 아이템에는 제목, URL, 순위 정보가 포함됨
  - 캐시된 데이터를 사용하여 서버 부하 감소

### 캐시 기능

- 하루에 한 번 자동으로 데이터를 파싱하고 캐시에 저장
- 캐시된 데이터가 유효한 경우 GeekNews 서버에 요청하지 않고 캐시된 데이터 사용
- 캐시 데이터는 24시간 동안 유효하며, 이후 자동으로 갱신
- 스케줄러가 주기적으로 캐시 유효성을 검사하고 필요시 갱신

## 사용법

- Smithery를 이용한 설치

   🚀 [geeknews-mcp-server](https://smithery.ai/server/@the0807/geeknews-mcp-server)

- MCP 설정 파일에 서버 정보를 추가

   ```json
   {
   "mcpServers": {
      "geeknews-mcp-server": {
         "command": "npx",
         "args": [
         "-y",
         "@smithery/cli@latest",
         "run",
         "@the0807/geeknews-mcp-server",
         "--key",
         "smithery에서 발급 받은 키"
         ]
      }
   }
   }
   ```

## 로컬 설치 방법

1. Git Clone

   ```bash
   git clone https://github.com/the0807/GeekNews-MCP-Server
   cd GeekNews-MCP-Server
   ```

2. uv로 환경 세팅

   ```bash
   uv sync
   ```

3. 가상환경 실행

   ```bash
   uv venv
   source .venv/bin/activate
   ```

4. MCP Inspector로 서버 테스트

   ```bash
   uv run mcp
   mcp dev main.py

   # 터미널에 나오는 URL(MCP Inspector)로 접속하여 서버 테스트
   ```

## 코드 구조

- `src/models.py`: 아티클 정보를 저장하는 데이터 클래스 정의
- `src/parser.py`: GeekNews 웹사이트의 HTML을 파싱하여 아티클 정보를 추출
- `src/client.py`: GeekNews 웹사이트에서 데이터를 가져오는 HTTP 클라이언트
- `src/config.py`: 설정과 상수 정의
- `src/cache.py`: 캐시 관리 기능 제공
- `src/scheduler.py`: 주기적인 데이터 갱신 스케줄러
- `src/server.py`: MCP 서버 구현
- `main.py`: 서버 실행 진입점

> [!Note]
> - 이 서버는 GeekNews 웹사이트의 HTML 구조에 의존합니다. 웹사이트 구조가 변경되면 파싱 로직을 업데이트해야 할 수 있습니다.
> - 캐시 데이터는 사용자의 홈 디렉토리 아래 `.cache/geeknews-mcp` 폴더에 저장됩니다.
adversarial-lab 0.0.6
A unified library for performing adversarial attacks on ML models
Requires Python: >=3.11

<h1 align="center">
  <br>
  <a href="assets/banner.png" alt="Adversarial Lab">
    <img src="assets/banner.png" alt="Adversarial Lab" width="800">
  </a>
  <br>
  Adversarial Lab
  <br>
</h1>

<p align="center">Adversarial Lab is a unified Python library for launching adversarial attacks on any machine learning model. It is framework-agnostic, supporting both TensorFlow and PyTorch.</p>

<p align="center">
  <a href="#key-features">Key Features</a> •
  <a href="#installation">Installation</a> •
  <a href="#quick-start">Quick Start</a> •
  <a href="#usage">Usage</a> •
  <a href="#customization">Customization</a> •
  <a href="#contributing">Contributing</a> •
  <a href="#license">License</a>
</p>


## Key Features

- **Framework Agnostic:** Works seamlessly with both TensorFlow and PyTorch.
- **Wide Range of Attacks:** Includes both black-box and white-box attack implementations.
- **Customizable Loss Functions and Optimizers:** Easily extendable to custom loss functions and optimization techniques.
- **Noise Generators:** Supports various noise generation methods to craft adversarial examples.
- **Defenses:** Built-in methods to evaluate and defend against adversarial attacks.

## Installation

To install Adversarial Lab, you can use pip. The pip installation does not install tensorflow and pytorch. Both these libraries must be installed for Adversarial Lab to work.

```bash
pip install adversarial-lab
```

## Quick Start

Here's a basic example to get you started with a white-box attack on a PyTorch model:

```python
from PIL import Image
import tensorflow as tf
from tensorflow.keras.applications import InceptionV3
from adversarial_lab.attacks.whitebox import WhiteBoxMisclassification

image = Image.open('data/panda.jpg')
model = InceptionV3(weights='imagenet')

attacker = WhiteBoxMisclassification(model, "cce", "adam")
noise = attacker.attack(image_array, epochs=20, strategy="random", verbose=3)
```

## Usage

### Attacks

Adversarial Lab supports a variety of adversarial attack techniques. Here's a brief overview:

- **Black-Box Attacks:** Located in `adversarial_lab/attacks/blackbox`
- **White-Box Attacks:** Located in `adversarial_lab/attacks/whitebox`

### Defenses

COMING SOON

## Customization

Adversarial Lab is designed to be extensible. You can add your custom components in the following areas:

- **Loss Functions:** Create your own loss functions in `adversarial_lab/core/losses`.
- **Optimizers:** Extend or modify optimizers in `adversarial_lab/core/optimizers`.
- **Noise Generators:** Implement new noise generators under `adversarial_lab/core/noise_generators`.

## Contributing

We welcome contributions to Adversarial Lab! If you'd like to contribute, please follow these steps:

For detailed guidelines, see the `CONTRIBUTING.md` file.

## License

This project is licensed under the terms of the MIT license. See the [LICENSE](LICENSE) file for details.
mdformat_simple_breaks 0.1.0
An mdformat plugin for simple line breaks like in GitHub Flavored Markdown.
Requires Python: >=3.10
Keywords: mdformat, markdown, markdown-it

# mdformat-simple-breaks

[![Build Status][ci-badge]][ci-link]
[![codecov.io][cov-badge]][cov-link]
[![PyPI version][pypi-badge]][pypi-link]

An [mdformat][mdformat] plugin to render *thematic breaks* using three dashes

```
---
```

instead of 70 underscores

```
________________________________________________________________________________
```

## Install

Install with:

```bash
pip install mdformat-simple-breaks
```

## Usage as a [pre-commit](https://pre-commit.com) hook

Add the following to your `.pre-commit-config.yaml`:

```yaml
- repo: https://github.com/executablebooks/mdformat
  rev: 1.0.0  # Use the ref you want to point at
  hooks:
    - id: mdformat
      additional_dependencies:
        - mdformat-simple-breaks
```

## Plugin rationale

The [CommonMark specification][commonmark-spec] states that *thematic breaks*, which are to be
rendered as horizontal rules `<hr>`, should be coded as:

> A line consisting of optionally up to three spaces of indentation, followed by a sequence of
> three or more matching `-`, `_`, or `*` characters, each followed optionally by any number of
> spaces or tabs

As a result, most of the Markdown guides and cheat sheets show a line made of three dash symbols
as an example of a *thematic break*, and therefore this likely to be the format which Markdown
writers are most used to type.

On the other hand, plain [mdformat][mdformat] renders these *thematic breaks* [as a line of 70
consecutive underscore characters][mdformat-thematic-breaks]. This is an [explicit style decision
][style-change] that is not going to be reverted and for which no configuration will be added.

As a result, this plugin has been created to offer the option to render the *thematic breaks*
using the common three dash style when preferred.


[ci-badge]: https://github.com/csala/mdformat-simple-breaks/workflows/CI/badge.svg?branch=master
[ci-link]: https://github.com/csala/mdformat/actions?query=workflow%3ACI+branch%3Amaster+event%3Apush
[cov-badge]: https://codecov.io/gh/csala/mdformat-simple-breaks/branch/master/graph/badge.svg
[cov-link]: https://codecov.io/gh/csala/mdformat-simple-breaks
[pypi-badge]: https://img.shields.io/pypi/v/mdformat-simple-breaks.svg
[pypi-link]: https://pypi.org/project/mdformat-simple-breaks
[mdformat]: https://github.com/executablebooks/mdformat
[commonmark-spec]: https://spec.commonmark.org/0.30/#thematic-breaks
[style-change]: https://github.com/executablebooks/mdformat/issues/69
[mdformat-thematic-breaks]: https://mdformat.readthedocs.io/en/stable/users/style.html#thematic-breaks