This file contains 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
// Gist by [email protected] Rev 2.1.2 May 15, 2019 | |
// go to your insta profile page (not the home page). It looks something like this: https://instagram.com/YOUR_PROFILE | |
// Open javascript console "Ctrl + Shift + i" in Windows/Linux and "Cmd + option + i" in Mac. | |
// Paste the entire code below to the console and hit enter | |
// You will get the list of people whom you follow but who don't follow you back and viceversa as well as the entire list of followers and following | |
var following = [], | |
followers = [], | |
followersCount = 0, | |
followingCount = 0, |
This file contains 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
const XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; // importing xmlhttprequest package because node doesn't support it out of the box | |
const superHeroes = ['Batman', 'Superman', 'WonderWoman', 'Flash', 'Cyborg', 'Aquaman', 'Green Lantern', 'Martian Manhunter']; // an array of request params | |
const completedFetchingData = () => { // function to be called when all ajax requests complete. | |
console.log('Just completed fetching the data'); | |
} | |
const failedFetchingData = () => { // function to be called when data fetching fails | |
console.log('Failed to fetch the data'); | |
} | |
const ajaxRequestWithPromise = (param) => { |
This file contains 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
for(let c = 500; c > 0; c--) { | |
let b = c - 1; | |
for(; b > 0; b--) { | |
let a = b - 1; | |
for(; a > 0; a--) { | |
if (((a**2 + b**2) === c**2) && (a + b + c === 1000)){ | |
console.log(`The Pythagorian Triplets are ${a}, ${b} and ${c}.`); | |
break; | |
} | |
} |
This file contains 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
for(let c = 500; c > 0; c--) { | |
let b = c - 1; | |
for(; b > 0; b--) { | |
let a = b - 1; | |
for(; a > 0; a--) { | |
if (((a**2 + b**2) === c**2) && (a + b + c === 1000)){ | |
console.log(`The Pythagorian Triplets are ${a}, ${b} and ${c}.`); | |
break; | |
} | |
} |
This file contains 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 wins_rock_scissors_paper(player: str, opponent: str) -> bool: | |
# Normalize the casing of the input strings | |
player = player.lower() | |
opponent = opponent.lower() | |
# Define the winning conditions | |
winning_conditions = { | |
"rock": "scissors", | |
"paper": "rock", | |
"scissors": "paper" |