Skip to content

Instantly share code, notes, and snippets.

View Ghost---Shadow's full-sized avatar
🥔
eating potatoes

Souradeep Nanda Ghost---Shadow

🥔
eating potatoes
View GitHub Profile
@Ghost---Shadow
Ghost---Shadow / PageReplacement.c
Last active April 27, 2016 01:53
Memory Page Replacement Strategies for learning
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#define FRAMES 4
#define ITERATIONS 10
// Check if the page is already in the frame
int hasPageInFrame(int *a,int request){
int i;
@Ghost---Shadow
Ghost---Shadow / plag.py
Created December 11, 2015 05:01
Using NLTK to replace all words in a string with their synonyms.
from nltk.corpus import wordnet
from nltk.tokenize import word_tokenize
from random import randint
import nltk.data
# Load a text file if required
text = "Pete ate a large cake. Sam has a big mouth."
output = ""
# Load the pretrained neural net
@Ghost---Shadow
Ghost---Shadow / SimpleKalmanFilter.cpp
Last active August 29, 2015 14:26
A very simple Kalman Filter
#include<iostream>
#include<random>
#include<fstream>
#include<vector>
#include<chrono>
using namespace std;
float exampleFunction(float x){
return x;