I hereby claim:
- I am idlephysicist on github.
- I am idlephysicist (https://keybase.io/idlephysicist) on keybase.
- I have a public key ASCydULc_5lR0fNwlLojP2GLxqgpA_R8duJq9U1iYbF3FQo
To claim this, I am signing this object:
| %!TEX TS-program = xelatex | |
| % | |
| % Latex template for my cave logs | |
| % Eoghan, 2019 | |
| % | |
| \documentclass[11pt]{article} | |
| % | |
| % Setup for the Typewriter look |
I hereby claim:
To claim this, I am signing this object:
| def getch(): | |
| import sys, tty, termios | |
| fd = sys.stdin.fileno() | |
| old = termios.tcgetattr(fd) | |
| try: | |
| tty.setraw(fd) | |
| return sys.stdin.read(1) | |
| finally: | |
| termios.tcsetattr(fd, termios.TCSADRAIN, old) |
| # Where sqlite3 is the place holder for the module that you want to find the exceptions for. | |
| import sqlite3, inspect | |
| print( [name for name, value in vars(sqlite3).items() if inspect.isclass(value) and issubclass(value, Exception)] ) |
| CHOICE = {'yes': {'yes', 'y', ''}, 'no': {'no', 'n'}} | |
| def YorN(text): | |
| """ | |
| This method prompts the user for an answer to a question. | |
| `text` should be the prompt to that the user responds to. | |
| """ | |
| answer = input(f'{text} [Y/n] ').lower() | |
| if answer in CHOICE['yes']: | |
| return True |
| #!/bin/bash | |
| pdf () { | |
| pandoc $1 -s --template cave-log.tex \ | |
| -o ${1%.*}.pdf --latex-engine=xelatex | |
| } | |
| xerox () { | |
| convert -density 150 ${1%.*}.pdf \ | |
| -rotate 0.5 \ |