Skip to content

Instantly share code, notes, and snippets.

View titipata's full-sized avatar
:octocat:

Titipat Achakulvisut titipata

:octocat:
View GitHub Profile
@titipata
titipata / optmiz_pb.md
Last active August 29, 2015 14:17
Optimization problem for assigning portfolio weight for each stock price

Portfolio Optimization (Stock Market)

Basically, we want to assign weight to history stock price, higher weight means good stock. So the question is: I need to maximize cost D, where we define as,

D = w' * std / sqrt (w' * Sigma * w)

where

  • w is portfolio weight
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@titipata
titipata / s3_hosting.md
Last active August 29, 2015 14:18
hosting web
@titipata
titipata / k-lab.md
Last active August 29, 2015 14:18
Knowledge lab
@titipata
titipata / email_py.md
Last active August 29, 2015 14:19
Sending email via Python

Email Fetching Stuff

Sending Email using Python

  • See Stack overflow link here
  • Python also has documentation here

Parsing Email using Python

  • See how to parse email to python here
@titipata
titipata / ssn_nu.md
Last active August 29, 2015 14:20
Getting SSN for International student at Northwestern

SSN for J-1 student at Northwestern University

  • Here is the link to International Office at Northwestern U

Complete the following application steps:

  • Obtain a Job Offer Letter (see a sample below) from the NU office/department that will employ you.
  • Using this Job Offer Letter, F-1 and J-1 students on-campus must request a Social Security Letter from the International Office.
  • F-1 Student Social Security Letter Request form

Can you test this?

def normalize(X):
    count = X.shape[1]
    for i in range(count):
        x = X[:,i]
        # There may be some nans, from missing values in data. 
        # A better strategy would be interpolate, but for now we just
 # use the mean.
@titipata
titipata / parse_affil.md
Last active August 29, 2015 14:22
Note for repository that
@titipata
titipata / sawbo_example.md
Last active August 29, 2015 14:22
Sawbo notebook for N' Pai

So here we load useful library from python

import pandas as pd
import numpy as np
from datetime import datetime

You can use pd.read_csv to read csv file. They have function to read SQL table or excel too.

@titipata
titipata / wget.md
Created July 24, 2015 21:07
Load PDF from url.txt link

Load all PDF from provided link

wget --content-disposition  -i urls.txt