NotesRight now, I’m not overly excited by MCP over “standard” tool calling. I much prefer agents.json and the concepts around endpoint discovery, which feel much more natural if you are working with APIs.FeedUnfurl
NotesToday, I learned that PyScript exists. PyScript is, at its core, some rigging to make Pyodide, a WebAssembly port of the CPython Python interpreter, real easy to use as a proper client-side web scripting language. Just include one <script> tag and now <script type="py"> is a valid thing you can have in your website. Put Python code inside of it, interact with the DOM, the works. I think that rules and/or is kind of horrifying, depending. Obviously, for me, the immediate question was: Can this run Mastodon.py? And the answer is: Yes, very competently.FeedUnfurl
NotesEspecially for side projects with limited traffic requirements and scaling concerns, the promise of SQLite is that it can remove a lot of ongoing hassles. Without a separate database, cache, or queue, there is less network traffic (because the SQLite file is local), and less servers to manage, maintain, and backup.Unfurl
NotesIt's been a few years since I wrote about my challenges with async/await-based systems and how they just seem to not support back pressure well. A few years later, I do not think that this problem has subsided much, but my thinking and understanding have perhaps evolved a bit. I'm now convinced that async/await is, in fact, a bad abstraction for most languages, and we should be aiming for something better instead and that I believe to be thread.FeedUnfurl
NotesI released LLM 0.17 last night, the latest version of my combined CLI tool and Python library for interacting with hundreds of different Large Language Models such as GPT-4o, Llama, Claude and Gemini.FeedUnfurl
NotesHighlight:BullMQ - Message Queue and Batch processing for NodeJS and Python based on Redis
BullMQ - Message Queue and Batch processing for NodeJS and Python based on Redis - taskforcesh/bullmqUnfurl
NotesParallel versions of the map function are provided by two libraries: multiprocessing, and also its little known, but equally fantastic step child: multiprocessing.dummy.Unfurl
NotesPRAW, an acronym for “Python Reddit API Wrapper”, is a python package that allows for simple access to reddit’s API. PRAW aims to be as easy to use as possible and is designed to follow all of reddit’s API rules. You have to give a useragent that follows the rules, everything else is handled by PRAW so you needn’t worry about violating them.Unfurl
NotesOne of the most popular third-party coverage tools is coverage.py which provides very nice HTML output along with advanced features such as branch coverage. If you prefer to stay with tools only provided by the stdlib then you can by using test.regrtest.Unfurl
NotesPygit2 is a set of Python bindings to the libgit2 shared library, libgit2 implements the core of Git. Pygit2 works with Python 2.6, 2.7, 3.1, 3.2 and 3.3Unfurl
NotesAfter Yahoo! acquired Summly and Google acquired Wavii, there is no doubt that auto summarization technologies are a hot topic in the industry. So as a NLP freak, I decided to give a quick overview and hands-on experience on how these technologies actually work.FeedEmbedUnfurl
NotesThe IPython Notebook is a web-based interactive computational environment where you can combine code execution, text, mathematics, plots and rich media into a single documentUnfurl
NotesWebIOPi is a REST framework and a webapp which allows you to control your Raspberry Pi's GPIO. Just install it on your Pi, and use any browser from your network. It's useful to start enjoying GPIOs and also to debug some circuits without writing any line of code. It also allows to control your Pi's GPIOs over Internet, so it's a good starting point for home remote control. Unfurl
NotesTrust is a Django app for managing the trust levels of your users. All users start out with a default amount of trust, and as they do good things they gain trust, and as they do bad things they lose trust.Unfurl
NotesLike Apache’s mod_xsendfile, Nginx’s X-Accel module provides for internal redirects. An x-accel-redirct is internal because instead of redirecting the client’s request to another URL, it redirects the location of Nginx’s request to another resource.Unfurl
NotesI’ve been using Travis-CI for a while now. Both my personal projects, and even several of the libraries we maintain at DISQUS rely on it for Continuous Integration. I figured it was about time to confess my undenying love for Travis, and throw up some notes about the defaults we use in our projects.Unfurl
NotesThis guide covers build environment and configuration topics specific to Python projects. Please make sure to read our Getting Started and general build configuration guides first.Unfurl
NotesSometimes you can’t avoid using HTTPS right starting from development (such as for developing Facebook canvas applications). You can setup Apache on your local machine and go through a bunch of trouble setting up your domain and setting up the certificate etc but there’s an easy way of using Django’s python manage.py runserver to work with HTTPS.Unfurl
NotesIf you’re prototyping a new project, or if you’re a start-up and need to ship something, or if you’re just one person working on a little app with a few (even a few tens of thousands) of users, odds are that none of those benefits are worth losing the nice stuff Django gives you, or the time it takes to build APIs (even using existing apps to do it) or abstraction layers between the silos.FeedUnfurl
NotesMaking strings in templates localizable is exceptionally easy. Making strings in Python localizable is a little more complicated. The short answer, though, is just wrap the string in _().Unfurl
NotesThe key parts are the get_urls function and the admin_update_feeds view. The get_urls method returns the urls for this admin to which we are adding our custom view. The custom view does the updating of the lifestream feeds and returns the user to the Item model's changelist view. We get the url for that view by calling reverse with the pattern "<namespace>:<app>_<model>_changelist" which in our case is "admin:lifestream_item_changelist" since the django admin uses the admin namespace.Unfurl
NotesThe easiest way to install a Sync Server is to checkout our repository and run a build in-place. Once this is done, Sync can be run behind and Web Server that supports the WSGI protocol.Unfurl
NotesSometimes, just to screw with people, I will rewrite .bashrc to contain only:
echo "Python 2.6.6 (r266:84374, Aug 31 2010, 11:00:51)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information."
export PS1=">>> "
trap bashtrap INT
bashtrap() {
echo -n "
KeyboardInterrupt"
}Unfurl
NotespyTivo is both an HMO and GoBack server. Similar to TiVo Desktop, pyTivo loads many standard video compression codecs and outputs mpeg2 video to the TiVo. However, pyTivo is able to load many more file types than TiVo Desktop. Unfurl
NotesFile Conveyor is a daemon written in Python to detect, process and sync files.
Designed to sync files to CDNs. Amazon S3 & CloudFront and Rackspace Cloud Files, as well as any Origin Pull CDN or FTP Push CDN are supported.Unfurl
Notes"As my Django sites get larger and larger, there inevitably comes a point where I want access to the current request from deep inside some function that doesn't have the request object. The latest reason was that I wanted a model class helper to have access to the session so it could access some debug flags.<br />
<br />
"FeedUnfurl