Skip to content

Instantly share code, notes, and snippets.

View jacktator's full-sized avatar
🏠
Working from home

Jack Song jacktator

🏠
Working from home
View GitHub Profile
@jacktator
jacktator / performance_report.md
Created June 1, 2019 23:59
This talbe displays the performance results
Object NamedTuple DataClass
create 2.94 µs 2.01 µs 2.34 µs
read property 24.7 ns 26.9 ns 24.7 ns
nested property 48.1 ns 75.8 ns 52.1 ns
execute function 829 ns 946 ns 821 ns
size 56 bytes 80 bytes 56 bytes
@jacktator
jacktator / Prices.md
Created June 1, 2019 23:54
This table displays the properties of a Prices object
Property Type Description
open float The opening price.
high float The highest price.
low float The lowest price.
close float The closing price.
@jacktator
jacktator / tradeday.md
Last active June 1, 2019 23:52
This table displays the properties of a TradeDay object
Property Type Description
symbol str The ticker symbol.
date date A datetime.date object that describes the date.
prices Prices A Prices object.
change float A float representing the change for the price.
@jacktator
jacktator / tradeday_namedtuple.ipynb
Created June 1, 2019 23:49
This file defines a NamedTuple for TradeDay
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jacktator
jacktator / tradeday_dataclass.ipynb
Created June 1, 2019 23:49
This file defines a DataClass for TradeDay
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jacktator
jacktator / tradeday_object.ipynb
Last active June 1, 2019 23:52
This file defines a Class for TradeDay
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jacktator
jacktator / quiz2
Created May 11, 2017 03:44
UTS Database Fundamentals Quiz2 Answers 2017 Autumn
select days, count(*) as missions from nasa2_mission where days >=14 and projectname='Shuttle' group by days order by days;
select missionno, launchYear from nasa2_mission natural join nasa2_spacecraft where projectname = 'Shuttle' and launchyear = ( select min(launchyear) from nasa2_mission natural join nasa2_spacecraft where projectname='Shuttle' );
select ass1.astrono, ass1. missionno, ass2.missionno from nasa2_assigned ass1, nasa2_assigned ass2 where ass1.astrono=44 and ass1.projectname='Shuttle' and ass1.missionno!=ass2.missionno and ass2.projectname='Shuttle' and ass1.astrono = ass2.astrono;