Masthash

#Python

ζ
9 minutes ago

>「0.1+0.2≠0.3」を説明できないエンジニアがいるらしい #Python - Qiita https://qiita.com/higashi_nc/items/9a5ea00415a008f06843

うーん「0.1 は二進数だと循環小数になるから実は正確に表現できていない」(表示上では切り上げ・切り捨てが行われてそれが見えていないだけ)という単純な説明だと、やっぱり非専門家の人が理解するのは難しいか…

# まぁ、正確には 0.1 == 1.0x10^-1 なので、計算前の単体の値であれば、たぶん浮動小数点型実数で正確に表せたりしてそうなんだけど、これを計算する際、仮数部を補正する際に循環化小数化してしまうとかいう話とかまで言い出すとややこしいからなぁ

Makaze
44 minutes ago

Day 9 in < 30 after (my) start! Let's gooooo #AdventofCode #Python

#TIL an interesting #Python "trick". Someone suggested that replacing `sys.stdin` with `open(0)` is shorter & eliminates need to `import sys`.
While that's great for code golf, obfuscated code, etc., it's impractical IRL. E.g.…
• Using `sys.stdin` is much more readable.
• If one isn't careful with `open(0)`, standard input could get closed & difficult (impossible?) to reopen in the same process. (Closing can be avoided by using `closefd=True` with `open()`.)

What are some good tech, #opensource #foss, or other related events and conferences coming in 2024 in North America?

Please reshare for reach 🙏

#linux #python #mastodon #softwaredevelopment

Sandy
2 hours ago

I'm a little confused as to why it's gotta be
choice = int(input (" > "))
and not
choice = (input (" > "))

for the if statements to work later.
I'm guessing that input always stores user input as a string, even when it's a number, so in order for it to function as an integer, you have to specify that that variable is storing an integer by using int(input()). #python

Leanpub
3 hours ago

Learn Kubernetes & Docker - .NET Core, Java, Node.JS, PHP or Python by Arnaud Weil is free with a Leanpub Reader membership! Or you can buy it for $11.99! http://leanpub.com/k8s #Devops #Docker #Aspnet #Python #NodeJs

Stu
3 hours ago

I was searching for numbers in a string. My method was failing, so I finally decided to look into regular expressions. I couldn't for the life of me figure out why when setting the minimum matching digits to 2, it was also returning numbers of length 1.

Until I noticed I had forgotten to delete my broken code, so it was doing the regex and my thing. Sigh.

#python

Makaze
3 hours ago

https://github.com/Makaze/csschooser

Interactive CLI CSS Chooser for making BeautifulSoup and Scrapy scripts.

CS50P certificate achieved in <1 week! I'm glad I did it; I've needed to make something for quite some time. #Python #CS50 #CS50p #CSS #BeautifulSoup #Scrapy

Python Weekly 🐍
4 hours ago

Gooey: Turn almost any Python command line program into a full GUI application

https://github.com/chriskiehl/Gooey

Discussions: https://discu.eu/q/https://github.com/chriskiehl/Gooey

#programming #python

James Bennett
4 hours ago

Today's post in my #Python and #Django "Advent calendar" series: raising awareness of the unittest module's "subtest" feature as a built-in way to do a lot of what pytest's parametrize() does:

https://www.b-list.org/weblog/2023/dec/09/python-unittest-subtest/

Buenas galera!

To fazendo alguns vídeos curtos sobre python para o canal do CodeShow~
Falando um pouco de strings
Youtube: https://www.youtube.com/shorts/Jwx-ugiUNIc
Instagram: https://www.instagram.com/p/C0oxOKVAPBk/
Github: https://github.com/codeshow/one-minute/blob/main/code/one-minute-003.py

Quem tiver sugestão de assunto manda aqui: https://github.com/codeshow/one-minute

Obrigada, paz :heartemo:

#python

phiofx
4 hours ago

@sb Its now mostly a distant memory but the first impression of #python after a lifetime of c++ etc. still lingers in my mind.

