A Pen by FelippeChemello on CodePen.
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 axios from 'axios'; | |
| import fs from 'fs'; | |
| import FormData from 'form-data'; | |
| (async () => { | |
| const form = new FormData(); | |
| const file = fs.createReadStream('tmp/1630077711.mp4'); | |
| form.append('file', file, 'oi.mp4'); | |
| form.append('name', 'oii.mp4'); |
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 request = require('request'); | |
| const baseUrl = 'https://finance.yahoo.com/quote/'; | |
| module.exports.getHistoricalPrices = function (startMonth, startDay, startYear, endMonth, endDay, endYear, ticker, frequency, callback) { | |
| const startDate = Math.floor(Date.UTC(startYear, startMonth, startDay, 0, 0, 0) / 1000); | |
| const endDate = Math.floor(Date.UTC(endYear, endMonth, endDay, 0, 0, 0) / 1000); | |
| request(baseUrl + ticker + "/history?period1=" + startDate + "&period2=" + endDate + "&interval=" + frequency + "&filter=history&frequency=" + frequency, function (err, res, body) { |
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
| wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O FILENAME && rm -rf /tmp/cookies.txt |
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
| //USO: node heapsort.js <numero de testes para cada caso> <tamanho do vetor> | |
| var debug = 0; | |
| class HeapSort { | |
| constructor(i) { | |
| console.log("Iniciando HeapSort " + i) | |
| } |