Using Powershell To Retrieve Latest Package Url From Github Releases
Github can host package releases, I will show you how to use Powershell to retrieve the latest release download url.
Github can host package releases, I will show you how to use Powershell to retrieve the latest release download url.
I've been using Scoop for setting up my personal and professional Windows development desktops since nearly 2 years.
This post shows how to use elastic painless language in scripted field to work on documents' keys which might not exist in some documents.
A quick tutorial for installing Python from its official source on Ubuntu with sqlite3 support.
If I'm not wrong, the SQLAlchemy official doc provides some examples to explain how to share a set of common columns, some common table options, or other mapped properties, across many classes. But I cannot find how to share common methods (e.g. your customized to_dict() method). This post will just show you a POC to achieve this goal by using Python Mixin.
The Test-NetConnection cmdlet is great and verbose but too slow if the remote port to check is not opened. This is due to its timeout setting and cannot be modified. In this port, I will show you a custom function that leverages the power of System.Net.Sockets.TcpClient to accelerate the port test.
Python has several tools to upload packages to PyPi or some private Artifactory locations. The mostly used one should be twine. Although twine is not a Python originate tool, but it's officially recommended by Python.org.
Pandas dataframe is like a small database, we can use it to inject some data and do some in-memory filtering without any external SQL. This post is much like a summary of this StackOverflow thread.
This is not a complete Git cheat sheet for everyone, this is just a personal cheat sheet for some often forgotten git commands.
SQLAlchemy DB session is not thread safe for both sync and async session. AsyncSession is only a thin proxy on top of a Session
The concurrency model for SQLAlchemy's
Session
andAsyncSession
is therefore Session per thread, AsyncSession per task.The best way to ensure this use is by using the standard context manager pattern locally within the top level Python function that is inside the thread or task, which will ensure the lifespan of the
Session
orAsyncSession
is maintained within a local scope.For applications that benefit from having a "global"
Session
where it's not an option to pass the Session object to specific functions and methods which require it, the scoped_session approach can provide for a "thread local" Session object; see the section Contextual/Thread-local Sessions for background. Within the asyncio context, the async_scoped_session object is the asyncio analogue for scoped_session, however is more challenging to configure as it requires a custom "context" function.