It was: wow, is it legal to have such an easy time, and dare I say fun, getting things done? :-)

Sean Boyer
4 hours ago

I'm several decades familiar with many, many programming languages, but have about a half-dozen that I'd consider *daily driver* languages. #python is not one of them.

I'm writing a lil' thing in #py, and have to keep looking up what modules to include for basic things... and every single time, the answer is exactly what I would have intuited.

"What would I call my datetime module if I were me? I'd call it *datetime*." It's *datetime*.

"If I wanted today's date, I'd want 'date.today()'". Yup.

I guess that's why it's so widely recommended as a starter language. Not starter because it's lacks advanced features, but because it lacks unnecessary confusion!

#pennyForMyThoughts

Tiago Ribeiro
5 hours ago

deep-translator: A flexible, free and unlimited tool to translate between different languages in a simple way using multiple translators.

https://github.com/nidhaloff/deep-translator

#Python

Jacob Scott
5 hours ago

Currently learning #Python as a long-time #RStats guy. Posting my thoughts as I go along.

Something that blew my mind today was realising that Python, while dynamically typed, _doesn't_ do automatic type coercion!

In the following situation, even though `a` is an int and `b` is a float, `+` doesn't coerce `a` to float, it just knows how to handle float + int (or int + float):

a, b, = 1, 1.5
c = a + b

This is subtle, but it really is a huge difference to R's approach. I actually like it...

Hacker News 50
6 hours ago

Gooey: Turn almost any Python command line program into a full GUI application

Link: https://github.com/chriskiehl/Gooey
Discussion: https://news.ycombinator.com/item?id=38586767

#python

Mäh-kinä
6 hours ago

LED 6x6 matrix
#raspberrypi #python

teamtuck
8 hours ago

Day 2 of #adventofcode : MUCH easier than day 1. Maybe now I'm just a bit more warmed up with Python and Regex?

#python

Preslav Rachev
9 hours ago

Q: How do I learn Django?

A: Skip the books. Django is not something you learn by solving theoretical puzzles. It is a framework meant for solving real needs. The best way to learn it is to concentrate on a small business idea, and jump right into it. Understanding the business and product needs will drive the rest of the process. The more you intertwine Django’s concepts with real world needs, the better.

#django #python #programming

Hugo van Kemenade
9 hours ago

🆕 🎨 Inspired by https://pep8.org, we've added green and red sidebars to the code examples at https://peps.python.org/pep-0008/ to help illustrate which are recommended and which are not recommended.

For accessibility, we don't rely on colour alone to convey information; as before, the info about whether examples are recommended is included in the text.
https://www.accessguide.io/guide/colorblind

We can add similar borders to help illustrate other PEPs too.

#Python #PEP8 #PEPs #PEP

Screenshot of PEP 8 with one block showing the correct way to indent code, it's left border is green. 

Below is a block showing the wrong way to indent, it has a red left border.
Same as the last image, but that is with the dark theme (white text on black background) and this is with the light theme (black on white).
Nican
10 hours ago

C# Dapper has a `QueryMultiple` method, which allows to run multiple SQL statements in a single network round trip. #csharp

https://www.learndapper.com/dapper-query/selecting-multiple-results#dapper-querymultiple

The same can be found with #JS, and from what I can tell, the performance is much better:

https://github.com/brianc/node-postgres/blob/master/packages/pg/test/integration/client/multiple-results-tests.js#L15-L24

But for the life of me, I can not find the same functionality in #Python. I am looking all over asyncpg, or related libraries, and I feel like I am going crazy, because I can not even figure out what part of the Postgres protocol allows for this functionality.

https://github.com/MagicStack/asyncpg

Leanpub
11 hours ago

The course Python Programming Bootcamp for Scientists by Gábor Szabó is on sale on Leanpub! Its suggested price is $99.00; get it for $49.50 with this coupon: https://leanpub.com/sh/1uh9NKyn #Python #ComputerProgramming #Software

Martin Geisler
11 hours ago

When teaching #rust, I often see people have a "Wow 🤯!" experience when I show #rustdoc #doctest system: you write small pieces of Rust code in your documentation and they are then executed as part of your test suite.

