Skip to content

Instantly share code, notes, and snippets.

View kvedala's full-sized avatar

Krishna Vedala kvedala

View GitHub Profile
@kvedala
kvedala / fibonacci_fast.c
Last active November 17, 2019 23:37
Fast Fibonacci number
/**
@file Fibonacci_fast.c
@author: Krishna Vedala
@date 2 October, 2019
@brief Compute \f$m^{mth}\f$ Fibonacci number using the formulae:
\f{eqnarray*}{
F_{2n-1} &=& F_n^2 + F_{n-1}^2 \\
F_{2n} &=& F_n\left(2F_{n-1} + F_n\right)
\f}
*/
@kvedala
kvedala / Weight tracking.ipynb
Created March 1, 2020 15:08
Weight tracking.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kvedala
kvedala / complex exponentials.py
Created August 23, 2017 16:04
Complex exponentials
import numpy as np
from matplotlib import pyplot as plt
from mpl_toolkits.axes_grid.axislines import SubplotZero
from matplotlib.transforms import BlendedGenericTransform
plt.rcParams['svg.fonttype'] = 'none'
A = complex(.5,.75)
pows = [0]*11
real = [0]*11
imag = [0]*11
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kvedala
kvedala / Project Euler - Problem 14 - Longest Collatz Sequence.ipynb
Last active March 11, 2020 00:28
Project Euler - Problem 14 - Longest Collatz Sequence.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kvedala
kvedala / factorial.c
Last active March 30, 2020 18:11
Factorial using "divide, swing and conquer" algorithm - https://oeis.org/A000142/a000142.pdf
/**
* Factorial algorithm -
* Divide, Swing & Conquer from https://oeis.org/A000142/a000142.pdf
**/
/**
* check if input number is prime.
* Return 1 if prime, otherwise 0
@kvedala
kvedala / -sorting-algorithms-quick-sort-and-shell-sort.ipynb
Created April 29, 2020 02:42
Sorting algorithms - Quick sort and Shell sort
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kvedala
kvedala / fast polynomial roots.ipynb
Last active April 29, 2020 03:02
Durand-Kerner Roots - Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kvedala
kvedala / Madelbrot optimization.ipynb
Last active April 29, 2020 03:13
Mandelbrot optimization
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kvedala
kvedala / notebook.ipynb
Last active May 15, 2020 00:51
Hill Cypher - Python and Cython
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.