Create a Python script that connects to a PostgreSQL database, creates a table called "products" with columns: id (integer), name (varchar), price (float), and quantity (integer). Then, insert 10 sample records into the table.

First, you need to install the psycopg2 library if you haven't already. You can do this by running:

```bash
pip install psycopg2
```

Then, you can use the following Python script to connect to a PostgreSQL database, create a table called "products", and insert 10 sample records into the table.

```python
import psycopg2

# Replace these values with your own database credentials
db_name = "your_database_name"
db_user = "your_username"
db_password = "your_password"
db_host = "your_host"
db_port = "your_port"

# Connect to the PostgreSQL database
connection = psycopg2.connect(
    dbname=db_name,
    user=db_user,
    password=db_password,
    host=db_host,
    port=db_port
)

# Create a cursor object to interact with the database
cursor = connection.cursor()

# Create the "products" table
cursor.execute("""
CREATE TABLE products (
    id SERIAL PRIMARY KEY,
    name VARCHAR(255) NOT NULL,
    price FLOAT NOT NULL,
    quantity INTEGER NOT NULL
)
""")

# Insert 10 sample records into the "products" table
sample_products = [
    ("Product 1", 19.99, 100),
    ("Product 2", 29.99, 50),
    ("Product 3", 9.99, 200),
    ("Product 4", 49.99, 30),
    ("Product 5", 24.99, 75),
    ("Product 6", 14.99, 150),
    ("Product 7", 39.99, 60),
    ("Product 8", 59.99, 20),
    ("Product 9", 34.99, 40),
    ("Product 10", 44.99, 25),
]

for product in sample_products:
    cursor.execute("""
    INSERT INTO products (name, price, quantity)
    VALUES (%s, %s, %s)
    """, product)

# Commit the changes and close the connection
connection.commit()
cursor.close()
connection.close()

print("Table created and sample records inserted successfully.")
```

Make sure to replace the placeholder values for `db_name`, `db_user`, `db_password`, `db_host`, and `db_port` with your actual PostgreSQL database credentials.