This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Master(sda,scl,clk); | |
inout wor sda; | |
input clk; | |
output reg scl; | |
reg scl2; | |
reg ack; | |
reg direction; | |
reg alpha; | |
reg [6:0] address; | |
reg [7:0] temp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import numpy as np | |
reward = np.array([[0, -10, 0, -1], | |
[0, -1, -10, -1], | |
[0, -1, -1, 10], | |
[0, -10, -1, -1], | |
[-10, -1, 0, -1], | |
[-1, -1, -10, -1], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import numpy as np | |
reward = np.array([[0, -1, 0, -10], | |
[0, -1, -1, -1], | |
[0, -10, -10, -1], | |
[0, 100, -1, 0], | |
[-1, -1, 0, -1], | |
[-10, -1, -1, -10], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import numpy as np | |
reward = np.array([[0, -1, 0, -10], | |
[0, -1, -1, -1], | |
[0, -10, -10, -1], | |
[0, 100, -1, 0], | |
[-1, -1, 0, -1], | |
[-10, -1, -1, -10], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main{ | |
public static void main(String args[]){ | |
LinkedList l = new LinkedList(); | |
l.append(1); | |
l.append(2); | |
l.append(3); | |
l.append(4); | |
System.out.println(l.toString()); | |
l.insertAt(2, 10); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main{ | |
public static void main(String[] args){ | |
BinaryTree b = new BinaryTree(); | |
b.addNode(1,"Shashi"); | |
System.out.println(b.toString()); | |
b.addNode(2,"Naruto"); | |
System.out.println(b.toString()); | |
b.addNode(5,"Madara"); | |
b.addNode(4,"Obito"); | |
System.out.println(b.toString()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Slave1(clk,miso,mosi,ss); | |
input clk; | |
input [0:0]mosi; | |
input ss; | |
output reg[0:0]miso; | |
reg [7:0] address,data;reg x1; | |
reg [7:0] arr [0:199]; | |
reg k; | |
reg [6:0] ione=0; | |
initial begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Master(scl,mosi,miso,ss1,ss2,ss3,ss4); | |
output reg scl; | |
input [0:0]miso; | |
output reg [0:0]mosi; | |
output reg ss1; | |
output reg ss2; | |
output reg ss3; | |
output reg ss4; | |
reg [16:0]xx; | |
initial begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Slave1(clk,miso,mosi,ss); | |
input clk; | |
input [0:0]mosi; | |
input ss; | |
output reg[0:0]miso; | |
reg [7:0] address,data;reg x1; | |
reg [7:0] arr [0:309]; | |
reg k; | |
reg [6:0] i=0; | |
initial begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Slave2(clk,miso,mosi,ss); | |
input clk; | |
input [0:0]mosi; | |
input ss; | |
output reg[0:0]miso; | |
reg [7:0] address,data;reg x1; | |
reg [7:0] arr [0:199]; | |
reg k; | |
reg [6:0] i=0; | |
initial begin |