Developer Blog

Tipps und Tricks für Entwickler und IT-Interessierte

Jupyter | Cookbook

Cookbook

Customize start dir

$ jupyter notebook --generate-config<br>
Writing default config to: /Users/demo/.jupyter/jupyter_notebook_config.py

Search for the following line in the file

#c.NotebookApp.notebook_dir = ''

Replace by

c.NotebookApp.notebook_dir = '†/the/path/to/home/folder/'

Change password

jupyter lab password

Free online Notebooks

https://notebooks.azure.com/

https://nbviewer.jupyter.org/

https://colab.research.google.com/notebooks/welcome.ipynb

Python | Working with virtual environments

Introduction

  • venv module
  • virtualenv
  • pipenv

pipenv

Introduction

Pipenv — the officially recommended Python packaging tool from Python.org, free (as in freedom).

Read here how to install in details

Installation

For Mac OS and brew package manager

brew install pipenv

Prepare environment

venv module

Installation

Nothing required. Module venv is part of the Python distribution

Prepare environment

python3 -m venv env

virtualenv

Prepare environment

$ virtualenv -p python3 .env/python

iPython | Getting Started

Introduction

iPython ist ein Kommandozeileninterpreter zum interaktiven Arbeiten mit der Programmiersprache Python

IDEs and Environments

Install 

Jupyter

$ virtualenv --python python3 jupyter
$ cd jupyter
$ . bin/activate
$ pip install --upgrade pip
$ pip install jupyter

Finally run jupyter

jupyter notebook

Anaconda

$ virtualenv --python python3 anaconda
$ cd anaconda
$ . bin/activate
$ wget https://repo.continuum.io/archive/Anaconda3-4.3.1-Linux-x86_64.sh | bash
jupyter notebook

Resources

Awesome Notebooks

Notebooks

Python | Toolbox

Introduction

Update Python Environment

Update all Python packages

pip3 list| cut -f1 -d' '|xargs -I {} pip3 install {} --upgrade

Debugging and Tracing

def tracefunc(frame, event, arg, indent=[0]):
      if event == "call":
          indent[0] += 2
          print "-" * indent[0] + "> call function", frame.f_code.co_name
      elif event == "return":
          print "<" + "-" * indent[0], "exit function", frame.f_code.co_name
          indent[0] -= 2
      return tracefunc

import sys
sys.settrace(tracefunc)

main()

JavaScript: Guide to the JavaScript Ecosystem

Beginning – Libraries and Frameworks

UI

  • Angular
  • Ionic
  • Onson UI
  • Framework 7

Unit Testing

  • Karma
  • Jasmine

End-to-End Testing

Technologies

Unit Testing

Protractor (http://www.protractortest.org/)

Use npm to install Protractor globally with

npm install -g protractor

The webdriver-manager is a helper tool to easily get an instance of a Selenium Server running. Use it to download the necessary binaries with:

webdriver-manager update

Now start up a server with:

webdriver-manager start

Install a demo repository:

git clone https://github.com/juliemr/protractor-demo.git
npm install

Update selenium driver

node_modules/protractor/bin/webdriver-manager update

Run server in background:

node app/expressserver.js &

Now run the tests

npm test 

Error message: No selenium server jar found at the specified location

The Error

If you got this error when testing your javascript app, maybe you hate to update the selenium driver jar.

The Solution

Update the driver depending on the installation of the node module:

Check with

$ which protracto
/usr/local/bin/protractor

If installed global, then use the command

$ /usr/local/lib/node_modules/protractor/bin/webdriver-manager update

If installed in the app directory, use

$ node_modules/protractor/bin/webdriver-manager update
[17:17:13] I/update - chromedriver: file exists node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.22mac32.zip
[17:17:13] I/update - chromedriver: unzipping chromedriver_2.22mac32.zip
[17:17:14] I/update - chromedriver: setting permissions to 0755 for node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.22
[17:17:14] I/update - chromedriver: v2.22 up to date
[17:17:14] I/update - selenium standalone: file exists node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar
[17:17:14] I/update - selenium standalone: v2.53.1 up to date