- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
- They are the people who get things done. Effective Engineers produce results.
from functools import partial | |
def add(x, y): | |
return x + y | |
add_two = partial(add, x=2) | |
print(add_two(3)) | |
# 5 |
from functools import partial | |
def add(x, y): | |
return x + y | |
add_two = partial(add, 2) | |
print(add_two(3)) | |
# 5 |
Welcome to the Algo Trading Bootcamp | |
==================================== | |
WIFI | |
==== | |
Ft1ch#2016#! | |
Quant Platform | |
============== |
import asyncio | |
__doc__ = """ | |
MFers gonna take away my generators & add an asyncronous library?!?!?!??! | |
NO. | |
""" | |
async def xrange(numbers): | |
for i in range(numbers): | |
yield i |
from itertools import islice | |
__doc__ = """ | |
This is a 'simple' example of how python3 runs jobs asynchronously. | |
The key is adding both a yield & return statement within a single function. | |
MODULE OUTPUT: | |
################################################################ | |
testing our infinite-recursive sequence generator func. | |
islice says "give me 20 vals from the generator." | |
================================================================ |