Skip to content

Instantly share code, notes, and snippets.

View gbohra's full-sized avatar

Gaurav Bohra gbohra

View GitHub Profile
git clone https://github.com/GoogleCloudPlatform/anthos-service-mesh-samples
cd anthos-service-mesh-samples/docs/helloserver
python3 server/server.py
Open another terminal window so that you can send requests to the server
curl http://localhost:8080
Cd anthos-service-mesh-samples/docs/helloserver/loadgen
export SERVER_ADDR=http://localhost:8080
export REQUESTS_PER_SECOND=5
virtualenv --python python3 env
source env/bin/activate
@gbohra
gbohra / sum_odd_n
Created February 3, 2021 06:20
Write a recursive function to print the sum of first n odd integer numbers. The recursive function should have the prototype
" int sum_odd_n(int n) ".
For example :
input : 5
output: 25
input : 6
output : 36
@gbohra
gbohra / protocol-host
Created February 3, 2021 06:18
A partial code fragment is given. The URL class object is created in try block.You should write appropriate method( ) to print the protocol name and host name from the given url string.
For example:
https://www.xyz.com:1080/index.htm
protocol://host:port/filename
@gbohra
gbohra / flip-flop array
Created February 3, 2021 06:17
Write suitable code to develop a 2D Flip-Flop Array with dimension 5 × 5, which replaces all input elements with values 0 by 1 and 1 by 0. An example is shown below:
INPUT:
00001
00001
00001
00001
00001
OUTPUT:
11110
@gbohra
gbohra / pattern
Created February 3, 2021 06:15
Write a program to print symmetric Pascal's triangle of "*" 's of height "l" of odd length . If input "l" is even then your program will print "Invalid line number".
For example:
input : 5
output:
*
* *
* * *
* *
*
- name: Azure CLI script to create a new Web App for Container
uses: azure/CLI@v2
with:
azcliversion: latest
inlineScript: |
az account show
az webapp deployment slot create --debug --resource-group ${{ env.AZURE_RESOURCE_GROUP }} --name ${{ env.AZURE_WEBAPP_NAME }} --slot ${{ env.GITHUB_HEAD_REF }}
{:dls_required_question_count => {[:tag_id, :min_ques_count, :max_ques_count], [:tag_id, :min_ques_count, :max_ques_count]}}
@gbohra
gbohra / exams
Last active December 11, 2015 13:58
LSAT Secrets 20130123
[{"custom_id":1,"name":"Exam1518","countdown_configuration":"360,360,360"}]