What people often don't know is that this system is ancient! I first met in #python and there it was introduced in 1999: https://groups.google.com/g/comp.lang.python/c/DfzH5Nrt05E/m/Yyd3s7fPVxwJ. That's 24 years ago!

I don't know if this was the first implementation of this concept?

Abans i després d'aplicar una mica de #CSS en la pàgina HTML d'inici de sessió en el servidor #Activitypub que estic programant amb #Python.

pàgina senzilla de HTML sense CSS
pàgina senzilla de HTML amb CSS
RasterInterrupt :verified:
12 hours ago

#HanukkahOfData 5783 Days 4 - 8:

I have just finished #HoD. I did almost everything in SQL with SQL Server.

The ASCII art of the candles and the rug is really beautiful.

https://hanukkah.bluebird.sh/5783/

Here are all my solutions:
https://github.com/nharrer/hanukkah-of

#SQL #Python

Joey Gibson :fez:
12 hours ago

Wow. #AdventOfCode Day 9 was shockingly easy. Day 8 wasn't that hard, either, so I'm worried that Day 10 is going to be a serious ass-kicker.

#AdventOfCode2023 #code #programming #python

Juhis
12 hours ago

Day 9 of #AdventOfCode was lovely.

I got a reason to introduce my readers to both itertools.pairwise and collections.deque, both wonderful modules.

https://hamatti.org/adventofcode/2023/day_9/

#Python #AdventOfCode2023

Tom Larrow
13 hours ago

I had a pretty epic run of bad rolls and my Pathfinder character was dead 20 minutes into last night's session. Since it isn't hard to role play a corpse, I grabbed my laptop and tinkered with some more of my #CreativeCoding sketches

This time I used the #python library Shapely to help track all of the paths being generated by particles going through the flow field and tried to keep each path from crossing over each other. #py5

Code: https://codeberg.org/TomLarrow/creative-coding-experiments/src/branch/main/x_0100/x_0118

a flow field of lines that in general looks like a @ symbol. It is made up of light blue, tan, black and gold strips of color
A dense flow field made up of thin lines, this one has lots of oranges and blues, with a tight spiral left of center and on the right lines curve up, then down
A flow field of red, green, black and light tan lines. this one almost looks like 2 trees on either side where the branches meet in the cop center. Below their branches are a pear shaped spiral
A bold flow field made up of solid green , red, black and gold lines. The right hand side of the images almost all of the lines are in a gradual curve pattern that looks like a ) The left hand side spirals towards a tight spiral in the center
Habr
13 hours ago

Автоматические бэкапы БД PostgreSQL по расписанию

В этой статье я поделюсь скриптом для создания бэкапов БД PostgreSQL за определенный период (например: 1, 2, 3 дня, 1 неделя, 1 месяц, 6 месяцев, каждый год). Объясню как запустить скрипт с помощью расписания crontab, покажу как настроить синхронизацию папки с бэкапами с облаком Yandex Disk.

https://habr.com/ru/articles/779520/

#telegram #python #backup #monitoring #cloud_storage

Jason Weatherly
13 hours ago

Enjoyed today's #AdventOfCode (Day 9). Pretty straightforward overall. Happy with the #python solve as it turned out pretty well. https://github.com/JamesTheBard/advent-of-code/blob/main/2023/09/solution.py

Siddhant Goel 👨🏻‍💻
13 hours ago

I started writing a blog post (for the @geniepy blog) on how to deploy Reflex.dev applications to Fly.io.

Luckily, I wrote another blog post a few weeks ago on how to run Reflex apps in production, so the one I'm writing right now builds on top of the previous one and saves me quite some work.

Hoping to hit the publish button this weekend! 🤞

#buildinpublic #blog #python

Tipa
13 hours ago

Advent of Code Days 8 and 9 — Ghost Story

It took me so long to figure out the Day 8 puzzle that I didn't write it up before bed, so twofer today to catch up.

