Yury Selivanov Profile picture
Apr 20, 2022 9 tweets 4 min read Read on X
WOW.

Bloomberg finally opensourced memray—a new versatile memory profile for Python. Can't way to use it.

Thread 👇
1. It's fully open source (Apache 2), grab it here: github.com/bloomberg/memr…
2. Until now you never could have such a deep insight in how your app allocates memory. The tool is a must for any long-running services implemented with Python. With memray you can generate flame charts or all allocations and trace absolutely everything.
3. And this must be a Python snippet of the month:
4. It's sophisticated enough to peek into native code. So you can profile your numpy and pandas code with it. And it has a live mode. You can just run your code and see how it allocates memory as it runs. 🤯
5. A little birdie mentioned to me that @pyblogsal is one of the active contributors in memray. Let's keep it a secret 🫢
6. This is a Python client to @edgedatabase as it establishes a connection to the DB. cc @fantix @elprans
@Twitter Can we add an edit button just for this tweet? 🙏
7. Wow, this thread is blowing up. Here’s a link to my Spotify… err, github.com/edgedb/edgedb

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Yury Selivanov

Yury Selivanov Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @1st1

Aug 12, 2019
Let's talk about Python metaclasses. 🎩✨ Many think they are magical things that mere mortals should never use. That's not quite true, although in many cases metaclasses can needlessly complicate things. Beware.

Read the thread! 👇👇👇
Note: the purpose of this thread is to show how to use metaclasses via a few examples. There are a few simplifications here and there for the sake of brevity. If you want to understand how things work I suggest to start with the official documentation: docs.python.org/3/reference/da…
1. We first need to talk about regular classes, and specifically about __new__() and __init__() methods. The former is actually a static method—it's called when an instance of the class is constructed. The __init__() method then initializes that instance.
Read 15 tweets
Jan 29, 2019
Let's talk about immutability. Python, unlike languages like Clojure, Erlang, and Rust is built entirely around mutable state. I'm going to try to convince you that immutability is awesome and can be effectively used in Python today.

Thread 👇
1. If an object is immutable it means that its state cannot be changed after it is created. For instance, in Python you can't change a character in a string, or reassign an element of a tuple. Python ships with a few immutable datatypes: str, bytes, tuple/namedtuple, frozenset.
2. Users can of course create their own immutable datatypes / objects. If an object doesn't have API to mutate its state and all of its public attrubutes are exposed via a readonly @property it is effectively immutable.
Read 19 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(