Отправляет email-рассылки с помощью сервиса Sendsay

RSS-канал «Python»

Доступ к архиву новостей RSS-канала возможен только после подписки.

Как подписчик, вы получите в своё распоряжение бесплатный веб-агрегатор новостей доступный с любого компьютера в котором сможете просматривать и группировать каналы на свой вкус. А, так же, указывать какие из каналов вы захотите читать на вебе, а какие получать по электронной почте.

   

Подписаться на другой RSS-канал, зная только его адрес или адрес сайта.

Код формы подписки на этот канал для вашего сайта:

Форма для любого другого канала

Последние новости

Friday Daily Thread: r/Python Meta and Free-Talk Fridays
2024-03-29 03:00 /u/AutoModerator

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:

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! ��

submitted by /u/AutoModerator
[link] [comments]

Is this a Python or NumPy bug?
2024-03-29 02:44 /u/drbobb

Try running this code:

import numpy for x in range(60, 64): print(x) y = numpy.arange(x + 1)[-1] assert x == y assert x == int(y) assert (1 << x) == (1 << int(y)) assert (1 << x) == (1 << y) 

Python version is 3.11.2, NumPy is 1.24.2. Edit: forgot the import.

submitted by /u/drbobb
[link] [comments]

Anything similar to Kaggle's Datasets community?
2024-03-28 23:56 /u/Technical_Visual_272

Just like the title says, anything similar to Kaggle's Datasets community? Any recommendations? Looking for more online resources for public and private datasets.

submitted by /u/Technical_Visual_272
[link] [comments]

OTP messages flask application
2024-03-28 20:52 /u/Wonderful-Use8392

Hello all. I'm developing a flask application to automate some websites, one of them (airbnb) has a MFA to login and one workaround that I'm trying to do is to autenticate via SMS. I tryed to use Twilio but OTP are blocked because compliance. Anyone know what can I use to recieve OTP messages in cellphone number (virtual or not) and use this code in my automation? Thanks

submitted by /u/Wonderful-Use8392
[link] [comments]

Python state management
2024-03-28 19:12 /u/Extreme-Acid

Hey all,

I love what Django has with django-fsm. I require something but without Django, as there is no user interaction with the workflow. All inputs and outputs are either rabbitmq or another api. This is to be a workflow management system.

I am looking for state management backed up by database so we can not suffer if a k8s pod dies with all the states in memory. Some of our workflows could take weeks.

Is it still best to make this in Django or is there a database backed state management module available?

I see pytransitions but I would have to add database logging to it.

submitted by /u/Extreme-Acid
[link] [comments]

Creating a GeoTIFF raster XYZ tile service in python with caching capability
2024-03-28 19:10 /u/iamgeoknight

submitted by /u/iamgeoknight
[link] [comments]

Automating Python with Google Cloud
2024-03-28 18:29 /u/neb2357

I just published a tutorial series on how to automate a Python script in Google Cloud using Cloud Functions and/or Cloud Run. Feedback would be great. Thanks!

submitted by /u/neb2357
[link] [comments]

Is ReactPy potentially dead in favor of Reflex's popularity
2024-03-28 16:11 /u/OkMathematician1511

I googled a lot but all the topics are at least one year old. Meanwhile, the number of stars for the Reflex repository is indecently high.
Does this mean that if you now (march 2024) choose a framework to study from scratch, it is better to immediately focus on Reflex. What is your experience?
Additional question: I see a thousand other frameworks such as ReactPy, Nicegui, Fleet and all the others from the A-Class list. Where can I find comparisons of their architectures, this is what will determine their fate and not the number of beautiful presentations.

submitted by /u/OkMathematician1511
[link] [comments]

No More Cutting in Line: Crafting Fairness in Queues using RQ in Python
2024-03-28 15:29 /u/soap94

I was trying to tackle the problem of queue fairness and here's how I solved it.

submitted by /u/soap94
[link] [comments]

The 77 French legal codes are now available via Hugging Face's Datasets library with daily updates
2024-03-28 10:36 /u/louisbrulenaudet

