This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker create \ | |
--name=lychee \ | |
-v ~/.config/lychee/conf:/conf \ | |
-v ~/lychee-uploads:/uploads \ | |
-v ~/.config/lychee/sym:/sym \ | |
-v ~/Pictures:/imagelib \ | |
-e PUID=1000 \ | |
-e PGID=1000 \ | |
-e PHP_TZ=Europe/Berlin \ | |
-e DB_CONNECTION=mysql \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.drew.imaging.ImageMetadataReader; | |
import com.drew.metadata.Directory; | |
import com.drew.metadata.Metadata; | |
import com.drew.metadata.Tag; | |
import com.drew.metadata.exif.ExifSubIFDDirectory; | |
import org.apache.commons.imaging.ImageInfo; | |
import org.apache.commons.imaging.Imaging; | |
import java.io.File; | |
import java.util.Iterator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source('load_data.R') | |
# all you need to do | |
# now two variables are available in your environment: | |
# df_known - data frame with features from BADS_WS1718_known.csv | |
# df_class - data frame with features from BADS_WS1718_class.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
standardize <- function(x){ | |
mu <- mean(x) | |
std <- sd(x) | |
result <- (x - mu)/std | |
return(result) | |
} | |
..static_user_statistics <- NULL | |
..read_and_preprocess_data_file = function(fp) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source('load_data.R') | |
d = read_and_preprocess_data_file('data/BADS_WS1718_known.csv') | |
n = nrow(d) | |
ratio = sum(d$return) / n | |
set.seed(1) | |
accuracy = 100000 | |
randomized_returns = sample(accuracy, n, replace=TRUE)/accuracy | |
randomized_returns = ifelse(randomized_returns > ratio, 1, 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source('load_data.R') | |
d = read_and_preprocess_data_file('data/BADS_WS1718_known.csv') | |
d = subset(d, select = -c(delivery_date)) # remove NAs | |
classdata = read_and_preprocess_data_file('data/BADS_WS1718_class.csv') | |
classdata = subset(classdata, select = -c(delivery_date)) # remove NAs | |
# train the final model with 632 bootstrapping | |
for (iter in 1:400) { | |
# sample with replacement here - to understand why please refer to the book |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source('load_data.R') | |
d = read_and_preprocess_data_file('data/BADS_WS1718_known.csv') | |
library(dplyr) | |
# 1st idea (the image I previously shared on WhatsApp) | |
# relationship between total orders (item_count, not transaction count) and return count (again the item_count) | |
# Are users who order more "wiser" in terms of picking the right items than small-volume users? | |
orders_and_returns_per_user = d %>% | |
group_by(user_id) %>% | |
summarize(nreturn=sum(return), norder=n()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
import multiprocessing | |
def test_screen(pic): #Prozess | |
file_prefix = 'MA_HA1_drawing_' | |
file_postfix = '.png' | |
file_name = file_prefix + str(pic) + file_postfix | |
im = Image.open(file_name) | |
pix = im.load() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
config: { | |
// default font size in pixels for all tabs | |
fontSize: 14, | |
// font family with optional fallbacks | |
fontFamily: '"Inconsolata for Powerline"', | |
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk) | |
cursorColor: 'rgba(248,28,229,0.8)', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
config: { | |
// default font size in pixels for all tabs | |
fontSize: 14, | |
// font family with optional fallbacks | |
fontFamily: '"Inconsolata for Powerline"', | |
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk) | |
cursorColor: 'rgba(248,28,229,0.8)', |
NewerOlder