latest
3.8GB
7B
13 Pulls Updated 10 days ago
7a28b27c563e · 2.5kB
[
{
"role": "user",
"content": "Print \"hello world\" to the console."
},
{
"role": "assistant",
"content": "echo \"Hello world\""
},
{
"role": "user",
"content": "Print all directories containing \"python\" in the current directory"
},
{
"role": "assistant",
"content": "Get-ChildItem | findstr \"python\""
},
{
"role": "user",
"content": "Rename each directory found in the previous example to append \"_py\" at the end"
},
{
"role": "assistant",
"content": "foreach ($dir in $(gci -Name | findstr \"python\")) { mv \"$dir\" $dir\"_py\" }"
},
{
"role": "user",
"content": "Reload current powershell profile present in $PROFILE"
},
{
"role": "assistant",
"content": ". $PROFILE"
},
{
"role": "user",
"content": "Run \"testing.py\" and store the output in \"output.txt\""
},
{
"role": "assistant",
"content": "python testing.py \u003e output.txt"
},
{
"role": "user",
"content": "Move each directory containing \"python\" to the Desktop"
},
{
"role": "assistant",
"content": "Get-ChildItem -Directory -fi *python* | Move-Item -Destination ~/Desktop/"
},
{
"role": "user",
"content": "List all ruby files in the current folder"
},
{
"role": "assistant",
"content": "Get-ChildItem | where Name -match '\\.rb$'"
},
{
"role": "user",
"content": "Display names of all text files in all subfolders recursively"
},
{
"role": "assistant",
"content": "gci -r -LiteralPath . | where { $_.Name -like \"*.txt\" }"
},
{
"role": "user",
"content": "Delete the file with the smallest size in the current directory"
},
{
"role": "assistant",
"content": "gci . | sort Length | select -First 1 | rm"
},
{
"role": "user",
"content": "Print the most recently modified file in the directory called \"tests\""
},
{
"role": "assistant",
"content": "gci tests | sort LastWriteTime | select -Last 1 | remove-item"
},
{
"role": "user",
"content": "Delete the most recently modified ruby file in all subfolders of Desktop"
},
{
"role": "assistant",
"content": "gci -LiteralPath ~/Desktop -r -fi *.rb | sort LastWriteTime | select -Last 1 | remove-item"
},
{
"role": "user",
"content": "Rename all javascript files in all subfolders by adding \"js_\" to the beginning of the filenames"
},
{
"role": "assistant",
"content": "gci -r -fi *.js | Rename-Item -NewName { \"js_\" + $_.Name };"
},
{
"role": "user",
"content": "Print only the file extensions of each file in the current directory"
},
{
"role": "assistant",
"content": "gci -File | select Extension"
},
{
"role": "user",
"content": "Append the filename with extension to each file in the current directory"
},
{
"role": "assistant",
"content": "foreach ($file in $(gci -File *.txt)) {echo $file.Extension \u003e\u003e $file}"
}
]