Skip to content

Instantly share code, notes, and snippets.

View Patrikios's full-sized avatar
🎯
carpe diem

Patrik Patrikios

🎯
carpe diem
View GitHub Profile
@Patrikios
Patrikios / function_parameter_pasing.jl
Created February 20, 2022 22:01
Passing by reference an passing by value in julialang
#= assignment of a function to a new name
- is shallow copy of a function
- in programming parlance: done by reference
=#
f(x) = 2x
g = f
g #f (generic function with 1 method)
g(2) #4
f(x) = 4x
@Patrikios
Patrikios / main.go
Last active February 20, 2022 21:58
Gist on type checking in go
package main
// Sources:
// 1. https://go.dev/tour/methods/15
// 2. https://go.dev/tour/methods/16
// 3. https://stackoverflow.com/questions/6996704/how-to-check-variable-type-at-runtime-in-go-language
// 4. https://go.dev/tour/methods/9
// Notions
// concrete types like int, float64, string etc
@Patrikios
Patrikios / server.R
Created April 2, 2021 18:01 — forked from garrettgman/server.R
A shiny app that helps you explore stock returns (by way of yahoo finance and quantmod)
library(shiny)
library(quantmod)
library(VGAM)
# Define server logic for random distribution application
shinyServer(function(input, output) {
# acquiring data
dataInput <- reactive({
if (input$get == 0)