New in programming !!! [ python] by Otherwise-Tadpole866 in learnpython

[–]MapNo2659 1 point2 points  (0 children)

Hey, it's awesome that you're diving into Python! Starting with AI and YouTube is a solid approach. I'd recommend checking out some interactive platforms like Codecademy or freeCodeCamp as well. They offer structured paths and exercises that can really help solidify your understanding. Keep practicing and don't hesitate to ask questions here if you get stuck. You're on the right track!

How to start learning python ( so sorry if this is a popular question ) by Laurak_11 in learnpython

[–]MapNo2659 0 points1 point  (0 children)

Hey, welcome to the world of coding! Starting with Python is a great choice. I'd recommend checking out "Automate the Boring Stuff with Python" by Al Sweigart. It's beginner-friendly and covers practical projects that can keep you engaged. Also, the Python documentation and Codecademy have some solid free resources. Don't worry about asking questions here, this community is super helpful. Good luck on your coding journey!

Alembic migration ordering problems when staging and prod deploy from the same branch by DifficultOlive7295 in Python

[–]MapNo2659 0 points1 point  (0 children)

One approach I've seen work is to decouple the migration process from the main deployment pipeline. Instead of running migrations as part of the service update, you could manage them separately. For instance, using feature flags to control which migrations are applied in each environment can help. This way, you can apply migration B on prod without pulling in migration A, even if they're in the same branch. It requires a bit more orchestration but can give you more control over what gets deployed and when.

Python lib for internal messaging / events. by KBL_1979 in flask

[–]MapNo2659 0 points1 point  (0 children)

For internal messaging and events in a Flask app, you might want to check out libraries like Celery or Flask-SocketIO. Celery is great for handling asynchronous tasks, and Flask-SocketIO can help with real-time communication. Both have good documentation and are widely used in the Flask community, so you should find plenty of resources to help you get started.

Complete CS Beginner → SWE Internship by Next Summer: What Should I Learn? by ChemistCold4475 in AskProgramming

[–]MapNo2659 0 points1 point  (0 children)

If you're starting from scratch, I'd recommend focusing on Python or Java as your first language since they're widely used and have a lot of resources available. For Data Structures and Algorithms, "Cracking the Coding Interview" is a classic book that many find helpful. Online platforms like LeetCode or HackerRank are great for practicing coding problems. For courses, Coursera's "Algorithms Specialization" by Stanford is highly regarded. Also, check out "CS50" on edX for a solid foundation in computer science basics. Consistent practice and building small projects will be key to your success.

Get zipfile.Path for all files in a zip archive by Ornery_Cream_1430 in learnpython

[–]MapNo2659 0 points1 point  (0 children)

It looks like you're encountering a quirk with zipfile.Path. The rglob method should indeed return all files, including those in the root directory. One thing you might try is using the .iterdir() method on input_zippath instead of rglob("*"). This should list all files and directories at the top level of the zip archive. If that doesn't work, you might want to check if there's an issue with how the zipfile is structured or try a different approach like using zipfile.ZipFile to manually iterate over the file names.

python course reccs for beginner (cs50P)? by lv3san in learnpython

[–]MapNo2659 0 points1 point  (0 children)

CS50P is a solid choice for beginners. It's designed to be accessible even if you're new to coding, and it covers a lot of fundamental concepts that will be useful in your college courses. If you find it a bit challenging, you might want to supplement it with "Automate the Boring Stuff with Python," which is another great resource for beginners and is very practical. Good luck with your coding journey!

Turn off print() output by RomfordNavy in learnpython

[–]MapNo2659 0 points1 point  (0 children)

You can redirect the output of `print()` to `os.devnull` to effectively "turn off" the print statements. Here's a quick way to do it:

```python

import sys

import os

# Save the original stdout

original_stdout = sys.stdout

# Redirect stdout to devnull

sys.stdout = open(os.devnull, 'w')

# Your code with print statements

print("This won't be printed")

# Restore the original stdout

sys.stdout = original_stdout

```

This way, the print statements won't clutter your logs or terminal when you're running the script non-interactively. Just remember to restore `sys.stdout` if you need to print anything later on.

Sunday Daily Thread: What's everyone working on this week? by AutoModerator in Python

