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 numpy as np | |
import re | |
from nltk.corpus import brown | |
import matplotlib.pyplot as plt | |
import time | |
def tokenize(text): | |
pattern = re.compile(r'[A-Za-z]+[\w^\']*|[\w^\']*[A-Za-z]+[\w^\']*') | |
try: |
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
#include <iostream> | |
#include <vector> | |
#include <map> | |
template <typename T> | |
struct CircularQueue { | |
std::pair<T, T> data; | |
size_t size; | |
CircularQueue* prev, *next; | |
CircularQueue(std::pair<T, T> data = std::make_pair(0, 0)) { this->data = data; prev = next = nullptr; size = 0; } |
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
/** | |
Code for https://journaldev.com article | |
Purpose: A Binary Search Tree Implementation | |
@author: Vijay Ramachandran | |
@date: 08-03-2020 | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct TreeNode { |
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
/** | |
Code for https://journaldev.com article | |
Purpose: A Min Heap Implementation, representing the Binary Tree as an Array | |
@author: Vijay Ramachandran | |
@date: 27-02-2020 | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> |
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
/** | |
Code for https://journaldev.com article | |
Purpose: A Trie Data Structure Implementation in C | |
@author: Vijay Ramachandran | |
@date: 20-02-2020 | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |
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
/** | |
Code for https://journaldev.com article | |
Purpose: A Depth First Search Implementation | |
@author: Vijay Ramachandran | |
@date: 14-02-2020 | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <limits.h> |
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
/** | |
Code for https://journaldev.com article | |
Purpose: A Hash Table Implementation | |
@author: Vijay Ramachandran | |
@date: 01-02-2020 | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |
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
/** | |
Code for https://journaldev.com article | |
Purpose: Performs Level Order Traversal across a Binary Tree | |
@author: Vijay Ramachandran | |
@date: 28-01-2020 | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> |
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
#include<stdio.h> | |
#include<stdlib.h> | |
#include<pthread.h> | |
#include<string.h> | |
#include<unistd.h> | |
#include<sys/types.h> | |
#include<signal.h> | |
static void shellHandler(int signo, siginfo_t* info, void* context) | |
{ |