Skip to content

Instantly share code, notes, and snippets.

tanmaiaccion

Block or report user

Report or block tanmaiaccion

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tanmaiaccion
tanmaiaccion / questions.txt
Created May 17, 2019
python sql questions
View questions.txt
What will be the output of the code below? Explain your answer.
def extendList(val, list=[]):
list.append(val)
return list
list1 = extendList(10)
list2 = extendList(123,[])
list3 = extendList('a')
@tanmaiaccion
tanmaiaccion / statements.py
Created May 17, 2019
python problem statements
View statements.py
#use yield to make get calls
import requests
urls = ["https://jsonplaceholder.typicode.com/todos/1",
"https://jsonplaceholder.typicode.com/todos/2"]
#find number in a column-sorted and row-sorted 2D list
arr = [[1, 5, 9, 11],
@tanmaiaccion
tanmaiaccion / Dockerfile
Last active Feb 22, 2019
docker-compose example
View Dockerfile
//for nodejs
FROM node:carbon-alpine
WORKDIR /usr/src/app
COPY . .
RUN apk -U upgrade && npm install && npm install -g nodemon && rm -rf /var/cache/apk/*
EXPOSE 5000
CMD ["npm", "run", "start:dev"]
View cloudTravel.js
"use strict";
function PriorityQueue() {
this.collection = [];
}
PriorityQueue.prototype.enqueue = function(element) {
if (this.isEmpty()) {
this.collection.push(element);
} else {
View gist:d7d41b83e8442413a968f5fb5e5434f5
mongoimport --port 27018 -d qanda -c qanda --type csv --fields question.string\(\),ans_1.string\(\),ans_2.string\(\),ans_3.string\(\),ans_4.string\(\),ans_5.string\(\),locationId.string\(\),status.boolean\(\) --columnsHaveTypes --file qanda.csv
View auth-cancel.json
{
"payment_auth": [
{
"id": 1,
"instrument_token": "aaa-bb"
},
{
"instrument_token": 2,
"id": 2
},
You can’t perform that action at this time.