Skip to content

Instantly share code, notes, and snippets.

View lordzuko's full-sized avatar

Himanshu Maurya lordzuko

View GitHub Profile
import numpy as np
x = [1,1] # target
y = [3,4] # weight matrix
step = 0
while True:
d = np.dot(x,y) -10
if abs(d) < 1e-10:
print "done", step, x, y
break
y += -d*0.1 # learning rate 0.1 , and updating the weight matrix
@lordzuko
lordzuko / APRunner.java
Created March 5, 2017 09:23
Multithreaded sum of AP & check if two lines intersect
import java.util.Scanner;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* Created by himan on 3/5/2017.
*/
public class APRunner {
public int sumAP(int A, int D, int N){
@lordzuko
lordzuko / APRunner.java
Created March 5, 2017 09:22
Multithreaded sum of AP & Checking if two lines intersect
import java.util.Scanner;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* Created by himan on 3/5/2017.
*/
public class APRunner {
public int sumAP(int A, int D, int N){
@lordzuko
lordzuko / data.csv
Last active January 25, 2017 11:04
An Implementation of Gradient descent in python & numpy
32.502345269453031 31.70700584656992
53.426804033275019 68.77759598163891
61.530358025636438 62.562382297945803
47.475639634786098 71.546632233567777
59.813207869512318 87.230925133687393
55.142188413943821 78.211518270799232
52.211796692214001 79.64197304980874
39.299566694317065 59.171489321869508
48.10504169176825 75.331242297063056
52.550014442733818 71.300879886850353
@lordzuko
lordzuko / credentials.json
Last active October 26, 2023 13:30
Automating login using BeautifulSoup & Requests module in python over SSO Raw
{
"ssousername":"example@oracle.com",
"password":"put your password here"
}
@lordzuko
lordzuko / LICENSE.txt
Last active August 29, 2015 14:06 — forked from aemkei/LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE