Skip to content

Instantly share code, notes, and snippets.

View hrishikeshrt's full-sized avatar
🇮🇳

Hrishikesh Terdalkar hrishikeshrt

🇮🇳
View GitHub Profile
@hrishikeshrt
hrishikeshrt / stopwatch.py
Last active February 9, 2022 20:12
Stopwatch class for timing your python code, with support for pause, resume and multiple named-ticks
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Stopwatch Class
@author: Hrishikesh Terdalkar
"""
###############################################################################
@hrishikeshrt
hrishikeshrt / check_attendance.py
Last active February 7, 2020 09:12
Attendance Checker and Reminder for IITK CSE (Kendra and Pingala)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: Hrishikesh Terdalkar
Attendance Checker and Reminder for IITK CSE
Checks both on Kendra and Pingala
You can add the command to cronjob by running the command `crontab -e'
and adding the following line at the end. (for checking at 5pm, 8pm, 11pm)
@hrishikeshrt
hrishikeshrt / README.md
Last active September 7, 2020 21:17
Download course contents from sanskritfromhome.in
@hrishikeshrt
hrishikeshrt / README.md
Last active October 28, 2023 21:15
Devangari to IAST in LaTeX
  • First run `teckit_compile deva-to-iast.map'
  • This will create a deva-to-iast.tec file.
  • Now you can use the \skt{} tag to write Devanagari Text, and \iast{} tag to render devangari text as IAST.
@hrishikeshrt
hrishikeshrt / README.md
Last active July 23, 2024 14:35
Hindu Calendar Utility using drikPanchang.com

Python class and a CLI for various calendar utilities according to Hindu Calendar. It uses drikPanchang.com for querying data.

Some Features:

  • Finding the Tithi of a particular date
  • Querying daily Panchang
  • Finding an occurrence of a particular Tithi in the current (or specified) year
  • Ability to specify date in both regional or Gregorian format
  • Display in regional language
  • ICS Calendar Creator (Plotting Janma-Tithi on the Gregorian calendar for the specified year)
// ==UserScript==
// @name Transliterate DCS
// @namespace http://www.gist.github.com/
// @version 1.1
// @description Transliterate IAST text from DCS into Devanagari
// @author Hrishikesh Terdalkar
// @match http://www.sanskrit-linguistics.org/dcs/index.php?contents=texte&IDTextDisplay=*
// @require https://raw.githubusercontent.com/sanskrit/sanscript.js/master/sanscript.js
// ==/UserScript==
@hrishikeshrt
hrishikeshrt / sanskrit_text.py
Last active July 3, 2022 16:09
Sanskrit Utility Functions
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 17 22:20:39 2018
Updated on Sun Jul 03 21:39:43 2022
@author: Hrishikesh Terdalkar
"""
import re
@hrishikeshrt
hrishikeshrt / functions.py
Created December 20, 2020 11:48
Fold Function
def fold(content, width=128):
'''
Fold content such that each line is no longer than 'width'
- breaks only at complete words
- if a word in the content exceeds `width`
- added as a separate line
- a warning is shown
similar to linux command "fold -w `width` -s"
except in the cases where there are spaces on the line boundaries
@hrishikeshrt
hrishikeshrt / decorators
Created March 23, 2021 14:59
Running Samsaadhanii Parser From CLI
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 17 20:06:38 2019
@author: Hrishikesh Terdalkar
General purpose decorators
https://wiki.python.org/moin/PythonDecoratorLibrary
@hrishikeshrt
hrishikeshrt / indic-stardict-downloader
Created April 24, 2021 16:52
Download stardict dictionaries from indic-dict
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 24 19:25:34 2021
@author: Hrishikesh Terdalkar
Original: https://github.com/sanskrit-coders/pydictupdater
"""