Skip to content

Instantly share code, notes, and snippets.

@mlouielu
Created July 26, 2017 03:30
Show Gist options
  • Save mlouielu/d14ac5ababc5bff035b8be05fab75569 to your computer and use it in GitHub Desktop.
Save mlouielu/d14ac5ababc5bff035b8be05fab75569 to your computer and use it in GitHub Desktop.
$ cat stock.py
#! /usr/bin/python3
import sys
import twstock
if __name__ == '__main__':
if len(sys.argv) == 2:
s = twstock.Stock(sys.argv[1])
print(s.price[-5:])
$ ./stock.py 2330
[214.5, 215.5, 214.0, 214.5, 214.0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment