Skip to content

Instantly share code, notes, and snippets.

View Polkas's full-sized avatar

Maciej Nasinski Polkas

  • Warsaw Poland
View GitHub Profile
@Polkas
Polkas / ret_wig_long.R
Last active August 4, 2022 11:53
WIG20TR and WIG40TR returns
``` r
# A very simple script to simulate all possible investment windows for x years investment
# Investment in WIG20TR or WIG40TR
library(xts)
w20 <- read.csv(glue::glue("https://stooq.com/q/d/l/?s=wig20tr&i=d"))
w40 <- read.csv(glue::glue("https://stooq.com/q/d/l/?s=mwig40tr&i=d"))
w80 <- read.csv(glue::glue("https://stooq.com/q/d/l/?s=swig80tr&i=d"))
@Polkas
Polkas / app.py
Last active September 1, 2024 09:02
pyshiny - compare R package DESCRIPTION files
import pyodide.http
from shiny import App, reactive, render, ui, req
from htmltools import TagList, div
from htmltools.tags import th, td, tr, thead, tbody, table, style, head, span, a
from re import compile, MULTILINE, split
fields = ["Title", "Version", "Author", "Description", "License", "URL",
"BugReports", "Encoding", "RoxygenNote", "Depends", "Imports", "LinkingTo",
"Suggests", "Enhance", "Config/testthat/edition", "VignetteBuilder", "NeedsCompilation",
"Packaged", "Repository", "Date/Publication"]