Skip to content

Instantly share code, notes, and snippets.

Avatar

Paweł Święcki pawelswiecki

View GitHub Profile
View typing2_18.py
from typing import Union
class Food: ...
class Meat(Food): ...
class Chocolate(Food): ...
class Dog:
def eat(self, food: Meat):
pass
View typing2_14c.py
class Railroad:
pass
def feed_animal(animal: BaseAnimal):
piece_of_railroad = Railroad()
animal.eat(piece_of_railroad)
lassie = Dog()
feed_animal(lassie) # It's safe, Lassie won't touch it anyway!
@pawelswiecki
pawelswiecki / julia_introduction.ipynb
Last active Nov 11, 2019
The Quickest Introduction to Julia (for Pythonistas)
View julia_introduction.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View haskell_fun.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.