Skip to content

Instantly share code, notes, and snippets.

View leesahanders's full-sized avatar

Lisa Anders leesahanders

View GitHub Profile
@leesahanders
leesahanders / setup.md
Last active June 1, 2024 16:29
Setup

Setup

2023 setup commands to get the windows and wsl ubuntu partition setup with needed software and settings.

Windows

After logging on and downloading chrome, check for Windows updates. This might take a bit.

Let's enable some things so we can use Andrie's trick for using scoop, choco to install software. Basically stuff you would do in linux you do with scoop.

@leesahanders
leesahanders / 2024-01-11 Reading Delta Files in R from Azure Data Lake.md
Last active November 6, 2024 14:16
2024-01-11 Reading Delta Files in R from Azure Data Lake
@leesahanders
leesahanders / 2023-08-29 Sagemaker and Git Credentials.md
Last active January 12, 2024 18:54
2023-08-29 Sagemaker and Git Credentials

Problem when on Linux:

In general gitcreds doesn't work well on linux (which has led to this git issue (Ship our own credential helper on Linux · Issue #47 · r-lib/gitcreds ). There is an excellent blog post that is very useful that goes deeper into what is going on: Notes from a data witch - Managing GitHub credentials from R, difficulty level linux

Problem when on Sagemaker:

Additionally, on Sagemaker things like credentials will be by default stored to the ephemeral EC2 instance and lost when the session is closed. A different method needs to be pursued in order for the token to persist.

TLDR Solution:

@leesahanders
leesahanders / 2023-09-27 Shinyloadtest and Post files working example.md
Created January 12, 2024 18:59
2023-09-27 Shinyloadtest and Post files working example

Goal

Explain how to include the <output_file>.post. files when running shinyloadtest.

Explanation

What's happening is that for shiny apps where data is being uploaded (for example using fileInput() ), that uploaded data won't be include in the recording file but in auxiliary "post" files. Shinycannon / Shinyloadtest will automatically detect and use the recording.log and recording.log.post files as long as the tests are being run from the same directory that those files are saved into.
 
A nice addition added by the team was that when the recording completes a message will display with the names of the created files, for example (from the github issue here: rstudio/shinyloadtest#114 ) like this:
 

Create a virtual environment:

python3 --version
python3 -m venv .venv
/opt/python/3.7.7/bin/python -m venv .venv
/opt/python/3.9.6/bin/python -m venv .venv
/opt/python/3.9.14/bin/python -m venv .venv

Activate the virtual environment. On Linux or Mac this is done with: