Level up your SRE Game — Best of this week — 16th April 2023

Vikas Yadav
3 min readApr 16, 2023

--

“Time is a created thing. To say ‘I don’t have time,’ is like saying, ‘I don’t want to.” — Lao Tzu

I compile Site Reliability Engineering/DevOps-related articles every week and help you keep up your learning game.

This week we covered:

  1. Use github copilot to write bash scripts like a pro!
  2. Manage python environments with poetry!
  3. Run Jupyter notebooks on vscode!
  4. Zen of Python — your philosophical programming guide!

I also write about the tools and tips related to Software Development and SRE regularly on my Linkedin profile. You can check out my profile here: https://www.linkedin.com/in/vikasyadav94/

Use github copilot to write bash scripts like a pro

Are you tired of spending countless hours writing complex Bash scripts to perform simple tasks? Look no further!

In this demo video, I’ll show you how to use github copilot to drastically reduce the time it takes to write a Bash script that creates an S3 bucket, IAM user, IAM policy, and attaches the policy to the user. Although in real life — I would recommend you to do something like this using terraform!

This is my first video in Copilot series! I am going to push Copilot to do some really complicated things in the future!

Do share it if you like it and help me reach out to more people. To get more videos in the Copilot series in the future — Follow Vikas Yadav

#github #copilot #aws #bash

Manage python environments with poetry

How to manage your python app package requirements better?

I know requirements.txt file does the job most of the time — but why not try something better?

Use Poetry (https://lnkd.in/eH35jqn5)
-> It version locks your direct as well as indirect dependencies — so that you can have that peace of mind.
-> Bump package versions easily — let poetry take care of updating the dependent versions and ensuring compatibility
-> Quickly fire up virtual environments
-> Easily separate dev, test, and production dependencies. No need to create multiple files and break your head over them.

Poetry can be extremely useful for large projects — but once you get used to it — you’ll start using it even for smaller projects🙂

For more such content every day — Follow Vikas Yadav

#python #programming

Run Jupyter notebooks on vscode

Did you know that you can run Jupyter Notebooks directly on Visual Studio Code?

Jupyter notebooks are a powerful tool for data scientists and developers but they can be equally powerful for Devops Engineers / SREs!

Just install the extension and create a file with the *.ipynb extension and you’re all set!

So why waste your time with other tools when you can seamlessly integrate Jupyter Notebooks into your Visual Studio Code workflow? Try it out today and take your coding experience to the next level!

Extension link: https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter

For more such content every day — Follow Vikas Yadav

#python #jupyternotebook #devops #vscode

Zen of Python — your philosophical programming guide!

A few guiding principles/philosophies to help you become a better programmer!

Checkout the Zen of Python and give the principles a few minutes to sink in 🙂 You’ll love them.

My favourite ones are
-> Readability counts.
-> Special cases aren’t special enough to break the rules.
-> Now is better than never.
-> Although never is often better than *right* now.
-> If the implementation is hard to explain, it’s a bad idea.
-> If the implementation is easy to explain, it may be a good idea.

Zen of Python — by Tim Peters. https://lnkd.in/dNr9QUWr

#python #programming #wisdom

--

--

Vikas Yadav
Vikas Yadav

No responses yet