Skip to content

Instantly share code, notes, and snippets.

View cgpu's full-sized avatar
:octocat:

Christina Chatzipantsiou cgpu

:octocat:
View GitHub Profile
@cgpu
cgpu / matchingFeatures_modified.R
Last active October 20, 2018 23:13
Script that contains functions for computeSimilarity() and matchFeatures()
#### Function for uniquely matching features between two datasets ####
#
# 1) computing features similarity matrix
# 2) assigning fatures across the two datasets (Hungarian algorithm)
# 3) returning a
#requires clue for the Hungarian algorithm
library(clue)
@cgpu
cgpu / templates_url.Rmd
Created October 25, 2018 16:14
Link to list with rmarkdown templates
http://jianghao.wang/post/2017-12-08-rmarkdown-templates/#r-packages
@cgpu
cgpu / TODO_05112018.md
Last active November 5, 2018 19:45
TODO_05112018.md
We couldn’t find that file to show.
@cgpu
cgpu / HallOfFameDocumentators.md
Last active November 7, 2018 23:26
Them rare good examples of people that put an effort to explain how to use their software.
@cgpu
cgpu / remote_cronjob_backup.sh
Created November 8, 2018 05:15
Remote automatic backup no authe required RSA key Apache
#!/usr/bin/env bash
# author: cgpu
# *NOTE*:
# PLEASE FIND ATTACHED AT THE tail OF THE FILE AN APPENDIX OF
# TASKS/COMMANDS THAT WERE PERFORMED OUTSIDE OF THE .sh FILE FOR THE CRONJOB.
# STEP 0:
#___________________________________________________________________________________________________________________
@cgpu
cgpu / EDAtoR.R
Last active November 11, 2018 18:49
Exploratory data analysis function starter pack. Modified by @patilindrajeets
EDAtoR <- function(df){
DT::datatable( (utils::str(df)), escape = FALSE, filter = 'bottom') )
DT::datatable( print(skimr::skim(df)), escape = FALSE, filter = 'bottom') )
DT::datatable( print(base::summary(df)), escape = FALSE, filter = 'bottom') )
DT::datatable( print(dplyr::glimpse(df)), escape = FALSE, filter = 'bottom') )
plot(visdat::vis_dat(df))
@cgpu
cgpu / sourceRy.R
Created November 8, 2018 07:45
Data sci starter pack(ages)
# WHAT | Under the hood #datasci starter pack-ages 📦 installation
# WHY | To de-clutter code - Use at own(er's) risk
sourceRy <- function(){
if (!require("librarian")) install.packages("librarian",
dependencies = TRUE,
quiet = TRUE)
librarian::shelf(
# CRAN
@cgpu
cgpu / images_on_scatterPlot.R
Created November 9, 2018 08:12
Add images on scatter plot
https://stackoverflow.com/questions/4860417/placing-custom-images-in-a-plot-window-as-custom-data-markers-or-to-annotate-t
@cgpu
cgpu / Numextract
Created November 14, 2018 12:43
Extract numbers from string. One-liner courtesy of @stla GitHub
Numextract <- function(string){ unlist(regmatches(string,gregexpr("[[:digit:]]+\\.*[[:digit:]]*",string)))}
@cgpu
cgpu / palette.R
Created November 18, 2018 12:56
My color palette
my_color_palette = c( '#da627d', #pinkpanther
'#2d3047', #nightblue
'#f46036', #brickorange
'#5b85aa', #mellowlightblue
'#9c528b', #purple
'#ffae19', #mustardyellow
'#c0c0c0') #coconutash