https://chasingdings.com/2023/12/09/advent-of-code-days-8-and-9-ghost-story/

#AdventOfCode #aoc2023 #camel #DesertWalk #python

Ghosts relaxing at a watery oasis in the desert.
Yann Büchau :nixos:
13 hours ago

I think it's amazing how you can get from nothing to a fully parametric #STL of a toy screwdriver in eight lines of #Python code with #sdfCAD.

If I had tried the same in a graphical #CAD software, it'd probably taken me ages. Also, none of the buttery smooth curves the #sdf - based approach makes so easy.

(Code is in the image description.)

#3dPrinting #3dDesign

sdfCAD in Jupyter screenshot, showing the following Python code and a rendered 3D image of a toy screwdriver with removable tip below:


from sdf import *
# base handle shape
handle = sphere(diameter=(HANDLE_DIAMETER:=30)).stretch(ORIGIN, (HANDLE_LENGTH:=60)*Z)
# grip relief
handle -= cylinder(diameter=(GRIP_RELIEF_DIAMETER:=5)).circular_array(count=5,offset=diameter/2).k(GRIP_RELIEF_DIAMETER)
# front slip protection
handle -= torus(diameter/2, GRIP_RELIEF_DIAMETER).translate(HANDLE_LENGTH*0.75*Z).k(GRIP_RELIEF_DIAMETER) # Handstopperrille
# handle flat top
handle = handle.chamfer(3,at=HANDLE_LENGTH*Z, direction=-Z, e=ease.in_sine)
# shaft hole
handle -= (shaft:=((shaft:=slab(dx=(SHAFT_THICKNESS:=7.5),dy=7.5,k=2)) & slab(z0=(SHAFT_LENGTH:=HANDLE_LENGTH/2)))).dilate(CLEARANCE:=0.2)
# shaft tip
shaft = shaft.chamfer(SHAFT_THICKNESS/3,at=(HANDLE_LENGTH+20)*Z,direction=-Z, e=ease.in_sine)
# assemble and save to STL
(handle|shaft.translate(SHAFT_LENGTH*1.5*Z)).save("screwdriver.stl",step=0.5)

#NeuralNetwork #Theb #Python #лытдыбр

Возникла ситуация — из одной нейросетки надо выкачать сгенерированное, но зделоть это можно только по одному файлу, причем отдает она их с одинаковыми именами. Значит, надо следить за папкой и переименовывать с нумерацией.

Питонячий скрипт, написанный чат-ботом, заработал с первого раза, а после 1 небольшой правки — даже сделал то, что требуется.

Чесгря, немного удивлен. (Но Питон всё равно придется выучить, хотя бы на уровне чайника :coffeepot: )

Leanpub
15 hours ago

The bundle Level Up by Noah Gift, Alfredo Deza and Matt Harrison is on sale on Leanpub! Its suggested price is $209.95; get it for $85.00 with this coupon: https://leanpub.com/b/levelup/c/LeanpubWeeklySale2023Dec08 #Python #Devops #SoftwareEngineering #NodeJs #Ruby #Go #R

Lisp & Scheme Weekly
16 hours ago

basilisp-lang/basilisp: A Clojure-compatible(-ish) Lisp dialect targeting Python 3.8+

https://github.com/basilisp-lang/basilisp

Discussions: https://discu.eu/q/https://github.com/basilisp-lang/basilisp

#clojure #lisp #programming #python

Leanpub
16 hours ago

The bundle All My Current Books by Michael Driscoll is on sale on Leanpub! Its suggested price is $149.94; get it for $86.39 with this coupon: https://leanpub.com/b/allmycurrentbooks/c/LeanpubWeeklySale2023Dec08 #Python #ComputerProgramming #Software

Mickaël CANOUIL
17 hours ago
Jobs for Developers
17 hours ago

Zoox is hiring Senior/Staff Safety Research Engineer - Quantitative Risk Assessment

🔧 #python #seniorengineer
🌎 Foster City, California
⏰ Full-time
🏢 Zoox

