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
| { | |
| "mcpServers": { | |
| "filesystem": { | |
| "command": "npx", | |
| "args": [ | |
| "-y", | |
| "@modelcontextprotocol/server-filesystem", | |
| "/Users/shubhaankar/" | |
| ] | |
| }, |
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
| set nocompatible " be iMproved, required | |
| filetype off " required | |
| let python_highlight_all=1 | |
| "vim plug auto install | |
| let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' | |
| if empty(glob(data_dir . '/autoload/plug.vim')) |
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
| ##login | |
| import requests | |
| API_ENDPOINT = "http://todoappshubhaankar.herokuapp.com/api/todo/hello/" | |
| #data = {"username":"shubh","password":"choti@21"} | |
| #r = requests.post(url = API_ENDPOINT, data = data) | |
| r = requests.get(url = API_ENDPOINT) | |
| pastebin_url = r.text | |
| print(pastebin_url) |
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
| solution=lambda k:int(((2*(k//2)*(k//2+1)*(2*(k//2)+1))/3)-((k-k//2)*(4*((k-k//2)**2)-1))/3) |
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
| solution=lambda k:sum([box*box for box in [x for x in range(1,k+1)][1::2]])-sum([box*box for box in [x for x in range(1,k+1)][0::2]]) |
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
| def solution(k): | |
| sizes = [x for x in range(1,k+1)] | |
| yellow_apples = [box*box for box in sizes[0::2] ] | |
| red_apples = [box*box for box in sizes[1::2] ] | |
| return sum(red_apples)-sum(yellow_apples) |