Skip to content

Instantly share code, notes, and snippets.

View cgpu's full-sized avatar
:octocat:

Christina Chatzipantsiou cgpu

:octocat:
View GitHub Profile
---
title: "ggiraph with bar chart tooltips"
author: "hrbrmstr"
date: "`r Sys.Date()`"
output:
html_document:
css: ggiraphe.css
---
The full `Rmd` and `css` files for this are in <a target=_blank href="https://gist.github.com/hrbrmstr/5ee3123f7161580d4cdf">this gist</a>.
@cgpu
cgpu / ggroc.R
Created June 10, 2019 00:43 — forked from jwaage/ggroc.R
ROC curve using ggplot2 and pROC
ggroc <- function(roc, showAUC = TRUE, interval = 0.2, breaks = seq(0, 1, interval)){
require(pROC)
if(class(roc) != "roc")
simpleError("Please provide roc object from pROC package")
plotx <- rev(roc$specificities)
ploty <- rev(roc$sensitivities)
ggplot(NULL, aes(x = plotx, y = ploty)) +
geom_segment(aes(x = 0, y = 1, xend = 1,yend = 0), alpha = 0.5) +
geom_step() +
@cgpu
cgpu / README-Template.md
Created June 22, 2019 17:52 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@cgpu
cgpu / notes.md
Created August 18, 2019 20:39 — forked from teamdandelion/notes.md
SustainOSS Ways to Encourage Contributors - Code of conduct

List of Ways to Help Get New Contributors

Ideas

(Sorted by # of people who voted for each one)

  • Say "Thank You" / Acknowledgement (8)
  • Have website (but website can be a distraction) (8)
  • "Setup social spaces" (8)
  • Good First Issue (7)
  • Status / Recognize status. A way to show/document that someone is a maintainer vs a collaborator (7)
  • Have a fast build (6)
@cgpu
cgpu / sed cheatsheet
Created September 2, 2019 14:01 — forked from someguynamedmatt/sed cheatsheet
magic of sed -- find and replace "text" in a string or a file
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@cgpu
cgpu / gist:6b15bc8af08ba319c8fd793e5c07f789
Created October 16, 2019 20:46 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@cgpu
cgpu / KaplanMeierPlotR.R
Created October 24, 2019 18:46 — forked from nbremer/KaplanMeierPlotR.R
Creating a Kaplan Meier plot, used in Survival Analysis, using R's ggplot2 package
#' Create a Kaplan-Meier plot using ggplot2
#'
#' @param sfit: a survfit object
#' @param table: logical: Create a table graphic below the K-M plot, indicating at-risk numbers?
#' @param returns logical: if TRUE, return an arrangeGrob object
#' @param xlabs: x-axis label
#' @param ylabs: y-axis label
#' @param ystratalabs: The strata labels. Default = levels(summary(sfit)$strata)
#' @param ystrataname: The legend name. Default = "Strata"
#' @param timeby numeric: control the granularity along the time-axis
@cgpu
cgpu / plink_pruning_prep.sh
Created November 27, 2019 17:14 — forked from janxkoci/plink_pruning_prep.sh
This simple script prepares your VCF dataset for pruning with Plink. It takes name of the input VCF as argument and produces new, annotated VCF.
# print everything after loop is finished
for (i in 0:101) {
print(i)
Sys.sleep(0.01)
}
# simplist way to print within loop
for (i in 0:101) {
print(i)
Sys.sleep(0.01)
@cgpu
cgpu / papermill_python_api.py
Created March 1, 2020 22:44 — forked from GabrielSGoncalves/papermill_python_api.py
executing papermill using its Python API
import papermill as pm
pm.execute_notebook('weather_forecast_using_pyowm.ipynb',
'weather_forecast_using_pyowm_output.ipynb',
parameters={'city':'Sao Paulo,BR'},
kernel_name='papermill-tutorial')