Referencing the decision tree from https://en.wikipedia.org/wiki/File:CART_tree_titanic_survivors.png
Original data from https://www.kaggle.com/c/titanic/data
| Description | Count | % from total | Notes |
|---|---|---|---|
| Total | 891 | 100% | |
| Died | 549 | 62% | |
| Survived | 342 | 38% |
| sudo apt-get update | |
| # need the same gcc-compiler as the kernel uses, or so NVidia says | |
| sudo apt install -y gcc=4:9.3.0-1ubuntu2 make libgl1-mesa-glx libxi6 libxrender1 | |
| # download and install the NVidia drivers | |
| wget https://us.download.nvidia.com/XFree86/Linux-x86_64/470.94/NVIDIA-Linux-x86_64-470.94.run | |
| chmod +x NVIDIA-Linux-x86_64-470.94.run | |
| sudo ./NVIDIA-Linux-x86_64-470.94.run | |
| # manually go through the install options |
| FROM python:3.7 | |
| WORKDIR /usr/src/app | |
| COPY requirements.txt ./ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| RUN python -m spacy download en |
| import requests | |
| import oauth2 | |
| import urllib | |
| from settings import auth | |
| def get(url): | |
| request = requests.get(url) | |
| json = request.json() | |
| response = json['response'] |
| # inspired in https://github.com/veggiedefender/miraculousladybot/blob/master/log.py | |
| import requests | |
| import re | |
| import tumblr_client | |
| from html2text import html2text | |
| from datetime import datetime | |
| from settings import blogs_to_search, posts_per_blog, tags_to_search, posts_per_search |
| import markovify | |
| import tumblr_client | |
| import settings | |
| import re | |
| import nltk | |
| class NltkText(markovify.Text): | |
| def word_split(self, sentence): | |
| words = re.split(self.word_split_pattern, sentence) | |
| if words[0] != "": |
| # log hours to destination systems each day at noon | |
| 0 12 * * * /home/myUser/scripts/log-daily-hours.sh | |
| # generate monthly report of worklogs each month, 1st day at 8 AM | |
| 0 8 1 * * /home/myUser/scripts/log-monthly-hours.sh |
| function checkoutCart(session) { // this is the code that executes on checkout | |
| trackActivity(session, ACTIONS.CHECKED_OUT); // it tracks that the user is checking out | |
| return getUserInfo(session.userId) // gets the user info with the user id | |
| .then(user => getDiscountAmount(user)) // then it gets the discount for the user | |
| .then(discAmt => addDiscountIfAny(session, discAmt)) // then it applies the discount | |
| .then(getPaymentScreenConfig) // then it gets the payment screen configuration | |
| .then(payScrCfg => new PaymentScreen(payScrCfg, session.cart)); // and it returns the payment screen | |
| } | |
| function getDiscountAmount(user) { // this is the code that gets the discount amount |
| function checkOutCart(session, cb) { // this is the code that executes on checkout | |
| getUserInfo(session.userId, function(err, user) { // it'll get the user information | |
| if (err) { return cb(err); } // if it has any error, it will call back with it | |
| if (user.hasDiscountedProfile) { // if the user has a profile for discounts | |
| retrieveDiscount(user.profileId, function(err, discAmt) { // it will retrieve that discount | |
| if (err) { return cb(err); } // on error, it aborts the operation | |
| session.cart.addDiscount(discAmt); // adds the discount to the cart | |
| getPaymentScreenConfig(function(err, payScrCfg) { // it retrieves the configuration from the payment screen | |
| if (err) { return cb(err); } // on error, it aborts | |
| cb(null, new PaymentScreen(payScrCfg, session.cart)); // creates a payment scree |
| $ErrorActionPreference = "SilentlyContinue" | |
| kill -force -processname 'Docker for Windows', com.docker.db, com.docker.slirp, com.docker.proxy, com.docker.9pdb, moby-diag-dl, dockerd | |
| kill -force -processname com.docker.service | |
| try { | |
| pushd "C:\Program Files\Docker\Docker\Resources" | |
| ./MobyLinux.ps1 -Destroy | |
| popd | |
| } Catch {} |
Referencing the decision tree from https://en.wikipedia.org/wiki/File:CART_tree_titanic_survivors.png
Original data from https://www.kaggle.com/c/titanic/data
| Description | Count | % from total | Notes |
|---|---|---|---|
| Total | 891 | 100% | |
| Died | 549 | 62% | |
| Survived | 342 | 38% |