Skip to content

Instantly share code, notes, and snippets.

View jan-glx's full-sized avatar

Jan Gleixner jan-glx

View GitHub Profile
library(future)
library(furrr)
library(kit)
#> Attaching kit 0.0.15 (OPENMP enabled using 1 thread)
library(tidyverse)

## reprex data
set.seed(1)
vars <- paste0(letters,1:10)[1:15]
@jan-glx
jan-glx / data.R
Created June 29, 2021 08:37
demo data for glmgampoi issue
pars <- list(Y = structure(c(46910819.9790649, 106932464.945086, 47871319.9775817,
107009304.974582, 31754130.0099559, 67657619.9535588, 33118039.9730373,
72316044.9935353, 46901215.0102922, 98729795.0210831, 43145660.0025119,
91362760.0231563, 39572599.9997401, 84379924.9702695, 30947309.992971,
69607434.9551284, 55180725.0019158, 107499160.056843, 56122014.9924626,
105568554.950027, 41935429.9847383, 64420735.0140891, 44557595.0019883,
75351225.0170069, 42857510.0085098, 111677335.095885, 51453984.9920682,
123750819.967743, 42838300.0033168, 110611180.039133, 43923664.993523,
117459544.975627, 36258875.0053207, 108939910.016663, 32743445.0015492,
@jan-glx
jan-glx / google_wordcloud.R
Last active July 17, 2016 21:07 — forked from noamross/google_wordcloud.R
Create a wordcloud of your google search history
# Script to make a word cloud of your google searches. Get your google search
# history at https://myactivity.google.com/more-activity . This script assumes the JSON files
# exported are in a 'Searches' subfolder
library(jsonlite)
library(rlist)
library(magrittr)
library(stringi)
library(wordcloud)
library(tm)
_companyName:GitHub
_productName:Atom
_version:1.6.2
platform:win32
process_type:renderer
prod:Electron
ptime:160961635
rept:electron-crash-service
ver:0.34.5
@jan-glx
jan-glx / speed_dist2.py
Created August 26, 2015 21:02
no wonder C is faster
__author__ = 'jan'
import numpy as np
import scipy.weave
def grad_dist2(ls, x1, x2=None):
if x2 is None:
x2 = x1
@jan-glx
jan-glx / .gitignore
Last active August 29, 2015 14:20 — forked from kogakure/.gitignore
*.aux
*.glo
*.idx
*.log
*.toc
*.ist
*.acn
*.acr
*.alg
*.bbl
function cell2csv(fileName, cellArray, append, separator, excelYear, decimal)
% Writes cell array content into a *.csv file.
%
% CELL2CSV(fileName, cellArray, append, separator, excelYear, decimal)
%
% fileName = Name of the file to save. [ i.e. 'text.csv' ]
% cellArray = Name of the Cell Array where the data is in
% append = false to open a new file, or true to go on with the existent.
% separator = sign separating the values (default = ';')
% excelYear = depending on the Excel version, the cells are put into