Skip to content

Instantly share code, notes, and snippets.

Docker Swarm Cheat Sheet

Starting/Stopping a Docker Swarm

# Turns your docker server into a manager of the Docker Swarm
$ docker swarm init

# Turns off docker swarm
$ docker swarm leave -f

Docker Cheat Sheet

  • docker image - is a standalone, executable file used to create a docker container

    # Creates an image
    $ docker build -t <app-name> .
  • docker container - a lightweight, standalone, executable software package that includes everything needed to run a piece of software

Angular Projects Folder Structure

When organizing angular projects, I like to use the below folder structure

root
|__ src
    |__ app
        |__ feature
 |__ components

VS Code Cheat Sheet

Formating Code on Save

  • In the menu bar Code > Perferences > Settings
  • In the left hand pane Text Editor > Formatting
  • Select the Format on Save radio button

Adding Linting

Python Virtual Environment

Python venv (virtural environment) comes package with Python 3.

Setting up venv

  1. Execute the following command to create a virtual environment

    Mac

Data Science Notes

PluralSight's Doing Data Science with Python

By: Abhishek Kumar

You can give this a try.

Table of Contents

@jonepl
jonepl / Logging in Python.md
Created December 2, 2021 01:19
Basics on logging in Python

Log Levels

  • Notset = 0: This is the initial default setting of a log when it is created. It is not really relevant and most developers will not even take notice of this category. In many circles, it has already become nonessential. The root log is usually created with level WARNING.
  • Debug = 10: This level gives detailed information, useful only when a problem is being diagnosed.
  • Info = 20: This is used to confirm that everything is working as it should.
  • Warning = 30: This level indicates that something unexpected has happened or some problem is about to happen in the near future.
  • Error = 40: As it implies, an error has occurred. The software was unable to perform some function.

Analyze + Mode Part 1

Organize

Analyze & Model - the process of understanding, diagnosing, and refining a machine learning model with the help of interactive visualization

Regression Models

Linear Regression Model

Testing with Mocha and Chai

Mocha - a JavaScript test framework for Node.js programs, featuring browser support, asynchronous testing, test coverage reports, and use of any assertion library.

Chai - BDD (behavior driven development) / TDD (test driven development) assertion library for node and the browser that can be delightfully paired with any javascript testing framework.

Setup

  1. Makes sure you have a intialized NodeJS environment.