Skip to content

Instantly share code, notes, and snippets.

@fidadoma
fidadoma / send_gosms.R
Last active January 31, 2024 11:13
short script to send sms using gosms.cz (czech numbers)
# the following script worked Feb-2024, not sure, whether the API wont change
# it is pretty cheap - 1CZK per message (again, this could be cheaper with better pricing plan)
library(tidyverse)
library(httr2)
# you need to register for gosms.eu
# you will need your client_id, client_secret and channel_id
# store those in variables
client_id <- "your client id"
@richarddmorey
richarddmorey / create_covers.R
Last active May 13, 2022 11:25
Create image covers for PDFs
#' Create cover images for talks from a folder of PDFs
#'
#' Requires imagemagick to be installed and in the path for the convert command
#' @param pdf_dir Directory containing PDF files of papers
#' @param img_dir Directory to output all the image files
#' @param crop_height How big to make the cropped images, relative to full page
#' @param fade_height How much of the image to fade to transparent at the bottom
#' @param density resolution for PNG images
#'
create_covers = function(pdf_dir, img_dir, crop_height = .5, fade_height = .25, density = 300){
@z3tt
z3tt / github.R
Last active July 12, 2024 13:07
Configure GitHub for Rstudio
#### 1. Sign up at GitHub.com ################################################
## If you do not have a GitHub account, sign up here:
## https://github.com/join
# ----------------------------------------------------------------------------
#### 2. Install git ##########################################################
## If you do not have git installed, please do so:
@dsquintana
dsquintana / gist:eb652322bd4f0f2602f143e6e9069750
Created December 11, 2019 10:28
Heart rate variability research trends
install.packages("europepmc")
install.packages("cowplot")
install.packages("tidyverse")
library(europepmc)
library(cowplot)
library(tidyverse)
hrv_trend <- europepmc::epmc_hits_trend(query = "heart rate variability",
period = 1978:2018)
@achetverikov
achetverikov / moving_dots.R
Last active January 21, 2021 10:49
Moving dots with gganimate
library(ggplot2)
library(gganimate)
library(ggthemes)
library(data.table)
n = 80 # number of dots
max_r = 300 # aperture radius
dt <- data.table(r = max_r*sqrt(runif(n)), theta =2*pi*runif(n), dot_n = 1:n)
@bradtraversy
bradtraversy / eslint_prettier_airbnb.md
Created July 19, 2019 17:54
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@ericjang
ericjang / TensorFlow_Windows.md
Last active March 27, 2021 22:19
Setting up TensorFlow on Windows using Docker.

TensorFlow development environment on Windows using Docker

Here are instructions to set up TensorFlow dev environment on Docker if you are running Windows, and configure it so that you can access Jupyter Notebook from within the VM + edit files in your text editor of choice on your Windows machine.

Installation

First, install https://www.docker.com/docker-toolbox

Since this is Windows, creating the Docker group "docker" is not necessary.

@tmalsburg
tmalsburg / predict_vs_simulate.org
Last active November 18, 2022 01:14
Predict vs simulate in lme4

Predict vs simulate in lme4

For this investigation we are going to use the sleepdata data set from the lme4 package. Here is the head of the data frame:

@rxaviers
rxaviers / gist:7360908
Last active July 25, 2024 14:32
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: