This file contains hidden or 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 pandas as pd | |
import random | |
from faker import Faker | |
faker = Faker() | |
COUNT = 1000000 | |
def generate_names(count, type): |
This file contains hidden or 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
How to setup TactNotes? | |
Mirror the TactNotes repo: | |
git clone --bare [email protected]:tactlabs/tactnotes.git | |
cd tactnotes.git | |
git push --mirror [email protected]:abc/mynotes.git | |
cd .. | |
rm -rf tactnotes.git | |
Clone your git repo now: |
This file contains hidden or 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
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"; |
This file contains hidden or 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
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"; |
This file contains hidden or 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
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 |
This file contains hidden or 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
# 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 |
This file contains hidden or 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
alias blah="/usr/bin/blah" | |
alias lh="ls -hal" | |
alias hiry="history" | |
alias clearme="history -c" | |
alias cls="clear" |
This file contains hidden or 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 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__)) |
This file contains hidden or 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
from nltk.sentiment.vader import SentimentIntensityAnalyzer | |
sid = SentimentIntensityAnalyzer() | |
def get_sentiment(sentence): | |
sentiment_score = sid.polarity_scores(sentence) |
This file contains hidden or 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
from nltk.sentiment.vader import SentimentIntensityAnalyzer | |
sid = SentimentIntensityAnalyzer() | |
def get_sentiment(sentence): | |
return sid.polarity_scores(sentence) | |
NewerOlder