This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import uuid | |
from ctypes import c_uint32, c_uint64, c_char, Structure, sizeof | |
from enum import Enum | |
from winsdk.windows.media.devices import MediaDevice | |
from winsdk.windows.devices.enumeration import DeviceInformation, Panel | |
from winsdk.windows.media.capture import ( | |
MediaCapture, | |
MediaCaptureInitializationSettings, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- "C:\Users\<username>\AppData\Local\lvim\config.lua" | |
-- Enable powershell as your default shell | |
vim.opt.shell = "pwsh.exe" | |
vim.opt.shellcmdflag = | |
"-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;" | |
vim.cmd [[ | |
let &shellredir = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode' | |
let &shellpipe = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode' | |
set shellquote= shellxquote= |
You first need to install pythonnet and pypsrp
pip install pythonnet pypsrp
Below is the code which uses pythonnet to execute the powershell command and pypsrp to deserialize it into Python object:
To delete all branches that are missing upstream, you can use the following Git commands. This will first list all branches that are missing upstream, and then delete them one by one.
- First, fetch the latest information from the remote repository:
git fetch --all --prune
- List all branches that are missing upstream:
git branch -vv | grep ': gone]' | awk '{print $1}'
- Find who added code:
git log --name-status --diff-filter=A --format='> %aN' -- | awk '/^>/ {tagline=$0}/^A\t/ {print tagline "\t" $0}'
NewerOlder