Skip to content

Instantly share code, notes, and snippets.

View niranjannitesh's full-sized avatar

Nitesh Kumar Niranjan niranjannitesh

View GitHub Profile
import csv
def gradient_desc(m, b, data, learning_rate):
"""Gradient Descent"""
N = len(data)
for i in range(N):
x = float(data[i][0])
y = float(data[i][1])
error = y - (m * x + b)
import csv
def gradient_desc(m, b, data, learning_rate):
"""Gradient Descent"""
N = len(data)
for i in range(N):
x = float(data[i][0])
y = float(data[i][1])
error = y - (m * x + b)
const fs = require('fs')
module.exports = function (babel) {
return {
visitor: {
ExportNamedDeclaration(path, state) {
const filename = state.file.opts.filename;
const name = path.node.declaration.declarations[0].id.name
if (name !== 'php') return