Skip to content

Instantly share code, notes, and snippets.

View tshrinivasan's full-sized avatar

Shrinivasan T tshrinivasan

View GitHub Profile
@tshrinivasan
tshrinivasan / split-page.py
Last active April 15, 2024 19:55
Split a PDF vertically, used for scanned double sided PDF pages
# Source http://stackoverflow.com/a/15741856/1301753
import copy
import sys
import math
import pyPdf
def split_pages(src, dst):
src_f = file(src, 'r+b')
dst_f = file(dst, 'w+b')
#!/usr/bin/env python
# coding: utf-8
# In[1]:
import pandas as pd
import json
@tshrinivasan
tshrinivasan / tess_ocr_pdf.py
Created May 23, 2020 16:36
Convert a PDF file to text using Tesseract OCR
import os
import sys
import glob
#import telegram_send
all_pdf = glob.glob("*.pdf")
all_pdf_count = len(all_pdf)
@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>
@tshrinivasan
tshrinivasan / Akonadi-MySQL-workaround.md
Created June 29, 2022 08:23 — forked from aldolat/Akonadi-MySQL-workaround.md
If MySQL is installed, Akonadi doesn't work anymore. This is a possible workaround to get Akonadi back to work.
@tshrinivasan
tshrinivasan / Tamil Month Calculator - Simpler.py
Created June 1, 2022 11:18
Code to get tamil months/date from english months
# -*- coding: utf-8 -*-
"""Tamil Month Calculator - Simpler.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1vYnNRVuCUZa-n1V6P18FUcONYflxJdcd
Created by Ravi Annasamy - ravi.annaswamy@gmail.com
@tshrinivasan
tshrinivasan / create-aws-ecr-authentication-cronjob.md
Last active October 21, 2021 15:51 — forked from tuantranf/create-aws-ecr-authentication-cronjob.md
A Kubernetes cronjob to refresh ECR authentication

A Kubernetes cronjob to refresh ECR authentication

Create AWS secret

kubectl create secret generic aws-secret --from-literal=AWS_ACCOUNT= --from-literal=AWS_ACCESS_KEY_ID= --from-literal=AWS_SECRET_ACCESS_KEY= --from-literal=AWS_DEFAULT_REGION= --from-literal=AWS_REGION=

Create cronjob

@tshrinivasan
tshrinivasan / rancher-cleanup-sh
Created April 7, 2021 11:33
Cleanup script for rancher. Run this when you want to remove existing rancher setup. run this in each node on the cluster.
#!/bin/bash
#########################################################################
# Copyright (C) 2019-2020 Akito <the@akito.ooo> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #