Skip to content

Instantly share code, notes, and snippets.

View rtruxal's full-sized avatar
💭
FIRE!

Rob rtruxal

💭
FIRE!
View GitHub Profile
@rtruxal
rtruxal / functools-partial.py
Created February 7, 2019 07:12
Simplest partial use case i can think of.
from functools import partial
def add(x, y):
return x + y
add_two = partial(add, x=2)
print(add_two(3))
# 5
@rtruxal
rtruxal / functools-partial.py
Created February 7, 2019 07:10
Simplest partial use case i can think of.
from functools import partial
def add(x, y):
return x + y
add_two = partial(add, 2)
print(add_two(3))
# 5
@rtruxal
rtruxal / admin.txt
Created June 11, 2018 23:29 — forked from yhilpisch/admin.txt
Algo Trading Bootcamp @ For Python Quants
Welcome to the Algo Trading Bootcamp
====================================
WIFI
====
Ft1ch#2016#!
Quant Platform
==============

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@rtruxal
rtruxal / iterators_for_asyncio_FROM_FRIGGIN_PYTHON2.py
Created August 17, 2017 00:51
Python2 had a bunch of iterators that would have worked in asyncio (unlike their python3 counterparts) IF THEY HAD BEEN KEPT IN PYTHON3...I remade a few.
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
@rtruxal
rtruxal / async_show.py
Last active July 31, 2017 20:03
Understanding Asynchronous Python
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."
================================================================