Skip to content

Instantly share code, notes, and snippets.

View kaushik20-dev's full-sized avatar
:octocat:
Hey!

R Kaushik kaushik20-dev

:octocat:
Hey!
View GitHub Profile
@kaushik20-dev
kaushik20-dev / brainfuck.py
Created December 28, 2018 02:42 — forked from elliotchance/brainfuck.py
Write Your Own Brainfuck Compiler
import sys
import ply.yacc as yacc
import ply.lex as lex
tokens = (
'INCREMENT',
'DECREMENT',
'SHIFT_LEFT',
'SHIFT_RIGHT',
'OUTPUT',
@kaushik20-dev
kaushik20-dev / brainfuck.py
Created December 28, 2018 02:41 — forked from elliotchance/brainfuck.py
Write Your Own Brainfuck Compiler
import sys
import ply.yacc as yacc
import ply.lex as lex
tokens = (
'INCREMENT',
'DECREMENT',
'SHIFT_LEFT',
'SHIFT_RIGHT',
'OUTPUT',
@kaushik20-dev
kaushik20-dev / crud.py
Created September 17, 2018 07:37 — forked from alessandrocucci/crud.py
MySQL CRUD Operations using Python
#!/usr/bin/env python
'''
MySQL CRUD (Create Retrieve Update Delete) Operations using Python
'''
__author__ = "Alessandro Cucci"
__license__ = "MIT"
__version__ = "0.0.1"
__email__ = "[email protected]"
__status__ = "Development"
@kaushik20-dev
kaushik20-dev / expecting.md
Created August 27, 2018 11:49 — forked from ksafranski/expecting.md
Basic principles of using tcl-expect scripts

Intro

TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl extension and a different #! call.

Setup Your Script

The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect we use the following:

#!/usr/bin/expect