Command | Description |
---|---|
rg pattern |
Search pattern in current dir recursively |
rg pattern utils.py |
Search in a single file utils.py |
rg pattern src/ |
Search in dir src/ recursively |
rg '^We' test.txt |
Regex searching support (lines starting with We) |
rg -F '(test)' |
Search literally, i.e., without using regular expression |
rg -i pattern |
Search pattern and ignore case (case-insensitive search) |
rg -S pattern |
Smart case search (match case of pattern) |
rg pattern -g '*.py' |
File globbing (search in certain files), can be used multiple times |
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
# https://github.com/databricks/mlops-stacks/blob/main/tests/utils.py#L53 | |
# Example of decorator for parameters | |
import os | |
import pathlib | |
import pytest | |
import json | |
import subprocess | |
from functools import wraps |
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 typing import TYPE_CHECKING | |
if TYPE_CHECKING: | |
from pyspark.sql import DataFrame | |
def to_json_conversion(self: "DataFrame") -> "RDDAdapter": |
Some of us have to use this every time we right-click, which is highly annoying. Thankfully, there’s a way to revert to the old menu permanently. All it involves is adding an entry to the registry via the command line. Here’s what you must do to get the old right-click menus back via Microsoft:
Right-click the Start button and choose Windows Terminal
Copy and paste this into the window: reg.exe add "HKCU\Software\Classes\CLSID{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
Close Terminal
With the announcement of an xy exploit, some links to potential security tools.
From a thread on Rust replacements for common utilities https://twitter.com/MilesCranmer
Linux Kernel https://git.kernel.org/pub/scm/linux/kernel/
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
# Dependabot Cli | |
https://github.com/dependabot/cli | |
```shell | |
go install github.com/dependabot/cli/cmd/dependabot@latest | |
``` |
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
# https://docs.databricks.com/en/optimizations/aqe.html#configuration | |
# disable | |
# spark.databricks.optimizer.adaptive.enabled false | |
# default | |
spark.databricks.optimizer.adaptive.enabled true | |
# default number of partitions to use for shuffling data for joins or aggs | |
# for small files, set a lower shuffle number | |
# default |
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
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2 | |
# winget configure -f <C:/Users/<username>/winget-configs/config-file-name.dsc.yaml> | |
properties: | |
# assertions: | |
# - resource: Microsoft.Windows.Developer/OsVersion | |
# directives: | |
# description: Verify min OS version requirement | |
# allowPrerelease: true | |
# settings: | |
# MinVersion: '10.0.22000' |