Skip to content

Instantly share code, notes, and snippets.

View sleebapaul's full-sized avatar
🏃‍♂️
Sprinting

Sleeba Paul sleebapaul

🏃‍♂️
Sprinting
View GitHub Profile
@sleebapaul
sleebapaul / matlab_snippet.m
Last active November 25, 2017 07:49
Why all should learn how to code?
student = [‘A’, ’B’, ’C’, ’D’, ’E’];
marks = [21, 35, 13, 26, 49];
n = length(marks);
count = 0;
count1 = 0;
for i = 1:n
if marks(i) >= 25
fprintf(‘ %s has passed\n’,student(i));
count = count + 1;
else
@sleebapaul
sleebapaul / python_snippet.py
Created October 26, 2017 08:25
Why all should learn how to code?
student = ["A", "B", "C", "D", "E"]
marks = [21, 35, 13, 26, 49]
n = len(marks)
count = 0
count1 = 0
for i in range(n):
if marks[i] >= 25:
print student[i] + "has passed"
count = count + 1
else:
@sleebapaul
sleebapaul / char_rnn_karpathy.py
Created July 18, 2017 16:59
Training char_rnn by Andrej Karpathy on first chapter of Genesis
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
from __future__ import print_function
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))