Skip to content

Instantly share code, notes, and snippets.

View gourab5139014's full-sized avatar

Gourab Mitra gourab5139014

View GitHub Profile
@gourab5139014
gourab5139014 / enrich_linkedin_profiles.py
Created April 17, 2026 01:45
A Python utility for batch enriching a list of LinkedIn profiles from a CSV file. It leverages search aggregators (DuckDuckGo Search) to find professional metadata such as name, location, current focus, education, technical skills, and GitHub links, then synthesizes the findings into a structured JSON repository.
import pandas as pd
import json
import time
from duckduckgo_search import DDGS
def enrich_profiles(csv_input, json_output):
"""
Reads a CSV of LinkedIn URLs and enriches them with professional metadata
found via search snippets, saving the result to a structured JSON.
"""
@gourab5139014
gourab5139014 / init.lua
Created July 8, 2024 16:40
Backup on new NVIM
vim.cmd("set expandtab")
vim.cmd("set tabstop=4")
vim.cmd("set softtabstop=4")
vim.cmd("set shiftwidth=4")
vim.g.mapleader=" "
vim.cmd("set number")
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
@gourab5139014
gourab5139014 / ScreenSqliteJoin_v1.py
Created August 20, 2018 23:25
Extract timestamps for screen events from PhoneLab logs
# coding: utf-8
# In[118]:
import gzip, io, os.path, json
# In[119]:
@gourab5139014
gourab5139014 / create_hr_schema.sql
Last active September 4, 2026 12:44
Script to create Oracle XE's HR schema in Postgres
-- Best used for learning purposes. Original developer also has an ER diagram available at https://tinyurl.com/oracle-hr-schema-postgres
--create tables
BEGIN;
CREATE TABLE regions
( region_id SERIAL primary key,
region_name VARCHAR(25)
);
CREATE TABLE countries
@gourab5139014
gourab5139014 / geocoded_Tweets.R
Created February 18, 2017 02:11 — forked from dsparks/geocoded_Tweets.R
Gathering Tweets, geocoding users, and plotting them
doInstall <- TRUE
toInstall <- c("twitteR", "dismo", "maps", "ggplot2")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
searchTerm <- "#rstats"
searchResults <- searchTwitter(searchTerm, n = 1000) # Gather Tweets
tweetFrame <- twListToDF(searchResults) # Convert to a nice dF
userInfo <- lookupUsers(tweetFrame$screenName) # Batch lookup of user info
@gourab5139014
gourab5139014 / longlat.r
Last active October 6, 2015 10:42
The extractLongLatData() uses the ggmap API in R to extract longitude and latitude data for a set of pincodes supplied in a csv file
extractLongLatData <- function(file)
{
library(ggmaps) #In case you dont have the package, use this command - install.packages(ggmaps, dependencies = TRUE)
data <- read.csv(file)
v <- as.list(data["pincode"]) #assuming the attribute containing the pincodes in the supplied CSV file is named "pincode"
pc <- sapply(v,as.character)
pc <- sapply(pc,function(x) { paste(x,"India", sep = " ")}) #change the argument in paste() from "India" to whichever country the pincodes belong to
longlatpc <- geocode(pc, source = "google")
library(xlsx) #In case you dont have the package, use this command - install.packages(xlsx, dependencies = TRUE)
write.xlsx2(longlatpc,'longlatpincode.xlsx')
@gourab5139014
gourab5139014 / wordCloud.r
Created August 27, 2015 14:15
Prepare a wordcloud of opinions regarding selected current affairs in India
tweets <- searchTwitter("hardik patel", n = 1000)
text <- sapply(tweets, function(x) x$getText())
dat3 <- grep("text",iconv(text,"latin1","ASCII",sub = "text"))
dat4 <- text[-dat3]
dat5 <- paste(dat4, collapse = ", ")
corpus <- Corpus(VectorSource(dat5))
tdm = TermDocumentMatrix(
corpus,
control = list(
@gourab5139014
gourab5139014 / ProducerConsumerPattern.java
Last active August 29, 2015 14:10
Producer Consumer Problem in Java using Blocking Queue
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.logging.Level;
import java.util.logging.Logger;
public class ProducerConsumerPattern
{
public static void main(String args[])
{
BlockingQueue sharedQueue = new LinkedBlockingQueue<>();
@gourab5139014
gourab5139014 / ProducerConsumerTest.java
Last active August 29, 2015 14:10
Implementation of Producer Consumer Problem in Java using threads
import java.util.logging.Level;
import java.util.logging.Logger;
//Producer Consumer using Threads
public class ProducerConsumerTest
{
public static void main(String args[])
{
@gourab5139014
gourab5139014 / URL-Redirection
Created November 28, 2014 14:46
Purpose : One click access to proxy server for blocked pages
javascript: (function() {
a = document.location.href;
a = a.replace(/.*?:\/\//g, "");
b = "http://bcdboot.appspot.com/";
c = b.concat(a);
this.document.location.href = c;
})();