This file contains hidden or 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
| function Invoke-Shape() { | |
| Param( | |
| [Parameter(Position = 0, ValueFromPipeline = $True)] | |
| [object] $Data, | |
| [Switch] $Recursive | |
| ) | |
| Begin { | |
| function Remove-Attribute() { | |
| Param( | |
| [Parameter(Position = 0, ValueFromPipeline = $True)] |
This file contains hidden or 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
| <html> | |
| <head> | |
| <title>My first web page</title> | |
| <script src="https://cdn.jsdelivr.net/npm/geotiff/dist-browser/geotiff.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/proj4/dist/proj4.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/geotiff-geokeys-to-proj4/main-dist-iife.js"></script> | |
| <script src="https://unpkg.com/[email protected]/dist/plotty.min.js"></script> | |
| </head> | |
| <body> | |
| <h1>GeoTIFF in Browser</h1> |
This file contains hidden or 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
| #!/usr/bin/env pwsh | |
| [CmdletBinding()] | |
| Param() | |
| function Invoke-FixMetadata() { | |
| <# | |
| .SYNOPSIS | |
| Fix version string issues within conda metadata so "conda env export" works | |
| #> | |
| [CmdletBinding()] |
This file contains hidden or 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
| #!/usr/bin/env pwsh | |
| #Requires -Modules Prelude | |
| [CmdletBinding(SupportsShouldProcess = $True)] | |
| Param( | |
| [Parameter(Mandatory = $False, Position = 0)] | |
| [ValidateSet( | |
| 'base', | |
| 'cml', | |
| 'gis', |
This file contains hidden or 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
| #!/usr/bin/env pwsh | |
| #Requires -Modules Prelude | |
| [CmdletBinding()] | |
| Param( | |
| [Parameter(Mandatory = $False, Position = 0)] | |
| [String] $Name | |
| ) | |
| $Prefix = if ($Name) { "/opt/conda/envs/${Name}" } else { $Env:CONDA_PREFIX } | |
| "==> [INFO] Conda Prefix = ${Prefix}`n" | Write-Verbose |
This file contains hidden or 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
| #!/usr/bin/env pwsh | |
| $Packages = "/opt/conda/lib/python3.8/site-packages" | |
| # Issue is with Torch-TensorRT version metadata | |
| $Before = "1.9.0<1.11.0" | |
| $After = "1.9.0,<1.11.0" | |
| # Get path of metadata file with bad version information | |
| $Path = Get-ChildItem -Path $Packages -File -Recurse -Filter METADATA | | |
| Select-String $Before | | |
| Select-Object -Unique Path -ExpandProperty Path |
This file contains hidden or 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
| function Get-Screenshot { | |
| <# | |
| .SYNOPSIS | |
| Create screenshot. Save as a file or copy to the clipboard. | |
| .DESCRIPTION | |
| Create screenshot of one or all monitors. The screenshot is saved as a BITMAP (bmp) file. | |
| When selecting a monitor, the assumed setup is: | |
| +-----+ +-----+ +-----+ +-----+ |
This file contains hidden or 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
| #! /bin/bash | |
| apt-get update | |
| # | |
| # Install development dependencies | |
| # | |
| apt-get install --no-install-recommends -y \ | |
| apt-utils \ | |
| apt-transport-https \ | |
| binutils \ |
This file contains hidden or 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 re | |
| import numpy as np | |
| import pandas as pd | |
| def parse_cuda_version(val: str): | |
| if isinstance(val, str): | |
| val = re.sub(r"\s+", "", val.lower()) | |
| val = re.sub(r"|nvidiacuda|baseimage|withcublas.*|update.*|includes.*|<<|>>", "", val) | |
| else: | |
| val = None |
This file contains hidden or 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 csv | |
| import urllib.request, urllib.error, urllib.parse | |
| from bs4 import BeautifulSoup | |
| root = 'https://www.jcs.mil/Library' | |
| links = { | |
| 'instruction': [ f'{root}/CJCS-Instructions/?udt_46626_param_page={page}' for page in range(1, 4) ], | |
| 'manual': [ f'{root}/CJCS-Manuals/' for page in range(1, 2) ], | |
| 'notice': [ f'{root}/CJCS-Notices/' for page in range(1, 2) ] | |
| } |
NewerOlder