pythondaily | Образование

Telegram-канал pythondaily - Python Daily

1102

Daily Python News Question, Tips and Tricks, Best Practices on Python Programming Language Find more reddit channels over at @r_channels

Подписаться на канал

Python Daily

Friday Daily Thread: r/Python Meta and Free-Talk Fridays

# Weekly Thread: Meta Discussions and Free Talk Friday 🎙️

Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!

## How it Works:

1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.

## Guidelines:

All topics should be related to Python or the /r/python community.
Be respectful and follow Reddit's Code of Conduct.

## Example Topics:

1. New Python Release: What do you think about the new features in Python 3.11?
2. Community Events: Any Python meetups or webinars coming up?
3. Learning Resources: Found a great Python tutorial? Share it here!
4. Job Market: How has Python impacted your career?
5. Hot Takes: Got a controversial Python opinion? Let's hear it!
6. Community Ideas: Something you'd like to see us do? tell us.

Let's keep the conversation going. Happy discussing! 🌟

/r/Python
https://redd.it/1eyykga

Читать полностью…

Python Daily

deploying flask app

hey guys i made a small web app using flask. i want to buy a domain name and deploy it as a website so my friends can interact. what is a simple and easy to use hosting service? i'm talking upload and live since i'm not good with network knowledge. any suggestion will be greatly appreciated

/r/flask
https://redd.it/1eyqmvm

Читать полностью…

Python Daily

D What industry has the worst data?

Curious to hear - what industry do you think has the worst quality data for ML, consistently?

I'm not talking individual jobs that have no realistic and foreseeable ML applications like carpentry. I'm talking your larger industries, banking, pharma, telcos, tech (maybe a bit broad), agriculture, mining, etc, etc.

Who's the deepest in the sh**ter?

/r/MachineLearning
https://redd.it/1eyj7vq

Читать полностью…

Python Daily

Enhancing a CRM Project for Small Business Owners: Seeking Innovative Features and Ideas

I have an idea to build a Django-based CRM project for small business owners, where they can add clients and save their information. but this is simple thing, I'm looking for additional features and enhancements to make the project more robust and valuable. If you have any innovative ideas or suggestions, I’d love to hear them!

/r/django
https://redd.it/1eylla3

Читать полностью…

Python Daily

Sauron Vision Project

* **What My Project Does**

Hi guys,

