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 bs4 import BeautifulSoup,SoupStrainer | |
| import urllib.request | |
| import colorama,re,queue,threading | |
| from colorama import Fore | |
| from urllib.parse import * | |
| class check_link(): | |
| def __init__(self,address): | |
| self.address=address | |
| def check(self,address): |
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 bs4 import BeautifulSoup,SoupStrainer | |
| import urllib.request | |
| import colorama,re,queue,threading | |
| from colorama import Fore | |
| from urllib.parse import * | |
| class check_link(): | |
| def __init__(self,address): | |
| self.address=address | |
| def check(self,address): |
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
| // Initial List of Candidates | |
| const candidates = [ | |
| ['Tom Cruise', 136, 6], | |
| ['Sponge Bob', 110, 4], | |
| ['James Earl Jones', 175, 8], | |
| ['Bob Barker', 112, 2], | |
| ['Tonya Harding', 108, 7], | |
| ['Charles Barkley', 220, 12], | |
| ['Peter Piper', 116, 4], | |
| ['Harry Potter', 96, 16], |
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
| // Write a function in JavaScript that accepts an array of integers and a number X as parameters, when invoked, returns an array of unique indices of two numbers whose sum is equal to X. | |
| // Example Input Arguments => [1, 3, 4, 5, 6, 8, 10, 11, 13], Sum: 14 | |
| // Example Output => [[0, 8], [1, 7], [2, 6], [4, 5]] | |
| // Initial (naive) approach using Brute Force -> O(N^2) time-complexity | |
| const findIndicesThatSumToTarget = (inputArray, targetValue) => { | |
| const indicesThatSumToTarget = []; |
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
| <link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet"> | |
| <script src="https://use.fontawesome.com/f5ea91e308.js"></script> | |
| <div id="app"></div> | |
| <a class="designer-link" href="https://dribbble.com/shots/1978243-Latest-News">Design from <i class="fa fa-dribbble"></i></a> | |
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
| # %% Change working directory from the workspace root to the ipynb file location. Turn this addition off with the DataScience.changeDirOnImportExport setting | |
| # ms-python.python added | |
| import os | |
| try: | |
| os.chdir(os.path.join(os.getcwd(), '08-Milestone Project - 2')) | |
| print(os.getcwd()) | |
| except: | |
| pass | |
| # %% [markdown] | |
| # # Milestone Project 2 - Solution Code |
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
| var grep = function (what, where, callback) { | |
| var exec = require('child_process').exec; | |
| exec("grep " + what + " " + where + " -nrH", function (err, stdin, stdout) { | |
| var list = {} | |
| var results = stdin.split('\n'); | |
| // remove last element (it’s an empty line) | |
| results.pop(); |
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 prompt = require('prompt'); | |
| const board = { | |
| 1: ' ', | |
| 2: ' ', | |
| 3: ' ', | |
| 4: ' ', | |
| 5: ' ', | |
| 6: ' ', | |
| 7: ' ', |
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
| ✓ status was 200 | |
| ✗ transaction time OK | |
| ↳ 99% — ✓ 82167 / ✗ 500 | |
| checks.....................: 99.69% ✓ 164834 ✗ 500 | |
| data_received..............: 28 MB 155 kB/s | |
| data_sent..................: 8.3 MB 46 kB/s | |
| http_req_blocked...........: avg=6.29µs min=1µs med=3µs max=5.08ms p(90)=4µs p(95)=4µs | |
| http_req_connecting........: avg=2.87µs min=0s med=0s max=4.11ms p(90)=0s p(95)=0s |
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 http = require('k6/http'); | |
| const { check } = require('k6'); | |
| export const options = { | |
| vus: 100, | |
| duration: "3m" | |
| }; | |
| export default function() { | |
| const res = http.get("http://127.0.0.1:5000/api/stocks/AITHK"); |
NewerOlder