Job details https://jobsfordevelopers.com/jobs/senior-staff-safety-research-engineer-quantitative-risk-assessment-at-zoox-com-jan-24-2022-971e53?utm_source=mastodon.world&ref=mastodon.world
#jobalert #jobsearch #hiring

I'm slowly developing a #minimalistic style in Go. This minimal but type-safe style is possible in any language with first-class functions and #generics, though some languages like Python have standard libraries that accommodate this function compositional style out of the box. 🤔

Because it's AoC code error handling is entirely non-existent 😂 Therefore sadly this style will never pass for good production grade Go code. Ah well!

https://github.com/RickWong/go-aoc/blob/main/2023/day09/day09_test.go

#AdventOfCode #aoc2023 #golang #python

Screenshot of Golang code that looks Pythonic, in Christmas theme.
christofsteel
17 hours ago

But I do like my solution :)

#adventofcode #aoc2023 #python

Code (solution to the advent of code 2023 day 09), also found here: https://git.k-fortytwo.de/christofsteel/aoc2023/-/raw/main/aoc/day09.py
Joleen Bothma
18 hours ago

If you're a data scientist looking for an IDE to code in, try JetBrains. They have seriously leveled up their game by introducing AI into their IDE.

#DataScience #AI #Python

https://blog.jetbrains.com/blog/2023/12/06/introducing-jetbrains-ai-and-the-in-ide-ai-assistant/

christofsteel
18 hours ago

Today Puzzle was a bit easier compared to the previous days. I solved part1 and part2 with the same naive approach.

This year I am NOT coding in #Haskell with #codegolfing, but in #python favoring readability.

I also made a framework, that downloads the puzzle inputs and example inputs, and runs the code on them, so my code is less cluttered.

https://git.k-fortytwo.de/christofsteel/aoc2023/-/blob/main/aoc/day09.py

I just completed "Mirage Maintenance" - Day 9 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/9

formamac
18 hours ago

Stream du samedi lancé 📢

- 12H00 : Lunch code, la pause déj' programmable !

- 14H00 : Stream 3310

Aujourd'hui : on parle iA (entre autre !) puis on passe sur le mooc "Apprendre à coder avec Python"

Le tout de manière simple et ludique 😉

C'est maintenant sur https://www.twitch.tv/formamac 🍎

#stream #streaming #twitch #python #ia #ai #hourofcode @python @pythonhub @chevrierfranckjeannic

Logos formamac et Twitch

Stream du samedi 09 décembre 2023 sur https://www.twitch.tv/formamac
Ankit Kumar
18 hours ago

Python allows single underscores ("_") to visually separate digits in large numbers, making them easier to read. These underscores are not part of the actual number.

#python

James Bennett
21 hours ago

Today's post in my #Python and #Django "Advent calendar" series shows how you can use the HTTPX library to make and test HTTP requests without lots of layers of mock objects and patching (with a hat tip to @hynek for a nice concise explanation of why you shouldn't mock what you don't own):

https://www.b-list.org/weblog/2023/dec/08/mock-python-httpx/

PyLadies Bot
22 hours ago

📝 "7 things I learned about GitHub Actions"

👤 Lacey Henschel

🔗 https://www.laceyhenschel.com/blog/2022/11/7/7-things-i-learned-about-github-actions

#pyladies #python

Dinakar
1 day ago

Due to a stupid mistake I made very early in the project, I had to change a Class name, code file name and all corresponding references and test cases. Boy, what a chore.

Visual Studio Python extension offered to refactor with new Class name but only changed few references, making the task worse 🙁

Anyway I’m done with it and ready to enjoy the weekend with some NBA and NFL. #programming #python

Cedric
1 day ago

Playing with #ev3dev and #Python for my child....

Photo of a portion of Python code which is supposed to control a Lego mindstorm.
Sharon Machlis
1 day ago

If you want to get started doing Web scraping with Python, this tutorial is very well done.
By Cody Winchester for the NICAR @IRE_NICAR (National Institute for Computer Assisted Reporting - that is, data journalism) conference early this year
https://github.com/cjwinchester/nicar23-python-scraping