This groundwork enables ecosystem players to consider deploying RAG solutions in real time without having to configure data retrieval systems.

Link to Louis Brulé-Naudet's Hugging Face profile

```python import concurrent.futures import logging

from datasets from tqdm import tqdm

def dataset_loader( name:str, streaming:bool=True ) -> datasets.Dataset: """ Helper function to load a single dataset in parallel.

Parameters ---------- name : str Name of the dataset to be loaded. streaming : bool, optional Determines if datasets are streamed. Default is True. Returns ------- dataset : datasets.Dataset Loaded dataset object. Raises ------ Exception If an error occurs during dataset loading. """ try: return datasets.load_dataset( name, split="train", streaming=streaming ) except Exception as exc: logging.error(f"Error loading dataset {name}: {exc}") return None 

def load_datasets( req:list, streaming:bool=True ) -> list: """ Downloads datasets specified in a list and creates a list of loaded datasets.

Parameters ---------- req : list A list containing the names of datasets to be downloaded. streaming : bool, optional Determines if datasets are streamed. Default is True. Returns ------- datasets_list : list A list containing loaded datasets as per the requested names provided in 'req'. Raises ------ Exception If an error occurs during dataset loading or processing. Examples -------- >>> datasets = load_datasets(["dataset1", "dataset2"], streaming=False) """ datasets_list = [] with concurrent.futures.ThreadPoolExecutor() as executor: future_to_dataset = {executor.submit(dataset_loader, name): name for name in req} for future in tqdm(concurrent.futures.as_completed(future_to_dataset), total=len(req)): name = future_to_dataset[future] try: dataset = future.result() if dataset: datasets_list.append(dataset) except Exception as exc: logging.error(f"Error processing dataset {name}: {exc}") return datasets_list 

req = [ "louisbrulenaudet/code-artisanat", "louisbrulenaudet/code-action-sociale-familles", "louisbrulenaudet/code-assurances", "louisbrulenaudet/code-aviation-civile", "louisbrulenaudet/code-cinema-image-animee", "louisbrulenaudet/code-civil", "louisbrulenaudet/code-commande-publique", "louisbrulenaudet/code-commerce", "louisbrulenaudet/code-communes", "louisbrulenaudet/code-communes-nouvelle-caledonie", "louisbrulenaudet/code-consommation", "louisbrulenaudet/code-construction-habitation", "louisbrulenaudet/code-defense", "louisbrulenaudet/code-deontologie-architectes", "louisbrulenaudet/code-disciplinaire-penal-marine-marchande", "louisbrulenaudet/code-domaine-etat", "louisbrulenaudet/code-domaine-etat-collectivites-mayotte", "louisbrulenaudet/code-domaine-public-fluvial-navigation-interieure", "louisbrulenaudet/code-douanes", "louisbrulenaudet/code-douanes-mayotte", "louisbrulenaudet/code-education", "louisbrulenaudet/code-electoral", "louisbrulenaudet/code-energie", "louisbrulenaudet/code-entree-sejour-etrangers-droit-asile", "louisbrulenaudet/code-environnement", "louisbrulenaudet/code-expropriation-utilite-publique", "louisbrulenaudet/code-famille-aide-sociale", "louisbrulenaudet/code-forestier-nouveau", "louisbrulenaudet/code-fonction-publique", "louisbrulenaudet/code-propriete-personnes-publiques", "louisbrulenaudet/code-collectivites-territoriales", "louisbrulenaudet/code-impots", "louisbrulenaudet/code-impots-annexe-i", "louisbrulenaudet/code-impots-annexe-ii", "louisbrulenaudet/code-impots-annexe-iii", "louisbrulenaudet/code-impots-annexe-iv", "louisbrulenaudet/code-impositions-biens-services", "louisbrulenaudet/code-instruments-monetaires-medailles", "louisbrulenaudet/code-juridictions-financieres", "louisbrulenaudet/code-justice-administrative", "louisbrulenaudet/code-justice-militaire-nouveau", "louisbrulenaudet/code-justice-penale-mineurs", "louisbrulenaudet/code-legion-honneur-medaille-militaire-ordre-national-merite", "louisbrulenaudet/livre-procedures-fiscales", "louisbrulenaudet/code-minier", "louisbrulenaudet/code-minier-nouveau", "louisbrulenaudet/code-monetaire-financier", "louisbrulenaudet/code-mutualite", "louisbrulenaudet/code-organisation-judiciaire", "louisbrulenaudet/code-patrimoine", "louisbrulenaudet/code-penal", "louisbrulenaudet/code-penitentiaire", "louisbrulenaudet/code-pensions-civiles-militaires-retraite", "louisbrulenaudet/code-pensions-retraite-marins-francais-commerce-peche-plaisance", "louisbrulenaudet/code-pensions-militaires-invalidite-victimes-guerre", "louisbrulenaudet/code-ports-maritimes", "louisbrulenaudet/code-postes-communications-electroniques", "louisbrulenaudet/code-procedure-civile", "louisbrulenaudet/code-procedure-penale", "louisbrulenaudet/code-procedures-civiles-execution", "louisbrulenaudet/code-propriete-intellectuelle", "louisbrulenaudet/code-recherche", "louisbrulenaudet/code-relations-public-administration", "louisbrulenaudet/code-route", "louisbrulenaudet/code-rural-ancien", "louisbrulenaudet/code-rural-peche-maritime", "louisbrulenaudet/code-sante-publique", "louisbrulenaudet/code-securite-interieure", "louisbrulenaudet/code-securite-sociale", "louisbrulenaudet/code-service-national", "louisbrulenaudet/code-sport", "louisbrulenaudet/code-tourisme", "louisbrulenaudet/code-transports", "louisbrulenaudet/code-travail", "louisbrulenaudet/code-travail-maritime", "louisbrulenaudet/code-urbanisme", "louisbrulenaudet/code-voirie-routiere" ]

dataset = load_datasets( req=req, streaming=True
) ```

