Skip to content

Instantly share code, notes, and snippets.

@incrhst
incrhst / csrf_SAMPLE_code.py
Created September 26, 2025 15:10
csrf and jwt examples
import requests
from requests.auth import HTTPBasicAuth
import json
def create_material_with_csrf():
# Create session with authentication
session = requests.Session()
session.auth = HTTPBasicAuth('your-username', 'your-password')
# Step 1: Get CSRF token
DELIMITER //
CREATE PROCEDURE partition_package_data(
IN source_table_name VARCHAR(100),
IN records_per_partition INT
)
BEGIN
DECLARE done INT DEFAULT FALSE;
DECLARE current_partition INT DEFAULT 1;
DECLARE partition_table_name VARCHAR(100);