Site Sponsors:
Python Stock Market 
Today we are hosting yet another "meetup." Designed for those who have been taking our Python 1000, 2000, and 3000 training, our goal is to build-up the resumes of our students.

Targeting a REAL WORLD game-play scenario that would impress would-be employers, we have set our sights upon a simple strategy.... Whoever can make the most "money" in the stock market, wins?

Anticipating the need, we decided to demonstrate how to get closing quotes from a particularly favorite quotation service:

# pip install urllib, first!
import urllib.request

class Stocks01:

def __init__(self, endpoint="", key="demo"):
self.end = endpoint.strip()
self.key = key.strip()

def get_history(self, token):
url = self.end + '&symbol=' + token.strip().upper() + "&apikey=" + self.key

response = urllib.request.urlopen(url)
except Exception as ex:
return None

stocks = Stocks01()
data = stocks.get_history("msft")

if data is not None:
import json
info = json.loads(str(data, "utf8"))
for row in info:
print("*" * 10, "KEY:", row)
if row != "Time Series (Daily)":
for ss, val in enumerate(sorted(info[row])):
print(ss, val)
for rec in sorted(info[row][val]):
print("\t\t", rec, info[row][val][rec])

Rather than using "demo," the link below will tell you how to get a free API key.

Hope you find it useful!

BONUS: Inspired by this meetup, PyDAO is a neat way to convert CSV / TEXT data (from NASDAQ, etc.) into Python.

[ view entry ] ( 218 views )   |  permalink  |  related link
Python From Requirements 
Supporting yesterdays skill review session, we added a series of "sub-challenges" to project PR05. The additions were added to the bottom of the document.

Designed to help new students understand how to develop software in the professional software development world, such presentations are being extremely well received.

Those needing extra help with PR05 and / or any of the other activities can find the solutions to these & other projects in our new Python by Requirement book on Amazon.

Sharing is caring!


[ view entry ] ( 239 views )   |  permalink  |  related link
New Project: AboutTime ... for the 'Web! 
The work on cleaning up those awful WikiQuotes lead me to coin the word 'Quotie,' as well as to pop-out a web UI.

Dedicated to cleaning up such a horrid morass, this week the brain-wave was to refactor that C.R.U.D so as to support my original time-tracking and invoicing efforts.

Known as "AboutTime," the name was originally applied to an on-line Applet.

Created before I served as the Consulting Technical Section Leader at the United States Electronic Proving Ground (EPG/DTC) I used the Applet to allow my section & I to better manage their time at Fort Huachuca.

Today's R&D Release

Migrated to a stand-alone desktop application after Java's Applet security 'sandbox' melt-down, this week's return to the 'Web marks our official return to maintaining a truly collaborative, time-tracking, tool set.

(zDesktop - free on Sourceforge)

Our plans are to merge the 'Desktop and 'Web together so as to create a free & open logging / time management tool.

If you would like to support our efforts, then feel free to purchase a copy of our new book, or one of our on-line training offerings?

Sharing is caring!

[ view entry ] ( 269 views )   |  permalink  |  related link

<<First <Back | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Next> Last>>