submitted by /u/louisbrulenaudet
[link] [comments]

Makefile Parser for Python
2024-03-28 05:36 /u/Cybasura

Hello everyone!

I am proud to introduce a Makefile Parser for Python that I think will be useful!

the link is Thanatisia/makefile-parser-python

As an introduction, I have been using python and been following this subreddit for quite awhile now, but this is my first post

Recently, I've been planning a side-project involving the use of Makefiles in Python, and I required the use of a Makefile parser ala json or pyyaml - whereby you would import a Makefile into python as objects/dictionary/lists. Hence, I started searching for a Makefile Parser.

The only parser I've found is PyMake(2) which is cool but it hasnt been updated since 2017 from what I recall and that it is more of a CLI utility, so with that in mind, I went about to make it

I hope that this will be as useful as it is for me, currently I am using this in a side project and i'm able to format it such that its printing out a typical Makefile structure right off the bat, which is pretty nice.

Additional information to the project

  • What My Project Does

This is a Makefile Parser, made in Python. The operational workflow is basically

Start --> Import File into dictionary --> Manipulation and Usage --> Processing --> Output --> Export

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

This is a library/package/module by design, much like json or pyyaml as mentioned but a smaller scale at the moment as its just started.

I'm not sure if it applies for you but its a parser/importer

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

I'm not sure if there are any other Makefile Parsers other than Pymake2, but the idea is similar to the aforementioned ideas

submitted by /u/Cybasura
[link] [comments]

Thursday Daily Thread: Python Careers, Courses, and Furthering Education!
2024-03-28 03:00 /u/AutoModerator

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! ��

submitted by /u/AutoModerator
[link] [comments]

Load Apple's .numbers Files into Pandas
2024-03-28 00:44 /u/nez_har

I recently ran into some challenges while trying to work with Apple's .numbers files on Linux. After a bit of experimentation, I figured out a workflow that simplifies the process. If you're planning to use .numbers files and need to load them into pandas, I've created a tutorial that covers the required dependencies and the steps to follow: https://nezhar.com/blog/load-apple-numbers-files-python-pandas-using-containers/.

