Today, I helped the author of Bike to debug how licenses are renewed: Renew Bike License (website version) - Bike Outliner - Hog Bay Software Support
Monthly Archives: October 2023
MIC-06-5 Digging into Jupyter widgets, specifically pyleaflet
As I work on integrating data across the different sources in iSamples, I'm getting my brain back into using Jupyter widgets. A place I chose to start was ipyleaflet: Interactive maps in the Jupyter notebook — ipyleaflet documentation, a wrapper around the awesome Leaflet - a JavaScript library for interactive maps.
The first I tried was to run the demo that uses JupyterLite -- but got an error. When I went to report the problem, I saw that the bug had been noted months ago.
No problem. Next up was cloning the repo and running the examples. I picked one that caught my eye -- the one to load KML into leaflet. Unfortunately, the demo didn't work out of the box with the current version of pyleaflet. I was able to make the simple fix and issued a pull request: fix examples/KML.ipynb to work with recent versions of geopandas by rdhyee · Pull Request #1141 · jupyter-widgets/ipyleaflet
MIC-06-4 Protocols in Python
In response to my prompt
There are various "protocols" in Python -- interfaces involving the implementation of certain methods to fulfill a protocol. For example the iterator protocol is implemented via __iter and __next. Confirm what I just wrote and also tell me about other protocols. I understand there is a sequence protocol and a container protocol. True? What other ones?
I got the answer from perplexity.ai:
Yes, you\'re correct about the iterator protocol in Python. It is
implemented via the__iter__
and__next__
methods. An object is considered an iterator in Python if it implements these two
methodsIn addition to the iterator protocol, Python also has other protocols
such as the sequence protocol and the container protocol.The sequence protocol is implemented by defining methods
like__getitem__
and__len__
. The__getitem__
method is used to get an element at a specific index, and the__len__
method is used to get the number of elements in the sequence. Other methods that can be part of the sequence protocol
include__contains__
,__iter__
,__reversed__
, and
moreThe container protocol is less clearly defined in the Python
documentation, but it generally refers to methods that allow an object to store other objects and provide ways to access and manipulate them. This can include methods like__contains__
,__iter__
, and__len__
, similar to the sequence protocolThere are also other protocols in Python. For example, the async
iterator protocol, which is similar to the iterator protocol but used
for asynchronous iteration. It is implemented via the__aiter__
and__anext__
methodsAnother example is the protocol for numerical types, which includes
methods
like__add__
,__sub__
,__mul__
,__truediv__
,__floordiv__
,__mod__
,__divmod__
,__pow__
,__neg__
,__pos__
,__abs__
,__invert__
,__complex__
,__int__
,__float__
,__round__
,__trunc__
,__floor__
,__ceil__
, and more. These methods allow an object to behave like a numerical value and interact with other numerical values in a meaningful way.There are many more protocols in Python, and they are a powerful tool for creating objects that interact with built-in Python constructs in a natural way. However, there doesn\'t seem to be a comprehensive list of all protocols in the Python documentation
MIC-06-3 OpenContext, iSamples, Solr, OpenAPI consumering clients
I have code in open-context-jupyter/notebooks/OC Explorations.ipynb at ee9bae594bb6a7bcc951425fd58e10804f1ad369 · rdhyee/open-context-jupyter for querying https://iscaws.isample.xyz/isamples_central/thing/select
using the requests
library. I\'m wondering whether it\'d be useful to use 1) django-haystack/pysolr: Pysolr --- Python Solr client (whose maintainer is [busy but still on the case](Is there a new release for pysolr? · Issue #373 · django-haystack/pysolr)) or 2) one of the openapi client generators to ingest https://iscaws.isample.xyz/isamples_central/openapi.json? If 2), it seems like there are at least three actively maintained libraries to choose from (openapi-core
, openapi-python-client
, and apispec
):
- python-openapi/openapi-core: Openapi-core is a Python library that adds client-side and server-side support for the OpenAPI v3.0 and OpenAPI v3.1 specification.
- openapi-generators/openapi-python-client: Generate modern Python clients from OpenAPI
- marshmallow-code/apispec: A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification).
Any guidance about which might be the fruitful option?
What I decided after talking to a colleague about this issue: I think I'll keep going with my simple requests approach as I get my brain warmed up again with solr and stay away from the code-generator options for now (and maybe for a while!)
MIC-06-2 GTD in OmniFocus
I liked listening to how an expert GTDer is using OmniFocus to implement GTD on GTD Focus President Meg Edwards Returns - The Omni Show (Oct 23, 2023). I\'m still trying to get a good GTD implementation using Obsidian. I see larslockefeer/obsidian-plugin-todo -- but it\'s not been updated since Feb, 2022 -- so I wouldn\'t use it. (Obsidian plugins that aren\'t being regularly updated are probably not worth the effort to use.). There\'s the fascinating little Issues · saibotsivad/obsidian-gtd-no-next-step. Probably the key insight is that I should focus on time-blocking than diving into a complicated GTD setup right now.
MIC-06-1 Surprise: Keyboard Maestro 11 is released
I was delighted to get an email today saying that I was eligible to upgrade to a new version of Keyboard Maestro (a license for which I had just purchased a few months ago.) From Stairways Software: Press Releases:
The engine adds a new keyboardmaestro command line tool for triggering macros, modern JavaScript syntax, Apple Text Recognition option, a new palette to show active macro groups, enhanced scripting support, and more.
MIC-05-5 Jupyter widgets made easier?
This morning, I learned about manzt/anywidget: jupyter widgets made easy. I\'m excited to figure out how to use it because I think it\'ll make developing custom widgets much easier.
As described in anywidget: Jupyter Widgets Made Easy | by Trevor Manz | Jupyter Blog:
*anywidget* is a Python library that makes it simple and enjoyable to create custom Jupyter Widgets that run in classic Jupyter notebooks, JupyterLite, JupyterLab, Google Colab, VS Code, and more.
MIC-05-4 Stepping back into web scraping
Today, as I revisited the Open Context: About - Web Services and APIs, I also started to think about how I would use Installation | Playwright Python and CDPSession | Playwright Python to interact with certain websites I have running on Chrome.
MIC-05-3 tools for finances
In preparing to meet with a financial advisor today, I was scrambling around to create a comprehensive inventory of our financial assets. It shouldn't have been that hard but I did have to do some amount of digging around. Now that I have the skeleton of an inventory, what tools should I use to fill out the outline and keep it up to date? Are there tools that will keep a financial inventory up-to-date automatically? I will work through the list at Tools and calculators - Bogleheads in search of such tools.
Let me tell you what perplexity.ai writes in response to the paragraph above:
Keeping a comprehensive inventory of your financial assets up-to-date
can indeed be a challenging task. However, there are several tools
available that can help you manage your financial inventory and keep it
updated automatically.
Portfolio Management Apps: Apps like Empower (formerly Personal
Capital), SigFig Wealth Management, Sharesight, and Yahoo Finance
can help you manage your financial portfolio. These apps can sync
with your existing accounts, providing real-time information on all
your investments in one place. They offer features like tracking
your net worth, creating a savings plan, tracking performance, asset
allocation, and fees with easy-to-read graphs and charts. Some of
these apps also offer automated investing for a fee, optimizing your
portfolio and providing daily monitoring to keep it on track with
rebalancing, dividend reinvestment, and tax-efficient
strategies refBudget Apps: Apps like Mint, YNAB (You Need A Budget),
Goodbudget, EveryDollar, and PocketGuard can help you manage your
budget and track your spending. These apps can sync with your
financial accounts, track spending, and categorize expenses so you
can see where your money is going. Some of these apps also offer
features like setting up alerts when you have exceeded your budget
in various categories, establishing goals, scheduling payments, and
reviewing your
investments refBogleheads Tools and Calculators: The Bogleheads website offers
a variety of tools and calculators that can help you manage your
financial inventory. These include tools for backtesting, Monte
Carlo simulation, tactical asset allocation and optimization, and
investment analysis. There are also tools for maintaining your
portfolio, computing and comparing tax costs, and modeling virtually
every aspect of a retiree\'s financial life. Some of these tools are
spreadsheets that you can download and use to manage your financial
inventory ref, refCredit Card Tracker Apps: If you have multiple credit cards,
apps like TPG To Go, Spending Tracker, Mint, Bill Tracker, and
Credit Card Manager can help you manage your credit cards. These
apps can track your spending, set reminders for bill payments, and
even recommend which card to use for a particular purchase to
maximize
rewards refDebt Reduction Software: If you have debts, software like
Quicken can help you manage and reduce your debts. This software can
provide a comprehensive view of your financial situation, including
your debts, and help you create a plan to reduce your
debts ref
MIC-05-2 Bike Outline Paths
I\\'m looking forward to a complete implementation of a new feature in Bike: Using Outline Paths - Bike, a language for specifying a subset of rows in an outline.