#python #WebScraping #scraping @IRE_NICAR @python

Łukasz Langa
1 day ago

I just released #Python 3.11.7 on #deadsnakes, and Anthony Sottile released 3.12.1 and 3.13.0a2.

Yeah, from now on, I'll be helping him get the releases out as part of the regular CPython release process.

https://github.com/deadsnakes/python3.11/actions/runs/7145158923

Michael Kennedy
1 day ago

We had a great recording yesterday with @ericholscher, @charliermarsh, @foosel, @samuelcolvin, @tiangolo, and @willmcgugan on @talkpython. I’m looking forward to sharing the episode with you early next year.

During the stream, one of the listeners said it reminded them of an “Avengers” emergency meeting for #Python Open Source. What do you think:

Video call.
Martijn Faassen
1 day ago

Back in the late 90s I discovered #python and a few weeks later I had a job writing Python ("Can I use Python?" "Is the code readable?" "Yes"). I saw people post how they wished they could use it for their job.

Now I see people post that they wish they could write Rust professionally. I am over a year in. It did take me a few years of on and off learning as obtaining Rust proficiency can take a little while.

The Rust jobs are out there, but you may have to make them

#rustlang

IBBoard
1 day ago

Is it possible to improve the refactoring in #VSCode?

I was using #Eclipse nearly 20 years ago now and its Java refactoring was FAR superior to what VS Code has.

It might be a Python vs Java thing, but some of it is simple stuff like "extract variable" extracting _all_ instances in scope, or being able to rearrange function arguments.

#SoftwareDevelopment #Programming #Python

Is the easiest way to find the location of the smallest nonzero element of a numpy floating point array/matrix really:

  1. Set all the 'small enough' entries to np.nan
  2. Use np.nanargmin

(context: I am using scipy.spatial.distance.cdist to generate a distance matrix of all the objects in a simulation, but I want to find the pair of closest different objects and remove that pair from the distance matrix, before iterating)

#python #numpy

WOW! You helped us raised more than 2x what we raised last year with the PyCharm discount 🤩 We are so incredibly grateful for you and JetBrains! #python

The promo might be over, but you can still support the PSF in 2023: https://www.python.org/psf/donations/2023-q4-drive/

Nate Gaylinn
1 day ago

I just published a new coding project on github!

This is an early exploration of what I call an “epigenetic algorithm.” It’s inspired by an observation: in living cells, the process of evolution is actively managed by the cell, which itself is an evolved mechanism. Using evolution to optimize evolution seems like a powerful trick, so I’m trying to reproduce it in small-scale AI experiments. I hope to make evolutionary computing more open-ended, more successful in vast search spaces, and less biased by the programmer. In this case, I’m generating cool looking Game of Life simulations, but I hope to find many more practical applications in the future.

I hope folks find this interesting, and I’d love to hear your thoughts and feedback!
Presentation: https://docs.google.com/presentation/d/1ZIYj8Rg4xPHukQ-Glk9_IZTgimEYh5dtWsyXrbkX9Dc/edit?usp=sharing
Code: https://github.com/ngaylinn/epigenetic-gol-v1
Results: https://github.com/ngaylinn/epigenetic-gol-v1-results

#ai #evolution #alife #programming #python #cuda #gameoflife #github

David Zaslavsky
1 day ago

@bk1e @tiberiuichim And (I think) it's worth emphasizing that if that is the reason it's taking so long, it's not Poetry's fault, it's because PyPI does not make it easy to bulk-download package metadata to check dependencies. (The situation is probably a little better if it only has to consider newer package versions where there is a separate metadata file, or at least I would hope so)

#Python

Finding anything about f-strings docs in docs.python.org is hard (and I say this even as a core dev 🤨)

"F-strings" is like a "common name" that everybody knows now, but...it wasn't its original name.

First, the PEP for it is (PEP 498) is called "Formatted String Interpolation"

Then, CPython officially documents this feature not under "f-strings" heading but as "Formatted String Literal"

😵‍💫 🤕

