This file contains hidden or 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
| library(miniCRAN) | |
| library(remotes) | |
| # CRAN mirror to use (recommend checkpoint date for installed version of R https://mran.microsoft.com/timemachine) | |
| cran_repo <- c(CRAN = "https://cran.microsoft.com/snapshot/2018-11-30") | |
| # local path to create miniCRAN repo | |
| miniCRAN_dir <- "/data/dataiku/miniCRAN" | |
This file contains hidden or 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 io import StringIO | |
| import logging | |
| class StreamingLog(object): | |
| def __init__(self, logger_name, level=logging.INFO): | |
| self.stream = StringIO() | |
| self.handler = logging.StreamHandler(self.stream) | |
| formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') | |
| self.handler.setFormatter(formatter) | |
| self.log = logging.getLogger(logger_name) |
This file contains hidden or 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 urllib.parse import urlparse | |
| import re | |
| import dataiku | |
| import pandas as pd | |
| PROJECT_ID = 'CUSTOMERSEGMENTATION' | |
| ANALYSIS_ID = 'UjW24hJ1' | |
| ML_TASK_ID = 'LsiobCLw' | |
| MODEL_ID = 'A-CUSTOMERSEGMENTATION-UjW24hJ1-LsiobCLw-s1-pp1-m1' |
OlderNewer