Artwork

Michael Kennedy and Brian Okken에서 제공하는 콘텐츠입니다. 에피소드, 그래픽, 팟캐스트 설명을 포함한 모든 팟캐스트 콘텐츠는 Michael Kennedy and Brian Okken 또는 해당 팟캐스트 플랫폼 파트너가 직접 업로드하고 제공합니다. 누군가가 귀하의 허락 없이 귀하의 저작물을 사용하고 있다고 생각되는 경우 여기에 설명된 절차를 따르실 수 있습니다 https://ko.player.fm/legal.
Player FM -팟 캐스트 앱
Player FM 앱으로 오프라인으로 전환하세요!

#447 Going down a rat hole

35:46
 
공유
 

Manage episode 504132450 series 1305988
Michael Kennedy and Brian Okken에서 제공하는 콘텐츠입니다. 에피소드, 그래픽, 팟캐스트 설명을 포함한 모든 팟캐스트 콘텐츠는 Michael Kennedy and Brian Okken 또는 해당 팟캐스트 플랫폼 파트너가 직접 업로드하고 제공합니다. 누군가가 귀하의 허락 없이 귀하의 저작물을 사용하고 있다고 생각되는 경우 여기에 설명된 절차를 따르실 수 있습니다 https://ko.player.fm/legal.
Topics covered in this episode:
Watch on YouTube
About the show

Sponsored by DigitalOcean: pythonbytes.fm/digitalocean-gen-ai Use code DO4BYTES and get $200 in free credit

Connect with the hosts

Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too.

Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it.

Michael #1: rathole

  • A lightweight and high-performance reverse proxy for NAT traversal, written in Rust. An alternative to frp and ngrok.
  • Features
    • High Performance Much higher throughput can be achieved than frp, and more stable when handling a large volume of connections.
    • Low Resource Consumption Consumes much fewer memory than similar tools. See Benchmark. The binary can be as small as ~500KiB to fit the constraints of devices, like embedded devices as routers.
      • On my server, it’s currently using about 2.7MB in Docker (wow!)
    • Security Tokens of services are mandatory and service-wise. The server and clients are responsible for their own configs. With the optional Noise Protocol, encryption can be configured at ease. No need to create a self-signed certificate! TLS is also supported.
    • Hot Reload Services can be added or removed dynamically by hot-reloading the configuration file. HTTP API is WIP.

Brian #2: pre-commit: install with uv

  • Adam Johnson
  • pre-commit doesn’t natively support uv, but you can get around that with pre-commit-uv
  • $ uv tool install pre-commit --with pre-commit-uv
  • Installing pre-commit like this
    • Installs it globally
    • Installs with uv
    • adds an extra plugin “pre-commit-uv” to pre-commit, so that any Python based tool installed via pre-commit also uses uv
  • Very cool. Nice speedup

Brian #3: A good example of what functools.Placeholder from Python 3.14 allows

  • Rodrigo Girão Serrão
  • Remove punctuation functionally
  • Also How to use functools.Placeholder, a blog post about it.
  • functools.partial is cool way to create a new function that partially binds some parameters to another function.
  • It doesn’t always work for functions that take positional arguments.
  • functools.Placeholder fixes that with the ability to put in placeholders for spots where you want to be able to pass that in from the outer partial binding.
  • And all of this sounds totally obscure without a good example, so thank you to Rodgrigo for coming up with the punctuation removal example (and writeup)

