Making PowerShell “Posh”
Back in the days when DOS and Windows were separate programs, the default Command Prompt didn’t look exactly the way that it does now. I can’t recall if it w...
When dealing with Python dependencies, it’s sometimes necessary to determine if a given project is using a given version of a library. Since our team is using Pipenv to manage our Python dependencies, it’s not very difficult to determine which version of a given library is in a given project, but what can be tricky is actually searching through the Pipfile.lock file to find what you’re looking for, and if you need to look at multiple packages, well, this could take a while.
Fortunately, we know that PowerShell can easily chew through JSON files and pick out values. Here’s how we can easily print out the versions of all of our default and development dependencies:
function Get-PythonEnvironment {
$pipfile = Get-content .\Pipfile.lock | ConvertFrom-Json
$default = $pipfile | Select-Object -ExpandProperty default
$develop = $pipfile | Select-Object -ExpandProperty develop
@($default, $develop) | ForEach-Object {$_.PSObject.Properties `
| ForEach-Object {$_ | Select-Object Name -ExpandProperty Value | Where-Object index -ne $null | Select-Object name, version}}
}
The output to this is similar to what you’d get from pip freeze except that only items appearing in the Pipfile.lock file will appear in this list. This can be helpful to quickly figure out if a new library was pulled in after locking a pipfile, for example.
Back in the days when DOS and Windows were separate programs, the default Command Prompt didn’t look exactly the way that it does now. I can’t recall if it w...
Sometimes it’s the little things…
As a Data Engineer using Mirth Connect, it’s often tricky to review my team’s merge requests because the merge request document contains the XML representati...
When dealing with Python dependencies, it’s sometimes necessary to determine if a given project is using a given version of a library. Since our team is usin...
A while ago, I wrote about using a bare git repository to manage my dotfiles. That worked somewhat well, but it had some shortcomings. Since, I’ve started us...
One of my current projects involves some improvements to code that I wrote last year – specifically enhancing the “Patient Identity Fixer”, which is my pet p...
To borrow from a favorite web comic: whenever I learn a new skill, I concoct elaborate fantasy scenarios where it lets me save the day. Actually, it feels li...
This one bugged me for a few days. I don’t think this script is the best solution to the problem at hand, but it was still fun to figure out.
My team at work has a custom FHIR resource that we work with often called an Operation Outcome. We generate one of these for nearly every record we process, ...
a.k.a. Why I Don’t Use Nano
COVID-19 has us many of us working from home. My husband and I are both fortunate enough to be in this group. However, as a teacher, his schedule is very pre...
When I set up a Raspberry Pi, there are a few things that I have to do right out of the gate to make things easier on myself. They involve putting a few file...
While I don’t use Linux as my primary operating system, I do use it a lot both at home and at work. It can be frustrating to try to sync up configurations be...
Anyone who knows my husband or me knows that we really like our cold brew, and they also know that we make our own at home. Nitro cold brew has become a bit ...
So you want to run an OpenVPN Server on a Raspberry Pi? I did too, but it wasn’t easy to figure out the first time. If you want to skip all of this and do it...