Thet Paing

@paing.bsky.social

Data Engineer from Burma.

Since Python 3.10 you can use the pipe operator to combine types – this creates a type union. This can be used, for example, when you want to check if a value belongs to one of 2+ types with `isinstance`. Here's an example 👇

Diagram showing the Python 3.10+ syntactic feature that allows you to combine types with the operator pipe |.

Full example source code:

def is_number(x):
    return isinstance(x, int | float | complex)
    
print(is_number(34))  # True
print(is_number("hey"))  # False

Do you use a makefile to manage your #dbt commands? Mainly used for compiling code, you can actually use a makefile to run any commands A makefile a great way to - reduce command fatigue - group commands - abstract your common tasks medium.com/inthepipelin... #dataengineering #analytics #data

How to use a Makefile to speed up your dbt project workflow

Learn how to use a makefile to reduce dbt command fatigue and group related commands for easy reuse and sharing.

medium.com

The testimonies of the people of Gaza. I have no more words. There is nothing more to say. We have failed the call of humanity in such a fundamental way so many times throughout history, but it is another thing entirely to have had so much access to it this time. www.nplusonemag.com/online-only/...

Can You Tell Us Why This Is Happening?

That night alone we lost over 400 people. The rockets that were fired and the bombs that were thrown were strong enough to destroy whole residential buildings. Families were wiped out of existence com...

nplusonemag.com

This #PGSQLPhriday, Chris Ellis asked about the weird and varied things that people are using #PostgreSQL for. I decided to try to explain a bit about what I'm using Postgres for in my PhD research. Look out for all of the other #PGSQLPhriday posts!

#PGSQLPhriday 013: Unlocking Open Data using PostgreSQL

Introduction For #PGSQLPhriday 013, with his challenge " Use cases and Why PostgreSQL ", Chris Ellis wants to hear about the weird and varie...

karenjex.blogspot.com

A good test to see if you’re writing maintainable code is to re-read it six months later. Both pandas & tidyverse fail this test, unless I add copious comments about the shape/content/schema/types of the data frames after each transform. Comments should not replace data structures and typing…

Research finds that ChatGPT consumes 500 ml of water (about 16 oz) for every 5-50 prompts it answers. Microsoft’s global water consumption ⬆️ 34% from ‘21-‘22 to 17 billion gl. 🗣️We are actively draining our resources for survival in the midst of climate collapse.

Artificial intelligence technology behind ChatGPT was built in Iowa — with a lot of water

As they race to capitalize on a craze for generative AI, leading tech developers including Microsoft, OpenAI and Google have acknowledged that growing demand for their AI tools carries hefty costs, fr...

apnews.com