Skip to content

Instantly share code, notes, and snippets.

View deep5050's full-sized avatar
💻
EMBEDDED SYSTEM

Dipankar Pal deep5050

💻
EMBEDDED SYSTEM
View GitHub Profile
var bytesToSize = function (a, b) {
if (0 === a) return "0 Bytes";
var c = 1024, d = b || 2, e = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"],
f = Math.floor(Math.log(a) / Math.log(c));
return parseFloat((a / Math.pow(c, f)).toFixed(d)) + " " + e[f]
}
@deep5050
deep5050 / generic_backprop.py
Created October 24, 2019 04:00
generic backpropagation with auto tuning
import numpy as np
import matplotlib.pyplot as plt
np.random.seed(100)
class Layer:
"""
Represents a layer (hidden or output) in our neural network.
"""
@deep5050
deep5050 / chandy-lamport.py
Created November 1, 2019 02:53
chandy lamport implementation
# Dipankar Pal (25th sep 2019)
import queue
class node(object):
def __init__(self, name, balance):
self.name = name
self.temp_state = []
self.recorded_state = []
@deep5050
deep5050 / SOFT_COMPUTING.ipynb
Last active January 4, 2020 20:57
bacpropagation, GA based weight determination, generic GA, perceptron learning
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@deep5050
deep5050 / SOFT_COMPUTING_Practice.ipynb
Last active January 4, 2020 20:55
back propagation,GA based weight determination , generic GA, perceptron learning
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@deep5050
deep5050 / os.txt
Last active January 6, 2020 05:56
all OS assignments ----- chandy lamport,misra hass , raymond's tree , ho ramamurthy ------
----------------------------------------------------------------------------------------------------------------------------
graph initiator
----------------------------------------------------------------------------------------------------------------------------
#include<stdio.h>
#include<stdlib.h>
int main()
{
int n,**adj,incount0=0,i,j,*source,*non_sink,i1=0,i2=0;
printf("\nEnter number of nodes:");
@deep5050
deep5050 / os_algos_pythhon.txt
Last active January 6, 2020 15:09
os assignments alorthm
-------------------------------------------------
graph initiator
import sys
from Graph import Graph
@deep5050
deep5050 / simple_server.c
Last active April 5, 2020 10:27
./server <port> <backlog>
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#include<sys/socket.h>
#include<sys/types.h>
#include<string.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include<signal.h>
@deep5050
deep5050 / client.c
Last active April 5, 2020 10:28
./client <port>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <string.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <signal.h>
@deep5050
deep5050 / dipankar_server_process.c
Last active April 5, 2020 10:26
USAGE: <port> <backlog> : handled with multi processes
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <string.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <signal.h>