Skip to content

Instantly share code, notes, and snippets.

View atomashevic's full-sized avatar

Aleksandar Tomašević atomashevic

View GitHub Profile
@atomashevic
atomashevic / zedR.md
Created July 22, 2024 11:45
R REPL in Zed (Linux)

Run R code in ZED

Tested using Zed 0.144.4 on Ubuntu 22.04.4 LTS.

  1. Download the Ark R kernel 0.1.117
  2. Run the binary: ark --install
  3. Run jupyter-kernelspec list and find the path to ARK kernel
  4. Open ZED and install R Extension
  5. Open ZED and edit settings and insert the following code (update the exact path to Ark)
@atomashevic
atomashevic / lotr.csv
Last active June 7, 2024 14:31
LOTR scripts
char dialog movie
DEAGOL Oh Smeagol Ive got one! , Ive got a fish Smeagol, Smeagol! The Return of the King
SMEAGOL Pull it in! Go on, go on, go on, pull it in!   The Return of the King
DEAGOL Arrghh! The Return of the King
SMEAGOL Deagol!   The Return of the King
SMEAGOL Deagol!   The Return of the King
SMEAGOL Deagol!   The Return of the King
SMEAGOL Give us that! Deagol my love   The Return of the King
DEAGOL Why?   The Return of the King
SMEAGOL Because' , it's my birthday and I wants it.   The Return of the King
---
title: "tikz in Quarto!"
format: html
---
```{r include=FALSE}
# Necessary for using dvisvgm on macOS
# See https://www.andrewheiss.com/blog/2021/08/27/tikz-knitr-html-svg-fun/
Sys.setenv(LIBGS = "/usr/local/share/ghostscript/9.53.3/lib/libgs.dylib.9.53")

Directory structure:

.
├── papers
│   ├── Title - Author.pdf
│   └── Title - Author.pdf
├── notes
│   ├── 2022-04-10
│   │   ├── note.tex
@awesomebytes
awesomebytes / ipython_to_file.md
Created March 16, 2016 10:38
Save iPython session to a python file as code

Save an iPython session commands/code to a file

You must use the magic method %save:

In [1]: %save?
Type:       Magic function
String Form:<bound method CodeMagics.save of <IPython.core.magics.code.CodeMagics object at 0x7fb5d25bb1d0>>
Namespace:  IPython internal
File: /usr/lib/python2.7/dist-packages/IPython/core/magics/code.py