Skip to content

Instantly share code, notes, and snippets.

Avatar

Gergely Daróczi daroczig

View GitHub Profile
@Shehab7osny
Shehab7osny / GSoC2020.md
Last active Oct 9, 2021
Details about my progress throughout GSoC 2020
View GSoC2020.md

GSoC 2020 - gRPC R package

Shehab Hosny

Overview and Aim of the project

In this post I will try to wrap up my working progress throught GSoC 2020. I've been working since May trying to add new functionalities to the gRPC R package originally implemneted by Neal Fultz in 2017. There were a total of three functionalities to implement, TLS Encryption, Oauth2 Authentication and finally Streaming. It was required to implement these functionalities in the grpc package from both R and the underlying C wrapper code. Here is the link for my forked repository.

Challenges

Obviously, one of the main challenges that faced me while working n the project was the callback between the R code and the underlying C wrapper code. This required me to go more deep in the callback functions' implementation and returned data types. For the streaming part, this problem consumed a vast amount of time to be solved in a correct way. Additionaly, knowing exactly why each me

@gaborcsardi
gaborcsardi / Pkgdown deploy from Travis.md
Last active Oct 27, 2020
Walkthrough: deploy a pkgdown site from Travis
View Pkgdown deploy from Travis.md

Run usethis::use_pkgdown_travis()

usethis::use_pkgdown_travis()
✔ Setting active project to '/Users/gaborcsardi/works/ps'Adding 'docs/' to '.gitignore'Set up deploy keys by running `travis::use_travis_deploy()`Insert the following code in '.travis.yml'
  before_cache: Rscript -e 'remotes::install_cran("pkgdown")'
@0penBrain
0penBrain / commitCount.sh
Last active Sep 22, 2021
The simplest way to get commit count of a GitHub repository through the API
View commitCount.sh
curl -I -k "https://api.github.com/repos/:owner/:repo/commits?per_page=1" | sed -n '/^[Ll]ink:/ s/.*"next".*page=\([0-9]*\).*"last".*/\1/p'
### And that's all !
# I saw many fighting with finding first commit SHA or similar fancy thing.
# Here we just rely on the GH API, asking commits at 1 per page and parsing the last page number in the header of the reply (whose body only holds the last commit !)
# So this is robust and bandwidth efficient. :)
# If one want the commit count of a specific SHA, just use :
curl -I -k "https://api.github.com/repos/:owner/:repo/commits?per_page=1&sha=:sha" | sed -n '/^[Ll]ink:/ s/.*"next".*page=\([0-9]*\).*"last".*/\1/p'
View gganimate.R
library(data.table)
library(ggplot2)
library(gganimate)
library(transformr)
library(gifski)
library(png)
library(datasauRus)
## Anscombe-i qaurtett
anscombe
@xunil154
xunil154 / ArchLinux_ZFS_LUKS_Setup.sh
Created Aug 20, 2019
ArchLinux install script with ZFS as the root, all sitting on LUKS encryption, using systemd-boot for UEFI (ArchLinux with ZFS Root on LUKS with UEFI)
View ArchLinux_ZFS_LUKS_Setup.sh
#!/bin/sh
SWAPSIZE=3 # IN GB
SYSTEM_NAME=aerozine # Hostname and used in ZFS structure (zroot/sys/${SYSTEM_NAME}/ROOT/default)
USER=xunil # Initial admin user for the system
# Archlinux on ZFS Root on LUKS setup script (v1.0)
#
# USAGE: ./ArchLinux_ZFS_LUKS_Setup.sh /dev/sda
#
@jeremybise
jeremybise / baseof.html
Last active Sep 25, 2021
Google Fonts via config with Hugo
View baseof.html
<!-- Wherever your head tag is located, add the new partial -->
<head>
{{ partial "google-fonts" . }}
</head>
View degooglify.md

DeGooglify

DeGooglify

To migrate

Software / Service Replacement Satisfaction License
E-mail service None yet
Contact service [Nextcloud][]
@rasmusab
rasmusab / get_up_to_speed_with_bayes_test_script.R
Last active Jul 8, 2019
UseR 2019 tutorial - Get up to speed with Bayes test script
View get_up_to_speed_with_bayes_test_script.R
# Prior to the tutorial make sure that the script below runs without error on your R installation.
# You first need to install the follwoing packages:
# install.packages(c("rstanarm", "prophet", "CausalImpact"))
library(rstanarm)
library(prophet)
library(CausalImpact)
# This will test that rstanarm works
# Don't be alarmed if you get a warning about "divergent transitions "
@tymm
tymm / gist:c2771d1d0dd256471b7082b4f11063b1
Created Jan 20, 2019
/etc/X11/xorg.conf.d/20-nvidia.conf
View gist:c2771d1d0dd256471b7082b4f11063b1
Section "Module"
Load "modesetting"
EndSection
Section "Device"
Identifier "Device NVIDIA GPU"
Driver "nvidia"
BusID "PCI:1:0:0"
Option "AllowEmptyInitialConfiguration"
@CodingCellist
CodingCellist / Installing-Arch-on-a-ThinkPad-X1-Extreme-Gen-1.md
Last active Aug 19, 2021
A detailed overview of how I installed Arch Linux on my Lenovo ThinkPad X1 Extreme (Gen 1), having never installed Arch before.
View Installing-Arch-on-a-ThinkPad-X1-Extreme-Gen-1.md

DISCLAIMER

I am not responsible for any damages, loss of data, system corruption, or any other mishap you may somehow cause by following this guide.

This is mainly a step-by-step reminder/log for myself of how I installed Arch on my laptop. I am putting this out there in case it is useful for someone else, it is not intended to be an official guide. As a result, you may find that this guide is very tedious or lists a lot of unnecessary/intuitive steps or just straight up does things in a way that is considered bad practice. Apart from the latter, this is intentional, as I did not find these steps intuitive at all when