Posts tagged: python
All posts with the tag "python"
Just Ask Ipython for help
We can’t all remember every single function signature out there, it’s just not possible. If you want to stay productive while coding without the temptation to hit YouTube or Twitter. Use the built in help. Here are 5 ways to get help without leaving your terminal.
In any python repl you can access the docstring of a function by calling for help.
...
Setting Parameters in kedro
Parameters are a place for you to store variables for your pipeline that can be accessed by any node that needs it, and can be easily changed by changing your environment. Parameters are stored in the repository in yaml files.
...
Writing your first kedro Nodes
Before we jump in with anything crazy, let’s make some nodes with some vanilla data structures.
You will need to import node from kedro.pipeline to start creating nodes.
...
Running your Kedro Pipeline from the command line
Running your kedro pipeline from the command line could not be any easier to get started. This is a concept that you may or may not do often depending on your workflow, but its good to have under your belt. I personally do this half the time and run from ipython half the time. In production, I mostly use docker and that is all done with this cli.
kedro Virtual Environment
Avoid serious version conflict issues, and use a virtual environment anytime you are running python, here are three ways you can setup a kedro virtual environment.
I prefer to use conda as my virtual environment manager of choice as it give me both the interpreter and the packages I install. I don’t have to rely on the system version of python or another tool to maintain python versions at all, I get everything in one tool.
...
Kedro Pipeline Create
Kedro pipeline create is a command that makes creating new pipelines much easier. There is much less boilerplate that you need to write yourself.
The kedro cli comes with the following command to scaffold out new pipelines. Note that it will not add it to your pipeline_registry, to be covered later, you will need to add it yourself.
...
Kedro Install
Kedro comes with an install command to install and manage all of your projects dependencies.
You must start by having your kedro project either cloned down from an existing project or created from kedro new. Then activate your environment.
...
Kedro Git Init
Immediately after kedro new, before you start running kedro install or your first line of code the first thing you should always do after getting a new kedro template created is to git init.
Its as simple as these three commands to get started.
...
Kedro New
Kedro new is simply a wrapper around the cookiecutter templating library. The kedro team maintains a ready made template that has everything you need for a kedro project. They also maintain a few kedro starters, which are very similar to the base template.
...
What is Kedro
Kedro is an unopinionated Data Engineering framework that comes with a somewhat opinionated template. It gives the user a way to build pipelines that automatically take care of io through the use of abstract DataSets that the user specifies through Catalog entries. These Catalog entries are loaded, ran through a function, and saved by Nodes. The order that these Nodes are executed are determined by the Pipeline, which is a DAG. It’s the runner’s job to manage the execution of the Nodes.
Incremental Versioned Datasets in Kedro
Kedro versioned datasets can be mixed with incremental and partitioned datasets to do some timeseries analysis on how our dataset changes over time. Kedro is a very extensible and composible framework, that allows us to build solutions from the individual components that it provides. This article is a great example of how you can combine these components in unique ways to achieve some powerful results with very little work.
👆 Unsure what kedro is? Check out this post.
...
Manage many git repos with ease
mu-repo
I Started Streaming on Twitch
I recently started streaming on twitch.tv/waylonwalker and it’s been a blast so far.
It all started with kedro/issues/606, Yetu called out for users of kedro to record themselves doing a walk through of their tutorials. I wanted to do this, but was really stuck at the fact that recording or editing somewhat polished vide is quite time consuming for me.
My introduction to twitch came from
...
Upcoming Stream
https://stackoverflow.com/questions/16720541/python-string-replace-regular-expression
I am starting to stream 3 days per week, before I start work in the morning. These streams will likely be me just talking through things I am already doing.
Science & Technology | Every Monday • 7:00 AM - 9:00 AM CDT
...
Kedro Spaceflights - part 2 | Stream replay June 7, 2021
This was my seconf time ever streaming on twitch.tv/waylonwalker, and I completely botched my mic 2x.
🌱 Digital Gardening | gif to Mp4 | Stream replay June 4, 2021
Doing some Digital Gardening on stream
After this stream all gifs on my site are converted to mp4/webm if they exist.
Kedro Spaceflights - part 1 | Stream replay June 4, 2021
This was my first time ever streaming on twitch.tv/waylonwalker. I am excited to get going. I have been streaming early in the morning while I am still waking up, so still a bit groggy as I go.
It all started with kedro/issues/606, Yetu called out for users of kedro to record themselves doing...
Comprehensive guide to creating kedro nodes
The Kedro node is an essential part of the pipeline. It defines what catalog entries get passed in, what function gets ran, and the catalog entry to save the results under.
https://waylonwalker.com/what-is-kedro/
👆 Unsure what kedro is? Check out this post.
...
Creating pypi-list with kedro
I had an idea come to me via twitter. Short one word name packages are becoming hard to find on pypi. Short one word readable package names that are not a play on words are easy to remember, easy to spell correctly, and quick to type out.
I started with the simple index. Pypi provides a single page listing to every single package hosted on pypi via the simple-index