Site Sponsors:
PyDAO: Turn CSV files into Databases & Python Code 
It's meetup time again!

In order to help our students make a fortune on the stock market, we decided to create a tool to help convert those nightly NASDAQ exports into a database.


Come to that, our new PyDAO project will convert ANY CSV (or other be-headed text-delimited file) into an SQLite Database, as well.

Click on the "Related Link" (below) to get started.

[ view entry ] ( 695 views )   |  permalink  |  related link
Python 2100: Objects, Factories, & Frameworks 
Today we proudly release our latest training offering.



Designed for ADVANCED 'Python'eers, in Python 2100 we will discover how to use @staticmethod, @classmethod, getattr(), hasattr() as well as object factories, and "abstract" signature classes.

In addition to advanced framework & object management patterns, this one (1) hour training opportunity will also cover multi-object initialization as well as modern framework testing & maintenance strategies.


[ view entry ] ( 534 views )   |  permalink  |  related link
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="https://www.alphavantage.co/query?function=TIME_SERIES_DAILY", 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

try:
response = urllib.request.urlopen(url)
return response.read()
except Exception as ex:
print(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)":
print("(skipped)")
continue
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 ] ( 188 views )   |  permalink  |  related link

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