Skip to content

Instantly share code, notes, and snippets.

View AnuragAnalog's full-sized avatar

Peddi Anurag AnuragAnalog

View GitHub Profile
@AnuragAnalog
AnuragAnalog / explainers.md
Last active December 9, 2021 17:15
These are some of the sites which will explain you more about the working of different types of Neural Networks
@AnuragAnalog
AnuragAnalog / IELTS.md
Last active April 30, 2023 14:53
A pack of curated resources for your self-study IELTS

IELTS Self-study

I have attched some links, which you can use them for your IELTS preparation.

Courses

These are some paid courses.

@AnuragAnalog
AnuragAnalog / CONNECT_REMOTELY.md
Created August 28, 2021 14:33
I have listed down some of the ways in which you can connect to your remote accounts to some of the popular tools/IDEs
@AnuragAnalog
AnuragAnalog / milne.py
Created July 21, 2021 07:12
Milane Method Implementation in Python
#!/usr/bin/python3.6
# A finite-difference method for the solution of the Cauchy problem for systems of first-order ordinary differential equations:
#
# dy/dx = f(x, y)
#
# The method uses the finite-difference formula:
# yi - yi-1 = 2hf(xi-1, yi-1).
# xi = x0+ih, i = 0,1,2,3,.....
#
@AnuragAnalog
AnuragAnalog / milne.c
Created July 21, 2021 07:10
Milane Method Implementation in C
/*
A finite-difference method for the solution of the Cauchy problem for systems of first-order ordinary differential equations:
dy/dx = f(x, y)
The method uses the finite-difference formula:
yi - yi-1 = 2hf(xi-1, yi-1).
xi = x0+ih, i = 0,1,2,3,.....
The predictor-corrector Milne method uses a pair of finite-difference formulas:
@AnuragAnalog
AnuragAnalog / rungekutta.py
Created July 20, 2021 06:00
Runge Kutta Method Implementation in Python
#!/usr/bin/python3.6
# In numerical analysis, the Runge–Kutta methods are a family of implicit and explicit iterative methods, which include the well-known routine called the Euler Method, used in temporal discretization for the approximate solutions of ordinary differential equations. These methods were developed around 1900 by the German mathematicians Carl Runge and Martin Kutta.
#
# The most widely known member of the Runge–Kutta family is generally referred to as "RK4", "classical Runge–Kutta method" or simply as "the Runge–Kutta method".
#
# Let an initial value problem be specified as follows:
# y˙ = f(t, y), y(t0) = y0.
#
# Here y is an unknown function (scalar or vector) of time t, which we would like to approximate; we are told that y˙, the rate at which y changes, is a function of t and of y itself. At the initial time t0 the corresponding y value is y0. The function f and the data t0, y0 are given.
@AnuragAnalog
AnuragAnalog / rungekutta.c
Created July 20, 2021 05:56
Runge Kutta Method Implementation in C
/*
In numerical analysis, the Runge–Kutta methods are a family of implicit and explicit iterative methods, which include the well-known routine called the Euler Method, used in temporal discretization for the approximate solutions of ordinary differential equations. These methods were developed around 1900 by the German mathematicians Carl Runge and Martin Kutta.
The most widely known member of the Runge–Kutta family is generally referred to as "RK4", "classical Runge–Kutta method" or simply as "the Runge–Kutta method".
Let an initial value problem be specified as follows:
y˙ = f(t, y), y(t0) = y0.
Here y is an unknown function (scalar or vector) of time t, which we would like to approximate; we are told that y˙, the rate at which y changes, is a function of t and of y itself. At the initial time t0 the corresponding y value is y0. The function f and the data t0, y0 are given.
@AnuragAnalog
AnuragAnalog / secant.py
Created July 19, 2021 02:29
Secant Method Implementation in Python
#!/usr/bin/python3.6
# This method is quite similar to that of the Regula-Falsi method except for the
# condition f(x1).f(x2) < 0. Here the graph of the function y = f(x) in the
# neighborhood of the root is approximated by a secant line or chords. Further,
# the interval at each iteration may not contain the root.
# Let the limits of interval initially be x0 and x1.
# Then the first approximation is given by:
# x2 = x1 – [(x1-x0)/f(x1)-f(x0)]f(x1)
@AnuragAnalog
AnuragAnalog / secant.c
Created July 19, 2021 02:27
Secant Method Implementation in C
/* This method is quite similar to that of the Regula-Falsi method except for the
condition f(x1).f(x2) < 0. Here the graph of the function y = f(x) in the
neighborhood of the root is approximated by a secant line or chords. Further,
the interval at each iteration may not contain the root.
Let the limits of interval initially be x0 and x1.
Then the first approximation is given by:
x2 = x1 – [(x1-x0)/f(x1)-f(x0)]f(x1)
Again, the formula for successive approximation in general form is
x(n+1) = xn - [xn - x(n-1)/f(xn)-f(x(n-1))]f(xn) */
@AnuragAnalog
AnuragAnalog / newton_raphson.py
Created July 18, 2021 09:11
Newton Raphson method Implementation in Python
#!/usr/bin/python3.6
# This method is generally used to improve the result obtained by one of the
# previous methods. Let x0 be an approximate root of f(x) = 0 and let x1 = x0 + h be
# the correct root so that f(x1) = 0.
# Expanding f(x0 + h) by Taylor’s series, we get
# f(x0) + hf′(x0) + h2/2! f′′(x0) + ...... = 0
# Since h is small, neglecting h2 and higher powers of h, we get
# f(x0) + hf′(x0) = 0 or h = – f(x0)/f'(x0)
# A better approximation than x0 is therefore given by x1, where