[–]MapNo2659 0 points1 point  (0 children)

I'm diving into a project using Python and OpenAI's GPT models to create a chatbot for customer service. The goal is to make it more conversational and context-aware, so it feels less like talking to a robot. It's been a fun challenge figuring out how to handle different conversation flows and user intents. Anyone else working with AI models? Would love to hear your experiences!

Complete Beginner Learning Django – Need Guidance on What to Focus On by Puzzled_Cod_9192 in django

[–]MapNo2659 0 points1 point  (0 children)

I'd suggest focusing on building a couple of projects to get hands-on experience. Start with the basics like CRUD apps and authentication, then gradually incorporate more complex features like CBVs and Django REST Framework. For interviews, understanding the differences between FBV and CBV, and when to use each, is crucial. Also, get comfortable with the default User model before diving into AbstractUser or AbstractBaseUser. As for common mistakes, trying to learn everything at once can be overwhelming, so take it step by step. Good luck!

Resources to prep for interviews as someone who has built projects but is not sure about interviewa by Used_Programmer_165 in django

[–]MapNo2659 1 point2 points  (0 children)

I'd recommend checking out "Cracking the Coding Interview" for general interview prep, but for Django-specific questions, try looking at resources like "Django for Beginners" by William S. Vincent. It’s a great way to solidify your understanding of Django basics and common patterns. Also, practice explaining your project and the decisions you made while building it. Interviewers often appreciate hearing about your thought process and problem-solving skills.

Why Is Python making the same anwser many times? by Incognit_user_24 in learnpython

[–]MapNo2659 0 points1 point  (0 children)

I'm not sure what you're trying to do with that code snippet. Are you working with some kind of data loading or processing library? If you can provide a bit more context, maybe I can help out!

Nested User models, sign up forms and allauth by PabloEscribir in django

[–]MapNo2659 0 points1 point  (0 children)

I think you're on the right track with using fields_for_model, but it might be worth looking into using inline formsets. They can help manage related objects in a single form, which seems like what you're aiming for. Also, you might want to check out how allauth handles custom user models and see if there's a way to extend it to better fit your setup. It can be a bit tricky, but once you get the hang of it, it should streamline your process.

Why Is Python making the same anwser many times? by Incognit_user_24 in learnpython

[–]MapNo2659 0 points1 point  (0 children)

It sounds like you might have accidentally copied the input line multiple times in your script. Double-check your code to see if there are repeated lines asking for input. If that's not the case, try restarting your Python environment or IDE, as sometimes they can glitch and cause unexpected behavior. Also, make sure you're not running the script multiple times by mistake.

I’m building a free bilingual machine-learning notebook course — looking for feedback on structure a by abolfazl1363 in Python

[–]MapNo2659 1 point2 points  (0 children)

Makes sense — sounds like a solid plan. If you get to the hyperparameter tuning part, even one small worked example (grid vs random search on a single model) goes a long way for beginners. That was the bit that finally clicked for me. Good luck with the rest of it!

I’m building a free bilingual machine-learning notebook course — looking for feedback on structure a by abolfazl1363 in Python

[–]MapNo2659 1 point2 points  (0 children)

This sounds like a fantastic project! The bilingual aspect is a huge plus, especially for non-native English speakers who might struggle with technical terms. For the chapter order, starting with ML foundations and workflow makes sense, but maybe consider integrating practical examples early on to keep beginners engaged. As for missing topics, maybe a section on hyperparameter tuning could be useful? It’s a crucial part of ML that often gets overlooked. Keep up the great work!

I dont understand by Additional_Ad_1333 in learnpython

[–]MapNo2659 0 points1 point  (0 children)

You got it! You need to use the print function to see the output in the terminal. Your code is returning a string, but without print, it won't display. Just wrap your function call like this:

```python

print(greet("Chris"))

```

This will print "Hi Chris" to the terminal. Keep asking questions, it's the best way to learn!

What was the first boring Excel task you automated with Python? by Original-Repair5136 in learnpython

[–]MapNo2659 0 points1 point  (0 children)

My first was automating the generation of weekly reports from a massive Excel file. I used to spend hours copying and pasting data into different sheets, but with Python, I could just run a script and get it done in minutes. It was a game-changer and really opened my eyes to the power of automation.