I was building a bot to play DayZ (it's not going well :\^)

So I thought I'd leave the first part of the code here. It's simple but efficient. My program takes a screenshot from a window name (Ex: Chrome.exe) gets the size of the window in real-time, saves the capture and uses CV2 to match to a templates' folder. Finally returns matches in a log and bounding boxes in the processed folder, obviously you could save that info however you want ;)

I've put two versions of the code, one in full for reading and the other with utils so you can extend. For example, before gray scaling, you could get exact colours at specific pixels for state representation. Or add contours processing, OCR, etc

[https://github.com/hadriloge/Sauron](https://github.com/hadriloge/Sauron)

* **Target Audience** (e.g., Is it meant for production, just a toy project, etc.

I guess people who like to automate things, probably looking at dynamic environments like games or video feeds, or just live usage.

* **Comparison** (A brief comparison explaining how it differs from existing alternatives.)

I know that Pyautogui has some features to automate directly based on images, but the idea here was to use PyWin32 and Psutil so that

/r/Python
https://redd.it/1eygt5i

Читать полностью…

Python Daily

How I hacked together GPT4 and government data

# What My Project Does?

I built an AI system that uses only official USA government sources with GPT4 to help us navigate the bureaucracy.

The result is pretty cool, you can play around at https://app.clerkly.co/ .

# Target Audience

The target audience is everyone who has problems with dealing with USA government bureaucracy.

# Comparison

Google: I use only official government sources for answering your queries
ChatGPT: I use a combination of agents and only government sources to provide answers with high-quality quotable sources .

# How Did I Achieve This?

1. Locating Data

First, it's important to gather all the essential government data you need. This can involve a lot of time browsing various federal and local government websites. Your goal is to find the domains that hold the relevant information. Be patient and thorough during this phase because the quality of your data depends on it.

2. Scraping Data

To collect data from these sites, I used Apify (https://apify.com/). This platform allows you to set up web crawlers which can automatically extract data from web pages. However, setting up these crawlers can be tricky:

You'll have to make sure to exclude irrelevant pages like random address books or archives.
No single format works for all websites, so you'll need

/r/Python
https://redd.it/1exp952

Читать полностью…

Python Daily

Sharing my FREE Python for Data Science Course so that you can get started with Data Science

I recently ran a 1 month [Python for Data Science BootCamp](https://drive.google.com/drive/folders/1qCQxaeyt4ODAy4KXfRJ_nDestCpmPwFw?usp=drive_link) for people interested in starting a career in Data Science. It was tailored very specifically for Data Science, meaning, we covered topics like:

* Pandas Libraray
* Data Handling (CSV/Excel files)
* Exploring Datasets
* Data Cleaning and Preprocessing
* Data Manipulation

All while also learning the basics and fundamentals of Python.

Our BootCamp was designed to be easy to understand for even people with no background in coding.

We had over 200 signups and the BootCamp was well received.

Now I'm moving towards starting a Data Science Comprehensive BootCamp next month. However for all those who could not take part in the Python BootCamp, I wanted to give away access to free recordings from our BootCamp. No signups, no emails required, no nothing! All for free, so that you can get a taste of what its like to get started in Data Science.

You can get the access to the recordings [here](https://drive.google.com/drive/folders/1qCQxaeyt4ODAy4KXfRJ_nDestCpmPwFw?usp=drive_link).

Let me know if you have any questions regardings the BootCamps, or any career related questions etc.

We also gave out a free resource to those interested in Data Science before, so if you want that, just drop a comment below.

/r/Python
https://redd.it/1exwp9r

Читать полностью…

Python Daily

Just Submitted My First Shopify App Built with Django

https://preview.redd.it/if7wawmou2kd1.png?width=2880&format=png&auto=webp&s=3ddd2d2d3253d46ce8523da236673b4886826333

Hey everyone,

I’m really proud to share that I’ve just submitted my first Shopify app for review, and it’s all built with Django.

This project has been both challenging and rewarding. I started with limited knowledge about integrating Django with Shopify, but after diving deep into the Shopify API, I’ve learned a ton. One of the biggest hurdles was handling webhooks and ensuring everything worked smoothly across different Shopify stores. Debugging and testing were also challenging since Shopify’s environment can be tricky when you’re new to it.

Another challenge was making sure the app could handle real-world scenarios, like syncing large numbers of products efficiently and managing data across multiple stores. I had to think about performance, scalability, and also making the user experience as seamless as possible.

Through this experience, I’ve gained a lot of confidence in building web applications, especially in how to structure Django projects for SaaS platforms like Shopify. There were moments when things didn’t work as expected, but those turned into valuable learning opportunities.

Now that the app is submitted, I’m waiting for the review, hoping it gets approved soon. If anyone is looking to build a Shopify app or has questions about using Django with Shopify, I’m happy to

/r/django
https://redd.it/1ey062g

Читать полностью…

Python Daily

Rye and uv: August is Harvest Season for Python Packaging

https://lucumr.pocoo.org/2024/8/21/harvest-season/

Author of Rye shares thoughts on latest uv release.

> If you are using Rye today, consider this blog post as a reminder that you should probably starting having a closer look at uv and give feedback to the Astral folks.

/r/Python
https://redd.it/1exnyiy

Читать полностью…

Python Daily

Ugly CSV Generator: Stress-Test Your Data Pipelines with Real-World Ugliness! 🐍💣

Hello, r/Python! 👋

[Ugly CSV Generator](https://github.com/LucaCappelletti94/ugly_csv_generator) has a rather self-evident goal: to introduce some controlled chaos into your data pipelines for stress testing purposes.

I started this project as a simple set of scripts as, during my PhD, I had to deal often with documents that claimed to be CSVs from the most varied sources, and I needed to make sure my data pipelines were ready for (almost) anything. I have recently spent a bit of time making sure the package is up to par, and I believe it is now time to share it.

Alongside this uglifier, I have also created a prettifier that tries to automatically make up for this messiness - I need to finish polishing it and I will share it in a few weeks.

# What my project does

[Ugly CSV Generator](https://github.com/LucaCappelletti94/ugly_csv_generator) is a Python package that *intentionally* uglifies CSV files stopping short from mangling the actual data. It mimics real-world "oopsies" from poorly formatted files—things that are both common and unbelievable when humans are involved in manual data entry. This tool can introduce all kinds of structured chaos into your CSVs, including:

* 🧀 G**ruyère your CSV**: Simulate CSVs riddled with empty rows and columns - this can happen when

/r/Python
https://redd.it/1exkxm8

Читать полностью…

Python Daily

uv: Unified Python packaging

https://astral.sh/blog/uv-unified-python-packaging

This is a new release of uv that moves it beyond just a pip alternative. There's cross platform lock files, tool management, Python installation, script execution and more.

/r/Python
https://redd.it/1ex6n9k

Читать полностью…

Python Daily

The Importance of API Development in Modern Software Engineering
https://www.quickwayinfosystems.com/blog/importance-of-api-development-in-software-engineering/

/r/flask
https://redd.it/1exhyz2

Читать полностью…

Python Daily

inject xss to me

Source code: https://github.com/IdanHajbeko/inject\_xss\_to\_me

website: https://unified-first-rooster.ngrok-free.app/

What My Project Does

My Python application hosts a website where people can post XSS injections freely. Do whatever you want with it.

Target Audience
Anyone from someone who wants to see the mess that will be there, to someone who will try to inject and destroy the site, to a Python developer who just wants to see how the website works.

/r/flask
https://redd.it/1exg64u

Читать полностью…

Python Daily

Interview with Sean Law, creator of STUMPY

I interviewed Sean Law about STUMPY, a library for performant time series data mining. STUMPY efficiently computes something called the matrix profile, which is a vector that represents the distances between all subsequences within a time series and their nearest neighbors. It's been downloaded over 9 million times and is used for a variety of data mining tasks.

/r/Python
https://redd.it/1ex34ec

Читать полностью…

Python Daily

Django Rest Framework Vs Flask Vs Fast Api? which one for Api creation as a Django dev?

in my last post,i asked about Django rest framework and alot of people talked about how its bloated and stuff

you should learn something else


i dont have time to experiment so i want a single answer,which one is the best one to get a job as a Django dev?

/r/flask
https://redd.it/1ewu9md

Читать полностью…

Python Daily

Open-Source SocialStarter Project

Six months ago, I started working on SocialStarter, an open-source Django project aimed at creating a flexible template for building social networks. The project includes features like posts, likes, comments, user relationships, and django-allauth for authentication. Unfortunately, due to an increasingly demanding workload, I haven’t been able to continue its development.

However, I believe in the potential of this project and the value of open-source collaboration. If you're someone just starting out and looking for a project to contribute to and learn from, I encourage you to jump in. SocialStarter offers a solid foundation, and with the right contributions, it could evolve into something significant. That’s the beauty of open-source—together, we can take a small idea and grow it into something impactful. If you’re interested, feel free to explore the GitHub repo and contribute.

/r/django
https://redd.it/1eys5bl

Читать полностью…

Python Daily

Master the python logging module

As a consultant I often find interesting topics that could warrent some knowledge sharing or educational content.
To satisfy my own hunger to share knowledge and be creative I've started to create videos with the purpose of free education for junior to medior devs.

My first video is about how the python logging module works and hopes to demystify some interesting behavior.

Hope you like it!

https://youtu.be/A3FkYRN9qog?si=89rAYSbpJQm0SfzP


/r/Python
https://redd.it/1eyn4n7

Читать полностью…

Python Daily

Need help with Import csv to database, Export to csv, and updating a table

I have a simply Flask app connected with postgres of a company data. I have everything linked and have search features as well as a couple table views. I want to add a section to import new csv into the database, export the database as a csv as well as a button to update a certain table (consists of inserts, select, truncate, and re insert). Would anyone be able to help me with this please.

/r/flask
https://redd.it/1eynpy2

Читать полностью…

Python Daily

Django Full Course for Beginners
https://youtu.be/6whz7Ujfpw0?si=x8HZ9jr3zo0gBHrX

/r/django
https://redd.it/1eyks47

Читать полностью…

Python Daily

Flask Mongo CRUD Package

I created a Flask package that generates CRUD endpoints automatically from defined mongodb models. This approach was conceived to streamline the laborious and repetitive process of developing CRUD logic for every entity in the application. You can find the package here: flask-mongo-crud · PyPI

Your feedback and suggestions are welcome :)

/r/flask
https://redd.it/1ey1isa

Читать полностью…

Python Daily

I wrote a python wrapper for SDL3.

**What My Project Does**

[PySDL3](https://github.com/Aermoss/PySDL3) allows developers to use [SDL3](https://github.com/libsdl-org/SDL) (which is a c++ library) in python.

**Target Audience**

[PySDL3](https://github.com/Aermoss/PySDL3) was developed to help developers who aim to develop games in python.

**Comparison**

[PySDL3](https://github.com/Aermoss/PySDL3) library is very similar to the PySDL2 library but it offers a modern SDL3 implementation instead.

**Example**
```python
import sdl3, ctypes, os, \
sys, colorsys, time

def main(argv):
print(f"loaded {sum(len(v) for k, v in sdl3.functions.items())} functions.")
result = sdl3.SDL_Init(sdl3.SDL_INIT_VIDEO | sdl3.SDL_INIT_EVENTS | sdl3.SDL_INIT_TIMER | sdl3.SDL_INIT_AUDIO)

if result:
print(f"failed to initialize library: {sdl3.SDL_GetError().decode().lower()}.")
return 1

window = sdl3.SDL_CreateWindow("Aermoss".encode(), 1200, 600, sdl3.SDL_WINDOW_RESIZABLE)

renderDrivers = [sdl3.SDL_GetRenderDriver(i).decode() for i in range(sdl3.SDL_GetNumRenderDrivers())]
print(f"available render drivers: {", ".join(renderDrivers)}")

renderer = sdl3.SDL_CreateRenderer(window, ("vulkan" if "vulkan" in renderDrivers else "software").encode())

if not renderer:
print(f"failed to create renderer: {sdl3.SDL_GetError().decode().lower()}.")
return 1

audioDrivers = [sdl3.SDL_GetAudioDriver(i).decode() for i in range(sdl3.SDL_GetNumAudioDrivers())]
print(f"available audio drivers: {", ".join(audioDrivers)}")


/r/Python
https://redd.it/1ey7fxk

Читать полностью…

Python Daily

Thursday Daily Thread: Python Careers, Courses, and Furthering Education!

# Weekly Thread: Professional Use, Jobs, and Education 🏢

Welcome to this week's discussion on Python in the professional world! This is your spot to talk about job hunting, career growth, and educational resources in Python. Please note, this thread is not for recruitment.

---

## How it Works:

1. Career Talk: Discuss using Python in your job, or the job market for Python roles.
2. Education Q&A: Ask or answer questions about Python courses, certifications, and educational resources.
3. Workplace Chat: Share your experiences, challenges, or success stories about using Python professionally.

---

## Guidelines:

- This thread is not for recruitment. For job postings, please see r/PythonJobs or the recruitment thread in the sidebar.
- Keep discussions relevant to Python in the professional and educational context.

---

## Example Topics:

1. Career Paths: What kinds of roles are out there for Python developers?
2. Certifications: Are Python certifications worth it?
3. Course Recommendations: Any good advanced Python courses to recommend?
4. Workplace Tools: What Python libraries are indispensable in your professional work?
5. Interview Tips: What types of Python questions are commonly asked in interviews?

---

Let's help each other grow in our careers and education. Happy discussing! 🌟

/r/Python
https://redd.it/1ey52d1

Читать полностью…

Python Daily

Dockerized Django starter template.

Hey everyone, Just wanted to share a django docker template I have created.

Techstack:

1. Django
2. Postgres
3. Nginx
4. Gunicorn
5. Certbot


https://github.com/alexdeathway/headstart-django

/r/django
https://redd.it/1exn5qk

Читать полностью…

Python Daily

Flask vs Node.js vs Spring for backend of web scraping app?

Hello everyone

What would be the best framework for the backend of a web scraping app?

I’m leaning towards Flask because I’ve done some Instagram scraping with it in the past and kind of dislike Spring Boot.

Django seems too heavyweight for this purpose.

Or could Node.js be better/easier in some instances? Even though Python is the go-to for web scraping?

For frontend I’m thinking Vue.js.

Which one would you choose? Thank you!

/r/flask
https://redd.it/1exv6a4

Читать полностью…

Python Daily

[R] HiRED: Attention-Guided Token Dropping for Efficient Inference of High-Resolution Vision-Language Models in Resource-Constrained Environments
https://arxiv.org/pdf/2408.10945

/r/MachineLearning
https://redd.it/1exhg0f

Читать полностью…

Python Daily

Axios give network error when I try to request to flask in reactnative

This is my app config in flask:

from flask import Flask
from flaskcors import CORS
from flask
sqlalchemy import SQLAlchemy
from dotenv import loaddotenv
from flask
session import Session
from flaskbcrypt import Bcrypt
import os
import redis

load
dotenv()

class ApplicationConfig():
SECRETKEY = os.environ["SECRETKEY"]

SQLALCHEMYDATABASEURI = "sqlite:///database.db"
SQLALCHEMYTRACKMODIFICATIONS = False
SQLALCHEMYECHO = True

SESSION
TYPE = "redis"
SESSIONPERMANENT = False
SESSION
USESIGNER = True
SESSION
REDIS = redis.fromurl("redis://127.0.0.1:6379")


app = Flask(name)
app.config.from
object(ApplicationConfig)
bcrypt = Bcrypt(app)


/r/flask
https://redd.it/1exh3pl

Читать полностью…

Python Daily

Wednesday Daily Thread: Beginner questions

# Weekly Thread: Beginner Questions 🐍

Welcome to our Beginner Questions thread! Whether you're new to Python or just looking to clarify some basics, this is the thread for you.

## How it Works:

1. Ask Anything: Feel free to ask any Python-related question. There are no bad questions here!
2. Community Support: Get answers and advice from the community.
3. Resource Sharing: Discover tutorials, articles, and beginner-friendly resources.

## Guidelines:

This thread is specifically for beginner questions. For more advanced queries, check out our [Advanced Questions Thread](#advanced-questions-thread-link).

## Recommended Resources:

If you don't receive a response, consider exploring r/LearnPython or join the Python Discord Server for quicker assistance.

## Example Questions:

1. What is the difference between a list and a tuple?
2. How do I read a CSV file in Python?
3. What are Python decorators and how do I use them?
4. How do I install a Python package using pip?
5. What is a virtual environment and why should I use one?

Let's help each other learn Python! 🌟

/r/Python
https://redd.it/1exb4w8

Читать полностью…

Python Daily

Holy f*** this is hard

Flask is by far the hardest thing I've ever done. It's a bit discouraging to hear people say that it's super easy and you should be able to pick it up in a couple days.

I've been going at it for a month and I'm still struggling. Granted I haven't put that many hours in yet (in absolute hours), but still I feel like I should've come a lot further than I have given the hours that I've put in.

Learning HTML+CSS+JS was a breeze. This flask/backend thing is another dimension. If something goes wrong you're donezo.

Flask giving you so much choice and options is also a blessing and a curse I feel like. It's almost like you have to learn mutliple ways to do things just to understand code others produce. Whereas for django (I'd imagine) it's mostly just 1 way of doing things.

/r/flask
https://redd.it/1ex9xdd

Читать полностью…

Python Daily

flask server

Hey guys! Started learning python a couple months back. Made a little chatbot as a project. it got some features like live weather updates, joke of the day and currency conversions.

i wanted to make this chatbot into an interactive website so my friends can interact with it as well. However besides a little HTML, my knowledge on web dev is poor. What should be my next steps to make it into a website?

I tried connecting my backend and front end using a flask server, but when i import my chatbot into my flask server, it starts behaving like the chatbot instead of a web server. Would really appreciate all the advice and ideas

Thanks!

/r/flask
https://redd.it/1ewwldc

Читать полностью…

Python Daily

Looking for a 3D library

Is there a package to transform a moving cam's output into a 3D model of the surroundings?

I have seen a video, a long time ago, of a guy coding something like this live, and plugging a video of his dashcam to model his neighbourhood. But I can't find it.

I want to make a model of my backyard.

/r/Python
https://redd.it/1ewveft

Читать полностью…
Подписаться на канал