semvec/pypi-packages huggingface dataset:
Python-DRL 1.0.1
A pytorch-based deep reinforcement learning package

# Python-DRL
A pytorch-based deep reinforcement learning package. At present, I have implemented the following reinforcement learning algorithms: Deep Q-Network (DQN), Policy Gradient (PG), Proximal Policy Optimization (PPO), Deep Deterministic Policy Gradient (DDPG), Twin Delayed DDPG (TD3), and Soft Actor-Critic (SAC).

## Dependencies
```
numpy~=1.23.0
torch>=2.0.1
gym~=0.26.2
opencv-python>=4.5.5.62
pygame~=2.5.2
```

## Supported Python Versions
```
3.8
3.9
3.10
```

## Install
```
pip install Python-DRL
```

## Basic Usage Examples With Gym
```
python ./examples/cartpole-demo.py -m [train/test] -t [DQN/PPO/PG]
python ./examples/pendulum-demo.py -m [train/test] -t [DDPG/TD3/SAC]
```
##### Note that ```examples``` will not be installed by ```pip install Python-DRL```.

## Detailed Usage Guide
### DQN
```
from DRL.dqn import DQN

DQN(n_states, n_actions, hidden_dim=64, critic_lr=1e-3, gamma=0.9, explore_intensity=100, replay_capacity=1000, replay_batch_size=32, target_update_freq=20, is_double_dqn=True, is_load=False, critic_path_name="dqn_critic_net.pkl", is_train=True)
```

### PPO
```
from DRL.ppo import PPO

PPO(n_states, n_actions, hidden_dim=64, actor_lr=1e-4, critic_lr=1e-3, gamma=0.99, eps_clip=0.2, learn_epochs=20, is_load=False, actor_path_name="ppo_actor_net.pkl", critic_path_name="ppo_critic_net.pkl", is_train=True)
```

### PG
```
from DRL.pg import PG

PG(n_states, n_actions, hidden_dim=64, actor_lr=1e-3, gamma=0.99, is_load=False, actor_path_name="pg_actor_net.pkl", is_train=True)
```

### DDPG
```
from DRL.ddpg import DDPG

DDPG(n_states, n_actions, max_action, hidden_dim=300, actor_lr=1e-4, critic_lr=1e-3, gamma=0.99, tau=0.0005, learn_epochs=200, replay_capacity=1000000, replay_batch_size=100, is_load=False, actor_path_name="ddpg_actor_net.pkl", critic_path_name="ddpg_critic_net.pkl", is_train=True)
```

### TD3
```
from DRL.td3 import TD3

TD3(n_states, n_actions, max_action, hidden_dim=300, actor_lr=1e-4, critic_lr=1e-3, gamma=0.99, tau=0.0005, learn_epochs=200, replay_capacity=1000000, replay_batch_size=100, is_load=False, actor_path_name="td3_actor_net.pkl", critic_path_name="td3_critic_net.pkl", is_train=True)
```

### SAC
```
from DRL.sac import SAC

SAC(n_states, n_actions, max_action, hidden_dim=300, actor_lr=3e-3, critic_lr=3e-3, alpha_lr=3e-3, alpha=0.5, gamma=0.99, tau=0.005, replay_capacity=10000, replay_batch_size=100, automatic_entropy_tuning=True, is_load=False, actor_path_name="sac_actor_net.pkl", is_train=True)
```

## Updates Log
- 1.0.0
  - implemented DQN, PG, PPO, DDPG, TD3, and SAC (missing pygame)
- 1.0.1
  - add pygame dependency
oktay1024 0.4
A package developed for blacktea024 to integrate it with PyPI.
Requires Python: >=3.6


```
# Oktay1024

Oktay1024 is a Python package developed for blacktea024 to integrate it with PyPI.

## Installation

You can install Oktay1024 using pip:

```
pip install oktay1024
```

## Usage

```python
import oktay1024

# Example usage here
```

## Dependencies

Oktay1024 depends on the following:
- pip

## Author

flechemano

## License

This project is licensed under the MIT License.
```
pyiptables 2.0.7
Simple Python client library for Iptables

# iptables


### Introduction

Native iptables is not friendly enough for most users.
This module is trying to make Linux/Iptables working like security groups in cloud environments.

### Scenarios
 - Service must be public facing, but still wants to block random bad ipaddress easily.
 - Scripting interface talking to iptables, be convenient like same thing in cloud.

### Examples
##### To protect your personal web server
```python

from pyiptables import securitygroup as sg

# Create a security group based on tcp/port, naming associated to your to-be-protected service.
sg.create_security_group(security_group_name='httpd', dst_port='80')

# Create, append/insert, rules based on source address, with action accept/reject/drop.
sg.create_security_group_rule(security_group_name='httpd', 
                              src_addr='1.2.3.0/24',
                              rule_action='insert',
                              packet_action='DROP')
sg.create_security_group_rule(security_group_name='httpd',
                              src_addr='2.3.4.0/24',
                              rule_action='insert',
                              packet_action='DROP')

# List current rules for a given security group.
sg.list_security_group_rules(security_group_name='httpd')

# Delete a given rule for a security group.
sg.delete_security_group_rule(security_group_name='httpd', rule_id='HTTPD_kfnsznwvb0mzn3uh')

# Delete a given security group and its rules completely.
sg.delete_security_group(security_group_name='httpd')

```