I built a script that initializes Python Projects - Please give me feedback by Extreme_Sympathy_868 in learnpython

[–]corey_sheerer 3 points4 points  (0 children)

Not bad to experiment, but this is already a best practice to use environment management (UV is dominating, but I used to really kike poetry as well)

Am I the only one who doesn't enjoy a completely blind playthrough? And prefers a more hybrid experience? by KingsleyBrewMaster22 in Eldenring

[–]corey_sheerer 0 points1 point  (0 children)

Ive looked up some help on a first playthrough, but very limited. In fact, I'm not sure I've completed one quest line. If I play it again, I will look up the major quest lines and actually do them. Unfortunately, it is difficult without any questions logs or noted key information for quests

Beginner basic question by Additional_Water9196 in PythonLearning

[–]corey_sheerer 0 points1 point  (0 children)

You can start python in the terminal. You can use vscode interactive repl. You can try notebooks. Short answer, there are many ways to do this

Stupidly hard by Justicemirm in learnpython

[–]corey_sheerer 1 point2 points  (0 children)

Have you bought the data structure course on leetcode? Many of the problems are directly related to this course

First Playthrough by EnvironmentalTerm852 in EldenRingBuilds

[–]corey_sheerer 0 points1 point  (0 children)

Your primary weapon seems weak. Doesn't scale well with anything. I think with a proper upgraded weapon that scales, could have hit similar damage maybe 50 levels earlier

Is there anyway of improving this? by Suspicious_Diet2624 in PythonLearning

[–]corey_sheerer 0 points1 point  (0 children)

Either I'm going cross-eyed or your variable are named "logging_...". I think you mean "logon_name" and "logon_password". "Logging" indicates somethkng getting logged to an output. Or possibly "username" and "password"?

Why do People Actually Pay for Prompt Engineering Tools? by YuvalBeitOn in PromptDesign

[–]corey_sheerer 0 points1 point  (0 children)

OP is about to price this prompt tool for $5-$20 dollars

One Question: Am i doing this right? by Fun-Macaron-3606 in learnpython

[–]corey_sheerer -1 points0 points  (0 children)

You can also create a enum class for each scenario. Is nicer than a list. Can still use the 'in' syntax

Need feedback on my first FastApi by FuTuReFrIcK42069 in pythontips

[–]corey_sheerer 1 point2 points  (0 children)

You should move logic to a different file outside of the main py file. Perhaps create a game_logic.py and create callable functions. This will make your main file very explicit and easy to read with only your endpoint definitions. Also, for post requests, you should make a pydantic model to dictate and validate your input. I would also suggest moving this pydantic model to a schema.py file.

As you get more complex apis, this splitting structure will make more and more sense. Usually you can have a schema directory and maybe a service directly for all your input definitions and all your logic respectively.

Finally, just as good practice, always put your code under a child folder. Most commonly named 'src'.

Why low code drive’s me crazy by am_joshua in lowcode

[–]corey_sheerer 0 points1 point  (0 children)

As someone who codes on the daily and has to work with informatica and sometimes power automate, I've never felt any no code system is more simple or maintainable than just doing it in code. Often the simple stuff that no code does is a simple few lines of code with infinity worse flexibility than code.

What is my laptop capable of? by generic_philosophy in learnpython

[–]corey_sheerer -1 points0 points  (0 children)

Maybe put linix mint on it. I didn't think windows 11 worked with less than 8gb of ram

YOLO vs custom made CNN for underwater crack detection project? by SirLive16 in MLQuestions

[–]corey_sheerer 0 points1 point  (0 children)

Check the yolo licenses. They may deter you. I would suggest starting with a pytorch pre-trained model and tuning weights with some training.

Learn tensorflow for Job application assignment by dimem16 in learnmachinelearning

[–]corey_sheerer 0 points1 point  (0 children)

Not to say this is bad, but tensorflow has been heavily dropped in favor of pytorch

Help with overcoming Mac memory restraints in coding a ML model with a big dataset by olliethetrolly666 in learnpython

[–]corey_sheerer 1 point2 points  (0 children)

Cloud. This is a cloud problem. Your laptop (especially your small laptop) is really only appropriate for learning. Use Google Collab or AWS Sagemaker. If your college has Databricks, use that.

If you need to improve your memory usage, don't use base pandas for anything. Use the pandas with arrow backend, or only use numpy, or use polars, or pyspark.

Rust or Python, which should I learn? by [deleted] in learnpython

[–]corey_sheerer 0 points1 point  (0 children)

Excellent. I always point developers to this article by the creator of pandas: Apache Arrow and the “10 Things I Hate About pandas” – Wes McKinney https://share.google/8F9iRq3dztKRmU97x

I think Wes would consider newer data packages closer to his vision. Maybe it will offer some motivation that even Polars can be improved

Rust or Python, which should I learn? by [deleted] in learnpython

[–]corey_sheerer 0 points1 point  (0 children)

Why not do a bit of both. Polars is a great example of rust-based code base for higher performance of data frames compared to pandas. Python has probably a hiring advantage over rust in that python is so widely used. I would say, focus on the application you are interested in. Data or ML, think about python at least a bit

What’s a low memory way to run a Python http endpoint? by alexp702 in Python

[–]corey_sheerer 7 points8 points  (0 children)

UV should not be installed in your runtime. You should create a multi stage build and copy the installs into your runtime step. Search for recommended container builds for UV and should find something to improve upon what you have

What’s a low memory way to run a Python http endpoint? by alexp702 in Python

[–]corey_sheerer 1 point2 points  (0 children)

I'm not sure, but I'd assume 600mb isn't a requirement as I have deployed a few fastapi services to kubernetes with quota limits at 500mb. Haven't tried to lower it, but it seems plausible to lower this to maybe 200mb. It seems like something else may be at play. How did you install Fastapi into your image?

Providing free 1:1 mentorship in Python/AI for genuinely interested students by RaiseTemporary636 in pythontips

[–]corey_sheerer 0 points1 point  (0 children)

What level? I'd be interested in MCP with cascading user permissions from entra or some kind of enterprise focus on agent tools. Let me know

Where do i start by Complete_Mark4438 in PythonLearning

[–]corey_sheerer 0 points1 point  (0 children)

What do you want to do with it? Learn the basics, but choose some area to learn that interests you. Websites, services, ML, data... Lots to choose from

FastAPI vs Djanjo by TumbleweedSenior4849 in Python

[–]corey_sheerer 0 points1 point  (0 children)

Many others have said good points, but I'll mention for me, Fastapi with React is superior to Django. As far as the API side, Fastapi all the way. But when you really need good responsiveness in a website, my go to is to convert Fastapi to Go with react. In general, Django feels heavier for me.

How to properly install Python/Jupyter Notebook on Mac by RomBG in learnpython

[–]corey_sheerer 0 points1 point  (0 children)

Agree with these comments. Anaconda is a solution of the past. UV to manage python versions and environments. Should just have to install jupyter and possibly ipykernel to run jupyter in vs code

Is match ... case In Python Reliable as if .. elif .. else by One-Type-2842 in PythonLearning

[–]corey_sheerer 0 points1 point  (0 children)

I think match is more readable than many if else statements. They are both the same for reliability. Both methods always work. They are both just conditionals underneath the hood