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
| # Code Coach — Pair Programming Agent Instructions | |
| > You are a **pair programming mentor**, not a code generator. Your primary mission is to | |
| > help the developer **grow their skills** while still shipping quality software at a | |
| > productive pace. You operate in two complementary modes: | |
| > | |
| > 1. **Pair Programming Mode** — You follow your usual development workflow but **pause | |
| > at strategic moments** and hand sections of the work to the developer. You then | |
| > review their code, interview them on their decisions, and suggest improvements. | |
| > |
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 fastapi import FastAPI, HTTPException, Query, Path | |
| from pydantic import BaseModel, Field | |
| from typing import Optional | |
| from datetime import datetime | |
| from enum import Enum | |
| import uuid | |
| import uvicorn | |
| app = FastAPI( | |
| title="Task Manager API", |
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
| param | |
| ( | |
| [Parameter(Mandatory = $true)] | |
| [String[]] | |
| $Timezone, | |
| [Parameter()] | |
| [Datetime] | |
| $Target | |
| ) |
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
| # Create a tar gz of the layer | |
| cd ~/hello-cloud/imageLayer | |
| tar -czvf ../hello-cloud.tar.gz * | |
| cd ~/hello-cloud | |
| # Obtain digests and diff IDs | |
| LAYERDIGEST=$(sha256sum < hello-cloud.tar.gz | cut -d' ' -f1) | |
| LAYERDIFF=$(gunzip < hello-cloud.tar.gz | sha256sum | cut -d' ' -f1) | |
| LAYERSIZE=$(ls -l hello-cloud.tar.gz | awk '{print $5}') |
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
| [CmdletBinding(DefaultParameterSetName='Version')] | |
| param | |
| ( | |
| [Parameter(ParameterSetName='Latest', Mandatory = $true)] | |
| [Parameter(ParameterSetName='Version', Mandatory = $true)] | |
| [String] | |
| $SaveToPath, | |
| [Parameter(ParameterSetName='Version', Mandatory = $true)] | |
| [String] |
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
| Create a program that uses shorthand declaration to declare variables of types `int`, `string`, and `bool` and assigns the values 10, 'hello', and true respectively. | |
| What happens when you use the statement `fmt.Println(i == s)`. |
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
| Create a program that declares two variables -- an integer and a floating pointing type. | |
| Perform multiplication of these values and print the result using `Println` function. |
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
| Create a program that declares two integer variables i and j and assigns values 10 and 30. | |
| Print the values of these variables. Add an expression to swap the values of the variables using assignment operator. | |
| Finally, print the values of the variable values after swapping. |
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
| In the first exercise, update the hello world program you create in the [last part](https://ravichaganti.com/blog/get-set-go-first-program/) | |
| to add a variable `fName` and initialize it with your name as the value. | |
| Finally, print the statement Hello, fName to the screen. |
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
| Write a program that prints "I ❤ Golang!". You don't have to use anything more than what you learned today. | |
| Comment your code to explain different statements / keywords. |
NewerOlder