Quote by RAYMOND HETTINGER - Deepstash
Machine Learning With Google

Learn more about computerscience with this collection

Understanding machine learning models

Improving data analysis and decision-making

How Google uses logic in machine learning

Machine Learning With Google

Discover 95 similar ideas in

It takes just

14 mins to read

RAYMOND HETTINGER

If you have an immutable mind get out!

RAYMOND HETTINGER

5

40 reads

MORE IDEAS ON THIS

Dataclasses & What are they for

Dataclasses & What are they for

Dataclasses are an implementation of a code generator, similar to a Named Tuple.

The idea of using a code generator is to save time and reduce wordiness.

There are two views about the purpose of Dataclasses:

  1. It makes a mutable da...

5

40 reads

A Complex Example of using Dataclasses

A Complex Example of using Dataclasses

In the image example, the generated code includes:

  • typed attributes
  • hidden attributes from __repr__ response
  • custom __hash__ dunder with the selected fields
  • attribute with default factory value in __init__ constructor

5

32 reads

Generated Code Includes

  • Dunder methods like init, repr, eq, lt, le, etc.
  • Frozen nature by generating dunder methods for __setattr__ and __delattr__
  • Class variables for the provided attributes

The code generation can be configured by providing keyword a...

5

21 reads

Comparison with Named Tuples

Comparison with Named Tuples

  • Dataclasses are by default mutable
  • Named Tuples have methods which start with an underscore which can be confusing. Ex: obj._replace...

5

21 reads

A History Lesson

A History Lesson

In the beginning there where:

  • dicts for look-ups
  • tuples for structures
  • hand-written classes for more functionality

Later Named Tuples where added as a code generator with the goal of adding ...

5

28 reads

CURATED FROM

CURATED BY

pvl

Backend @deepstash

I started using Dataclasses and I think you should too

β€œ

Related collections

More like this

Respond to everyone

Respond to everyone

If someone reaches out, respond to them.

That doesn't mean you have to have an answer to every question you get asked or that you have to agree to every request you receive. You just have to respond.

Eliminate Bias

If you have an idea for a solution, and you want to test it first, you must figure out a way that eliminates any bias you have toward that solutionΒ before you can get any true results.

15-minute Mind Exercises

15-minute Mind Exercises

If you find your mind frequently jumping around, an app can be life-changing to help you focus.

It can train you to notice when your mind is wandering, and help you to get back on track.

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Access to 200,000+ ideas

β€”

Access to the mobile app

β€”

Unlimited idea saving & library

β€”

β€”

Unlimited history

β€”

β€”

Unlimited listening to ideas

β€”

β€”

Downloading & offline access

β€”

β€”

Personalized recommendations

β€”

β€”

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates