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
| function isTrick(cards = [{}]) { | |
| const colors = [cards[0].color, cards[1].color, cards[2].color,]; | |
| const numbers = [cards[0].number, cards[1].number, cards[2].number,]; | |
| const shade = [cards[0].shade, cards[1].shade, cards[2].shade,]; | |
| const shape = [cards[0].shape, cards[1].shape, cards[2].shape,]; | |
| let validPropsCount = 0; | |
| validPropsCount += isAValidProperty(colors); | |
| validPropsCount += isAValidProperty(numbers); | |
| validPropsCount += isAValidProperty(shade); | |
| validPropsCount += isAValidProperty(shape); |
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 diceGame(rolls): | |
| sum = 0; | |
| for [dice1, dice2] in rolls: | |
| if dice2 == dice1: | |
| sum = 0 | |
| else: | |
| sum += dice2 + dice1 | |
| return sum | |
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
| const myOutput = [ | |
| { | |
| image: 'https://lh4.googleusercontent.com/-eppsO08983g/WuQAZEjlrQI/AAAAAAABSRs/iBwDTYnr_wYtZXulXVwF-DN0Wp-o6sfCwCLIBGAYYCw/w36-h36-p-k-no/', | |
| title: "Che's Lounge", | |
| subtitle: '350 N 4th Ave, Tucson, AZ 85705, United States - ', | |
| time: ' 2 hours ago' | |
| }, | |
| { | |
| image: 'https://lh4.googleusercontent.com/-K-XTm1R7vuc/XcdrjBsh_gI/AAAAAAAB_nE/lmajk-2chgMRN3L1Gtalrba_cWXD6kXlQCJUFGAYYCw/w36-h36-p-k-no/', | |
| title: 'Public Brewhouse', |
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
| getSkills: async (data) => { | |
| let skills = [] | |
| skills = await this.page.evaluate(async () => { | |
| const seeMoreButton = document.querySelector('.pv-skill-categories-section button.pv-skills-section__additional-skills') | |
| if (seeMoreButton) seeMoreButton.click() | |
| await new Promise(resolve => setTimeout(resolve, 1500)); | |
| const skillsElements = document.querySelectorAll('.pv-skill-category-entity__skill-wrapper'); | |
| let skillsArray = [] | |
| for (let i = 0; i < skillsElements.length; i++) { |
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
| { | |
| "skills": [ | |
| { | |
| "skillName": "Product Management", | |
| "endorsement": "99+", | |
| "endorsedBy": [ | |
| { | |
| "name": "Alexander Tzur", | |
| "user": "https://www.linkedin.com/in/alexander-tzur-b39ba614/", | |
| "image": "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", |
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
| // {grapeType: "Malbec", rating: "4", ratingCount: 1000, priceRange: [10, 25]} | |
| let result = [{ | |
| "imageUrl": "https://images.vivino.com/thumbs/Jn9NIWl2TZmSUWDQ84eT_A_pb_x300.png", | |
| "name": "Luigi Bosca, Single Vineyard Malbec 2017", | |
| "country": "Argentina", | |
| "region": "Lujan de Cuyo", | |
| "price": 23.99, | |
| "vineUrl": "https://www.vivino.com/luigi-bosca-single-vineyard-malbec/w/51934?year=2017&price_id=22824349&cart_item_source=", | |
| "rating": 4.2, | |
| "ratingCount": 2885 |
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
| [{ | |
| "imageUrl": "https://images.vivino.com/thumbs/F7zv69HZS9OHt0UPrc6GRQ_pb_x300.png", | |
| "name": "Luigi Bosca, Malbec 2017", | |
| "country": "Argentina", | |
| "region": "Mendoza", | |
| "price": 18.99, | |
| "vineUrl": "https://www.vivino.com/luigi-bosca-malbec-mendoza-red-wine/w/2141966?year=2017&price_id=20931902&cart_item_source=", | |
| "rating": "4.1", | |
| "ratingCount": "8554" | |
| }, { |
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
| [ | |
| { | |
| imageUrl: 'https://images.vivino.com/thumbs/M3WitDM7QByVjznvecEOCQ_pb_x300.png', | |
| name: 'Nieto Senetiner, Don Nicanor Single Vineyard Villa Blanca Malbec 2011', | |
| location: 'Argentina, Lujan de Cuyo', | |
| price: null, | |
| rating: '4.5, 124 ratings' | |
| }, | |
| { | |
| imageUrl: 'https://images.vivino.com/thumbs/DXNCA9YMS5S4ROc7yth6jA_pb_x300.png', |
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
| [ | |
| { | |
| skillName: 'Telecommunications', | |
| endorsement: '99+', | |
| endorsedBy: `[{"name":"βΆCeline JordaoβΆ","user":"https://www.linkedin.com/in/%E2%9C%B6celine-jordao%E2%9C%B6-825b70192/","image":"https://media-exp1.licdn.com/dms/image/C5603AQE7tVjjNP0s9w/profile-displayphoto-shrink_100_100/0?e=1610582400&v=beta&t=80k4X7rj_CREFDA4cRfvmR0J1ePBPGdAA9Y0RVpat7c","title":"π π«πΆπππΎβππΆππ π²ππΎπππ π«Helping People Get Started in Online Entrepreneurship π» COMPLETE & FREE ONLINE TRAINING PROVIDED π I Also Write About Fitness & Nutrition"},{"name":"Edwin Koh K.C.","user":"https://www.linkedin.com/in/edwin-koh-k-c-805b54/","image":"https://media-exp1.licdn.com/dms/image/C5103AQEcbbdRSJK9sA/profile-displayphoto-shrink_100_100/0?e=1610582400&v=beta&t=h41ByULMbs8o6BFBKpmrQpl6w1viQXU5s4JCEACS-Zo","title":"VP - Business Development - APAC. - MBA, SMSCS, Compliance"},{"name":"Gaby Treiband","user":"https://www.linkedin.com/in/gaby-treiband/","image":"https://media-exp1.licdn.com/dms/image/C4D03AQF7RtCmXv5lMw/profile-displayphot |
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
| import math | |
| def least_cost_path(matrix): | |
| memo = [[-1 for _ in range(len(matrix[0]))] for _ in range(len(matrix))] | |
| solve(0, 0, memo, matrix) | |
| return memo[0][0] | |
| def solve(i, j, memo, matrix): |