๐๏ธโโ๏ธ
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
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from bs4 import BeautifulSoup | |
BASE_URL = 'http://www.youtube.com' | |
path_to_chromedriver = '/Users/nebula/Projects/test-scrape-youtube-explore/chromedriver' # change path as needed | |
browser = webdriver.Chrome(executable_path = path_to_chromedriver) |
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
/* | |
* Complete the 'topArticles' function below. | |
* | |
* The function is expected to return a STRING_ARRAY. | |
* The function accepts INTEGER limit as parameter. | |
* base url for copy/paste: | |
* https://jsonmock.hackerrank.com/api/articles?page=<pageNumber> | |
*/ | |
const https = require('https'); | |
const makeRequest = (pageNumber = 1) => new Promise((resolve, reject) => { |
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 calculateAmount(prices) { | |
let dp = []; | |
dp[0] = prices[0]; | |
let totalCost = prices[0]; | |
for (let i = 1; i < prices.length; i += 1) { | |
if (prices[i] - dp[i-1] < 0) { | |
totalCost += 0; | |
dp[i] = Math.min(prices[i], dp[i-1]); | |
} | |
else { |
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
# The `contract` keyword defines a new contract type | |
contract HelloWorld: | |
message: String<100> | |
pub fn __init__(self, _message: String<100>): | |
self.message = _message | |
pub fn update(self, newMessage: String<100>): | |
self.message = newMessage | |
pub fn getMessage(self) -> String<100>: | |
return self.message.to_mem() |
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
{ | |
"deploy": { | |
"VM:-": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"main:1": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, |
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 { Octokit } = require("octokit"); | |
const dotenv = require('dotenv'); | |
const path = require('path'); | |
// to load the PAT you created | |
dotenv.config({ path: path.join(__dirname, '..', '..', `.env.${process.env.NODE_ENV || 'development'}`) }); | |
// Create a personal access token at https://github.com/settings/tokens/new?scopes=repo | |
const octokit = new Octokit({ auth: process.env.GIT_PAT }); |