-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
773 changed files
with
125,144 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,9 @@ class ShowResultViewController: UIViewController, MFMailComposeViewControllerDel | |
print(hitRate) | ||
|
||
} | ||
@IBAction func sendEmailBtnAction() { | ||
self.sendEmail() | ||
} | ||
|
||
func createCsvFrom(result: [DotPosition: [PredictPoint]]) -> String{ | ||
var stringResult: String = "" | ||
|
@@ -32,6 +35,7 @@ class ShowResultViewController: UIViewController, MFMailComposeViewControllerDel | |
stringResult.append("\(predictPoint.posX), \(predictPoint.posY),\(predictPoint.toScreenPoint().x),\(predictPoint.toScreenPoint().y)\n") | ||
} | ||
} | ||
print(stringResult) | ||
return stringResult | ||
} | ||
|
||
|
@@ -40,7 +44,8 @@ class ShowResultViewController: UIViewController, MFMailComposeViewControllerDel | |
mailMVC.mailComposeDelegate = self | ||
mailMVC.setToRecipients(["[email protected]"]) | ||
mailMVC.setSubject("send position") | ||
|
||
mailMVC.setMessageBody(self.createCsvFrom(result: predictResults), isHTML: false) | ||
self.present(mailMVC, animated: true, completion: nil) | ||
} | ||
|
||
func calAccuracy(result:[DotPosition: [PredictPoint]]) -> Double{ | ||
|
129 changes: 129 additions & 0 deletions
129
PredictPoint Plot/.ipynb_checkpoints/Fibo-checkpoint.ipynb
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Hello" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 10, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import numpy as np" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Dynamic fibo" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 11, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"(14930352, 24157817)\n", | ||
"None\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"def fibo(j):\n", | ||
" a,b = 1, 1\n", | ||
" for _ in range(j):\n", | ||
" a, b = b, a+b\n", | ||
" print(a,b)\n", | ||
"print(fibo(35))" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 12, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"9227465\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"mem = {1: 1, 2: 1}\n", | ||
"def refibo(i):\n", | ||
" if i not in mem:\n", | ||
" mem[i] = refibo(i-1) + refibo(i-2)\n", | ||
" return mem[i]\n", | ||
"print(refibo(35))" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 13, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"9227465\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"def normalfibo(i):\n", | ||
" if i <= 2:\n", | ||
" return 1\n", | ||
" else:\n", | ||
" return normalfibo(i-1) + normalfibo(i-2)\n", | ||
"print(normalfibo(35))" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 2", | ||
"language": "python", | ||
"name": "python2" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 2 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython2", | ||
"version": "2.7.13" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
Oops, something went wrong.