Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

Thursday, March 16, 2023

Codon for Faster Python Code

Interesting. Unsure if Condon helps with async or threaded applications, though. Probably most useful for linear number-crunching scientific or data science applications.

Regular interpreted Python is pretty fast as is. I encountered at least one race condition issue, where the Python code was beating an API having low double-digit msec response times - was that a surprise! 😄

There's also Cython, which compiles to C, but this is a new approach which is at least as fast (or faster!)

Wednesday, November 18, 2020

Update Raspbian OS on the Raspberry Pi

I have an early Raspberry Pi model running the Raspbian OS "jessie" release (which lacks Python 3.6 and its useful "f-string" format syntax.) So, I wanted to upgrade to the contemporary "buster" release to resolve that issue. Here's what worked:

  1. Follow these excellent instructions (Use the section "Update Raspbian to the Latest Version") to manually update OS releases sequentially. So, in my case, I upgraded from "jessie" to "stretch" and then from "stretch" to "buster."
  2. You'll likely want to upgrade the Docker packages, too. To do it, refer to the following steps:
Now, "You're Good to Go" with the latest release ("buster" in this example!) Enjoy 😀👍

Friday, January 11, 2019

The Raspberry Pi Story

Ever wonder how those little boards got created and who was behind them? Check out this article from TechRepublic.

Monday, December 3, 2018

Thursday, January 12, 2017

Don't get upset about CPython concurrency - just get Grumpy!

Here's a short recommended read that was brought to my attention by a teammate. If you've grumbled about poor concurrency support in conventional Python, Grumpy looks like it's coming to the rescue.

I suspect this break-through reflects the benefits of new concurrency approaches, as reflected in recent packages (like Akka) and languages (Go).

It's a fundamental shift, since Go extensions will be supported over C extensions. I assume that means Grumpy and CPython will co-exist for some time, unless most existing C extensions get re-coded in Go? It will be interesting to see how this unfolds!

Wednesday, November 2, 2016

Installing Robot Framework on a MacBook

I recently faced challenges getting the open source Robot Framework to work on my MacBook, which is running OS X El Capitan. In general, the installation process should be trivial, but here's what finally worked:

  1. If you have the brew package manager installed, update it:

        brew update
  2. Use brew to install (or upgrade) the chromedriver program:

      brew upgrade chromedriver
  3. Make and use a Python virtualenv for the framework installation:

      pip install --upgrade virtualenv
      source virtualenvwrapper.sh  # Note: Depends on where virtualenvwrapper.sh was installed to.
      mkvirtualenv robotframework
      workon robotframework
      cdvirtualenv
  4. Install the necessary framework packages:

      pip install --upgrade robotframework
      pip install --upgrade robotframework-selenium2library
      pip install --upgrade requests
Now, you'll be able to use the robot command to run test scripts OK :-)