Skip to content

Instantly share code, notes, and snippets.

View yask123's full-sized avatar
πŸ‘¨β€πŸ’»

Yask Srivastava yask123

πŸ‘¨β€πŸ’»
View GitHub Profile
{"Menu": [{"Food": "Burger", "Price": 50}, {"Food": "Pizze", "Price": 300}], "RestaurantName": "Burger Place"}
ls = [-1, -2, 1, 3, 2]
maxx = ls[0]*ls[1]*ls[2]
for i in range(len(ls)-2):
prod=1
for j in range(i,i+3):
prod*=ls[j]
if maxx < prod:
maxx = prod
var img_dom = document.getElementsByClassName('image-thumb-body');
var links = [];
for (var i = 0; i< img_dom.length;i++){
links.push(img_dom[i].src);
}
function downloadAll(urls) {
var link = document.createElement('a');
var img_dom = document.getElementsByClassName('image-thumb-body');
var links = [];
for (var i = 0; i< img_dom.length;i++){
links.push(img_dom[i].src);
}
function downloadAll(urls) {
var link = document.createElement('a');
def merge_ranges(input_range_list):
prev_start_date = input_range_list[0][0]
prev_end_date = input_range_list[0][1]
result = []
for i in range(1,len(input_range_list)):
current_start_date = input_range_list[i][0]
if current_start_date > prev_end_date:
result.append([prev_start_date,prev_end_date])
prev_start_date = current_start_date
prev_end_date = input_range_list[i][1]
S = [1,2,3]
def get_subsets(arr,current_index, result):
if current_index == len(arr):
print result
return 1
get_subsets(arr,current_index+1,result+str(arr[current_index]))
get_subsets(arr,current_index+1,result)
def check(row,column,board):
for i in range(N):
if board[row][i] == 'Q':
return False
return True
def solve_queen(current_column, board):
if current_column == -1:
print board
return True
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure