Skip to content

Instantly share code, notes, and snippets.

@anilsathyan7
anilsathyan7 / guitkinter.py
Created July 31, 2017 15:17
Python GUI Tkinter
#GUI: Sample Program - Increment
import Tkinter
window = Tkinter.Tk()
window.title("Button_Label")
num = 0
#callback : function for changing label
def increment():
@anilsathyan7
anilsathyan7 / numbamatmul.py
Created July 31, 2017 15:09
Python numba matrix multiplication
import time
import numba
from numba import jit
import numpy as np
#input matrices
matrix1 = np.random.rand(30,30)
matrix2 = np.random.rand(30,30)
rmatrix = np.zeros(shape=(30,30))
@anilsathyan7
anilsathyan7 / numiseven.bf
Created July 31, 2017 14:57
Brainfuck check if a number is even
,.
[
[<]<+
>>[>]
,.
]
+++++ +++++
[
@anilsathyan7
anilsathyan7 / revrsstr.bf
Last active July 31, 2022 23:49
Brainfuck reverse a string
,
[
[<]<+
>>[>]
,
]
<
[.<]
@anilsathyan7
anilsathyan7 / convtouc.bf
Last active July 31, 2017 15:03
Brainfuck convert to uppercase
,.
[
[<]<+
>>[>]
,.
]
<[
[-------- --------
-------- -------- .>]
@anilsathyan7
anilsathyan7 / lenofip.bf
Last active June 25, 2021 16:17
Brainfuck Length of Input string
+++++ +++
[
> +++++ +
< -
]
>>>
,.
[
[<]<+
>>[>]
@anilsathyan7
anilsathyan7 / helloworld.bf
Last active May 6, 2020 23:01
Brain fuck hello-world program
+++++ +++++ initialize counter (cell #0) to 10
[ set the next four cells to 70 100 30 and 10 respectively
> +++++ ++ add 7 to cell #1
> +++++ +++++ add 10 to cell #2
> +++ add 3 to cell #3
> + add 1 to cell #4
<<<< - decrement counter (cell #0)
]
> ++ . print 'H' (H = ASC (72))