- Log in to AWS
- Go to a sensible region
- Start a new instance with Ubuntu Trusty (14.04) - compute-optimised instances have a high vCPU:memory ratio, and the lowest-cost CPU time.
c4.2xlarge
is a decent choice. - Set security group (firewall) to have ports 22, 80, and 443 open (SSH, HTTP, HTTPS)
- If you want a static IP address (for long-running instances) then select Elastic IP for this VM
- If you want to use HTTPS, you'll probably need a paid certificate, or to use Amazon's Route 53 to get a non-Amazon domain (to avoid region blocking).
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
Sub InputFill() | |
'Cells(Cells(1, "B").Value, Cells(2, "B").Value ) ' ¨Ï¥ÎªÌ«ü©wªº°_©lÀx¦s®æ | |
'Cells( Cells(3, "B").Value, Cells(4, "B").Value ) '¨Ï¥ÎªÌ«ü©wªºµ²§ôÀx¦s®æ | |
Range(Cells(Range("B1").Value, Range("B2").Value), Cells(Range("B3").Value, Range("B4").Value)).Value = Range("B5").Value | |
End Sub |
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
Sub CalculateCorr4() | |
Dim corrSheet As Worksheet | |
Set corrSheet = Worksheets("相關性分析") | |
Dim portSheet As Worksheet | |
Set portSheet = Worksheets("投資組合報酬分析") | |
Dim corr As Double | |
Dim i As Integer | |
Dim j As Integer | |
For j = 2 To 13 |
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
Sub CalculateCorr4() | |
Dim corrSheet As Worksheet | |
Set corrSheet = Worksheets("相關性分析") | |
Dim portSheet As Worksheet | |
Set portSheet = Worksheets("投資組合報酬分析") | |
Dim corr As Double | |
Dim i As Integer | |
Dim j As Integer | |
For j = 2 To 13 |
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
Sub CalculateCorr4() | |
Dim corrSheet As Worksheet | |
Set corrSheet = Worksheets("闽┦だ猂") | |
Dim portSheet As Worksheet | |
Set portSheet = Worksheets("щ戈舱厨筍だ猂") | |
Dim corr As Double | |
Dim i As Integer | |
For i = 2 To 13 | |
corr = Application.WorksheetFunction.Correl(portSheet.Range("B2:B95").Value, _ |
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 email, getpass, imaplib, os | |
detach_dir = '.' # directory where to save attachments (default: current) | |
user = raw_input("Enter your GMail username:") | |
pwd = getpass.getpass("Enter your password: ") | |
# connecting to the gmail imap server | |
m = imaplib.IMAP4_SSL("imap.gmail.com") | |
m.login(user,pwd) | |
m.select("cs2043") # here you a can choose a mail box like INBOX instead |
NewerOlder