Skip to content

Instantly share code, notes, and snippets.

View chingjunetao's full-sized avatar
🐳

June Tao Ching chingjunetao

🐳
View GitHub Profile
import matplotlib.pyplot as plt
import numpy as np
import math
import pandas as pd
titanic_df = pd.read_csv("titanic_test_data.csv")
@chingjunetao
chingjunetao / process-fb-message.py
Last active February 7, 2022 08:26
Process Facebook Message
import os
import json
import datetime
from tqdm import tqdm
import csv
from datetime import datetime
directory = "messages/inbox"
folders = os.listdir(directory)
@chingjunetao
chingjunetao / employee.py
Created April 11, 2020 08:25
Argparse example 3
parser.add_argument("--country",choices=["Singapore", "United States", "Malaysia"], help="Country/Region of Employee")
COUNTRY = args.country
print("Country : " + str(COUNTRY))
@chingjunetao
chingjunetao / employee.py
Last active April 11, 2020 07:52
Argparse example 2
from distutils.util import strtobool
parser.add_argument("--isFullTime", default=True, type=strtobool, help="Is this Employee Full Time? (default: %(default)s)")
FULLTIME = args.isFullTime
if FULLTIME:
print(NAME + " is a full time employee.")
else:
print(NAME + " is not a full time employee.")
@chingjunetao
chingjunetao / employee.py
Last active April 11, 2020 06:34
Argparse example 1
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="""
This script is going to create an employee profile.
""")
parser.add_argument("name", help="Name of Employee")
parser.add_argument("title", help="Job Title of Employee")
parser.add_argument("--address", help="Address of Employee")