Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ramsays on github.
  • I am ramsays (https://keybase.io/ramsays) on keybase.
  • I have a public key ASATMu9uEKm7U6EJw2s4pWJWkYAbI8rT671hzIlqXjPlygo

To claim this, I am signing this object:

@ramsays
ramsays / newtonraphson.py
Created March 7, 2019 03:39
Newton-Raphson Algorithm
import numpy as np
def function(xy):
x, y = xy
return [2*x + y**2 - 8,
x**2 - y**2 + x*y - 3]
def jacobian(xy):
x, y = xy
return [[2, 2*x],
@ramsays
ramsays / gcd.js
Last active January 29, 2019 19:47
GCD Javascript Algorithm
var a, b, u, g, x, y;
u = 1;
x = 0;
a = 527; // Set here
b = 1258; // Set here
g = a;
y = b;
if (b == 0) { // For part d
console.log("Division by zero error. Set b > 0.");
return;