Skip to content

Instantly share code, notes, and snippets.

View vascoferreira25's full-sized avatar
🎯
Focusing

Vasco Ferreira vascoferreira25

🎯
Focusing
  • Portugal
View GitHub Profile
@vascoferreira25
vascoferreira25 / presentation.org
Created January 2, 2022 02:42 — forked from abrochard/presentation.org
Notes from the "Conquering Kubernetes with Emacs" presentation

Conquering Kubernetes with Emacs

Specific Annoying workflow

Listing pods with kubectl get pods, then select a pod name and copy paste it into kubectl logs [pod name]

Why?

  • I want to streamline my workflow and stop using the terminal
  • learn more about kubernetes
  • main kubernetes extension for Emacs out there is greedy for permissions
@vascoferreira25
vascoferreira25 / m_CleanupAndPerformance.bas
Last active March 18, 2021 22:02
Remove rows based on a condition and add new columns to a table
'******************************************************************************
' Author: Vasco Ferreira
' Description: Increase performance of Excel when running heavy subs
' Version: 0.1
' Instructions: Add this module to the workbook and call its subs
' Revisions: TODO
' - Date: 2019/03/10
' - Author: Vasco Ferreira
' - Description: Init
'@Folder("Utilities")
@vascoferreira25
vascoferreira25 / work_queue.rs
Created January 24, 2021 01:22 — forked from NoraCodes/work_queue.rs
An example of a parallel work scheduling system using only the Rust standard library
// Here is an extremely simple version of work scheduling for multiple
// processors.
//
// The Problem:
// We have a lot of numbers that need to be math'ed. Doing this on one
// CPU core is slow. We have 4 CPU cores. We would thus like to use those
// cores to do math, because it will be a little less slow (ideally
// 4 times faster actually).
//
// The Solution:
@vascoferreira25
vascoferreira25 / data_test.json
Created May 26, 2020 00:55
Testing data for d3 network graph
{"nodes": [{"id": 4, "name": 4}, {"id": 17, "name": 17}, {"id": 21, "name": 21}, {"id": 22, "name": 22}, {"id": 33, "name": 33}, {"id": 23, "name": 23}, {"id": 38, "name": 38}, {"id": 47, "name": 47}, {"id": 50, "name": 50}, {"id": 6, "name": 6}, {"id": 39, "name": 39}, {"id": 41, "name": 41}, {"id": 11, "name": 11}, {"id": 36, "name": 36}, {"id": 45, "name": 45}, {"id": 48, "name": 48}, {"id": 15, "name": 15}, {"id": 25, "name": 25}, {"id": 40, "name": 40}, {"id": 16, "name": 16}, {"id": 20, "name": 20}, {"id": 28, "name": 28}, {"id": 3, "name": 3}, {"id": 10, "name": 10}, {"id": 9, "name": 9}, {"id": 37, "name": 37}, {"id": 46, "name": 46}, {"id": 14, "name": 14}, {"id": 42, "name": 42}, {"id": 24, "name": 24}, {"id": 26, "name": 26}, {"id": 29, "name": 29}, {"id": 49, "name": 49}, {"id": 1, "name": 1}, {"id": 19, "name": 19}, {"id": 5, "name": 5}, {"id": 12, "name": 12}, {"id": 44, "name": 44}, {"id": 35, "name": 35}, {"id": 30, "name": 30}, {"id": 8, "name": 8}, {"id": 31, "name": 31}, {"id": 13, "name":
# -*- coding: utf-8 -*-
"""Solution for the exercise IS340 - Business Application Programming
This exercise was posted on reddit:
https://www.reddit.com/r/learnprogramming/comments/fdwt9a/wrote_my_first_successful_code/
This exercise is to calculate the installment schedule of a car loan."""
import pandas as pd
@vascoferreira25
vascoferreira25 / discord_bot.cljs
Created February 11, 2020 07:53
Discord bot written in Clojurescript
(ns core
(:require ["discord.js" :as Discord]))
;; Setup
(def admin-token "token")
(def general-chat-id "chat-id")
(def client
Option Explicit
' Description: Outputs quarterly average for a range monthly data.
' "quarter" for quarter reports
' "year" for yearly reports
Sub GenerateReport(term As String)
Dim portfolioData As Range
Set portfolioData = Range("B2", Range("B2").End(xlToRight).End(xlDown))
@vascoferreira25
vascoferreira25 / policy_probability_list_comprehension.py
Created March 13, 2019 21:31
Calculate the probability of all possible cenarios.
# This problem lies in calculating the probability
# that a certain cenario has to occur. It is
# similar to a Monte Carlo method in that
# it creates several cenarios. However, MC method
# creates cenarios based on the distribution of
# already seen cases while this method brute forces
# all possible cenarios.
# Original post on reddit: https://www.reddit.com/r/vba/comments/b0d07g/brand_new_to_vba_struggling_with_probability/
@vascoferreira25
vascoferreira25 / policy_probability.py
Created March 13, 2019 20:58
Calculate the probability of all possible cenarios.
# This problem lies in calculating the probability
# that a certain cenario has to occur. It is
# similar to a Monte Carlo method in that
# it creates several cenarios. However, MC method
# creates cenarios based on the distribution of
# already seen cases while this method brute forces
# all possible cenarios.
# Original post on reddit: https://www.reddit.com/r/vba/comments/b0d07g/brand_new_to_vba_struggling_with_probability/
'******************************************************************************
' Author: VascoFerreira
' Description: Sort arrays with collections
' Version: 0.1
' Instructions: TODO
' Revisions: TODO
' - Date: 2019/03/07
' - Author: Vasco Ferreira
' - Description: Init
'@Folder("Utilities.Sort")