Skip to content

Instantly share code, notes, and snippets.

View csaybar's full-sized avatar
🇵🇪

Cesar Aybar csaybar

🇵🇪
View GitHub Profile
@csaybar
csaybar / Single_Linked_List.cpp
Last active September 24, 2020 10:31
Singly linked list in C++
/*Singly linked list example using C++
This code was inspired in the post of Kamal Choudhary
https://www.codementor.io/codementorteam/a-comprehensive-guide-to
-implementation-of-singly-linked-list-using-c_plus_plus-ondlm5azr
and Charlie Mills https://gist.github.com/charlierm/5691020
*/
#include <iostream>
using namespace std;
@csaybar
csaybar / pal.png
Created December 10, 2018 23:54
pal_png
logo
@csaybar
csaybar / cptcity_scrp.R
Last active December 16, 2019 14:37
Scraping the cptcity website (Please, read this first: http://soliton.vm.bytemark.co.uk/pub/cpt-city/notes/faq.html)
# 1._Libraries ------------------------------------------------------------
library(rvest)
library(openNLP)
library(NLP)
library(stringr)
library(tidyverse)
options(java.parameters = "- Xmx1024m")
blacklist <- read_table('R/blacklist.txt',col_names = F)[[1]] %>% tolower()
blacklist <- blacklist[!duplicated(blacklist)] %>% as.character()
@csaybar
csaybar / blacklist.txt
Created December 15, 2018 23:03
blacklist cpt-city
.com
.org
.net
.io
record
Graphics
Graphic
Library
Libraries
prepared
@csaybar
csaybar / hextolab.R
Last active December 13, 2019 15:14
hex to Lab color space & Lab color space to hex.
hex_to_Labspace <- function(hex) {
hextolab <- function(x)
convertColor(x,from="sRGB",to="Lab")
rgb_col <- col2rgb(hex)/255
labspace <- apply(rgb_col, 2, hextolab) %>% t
colnames(labspace) <- c('L','a','b')
return(labspace)
}
Labspace_to_hex <- function(lab) {
@csaybar
csaybar / paletter_to_pal.R
Last active January 2, 2019 10:32
function to pass the paletter database to pal packages
hex_to_Labspace <- function(hex) {
hextolab <- function(x)
convertColor(x,from="sRGB",to="Lab")
rgb_col <- col2rgb(hex)/255
labspace <- apply(rgb_col, 2, hextolab) %>% t
colnames(labspace) <- c('L','a','b')
return(labspace)
}
Labspace_to_hex <- function(lab) {
print('hi')
@csaybar
csaybar / rgee_images
Created December 30, 2019 02:08
rgee Images
hi
my images will be here! :)