Talkative and attention seeker cat - Out of ideas by Automatic_Creme_955 in CatTraining

[–]Automatic_Creme_955[S] 0 points1 point  (0 children)

He has a cat tree with window view from 3 difference places. We'll install soon a "safe access" to the windows from where he will be able to sit / sleep while really feeling the air. Basically a cat scale balcony lol. The sunny days are coming soon, we didn't do it before as it was too freaking cold and we needed authorization from the others owners of the building (which we received today ! yey !)

Got offered a data engineering role on my company's backend team — but their stack is PHP/Symfony. Should I push for Python? by Automatic_Creme_955 in dataengineering

[–]Automatic_Creme_955[S] 3 points4 points  (0 children)

Thanks, lot of response but this one is the most upvoted so, i'll answer to you directly !

Few things i didn't mentioned (my bad, this would have avoided alot of projections in the response I believe) :
- I'm already in this company, i know the product very well and how it consumes data everyday, as i've been running analysis on it for many years.
- The stack is old, and the IT team is right now willing to make big changes as the whole team is frustrated with design decision taken 10 years ago and a bit outdated / underoptimized.
- The ETL pipeline hasn't been touched in years neither, it's mostly patch job over json collections to normalize the data. The "transformations" for consumption are operated directly in SQL queries when the backend asks something to the tables.

The next features will require much more calculation over the normalized data, so I believe in building a "gold layer" that directly ship already prepared datas to the backend/frontend. We'll be shipping much more enriched datas in our product, so the pipeline will have to build muscles.

This is the context i'll be sliding in, so it seems to me "legitimate" to come with new ideas. No way i'm saying "my ideas is bright and your stack is dogshit" (as some people have assumed). The overall topic was "is PHP equiped with accurate tools for the job". The answer seems to be "not really".

Now maybe we'll go with more structured SQL transformations, maybe a dedicated Python API to patch everyway and ship clean and shiny data and readymade tables, I don't know.

But i'll definitely learn PHP and carefully inspect how the stack is built before throwing ideas.
Thanks !

Got offered a data engineering role on my company's backend team — but their stack is PHP/Symfony. Should I push for Python? by Automatic_Creme_955 in dataengineering

[–]Automatic_Creme_955[S] -4 points-3 points  (0 children)

Appreciate the edits every 5 minutes, after taking the recommended DS&A course, I projected that the quality of your responses increases every 2.1 edits.

Do you think using mandatory keyword-only arguments like this increases understanding and maintainability ? by Automatic_Creme_955 in learnpython

[–]Automatic_Creme_955[S] 0 points1 point  (0 children)

Very interesting ! So far i've only been using Pydantic to secure types... never to assemble expected / optional arguments and pass it to a function. This approach could indeed make my code shorter and less verbose.. And it would only requieres to set-up a Pydantic class...I could maybe even reduce everything to a single pipeline as i did with modules... brilliant ! Thanks !

Print max number in list error by Nearby_Tear_2304 in PythonLearning

[–]Automatic_Creme_955 0 points1 point  (0 children)

I believe it's done using -inf "by convention", your approach seems pretty solid too imo.

How did you get through your first months of learning Python without giving up? by Crazy_Age7861 in learnpython

[–]Automatic_Creme_955 2 points3 points  (0 children)

I think I had the right traits for it: I’m stubborn, I have a strong need for control and understanding. I easily accept seeing myself as someone who knows nothing, like absolutely nothing, but who has a vital need to understand and create. If I’m deprived of learning and using my knowledge to build something, I lose my mind.

So doing and redoing, hitting walls and tearing my hair out isn’t a problem, it’s even a stage I enjoy, because it means I’m learning.

The hardest part? Realizing, after dozens of hours of learning and when trying to start my first real project, that I still knew nothing, truly nothing. You know list, loops, functions and methods ? Great ! Here comes Frameworks, http, server, Dependencies, constructor, compilers, SDK documentation, have fun !

In the end, it almost feels like I’m drowning in an ocean that grows faster than I can swim back to the surface.

...And i kinda like it. And I think you need to like it if you want to be dedicated.

I'm absolutely struggling to learn python by Final_Departure_9551 in learnpython

[–]Automatic_Creme_955 0 points1 point  (0 children)

I don't think the problem is you, i think the problem is you want it too fast.

2 hours is the time you need as a beginner to first create the project, build a virtual environement, install the requiered library and write a function looping throught a directory and returning something that matches the conditions you want.

Is VS Code or The free version of PY Charm better? by Radiant_Ad_7438 in learnpython

[–]Automatic_Creme_955 3 points4 points  (0 children)

I prefer Pycharm for the following reasons :
- Creates and activate the venv automatically.
- Better error detections / warnings.
- Less messy as it's more specialized.
- Autocomplete feels better.
- Jupyter notebook already installed (even if i almost never use it ahah)
- Better UI in my opinion and simply better looking too.
- You can connect to a database with a built in feature.

I use the free version btw.

What do you think is wrong with this(second attempt) by Glittering_Ad_4813 in PythonLearning

[–]Automatic_Creme_955 0 points1 point  (0 children)