#Python #fstrings #docs

Browser screenshot showing docs.python.org/3/reference/lexical_analysis.html

2.4.3 Formatted string literals
New in version 3.6

A formatted string literal or f-string is a string literal that is prefixed with 'f' or 'F'
teamtuck
2 days ago

RealPython is subscription based, locking things behind a paywall.

#python

teamtuck
2 days ago

As someone who has “spotty” knowledge, ranging from beginner to intermediate, about #python , can anyone recommend a good training course to fill in all the gaps? I’m thinking about building on my knowledge of Python and getting a better understanding of it. 
#question #askfedi #programming

#Python para quem curte #Processing e #ProgramaçãoCriativa pra quem curte Python.

Dois encontros online, sábado 9/12 e sábado 16/12, entre 10h e 12h da manhã, horário de São Paulo.

Quem sabe você conhece alguém que iria gostar de participar? Quem sabe você não quer oferecer essa atividade como um presente para alguém? Contribuição sugerida de R$100

https://form.jotform.com/233352075438658

código Python à esquerda no Thonny IDE, usando numpy e py5 que produz imagem colorida a direita com círculos concêntricos que com gradientes que fazem os aneis que se formam entre os círculos parecerem levemente abaulados.
Dan Jacob
2 days ago

My #python project uses Poetry for development, but I have a git precommit that generates requirements*.txt files for production and CI. Poetry is great for syncing all your dependencies but you probably don't want to install it on your deployment images.

Juhis
2 days ago

In today's spooky #AdventOfCode Day 8, my puzzle senses were tingling and that led me to the right direction.

Years of doing these puzzles is finally paying off.

https://hamatti.org/adventofcode/2023/day_8/

#Python #AdventOfCode2023

James Bennett
2 days ago

Today's post in my #Python and #Django “Advent calendar" series: using "pip install" as safely and securely as possible (with a hat tip to @brettcannon for being the first person I eve saw explain this stuff concisely).

https://www.b-list.org/weblog/2023/dec/07/pip-install-safely/

David Zaslavsky
2 days ago

@glyph Kind of a weird PEP overall, if you ask me... But this is the first I'm hearing about it so I dunno, maybe it'll make more sense once I get to think about it.

#Python

Glyph
2 days ago

PEP 593 is a bit vague on how you’re supposed to actually consume arguments to `Annotated`; here is my proposal.

https://blog.glyph.im/2023/12/annotated-at-runtime.html

#python #programming #mypy

Alexandre B A Villares
2 days ago

Dois encontros online,sábados 9 e 16/12, 10h da manhã:
#Python para quem curte #Processing e #Programaçãocriativa pra quem curte Python.
https://form.jotform.com/233352075438658

Robin
2 days ago

Last month in Wasm - Python
#python #wasm #componentmodel

Brett Cannon (@brettcannon) from Microsoft has added a build script for building Python for WASI.
https://github.com/python/cpython/blob/main/Tools/wasm/wasi.py
https://github.com/python/cpython/blob/main/Tools/wasm/README.md#wasi-wasm32-wasi

Joel Dice from Fermyon and Peter Huene (@peterhuene) from Fastly have updated Componentize-Py from Wasmtime 13 up to 15 and are planning to be ready for Wasmtime 16 on release.
https://github.com/bytecodealliance/componentize-py/pull/43
https://github.com/bytecodealliance/componentize-py/pull/44

At 20tab we've always been involved in Open Source and we're part of the Python and Django community 🐍

We're working with the Django Software Foundation to improve the UX of its website 🌐

More👇
https://www.20tab.com/about-us/20blog/ux-django-website

#Python #Django #20tab #FOSS #FreeSoftware #OpenSource #DSF

Take a few minutes -- today or tomorrow -- to complete the Python Developers Survey 2023 and have a chance to win an amazing prize from JetBrains! 🎁 #python https://survey.alchemer.com/s3/7554174/python-developers-survey-2023

Daniel Kuhl
2 days ago

