2023-03-15: checked it for python == 3.11, django == 4.1.7, jupyterlab = 3.6.1, django-extensions == 3.2.1, jupyter-server <= 2.0.0
Using Django project in Jupyter or JupyterLab
| git filter-branch --env-filter ' | |
| if [ "$GIT_AUTHOR_EMAIL" = "email@email.com" ]; then | |
| GIT_AUTHOR_NAME="username" | |
| GIT_AUTHOR_EMAIL="email2@email2.com" | |
| fi | |
| if [ "$GIT_COMMITTER_EMAIL" = "email@email.com" ]; then | |
| GIT_COMMITTER_NAME="username" | |
| GIT_COMMITTER_EMAIL="email2@email2.com" | |
| fi | |
| ' --tag-name-filter cat -- --branches --tags |
| Name: flake8 | |
| -- Files to Watch | |
| File Type: Python | |
| Scope: Project Files | |
| -- Tools to Run on Changes | |
| Program: $PyInterpreterDirectory$\python | |
| Arguments: -m flake8 $FilePath$ --config=setup.cfg --ignore=E133 --format='%(path)s:%(row)d,%(col)d:%(code)s:%(text)s:https://lintlyci.github.io/Flake8Rules/rules/%(code)s.html' | |
| Output paths to refresh: $FilePath$ |
| # .github/workflows/publish.yml | |
| name: Generate a build and push to another branch | |
| on: | |
| push: | |
| branches: | |
| - master # Remove this line if your primary branch is "main" | |
| - main # Remove this line if your primary branch is "master" | |
| jobs: |
| name: Continous Integration | |
| on: | |
| pull_request: | |
| branches: | |
| - development | |
| jobs: | |
| build: |
| [pytest] | |
| DJANGO_SETTINGS_MODULE = yourproject.settings | |
| python_files = tests.py test_*.py *_tests.py | |
| addopts = -p no:warnings --strict-markers --no-migrations --reuse-db | |
| norecursedirs = venv old_tests | |
| markers = | |
| custom_mark: some information of your mark | |
| slow: another one slow tes |
| # Luke's config for the Zoomer Shell | |
| # Enable colors and change prompt: | |
| autoload -U colors && colors | |
| PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " | |
| # History in cache directory: | |
| HISTSIZE=10000 | |
| SAVEHIST=10000 | |
| HISTFILE=~/.cache/zsh/history |
| # https://hakibenita.com/how-to-turn-django-admin-into-a-lightweight-dashboard | |
| from django.contrib import admin | |
| from django.db.models import Count, Sum, Min, Max, DateTimeField | |
| from django.db.models.functions import Trunc | |
| from . import models | |
| def get_next_in_date_hierarchy(request, date_hierarchy): |
2023-03-15: checked it for python == 3.11, django == 4.1.7, jupyterlab = 3.6.1, django-extensions == 3.2.1, jupyter-server <= 2.0.0
Using Django project in Jupyter or JupyterLab
| javascript: var regeX = /^.*(youtu.be\/|v\/|e\/|u\/\w+\/|embed\/|v=)([^#&\?]*).*/, | |
| getYTURL = location.href, | |
| video_id, match = getYTURL.match(regeX); | |
| if (match && 11 == match[2].length) { | |
| video_id = match[2]; | |
| var url = "https://www.youtubnow.com/watch/?v=" + escape(video_id); | |
| (w = open(url, "w", "location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=500,height=800,modal=yes,dependent=yes")) ? setTimeout("w.focus()", 1E3): location = url | |
| } else alert(" That's Not a Valid YouTube URL, \n Need URL like this \n http://youtube.com/watch?v=KuUYePG6ygQ "); |
| set ignorecase | |
| set smartcase | |
| set scrolloff=3 " 3 lines above/below cursor when scrolling | |
| " Emulated Plugins | |
| set surround | |
| " set easymotion | |
| set NERDTree | |
| " Copy to system clipboard as well |