Skip to content

Instantly share code, notes, and snippets.

Avatar

Maxime Wack MaximeWack

View GitHub Profile
@MaximeWack
MaximeWack / elmtags.py
Created Sep 30, 2018
Tag generator for Elm files
View elmtags.py
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
help_text = """
Extracts tags from Elm files. Useful for the Tagbar plugin.
Usage:
Install Tagbar (http://majutsushi.github.io/tagbar/). Then, put this file
@MaximeWack
MaximeWack / rmdtags.py
Created Sep 30, 2018
Tag generator for Rmarkdown files
View rmdtags.py
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
help_text = """
Extracts tags from rmd files. Useful for the Tagbar plugin.
Usage:
Install Tagbar (http://majutsushi.github.io/tagbar/). Then, put this file
View Figures functions
figures <- function(data, group = NULL)
{
if (is.null(group))
{
names(data) %>%
map(. %>%
{
ggplot(data) +
aes_(x = as.name(.)) -> g
if (is.factor(data[[.]]))
@MaximeWack
MaximeWack / Palette
Last active Nov 28, 2017
Color/fill functions for ggplot2 with my palette
View Palette
my_scale_color_discrete <- function(n)
{
pal <- scales::colour_ramp(c("#192440", "#F05440"))
seq(0, 1, length.out = n) %>%
lapply(pal) %>%
unlist -> values
scale_color_manual(values = values, na.value = "#D2D2D2")
}
You can’t perform that action at this time.