Michael #4: Converted 160 old blog posts with AI

  • They were held-hostage at wordpress.com to markdown and integrated them into my Hugo site at mkennedy.codes

  • Here is the chat conversation with Claude Opus/Sonnet.

    • Had to juggle this a bit because the RSS feed only held the last 50. So we had to go back in and web scrape. That resulted in oddies like comments on wordpress that had to be cleaned etc.
    • Whole process took 3-4 hours from idea to “production”duction”.
    • The chat transcript is just the first round getting the RSS → Hugo done. The fixes occurred in other chats.
  • This article is timely and noteworthy: Blogging service TypePad is shutting down and taking all blog content with it

  • This highlights why your domain name needs to be legit, not just tied to the host. I’m looking at you pyfound.blogspot.com. I just redirected blog.michaelckennedy.net to mkennedy.codes

  • Carefully mapping old posts to a new archived area using NGINX config. This is just the HTTP portion, but note the /sitemap.xml and location ~ "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.+?)/?$" { portions. The latter maps posts such as https://blog.michaelckennedy.net/2018/01/08/a-bunch-of-online-python-courses/ to https://mkennedy.codes/posts/r/a-bunch-of-online-python-courses/

    server {  listen 80;  server_name blog.michaelckennedy.net;  # Redirect sitemap.xml to new domain  location = /sitemap.xml {  return 301 ;  }  # Handle blog post redirects for HTTP -> HTTPS with URL transformation  # Pattern: /YYYY/MM/DD/post-slug/ ->   location ~ "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.+?)/?$" {  return 301 $4/>;  }  # Redirect all other HTTP URLs to mkennedy.codes homepage  location / {  return 301 ;  } } 

Extras

Brian:

Michael:

Joke: Do you know him? He is me.

  continue reading

455 에피소드

Artwork

#447 Going down a rat hole

Python Bytes

1,331 subscribers

published

icon공유
 
Manage episode 504132450 series 1305988
Michael Kennedy and Brian Okken에서 제공하는 콘텐츠입니다. 에피소드, 그래픽, 팟캐스트 설명을 포함한 모든 팟캐스트 콘텐츠는 Michael Kennedy and Brian Okken 또는 해당 팟캐스트 플랫폼 파트너가 직접 업로드하고 제공합니다. 누군가가 귀하의 허락 없이 귀하의 저작물을 사용하고 있다고 생각되는 경우 여기에 설명된 절차를 따르실 수 있습니다 https://ko.player.fm/legal.
Topics covered in this episode:
Watch on YouTube
About the show

Sponsored by DigitalOcean: pythonbytes.fm/digitalocean-gen-ai Use code DO4BYTES and get $200 in free credit

Connect with the hosts

Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too.

Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it.

Michael #1: rathole

  • A lightweight and high-performance reverse proxy for NAT traversal, written in Rust. An alternative to frp and ngrok.
  • Features
    • High Performance Much higher throughput can be achieved than frp, and more stable when handling a large volume of connections.
    • Low Resource Consumption Consumes much fewer memory than similar tools. See Benchmark. The binary can be as small as ~500KiB to fit the constraints of devices, like embedded devices as routers.
      • On my server, it’s currently using about 2.7MB in Docker (wow!)
    • Security Tokens of services are mandatory and service-wise. The server and clients are responsible for their own configs. With the optional Noise Protocol, encryption can be configured at ease. No need to create a self-signed certificate! TLS is also supported.
    • Hot Reload Services can be added or removed dynamically by hot-reloading the configuration file. HTTP API is WIP.

Brian #2: pre-commit: install with uv

  • Adam Johnson
  • pre-commit doesn’t natively support uv, but you can get around that with pre-commit-uv
  • $ uv tool install pre-commit --with pre-commit-uv
  • Installing pre-commit like this
    • Installs it globally
    • Installs with uv
    • adds an extra plugin “pre-commit-uv” to pre-commit, so that any Python based tool installed via pre-commit also uses uv
  • Very cool. Nice speedup

Brian #3: A good example of what functools.Placeholder from Python 3.14 allows

  • Rodrigo Girão Serrão
  • Remove punctuation functionally
  • Also How to use functools.Placeholder, a blog post about it.
  • functools.partial is cool way to create a new function that partially binds some parameters to another function.
  • It doesn’t always work for functions that take positional arguments.
  • functools.Placeholder fixes that with the ability to put in placeholders for spots where you want to be able to pass that in from the outer partial binding.
  • And all of this sounds totally obscure without a good example, so thank you to Rodgrigo for coming up with the punctuation removal example (and writeup)

Michael #4: Converted 160 old blog posts with AI

  • They were held-hostage at wordpress.com to markdown and integrated them into my Hugo site at mkennedy.codes

  • Here is the chat conversation with Claude Opus/Sonnet.

    • Had to juggle this a bit because the RSS feed only held the last 50. So we had to go back in and web scrape. That resulted in oddies like comments on wordpress that had to be cleaned etc.
    • Whole process took 3-4 hours from idea to “production”duction”.
    • The chat transcript is just the first round getting the RSS → Hugo done. The fixes occurred in other chats.
  • This article is timely and noteworthy: Blogging service TypePad is shutting down and taking all blog content with it

  • This highlights why your domain name needs to be legit, not just tied to the host. I’m looking at you pyfound.blogspot.com. I just redirected blog.michaelckennedy.net to mkennedy.codes

  • Carefully mapping old posts to a new archived area using NGINX config. This is just the HTTP portion, but note the /sitemap.xml and location ~ "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.+?)/?$" { portions. The latter maps posts such as https://blog.michaelckennedy.net/2018/01/08/a-bunch-of-online-python-courses/ to https://mkennedy.codes/posts/r/a-bunch-of-online-python-courses/

    server {  listen 80;  server_name blog.michaelckennedy.net;  # Redirect sitemap.xml to new domain  location = /sitemap.xml {  return 301 ;  }  # Handle blog post redirects for HTTP -> HTTPS with URL transformation  # Pattern: /YYYY/MM/DD/post-slug/ ->   location ~ "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.+?)/?$" {  return 301 $4/>;  }  # Redirect all other HTTP URLs to mkennedy.codes homepage  location / {  return 301 ;  } } 

Extras

Brian:

Michael:

Joke: Do you know him? He is me.

  continue reading

455 에피소드

Alla avsnitt

×
 
Loading …

플레이어 FM에 오신것을 환영합니다!

플레이어 FM은 웹에서 고품질 팟캐스트를 검색하여 지금 바로 즐길 수 있도록 합니다. 최고의 팟캐스트 앱이며 Android, iPhone 및 웹에서도 작동합니다. 장치 간 구독 동기화를 위해 가입하세요.

 

빠른 참조 가이드

탐색하는 동안 이 프로그램을 들어보세요.
재생