Has anyone else here worked with .numbers files in Python? I’d love to hear about your experiences or any tips you might have.

submitted by /u/nez_har
[link] [comments]

Open Jupyter Notebooks in Kaggle? (from GitHub)
2024-03-27 17:52 /u/pbeens

I have a repo in GitHub with Jupyter Notebooks for students. On each notebook I have a link where the student can open the notebook in Colab (by changing the URL from https://github.com/ to https://githubtocolab.com/). The problem is that some school boards have Colab blocked.

Is there a similar technique I can use to open the notebooks in Kaggle?

Are there other sites I should be considering?

Thanks!

submitted by /u/pbeens
[link] [comments]

Type-Level Programming: a POC
2024-03-27 14:24 /u/Kiuhnm

While Python doesn't explicitly support Type-Level Programming, I've had some success with it.

I think this may be of interest to the Python community, so I'm sharing a POC (Proof Of Concept) I've written.

This POC is a statically typed list that encodes its length in its type so that, for instance, when you concatenate two lists, the result has the correct length, all done at type-checking time.

Read more on GitHub

submitted by /u/Kiuhnm
[link] [comments]

externally-managed-environment!
2024-03-27 03:53 /u/ReallyAngrySloths

What's the easiest method to manage an environment?
>pip3 install requests

gives a long error message that I shouldn't do this.

I see the venv method with 12 steps and some activation that may need to be done every time I use it.

Is there a native way to just have all your dependencies on one default python environment that won't break macos?

/rant

I know I can just figure out what the goals were of all the warnings, but who uses python? dev for devs or everyone that finds a cool project?

submitted by /u/ReallyAngrySloths
[link] [comments]

Wednesday Daily Thread: Beginner questions
2024-03-27 03:00 /u/AutoModerator

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:

Recommended Resources:

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! ��

submitted by /u/AutoModerator
[link] [comments]

Pdflib developer using python
2024-03-27 02:30 /u/Izzy_o0

Hello hope you're all well

Im a python devoloper been building dynamic PDF's for about 5 years using PDFLib in Python, I'm trying to get a new opportunity but searching is difficult in terms of what I do (building Bills using PDFLib/from simple to the most complex you can think of tables and everything ) I don't know really how to search for PDF developer or pdflib expert jobs using python... Does anyone have suggestions on how to search for a job in the field of work I do (generating dynamic PDFs/Billing)

Any advice would be appreciated, thanks

submitted by /u/Izzy_o0
[link] [comments]

does anyone know about an alternative to aeneas that works on python 3.12.1?
2024-03-27 00:34 /u/jonnisaesipylsur

i need some python library that can automatically generate a synchronization map between a list of text fragments and an audio file containing the narration of the text. aeneas does exactly that except it doesnt work on higher than 2.7 with windows.

submitted by /u/jonnisaesipylsur
[link] [comments]

"Mark as read" plugin for mkdocs-material
2024-03-26 15:57 /u/br2krl

Hi everyone, I developed a simple plugin for mkdocs-material.

What My Project Does:

In simple terms, this plugin allows users to mark pages as read and it shows a checkmark icon in navigation bar for the pages that was marked as read.
The plugin adds a button under the page content and when users clicks, it stores read date in localStorage. It shows a checkmark icon in the navigation panels for the pages that marked as read. It also shows a "document updated" icon if the pages that marked as read got an update.

Target Audience:

Anyone who has a website built with Material for MkDocs (a.k.a. mkdocs-material).
This plugin could be useful for the pages that user read by an order and wants to continue from where it left. I guess the Learn page of FastAPI documentation could be a great example to that.

Comparison: No alternative plugin exist for Material for MkDocs afaik

Project repo: github.com/berk-karaal/mkdocs-material-mark-as-read

You can try this plugin on the documentation website. Let me know what you think about this plugin. Also please share if you have a feature request or an idea to improve this plugin.

submitted by /u/br2krl
[link] [comments]