Unix Command | PowerShell Equivalent | Description |
---|---|---|
pwd |
Get-Location or $PWD |
Print working directory |
ls |
Get-ChildItem or dir |
List directory contents |
cd |
Set-Location or cd |
Change directory |
mkdir |
New-Item -ItemType Directory or mkdir |
Create a new directory |
touch |
New-Item -ItemType File |
Create a new file |
rm |
Remove-Item or del |
Remove a file |
rm -r |
Remove-Item -Recurse |
Remove a directory and its contents |
cp |
Copy-Item or copy |
Copy a file |
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
{"name":"embedding-data","document":{"backgroundColor":"#ffffff","slides":[{"id":"1739814262631","elements":[{"id":"frame","type":"rectangle","x":0,"y":0,"width":1080,"height":1080,"angle":0,"strokeColor":"#228be6","backgroundColor":"transparent","fillStyle":"solid","strokeWidth":1,"strokeStyle":"dashed","roughness":0,"opacity":100,"groupIds":[],"frameId":null,"roundness":null,"seed":500058849,"version":1,"versionNonce":1663891759,"isDeleted":false,"boundElements":null,"updated":1739814262631,"link":null,"locked":true},{"id":"rhSx98ZbcHp3gkwYdlD8z","type":"image","x":89.63666757641909,"y":79.70387554585147,"width":399.06522925764193,"height":399.06522925764193,"angle":0,"strokeColor":"transparent","backgroundColor":"transparent","fillStyle":"solid","strokeWidth":2,"strokeStyle":"solid","roughness":1,"opacity":100,"groupIds":[],"frameId":null,"roundness":null,"seed":22678410,"version":85,"versionNonce":1486123466,"isDeleted":false,"boundElements":null,"updated":1739818052621,"link":null,"locked":false,"status" |
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 gradio as gr | |
with gr.Blocks() as demo: | |
subscribed = gr.State(False) | |
update_subscription_btn = gr.Button("Update Subscription") | |
@update_subscription_btn.click(inputs=subscribed, outputs=subscribed) | |
def update_subscription(subscribed): |
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
name: Publish to PyPI | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
pypi-publish: | |
name: upload release to PyPI |
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 nicegui import ui | |
@ui.refreshable | |
def app(): | |
username, set_username = ui.state("") | |
with ui.header(): | |
with ui.tabs().classes("w-full") as tabs: |
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
provider "aws" { | |
region = "us-east-1" | |
} | |
data "aws_s3_bucket" "dev" { | |
bucket = "..." | |
} | |
# Create a data source for each file in dags folder | |
data "local_file" "dags" { |
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 apispec import APISpec | |
from chalice import Chalice, BadRequestError, Response | |
from chalice_spec import PydanticPlugin, ChalicePlugin, Docs, Operation | |
from pydantic import BaseModel, ValidationError | |
APP_NAME = "chalice-spec example" | |
app = Chalice(app_name=APP_NAME) | |
spec = APISpec( |
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 streamlit as st | |
def login_form(): | |
if not ("username" in st.session_state and "password" in st.session_state): | |
st.write("## Login") | |
with st.form("Login"): |
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 shlex | |
import subprocess as sp | |
from pprint import pprint | |
registry = "foo" | |
schema_name = "bar" | |
cmd = f"aws schemas describe-schema --registry-name={registry} --schema-name={schema_name}" |
NewerOlder