Skip to content

Instantly share code, notes, and snippets.

View MayukhSobo's full-sized avatar
🎯
Focusing

Mayukh Sarkar MayukhSobo

🎯
Focusing
View GitHub Profile
@MayukhSobo
MayukhSobo / websites.txt
Created January 5, 2020 18:19
List of all the cool websites
https://cdecl.org/ - get the meaning of complicated c code declarations.
@MayukhSobo
MayukhSobo / matrix.h
Created December 26, 2019 19:18
A basic Matrix class
#ifndef DP2__MATRIX_H
#define DP2__MATRIX_H
#include <algorithm>
#include <cstdio>
#include <memory>
#include <stdexcept>
template <typename T>
class Matrix {
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <tuple>
using namespace std;
//std::string greeting(const std::string &name="Mayukh") {
// return "Hello " + name;
//}
@MayukhSobo
MayukhSobo / sent2vec.py
Last active November 30, 2018 13:23
Generic sent2vec in python
def sent2vec(sentence, model, method='tfidf', **kwargs):
"""
Generic function to convert a sentence to a vector using
avg or TFIDF vecorization
"""
##### It is recommended to pass seperate stopwords #####
stopwords = kwargs.get('stopwords')
if stopwords is None:
from sklearn.feature_extraction.stop_words import ENGLISH_STOP_WORDS
@MayukhSobo
MayukhSobo / sqlite2csv.go
Created October 12, 2018 13:24
Dump Data from SQLite to CSV
package main
import (
"encoding/csv"
"os"
"reflect"
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/sqlite"
)
{
"auto_complete_commit_on_tab": true,
"color_pick_upcase": true,
"color_scheme": "Packages/Enlightened Color Scheme/enlightened.tmTheme",
"dplus_bright_fonts": true,
"dplus_bright_status_bar": true,
"dplus_fat_tabs": false,
"file_exclude_patterns":
[
"*.pyc",
@MayukhSobo
MayukhSobo / timestamp.py
Created November 1, 2017 12:28
Generate time stamp interval for CSV dummy data
"""
Common dummy data generation scripts
"""
from random import randint
from datetime import datetime as dt
from datetime import timedelta
start_times = []
end_times = []
@MayukhSobo
MayukhSobo / CMakeLists.txt
Created December 2, 2014 01:11
This projects shows that how OOPs in C++11 & its extensive form can be used to demonstrate a simple concept of Fibonacii Series
cmake_minimum_required(VERSION 2.8.4)
project(test)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.cpp test.h test.cpp)
add_executable(test ${SOURCE_FILES})