Skip to content

Instantly share code, notes, and snippets.

View rajacsp's full-sized avatar

Raja CSP rajacsp

View GitHub Profile
import pandas as pd
import random
from faker import Faker
faker = Faker()
COUNT = 1000000
def generate_names(count, type):
@rajacsp
rajacsp / tact-notes-setup
Created March 29, 2021 09:18
Tact Notes Setup
How to setup TactNotes?
Mirror the TactNotes repo:
git clone --bare git@github.com:tactlabs/tactnotes.git
cd tactnotes.git
git push --mirror git@github.com:abc/mynotes.git
cd ..
rm -rf tactnotes.git
Clone your git repo now:
@rajacsp
rajacsp / gist:8b0dc26c4e20c43918eecbeec382668c
Created September 14, 2019 15:41
MySql Connection Manager with AllowPublicKeyRetrieval False
package com.learned;
import java.sql.Connection;
import java.sql.SQLException;
import com.mysql.cj.jdbc.MysqlDataSource;
public class ConnectionManager {
public static final String serverTimeZone = "UTC";
package org.rj;
import java.sql.*;
public class Oracle12CEETest {
private final static String DB_URL = "jdbc:oracle:thin:@//127.0.0.1:1521/orcl";
private final static String USER = "system";
private final static String PASS = "oracle";
Postgres-Docker Installation:
docker pull postgres
mkdir -p $HOME/docker/volumes/postgres
docker run --name pgdocker -e POSTGRES_PASSWORD=postgres -d -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data postgres
docker exec -it pgdocker bash
@rajacsp
rajacsp / virtualbox-vagrant-nuclear-option.sh
Created March 23, 2019 01:27 — forked from tjbenton/virtualbox-vagrant-nuclear-option.sh
Completely uninstall VirtualBox and Vagrant and reinstall through brew
# update brew because `brew update` is broken after updating to El Capitan
cd `brew --prefix`
git fetch origin
git reset --hard origin/master
sudo shutdown -r now # restart the computer
# open terminal and run the following
brew update
brew cleanup
@rajacsp
rajacsp / my-alias
Created March 14, 2019 00:38 — forked from rajasgs/my-alias
alias blah="/usr/bin/blah"
alias lh="ls -hal"
alias hiry="history"
alias clearme="history -c"
alias cls="clear"
import os
import nltk
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize
from nltk.stem import PorterStemmer
porter_stemmer = PorterStemmer()
def get_dir():
dir_path = os.path.dirname(os.path.realpath(__file__))
from nltk.sentiment.vader import SentimentIntensityAnalyzer
sid = SentimentIntensityAnalyzer()
def get_sentiment(sentence):
sentiment_score = sid.polarity_scores(sentence)
from nltk.sentiment.vader import SentimentIntensityAnalyzer
sid = SentimentIntensityAnalyzer()
def get_sentiment(sentence):
return sid.polarity_scores(sentence)