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
def dslice(d, *keys): | |
''' | |
Slice a dictionary into a new dictionary, using the keys to define the slice. | |
Each key can be a string, or a dictionary with the following keys: | |
- k: the key to slice | |
- c: the cast or conversion function | |
- d: the default value | |
- n: the name of the key in the result dictionary | |
''' |
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 Move-Files-From-Clipboard() { | |
Add-Type -AssemblyName System.Windows.Forms | |
$hasFile = [System.Windows.Forms.Clipboard]::ContainsFileDropList() | |
if (-not $hasFile) { | |
Write-Output "No valid file copied in File Explorer." | |
return | |
} | |
$files = [System.Windows.Forms.Clipboard]::GetFileDropList() |
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
[ | |
{ | |
"Rules": [ | |
{ | |
"Resource": [ | |
"collection/my-randon-objects-fulltext" | |
], | |
"Permission": [ | |
"aoss:CreateCollectionItems", | |
"aoss:DeleteCollectionItems", |
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 sys | |
from pathlib import Path | |
import docx | |
from docx.document import Document | |
def extract_abbreviations(doc_path: str): | |
# Load the document | |
doc: Document = docx.Document(doc_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
import boto3 | |
import click | |
import json | |
import logging as lg | |
from pathlib import Path | |
@click.group() | |
@click.option('--profile', '-p', default='default') | |
@click.pass_context |
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
package safir.fusion.geodesy | |
import org.apache.commons.math3.linear.Array2DRowRealMatrix | |
import org.apache.commons.math3.linear.ArrayRealVector | |
import org.apache.commons.math3.linear.RealMatrix | |
import org.apache.commons.math3.linear.RealVector | |
import org.apache.commons.math3.util.FastMath | |
data class Datum ( | |
val a: Double, |
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 asyncio | |
import threading | |
import utils as u | |
MESSAGE_STOP = ('control', 'stop') | |
class AsyncAdapter: |
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
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"version": 3, | |
"blocks": [ | |
{ | |
"alignment": "left", | |
"type": "prompt", | |
"newline": true, | |
"segments": [ | |
{ |
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 json | |
import traceback | |
import time | |
def lambda_handler(event, context): | |
action = None | |
timeout = None | |
qsp = event.get('queryStringParameters') | |
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
# - This needs a temporary OAuth Application created in Bitbucket | |
curl -X POST -u "ID:KEY" https://bitbucket.org/site/oauth2/access_token -d grant_type=client_credentials |
NewerOlder