Skip to content

Instantly share code, notes, and snippets.

View deniscapeto's full-sized avatar
👨‍💻
Coding and having fun

Denis Capeto deniscapeto

👨‍💻
Coding and having fun
View GitHub Profile
@deniscapeto
deniscapeto / get_most_profit_from_stock_quotes.py
Created October 13, 2021 14:33
get_most_profit_from_stock_quotes
def get_most_profit_from_stock_quotes(quotes):
max_profit = 0
for idx, day_quote in enumerate(quotes):
max_gain_day = 0
lower_limit = idx+1
for next in quotes[lower_limit::]:
@deniscapeto
deniscapeto / main_csv.js
Last active February 4, 2024 14:56
K6 load testing using CSV file
import papaparse from 'https://jslib.k6.io/papaparse/5.1.1/index.js';
import { SharedArray } from "k6/data";
import http from 'k6/http';
import { check } from 'k6';
const csvData = new SharedArray("another data name", function() {
return papaparse.parse(open('./data.csv'), { header: true }).data;
});
const BASE_URL = 'https://www.mywebsiteundertest.com.br'