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
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| from lxml import html | |
| import requests | |
| r = requests.get('http://www.protocol5.com/Fibonacci/60.htm') | |
| tree = html.fromstring(r.content.decode('utf8')) | |
| li_elms = tree.xpath("//*[contains(@class, 'number-result')]/li") | |
| for li in li_elms: |
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
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| from lxml import html | |
| import requests | |
| r = requests.get('http://www.protocol5.com/Fibonacci/60.htm') | |
| tree = html.fromstring(r.content.decode('utf8')) | |
| li_elms = tree.xpath("//*[contains(@class, 'number-result')]/li") | |
| for li in li_elms: |
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
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| from lxml import html | |
| import requests | |
| def get_fibonacci(idx): | |
| r = requests.get('http://www.protocol5.com/Fibonacci/' + str(idx) + '.htm') | |
| t = html.fromstring(r.content.decode('utf8')) | |
| li_elms = t.xpath("//*[contains(@class, 'number-result')]/li") |
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
| 0 | |
| 1 | |
| 1 | |
| 2 | |
| 3 | |
| 5 | |
| 8 | |
| 13 | |
| 21 | |
| 34 |
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
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| import random | |
| # import numpy as np | |
| # fmt: off | |
| # from 易經 |
OlderNewer