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
| from pathlib import Path | |
| from queue import Queue | |
| import sys | |
| def stream_files(q, basedir, mpd): | |
| first = True | |
| seen = set() | |
| while q: | |
| datpath = basedir / q.pop() | |
| if not datpath.exists(): |
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
| using Microsoft.AnalysisServices.Tabular; | |
| using System.Diagnostics; | |
| if (args.Length != 1) { | |
| Console.Error.WriteLine( | |
| $"Usage: {Process.GetCurrentProcess().ProcessName} tmdl-dir"); | |
| return 2; | |
| } | |
| var db = TmdlSerializer.DeserializeModelFromFolder(args[0]); |
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
| # /// script | |
| # requires-python = ">=3.13" | |
| # dependencies = [ | |
| # "s3-log-parse", | |
| # ] | |
| # /// | |
| import argparse | |
| import sys | |
| import csv |
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
| pass-env () { | |
| if [ -z "$1" ]; then | |
| echo "Usage: pass-env prefix" >&2 | |
| return | |
| fi | |
| for name in $(ls "$HOME/.password-store/$1"); | |
| do | |
| KEYNAME=$(basename "$name" .gpg) | |
| export $KEYNAME=$(pass show "$1/$KEYNAME") |
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 _debug() -> None: | |
| import sys | |
| import pdb | |
| import traceback | |
| def debughook(etype, value, tb): | |
| traceback.print_exception(etype, value, tb) | |
| print() # make a new line before launching post-mortem | |
| pdb.pm() # post-mortem debugger |
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
| from selenium.common import NoSuchElementException | |
| from selenium.webdriver.common.by import By | |
| from selenium.webdriver.remote.webdriver import WebDriver | |
| from selenium.webdriver.remote.webelement import WebElement | |
| from selenium.webdriver.support.relative_locator import RelativeBy, locate_with | |
| class WaitRelative: | |
| def __init__(self, by: RelativeBy): | |
| self._by = by |
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
| {-# LANGUAGE NoMonomorphismRestriction #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE OverloadedRecordDot #-} | |
| import Data.List.NonEmpty (NonEmpty(..)) | |
| import Diagrams.Prelude | |
| import qualified Diagrams.Color.XKCD as CX | |
| import Diagrams.Backend.SVG.CmdLine |
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
| data "aws_ami" "latest_spotfire" { | |
| most_recent = true | |
| owners = ["aws-marketplace"] | |
| filter { | |
| name = "product-code" | |
| values = ["2c7dxpxtbfm3wc7iik24lbll2"] | |
| } | |
| } | |
| resource "aws_instance" "spotfire" { |
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 os | |
| import sys | |
| import matplotlib | |
| import matplotlib.pyplot as plt | |
| from matplotlib.widgets import TextBox | |
| matplotlib.use('QTAgg') | |
| matplotlib.rcParams['toolbar'] = 'toolmanager' |
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
| :- module dogcrypt2. | |
| :- interface. | |
| :- import_module io. | |
| :- pred main(io::di, io::uo) is det. | |
| :- implementation. | |
| :- import_module int, list, string, solutions. | |
| main(!IO) :- |
NewerOlder