Skip to content

Instantly share code, notes, and snippets.

Gergely Daróczi daroczig

Block or report user

Report or block daroczig

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@daroczig
daroczig / matek.R
Last active May 19, 2019
Math exercises for a 8 yrs old in Hungarian language
View matek.R
## TODO R package
## TODO internation via yaml that also provides the list of languages for the UI
## TODO cli --ui hu --control en --number 1:20 ...
library(logger)
library(crayon)
library(reticulate)
num2words <- import('num2words')
## rich-iannone/UnidecodeR
@daroczig
daroczig / szeged-2017-workshop.R
Created Apr 11, 2019
Visual Methods to Teach Multivariate Statistics with R (at) Challenges and Innovations in Statistics Education (Szeged, Hungary)
View szeged-2017-workshop.R
## intro slides: http://bit.ly/r-intro-slide
## basic operations
1 + 3
3*2
3^2
## constants
pi
"pi"
View iris demo.Rmd
---
title: "Iris teszt elemzés"
author: "Gergely"
date: "`r Sys.time()`"
output: html_document
---
Hello, markdown! Ez egy egyszerű szöveges dokumentum,
a szöveget a markdown jelölőnyelv segítségével tudunk formázni.
@daroczig
daroczig / BCE-MDDA-2018.R
Created Nov 19, 2018
BCE // Vállalati Pénzügyi Információs Rendszerek // 2018
View BCE-MDDA-2018.R
## #############################################################################
## PCA demo on image processing
## #############################################################################
download.file('http://bit.ly/nasa-image-pca', 'image.jpg') # mode = »bw«
library(jpeg)
img <- readJPEG('image.jpg')
str(img)
@daroczig
daroczig / print-tracked-tasks.py
Last active Nov 11, 2018
Argos script to print currently tracked tasked from Time ++ https://github.com/zagortenay333/timepp__gnome/issues/80
View print-tracked-tasks.py
#!/usr/bin/env python
import dbus, dbus.exceptions
import sys
import re
try:
bus = dbus.SessionBus()
timetracker = bus.get_object('org.gnome.Shell', '/timepp/zagortenay333/TimeTracker')
except dbus.exceptions.DBusException as e:
@daroczig
daroczig / Crunch-2018-R-workshop.R
Created Nov 3, 2018
Code presented at the R workshop of the Crunch 2018 conference: http://crunchconf.com
View Crunch-2018-R-workshop.R
## #############################################################################
## intro slides: http://bit.ly/CRUNCH-R-2018
## #############################################################################
## intro to R
## basic operations
1 + 3
3 * 2
@daroczig
daroczig / exercises.R
Last active Apr 5, 2018
data.table joins
View exercises.R
## generate transactional tables
set.seed(42)
library(data.table)
tx <- data.table(
item = sample(letters[1:3], 10, replace = TRUE),
time = as.POSIXct(as.Date('2016-01-01')) - runif(10) * 36*60^2,
amount = rpois(10, 25))
prices <- data.table(
item = letters[1:3],
date = as.Date('2016-01-01') - 1:2,
View Budapest-BI-Forum-2017.r
## intro slides: http://bit.ly/r-intro-slide
## basic operations
1 + 3
3*2
3^2
## constants
pi
"pi"
@daroczig
daroczig / CRUNCH-2017-R-workshop.R
Created Oct 19, 2017
Code presented at the R workshop of the CRUNCH 2017 conference: http://crunchconf.com
View CRUNCH-2017-R-workshop.R
## intro slides: http://bit.ly/CRUNCH-R-2017
## basic operations
1 + 3
3*2
3^2
## constants
pi
"pi"
@daroczig
daroczig / data.table.R
Created Apr 12, 2017
overlap join demo
View data.table.R
# demo transactions data
library(data.table)
txns <- data.table(
rpid = rep(1:3, times = 4),
txid = 1:12,
time = c(10, 10, 10, 11, 15, 20, 12, 16, 25, 13, 21, 30))
## overlap join to see which transactions happened withing 3 time units on the same rpid
## let's define the time periods for the overlap
txns[, start := time - 3]
You can’t perform that action at this time.