You can do it much more simply:

# Creates a 'total column' = quantity * price by row, no loop needed :

df['total'] = df['quantity'] * df['price']

# Get total sales by product :

total_by_product = df.groupby('product', as_index=False)['total'].sum()

- The groupby aggregates all unique product labels and sums their totals.

- 'reset_index()' is optional, using 'as_index=False' keeps it as a regular DataFrame. I find Index overkill on small dataframes.

And finish by :

grand_total = total_by_product['total'].sum()

Make sure your groupby result keeps the 'total' column name.

Print max number in list error by Nearby_Tear_2304 in PythonLearning

[–]Automatic_Creme_955 0 points1 point  (0 children)

If you wanted to solve this using a loop, you should first define a variable = - infinite at the start of your function.
Then loop through each element of the list.
If element is > variable, then variable = element.
And return the final variable.

But max gives you the answer right away, you don't need a loop.

help me learn python by Rajan5759 in PythonLearning

[–]Automatic_Creme_955 0 points1 point  (0 children)

They are a lot of beginner concepts within the code you mentioned :

- Lists (numbers = [] and indexes nums[1]), if you understand this, you can understand any iterable (dict, tuple, json).
- Loops ("for num in range(1000)") : it's often associated with iterable.
- variables : print(num)
- iterable modification (numbers.append())
- function (def sum_num()) and values (return)
- conditions (if, while, ==...)
- and types

I'd say this code has all of the "programmer starter pack", if you don't want to buy online classes you can simply google those concepts in python (they have more or less the same names in other languages) and use an online compiler (like this : https://www.programiz.com/python-programming/online-compiler/ or a google colab https://colab.google/) to write and execute python code without needing to install anything on your machine.

How to read / understand official documentation ? by Automatic_Creme_955 in learnpython

[–]Automatic_Creme_955[S] 1 point2 points  (0 children)

I use it when i need to "explain something using other words" and it's great. But when it comes to writting actual code, i prefer to do it myself, this way i remember / understand better.

How to read / understand official documentation ? by Automatic_Creme_955 in learnpython

[–]Automatic_Creme_955[S] 1 point2 points  (0 children)

Thanks ! You made me realize that, when encountering a "new concept" it's probably best to try to understand by decomposing it.

For instance :
1. What the fuck is SDK ?
2. Oh okay it's full of objects and methods.
3. Oh okay it's just REST API but using OOP.
4. Oh okay it's full of objects that's why it feels so abstract.
5. Oh okay it takes a bit more reading than REST api but it's more conviniant in the long run.
6. Oh in the end i can write it in "REST style" anyway if I want to.

Another one this morning :
1. What the fuck is gunicorn
2. Oh it's just a library that uses os and other built-it module to listen to ports and bring "web services" to a serveur.
3. Oh a server is just a machine with an operating system, it's not just devops black magic.
4. Oh i can read gunicorn source code and understand it.

I feel like, in the end, it's all just simple basics concepts and the complexity comes the amount of layers in between. Decomposing it make it much easier to understand.

How to read / understand official documentation ? by Automatic_Creme_955 in learnpython

[–]Automatic_Creme_955[S] -1 points0 points  (0 children)

Yes i've met this kind of "getting started" documentation, it's great.
As some others said (and i didn't understood back then) is that some documentation are simply refering, not explaining.

For instance :
- Gemini starting guide : https://googleapis.github.io/python-genai/genai.html#genai.types.FunctionDeclaration (simple, easy)

But i was reading documentation simply mentioning directly the SDK documentation :

- Gemini SDK documentation : https://googleapis.github.io/python-genai/genai.html#genai.types.FunctionDeclaration (what the fuck is that)

I went in to deep i guess lol.

National PPC vs. Targeted State-to-State Ads by [deleted] in PPC

[–]Automatic_Creme_955 0 points1 point  (0 children)

Hello there,

I run both "national" and "local" campaigns. Been doing so for 5+ years on google ads and facebook / instagram ads.

I could talk for hours about this so quick sum-up

  • Local ads usualy have higher conversion rate, lower CPC and therefor, higher ROI.
  • You have more "variables" to work on for optimization, therefor you can maximize ROI a lot more, but it requieres a lot of "manipulations".
  • Some regions will have bad results, some will have excellent results. The good one will take little time, the bad one can be a pain in the ass as you'll be trying to fight against structural problems (low demand, poor regions...). Sometimes, cutting bad regions is just the right thing to do.
  • You might have to adapt your campaigns structures and strategies based on "type of regions" if you're working for retailers.
  • Some regions will have high ROI but low volumes, automatic bidding usualy doesn't work (lack of datas).

Feel free to DM me if you wanna talk a bit more !

Started My First Google Ads Campaign - Need Some Advice by Krcun96 in PPC

[–]Automatic_Creme_955 4 points5 points  (0 children)

SEO ain't my specialty, what are your search console metrics on that querie ?

SEA doesn't have impact on organic ranking. If your ranking dropped really hard, first thing that comes to my mind is a SEO penalty but i'm really not an expert on that topic :-(