Spent some time with my #Ubuntu 22.04 developing server and its DNS settings. It‘s really weird that there is more than one service which manipulates DNS. I can recommend reading through the man pages of systemd-resolved to understand how it works.

I had to edit the /etc/systemd/resolved.conf and deactivate the DNS stub listener. After that the /etc/resolv.conf won't be overwritten anymore and the netplan configuration works also after a reboot.

#DevNet #DevOps #Gitlab #Python #Ansible

AstraLuma
2 days ago

Hey #Python and #Sphinx

I've got a CLI to document in sphinx. Is there a good CLI domain plugin for Sphinx?

It's click, so I was thinking of using sphinx-click, but I figured I'd ask if there was a more systematic plugin.

Talk Python Podcast
2 days ago

Kicking off another @talkpython live stream in a few minutes! Join us and be part of the show with @mkennedy and guests. #python #podcast https://talkpython.fm/stream/live

James Jefferies
2 days ago

I thought I might try and buy my many bandcamp purchases using https://github.com/easlice/bandcamp-downloader - but I can't get it to do the cookie thing - instructions don't seem too great - anyone got it working? Basically it should iterate through your purchases and download them in the format of your choice. #python #bandcamp

Juhis
3 days ago

Over the years of learning and teaching programming, I've modeled card games, especially poker, so many times that day 7 of #AdventOfCode was straight-forward for me.

In terms of Python stuff, today's solution uses classes, inheritance and enums that I haven't yet used this year.

https://hamatti.org/adventofcode/2023/day_7/

#Python #AdventOfCode2023

Kedro
3 days ago

Today Juan Luis Cano Rodríguez from QuantumBlack, AI by McKinsey will give a workshop at PyData Global titled "Who needs ChatGPT? Rock solid AI pipelines with Hugging Face and Kedro" in which attendees will learn how to create a complex AI pipeline using Hugging Face transformers and turn it into a Kedro project that cleanly separates code from configuration and data.

Tune in at 16:00 UTC! https://global2023.pydata.org/cfp/talk/NFZDPN/

#python #pydata #pydataglobal #pydataglobal2023 #kedro #huggingface #aipipelines

Title slide "Who needs ChatGPT? Rock solid AI pipelines with Hugging Face and Kedro" with the logos of Kedro and LF AI & Data
Kushal Das :python: :tor:
3 days ago

In my team we have openings for #developer focused on #offensive / #redteam development. You will help to make the research and education sector better (focused specially for #sweden) with your skills and write all #opensource tools.

https://vr.se/sidfot/arbeta-hos-oss/lediga-jobb.html?rmpage=job&rmjob=441&rmlang=SE #python #sverige #svenska #sunet #infosec

Ask me any question about the position or team and culture.

Please boost for more reach

Talk Python Podcast
3 days ago

Latest episode is out!

#441: Python = Syntactic Sugar?

with @brettcannon and @mkennedy #python

https://talkpython.fm/episodes/show/441/python-syntactic-sugar

Esther Schindler
3 days ago

In this sample chapter from Learn Enough Python to Be Dangerous, you will obtain an introduction to testing in #Python, including a first look at test-driven development, or #TDD. https://www.informit.com/articles/article.aspx?p=3178912

Dave Pearson
3 days ago

Many (but not all) of the quick examples I write when helping people with #Textual go into my sandbox repo; I doubt most are useful past that conversation, some of them likely won't even run any more as they'll have tested bugs or things we've improved. Every so often I tidy the "root" of the repo, moving stuff into the "attic”.

It's getting kinda busy in the attic…

#Python

Chris White
3 days ago

I've finished the last part of my python beginners series that shows how to upload to PyPI using twine. It was a long two weeks but I hope the overall series is useful for beginners looking to put together a fairly modern python project. #python

https://dev.to/cwprogram/publishing-python-packages-to-pypi-with-twine-4h5

Source Markdown available as Creative Commons licensed:

https://github.com/cwgem/devtoarticles/blob/main/2023/10/basic_python/content7.md

I'm also currently open for work:

https://www.linkedin.com/in/chrischriswhite