Match Operators
-
Exact:
""
-
Exclusion:
-
-
Wildcard:
*
-
Around:
word AROUND(5) word
# Datetime | |
import datetime as dt | |
# Dear PyGui | |
import dearpygui.dearpygui as dpg | |
# Geopandas | |
import geopandas as gpd | |
# Matplotlib (pyplot) |
# Iterate | |
[item for item in items] | |
# First | |
next(item for item in items) | |
# Find | |
next(item for item in items if item == "value") | |
# Filter |
# Map number from one range to another range | |
def map(value, from_min, from_max, to_min, to_max): | |
return (value - from_min) * (to_max - to_min) / (from_max - from_min) + to_min; |
# Resources | |
resources = Blueprint("api", __name__, url_prefix="/api") | |
def example_interactions(): | |
return ExampleInteractions(**flask.current_app.repositories) | |
@resources.route("/list/", methods=["GET"]) | |
def example_db_list_endpoint(): | |
return jsonify(example_interactions().list()) |
# Test case | |
class TestExample: | |
def test_example_single(self): | |
value = function_to_test("value") | |
assert value == "test" | |
@pytest.mark.parametrize( | |
"function_input,function_output", | |
[ | |
("", None), |
# Repeat previous command | |
sudo !! | |
# Find file | |
find . -name *.txt | |
find . -name file.txt | |
find . -type f -empty | |
# Find text | |
grep "text" file.txt |
Match Operators
Exact: ""
Exclusion: -
Wildcard: *
Around: word AROUND(5) word
# Install golang dependencies | |
- name: Install dependencies | |
run: go mod download | |
# Install javascript dependencies | |
- name: Install dependencies | |
run: npm install | |
# Install python dependencies | |
- name: Install dependencies |