Skip to content

Instantly share code, notes, and snippets.

View sidsbrmnn's full-sized avatar
🎯
Focusing

Siddharth Subramanian sidsbrmnn

🎯
Focusing
View GitHub Profile
@sidsbrmnn
sidsbrmnn / gulpfile.js
Last active November 12, 2019 19:12
Gulp init
///////////////
// gulpfile.js
///////////////
import gulp from 'gulp';
import sass from 'gulp-sass';
const path = {
src: './src/scss/**/*.scss',
dest: './src/css'
@sidsbrmnn
sidsbrmnn / lab4.awk
Last active December 10, 2019 14:20
Implement simple ESS and with transmitting nodes in wireless LAN by simulation and determine the performance with respect to transmission of packets.
BEGIN {
c1 = 0;
c2 = 0;
p1 = 0;
p2 = 0;
t1 = 0;
t2 = 0;
}
{
@sidsbrmnn
sidsbrmnn / lab5.tcl
Last active December 5, 2022 07:31
Implement and study the performance of GSM on NS2/NS3 (using MAC layer) or equivalent environment.
set stop 100;
set type gsm;
set minth 0;
set maxth 30;
set adaptive 1;
set flows 0;
set window 30;
set web 2;
set opt(wrap) 100;
set opt(srcTrace) is;
@sidsbrmnn
sidsbrmnn / lab6.tcl
Last active June 2, 2024 23:52
Implement and study the performance of CDMA on NS2/NS3 (using stack called call net) or equivalent environment.
set stop 100;
set type cdma;
set minth 0;
set maxth 30;
set adaptive 1;
set flows 0;
set window 30;
set web 2;
set opt(wrap) 100;
set opt(srcTrace) is;
import java.util.Arrays;
import java.util.Scanner;
public class BellmanFord {
private int vertexCount;
private int[][] graph;
private final int INFINITY = Integer.MAX_VALUE;
BellmanFord(int vertexCount) {
this.vertexCount = vertexCount;
import java.util.Scanner;
public class LeakyBucket {
public static void main(String[] args) throws InterruptedException {
Scanner sc = new Scanner(System.in);
System.out.print("Enter bucket size: ");
final int size = sc.nextInt();
System.out.print("Enter output rate: ");
final int outRate = sc.nextInt();
@sidsbrmnn
sidsbrmnn / Crc.java
Last active December 10, 2019 14:22
import java.util.Scanner;
public class Crc {
static Scanner sc = new Scanner(System.in);
static void readArray(int[] arr) {
for (int i = 0; i < arr.length; i++) {
arr[i] = sc.nextInt();
}
}
import java.math.BigInteger;
public class Rsa {
public static void main(String[] args) {
BigInteger publicKey = new BigInteger(args[0]);
BigInteger secretKey = new BigInteger(args[1]);
BigInteger n = new BigInteger(args[2]);
BigInteger m = new BigInteger(args[3]);
BigInteger e = m.modPow(publicKey, n);
import java.io.*;
import java.net.Socket;
import java.util.Scanner;
public class TcpClient {
public static void main(String[] args) {
Socket socket;
while (true) {
Scanner sc = new Scanner(System.in);
import java.io.IOException;
import java.net.*;
import java.util.Scanner;
public class UdpClient {
static StringBuilder data(byte[] buf) {
if (buf == null) return null;
StringBuilder message = new StringBuilder();
int i = 0;