Skip to content

Instantly share code, notes, and snippets.

View fc1943s's full-sized avatar

stewshka fc1943s

  • Brazil
  • 10:37 (UTC -03:00)
View GitHub Profile

Plotting with VegaLite

Setup

We need two libraries for plotting in Livebook:

  • The vega_lite package allows us to define our graph specifications
@fc1943s
fc1943s / ideavim_actionlist.md
Created September 19, 2020 20:50 — forked from aca/ideavim_actionlist.md
IdeaVim ActionList

IdeaVim 0.55.2

--- actions ---
$copy                                              <c-c> <c-ins>
$cut                                               <c-x> <s-del>
$delete                                            <del>
$lru
$paste                                             <c-v> <s-ins>
$redo                                              <c-s-z> <a-s-bs>
$searchweb
import com.intellij.openapi.actionSystem.AnActionEvent
import static liveplugin.PluginUtil.*
import java.awt.*
import com.intellij.openapi.wm.ex.*
registerAction("FocusFindDialog", "alt shift F") { AnActionEvent event ->
def frame = WindowManagerEx.getInstanceEx().getFrame(event.project)
frame?.windows.each { Window window ->
def className = 'com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog'
let calc v =
let rec loop min_ max_ sum = function
| head :: tail -> loop (min min_ head) (max max_ head) (head + sum) tail
| [] -> [sum - max_; sum - min_] |> List.map string |> String.concat " "
loop 0 0 0 v
printfn "%s" (calc [ 4; -3; 7; 8; 2 ])
let calc = (n, v) => {
if(n < 2 || n > 10) {
throw "Tamanho do array de números inválido."
}
if(v.length < n) {
throw "Array de números inválido."
}
var sum = min = max = v[0];