Skip to content

Instantly share code, notes, and snippets.

View tshrinivasan's full-sized avatar

Shrinivasan T tshrinivasan

View GitHub Profile
@tshrinivasan
tshrinivasan / consolidate_aws_securityhub_findings.py
Last active August 17, 2026 13:05
consolidate_aws_securityhub_findings.py
import pandas as pd
import re
input_file = 'securityhub_all_findings.csv'
output_file = 'consolidated_remediation_plan.csv'
print(f"Processing {input_file} for aggregation...")
df = pd.read_csv(input_file)
# Standardize cases
@tshrinivasan
tshrinivasan / export_aws_security_hub_findings.py
Last active August 17, 2026 13:05
export_aws_security_hub_findings.py
import boto3
import csv
session = boto3.Session(region_name='ca-central-1')
client = session.client('securityhub')
finding_filter = {
'SeverityLabel': [
{'Value': 'CRITICAL', 'Comparison': 'EQUALS'},
{'Value': 'HIGH', 'Comparison': 'EQUALS'},
@tshrinivasan
tshrinivasan / get_kindle_book_screenshot_chrome.py
Created August 20, 2025 16:39
get_kindle_book_screenshot_chrome.py
# -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
import time
import os
import platform
@tshrinivasan
tshrinivasan / gist:d9750894d4a419b1920d55ad2ca28978
Last active April 1, 2025 21:13
emacs as regular fullscreen editor
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(cua-mode t)
(delete-selection-mode t)
(global-set-key (kbd "<left>") 'backward-char)
@tshrinivasan
tshrinivasan / ttonts.py
Created November 26, 2024 02:48
Fix for Tamil font issues in Reportlab ( python2)
#coding:utf-8
#Copyright ReportLab Europe Ltd. 2000-2009
#see license.txt for license details
# author - Selvam <s.selvamsiva@gmail.com>
# Fix for Tamil font issues in Reportlab ( python2)
# search for "selvam" for the changes he made in this file
@tshrinivasan
tshrinivasan / embed_archive.org_books.html
Created August 2, 2024 13:45
Embed archive.org books in HTML page
<h1> Embed archive.org books in HTML page </h1>
<br/>
<br/>
<h1> Double page embed mode </h1>
<!-- thanks to https://stackoverflow.com/questions/7847465/pre-tag-wont-show-text-containing-iframe for the fix on pre and embed -->
#!/usr/bin/env python
# coding: utf-8
# In[1]:
import pandas as pd
import json
@tshrinivasan
tshrinivasan / Revolution OS-Tamil.srt
Last active June 5, 2023 03:06
Tamil subtitle of the film about open source "Revolution OS"
1
00:00:04,000 --> 00:00:05,500
Agenda 2000 நிகழ்ச்சிக்கு போயிருந்தேன்
2
00:00:06,100 --> 00:00:08,900
அங்கே Criag Mundie இருந்தார்.
3
00:00:08,900 --> 00:00:12,000
@tshrinivasan
tshrinivasan / tamil.keyboard.xml
Created May 29, 2023 02:59
KTouch - tamil.keyboard.xml
<KTouchKeyboard>
<Title>Tamil</Title>
<Comment>You can learn Tamil Typing easily with the help of this keyboard layout. </Comment>
<FontSuggestions>Sans Serif,9,-1,5,50,0,0,0,0,0</FontSuggestions>
<Language>ta (Tamil)</Language>
<Keys>
<Key Width="80" X="180" Y="200" Height="80" Type="FINGER">
<Char Unicode="2991" Position="TopLeft">ய</Char>
</Key>
<Key Width="80" X="280" Y="200" Height="80" Type="FINGER">
@tshrinivasan
tshrinivasan / ta_eng.keyboard.xml
Created May 29, 2023 02:58
KTouch - ta_eng.keyboard.xml
<KTouchKeyboard>
<Title>Tamil Eng</Title>
<Comment>You can learn Tamil Typing easily with the help of this keyboard layout. In this layout you can also see the English Characters on the Keys for More convinience</Comment>
<FontSuggestions>Sans Serif,9,-1,5,50,0,0,0,0,0</FontSuggestions>
<Language>ta (Tamil)</Language>
<Keys>
<Key Width="80" X="180" Y="200" Height="80" Type="FINGER">
<Char Unicode="2991" Position="TopLeft">ய</Char>
<Char Unicode="65" Position="BottomRight">A</Char>
</Key>