![]() Copy and paste both private and public (.pub) keys to ~/.ssh/.Persistent use of the same key with known hosts Add the generated key through ssh-add ~/.ssh/.Execute the ssh-agent in the git bash console. ![]() Xclip -sel clip # Or, or gitea repoįinally, clone the repository with git as usual. To add the SSH key to GitLab, copy the SSH to the keyboard using: To add or change the password of an SSH key pair, use the -p flag: Next, you will be prompted to input a password to secure the new SSH key pair. Next, input a file path to save the SSH key pair. Ssh-keygen -t ed25519 -C -t rsa -b 4096 -C -C adds a comment and helps to identify which is which in case you want to know which is which More info about security keys here Create the SSH key Types of SSH keys: Always favor ED25519 SSH keys, otherwise go to common RSA SSH Keys. The easiest way is to install either Windows Subsystem for Linux (WSL) or Git for Windows which provides Bash emulation (Git Bash) used for running git and the ssh-keygen command to create the keys. OpenSSH is the program to generate these keys, which comes by default on GNU/Linux and macOS, but not Windows. SSH protocol provides a secure communication channel to share information with the server without having to provide username and password each time. Used to create private and public keys in git repositories hosted outside GitHub, for instance in GitLab/Gitea servers. travis.yml that describes how the project is supposed to be built. Travis: Compiles and test it automatically across different platforms. Cython 2 allows to call native-C libraries Continuous Integration (CI) Write python code and annotate it so it become more efficient transforming it to C language. To build binary packages you can use: cibuildwheel package Cython ![]() Source distribution (sdist) and built distribution (bdist) the packages need to be generic so it can be compiled in multiple platforms CookieCutter: Better projects template.Packages: setuptools, distutils Python packaging tutorial Usually a package correspond to libraries or machine learning algorithms. The packages downloaded through PIP are stored and distributed from. Overall process based on Isak Samsten presentation Interactive python to play around with the Django application.Ĭreate admin user python manage.py createsuperuser Create a Python package for publishing ![]() Look at the classes in models.py inside the app and make update migrations: Look at the installed apps and create database tables accordingly The contents of a unittest looks as follows:ĭjango-admin startproject. Runn the unit test with the normal execution of the file: To test a calc.py file with basic calculations. For more info about the accepted formats, check nbconvert website Python Unit tests To convert a jupyter notebook, run the command window:Īmong the accepted formats there are: html, tex, pdf. Requires \(\TeX\) installation (MiKTeX in Windows) to be able to compile tex files and generate PDF (using XeLaTeX): Install jupyter notebooks from Python pipĭownload and install the program Pandoc. This command start in the console and does not trigger the browser automatically:> start jupyter lab -no-browser` Convert Jupyter Notebooks to HTML, PDF, \(\LaTeX\) Note: Still preferable to use VSCode with their implementation for jupyter notebooks Pip list -local # To list just the env packages Jupyter Jupyter-lab Python -m venv env -system-site-packages env/Scripts/activate.bat After installing the packages, and inside the virtual environment. Python -m venv \Scripts\activate.batĮxport the packages for the project. Python Start a project in Virtual EnvironmentsĬreate a new virtual environment in the current directory The superproject just keeps a reference to the commit in the submodule that needs to be checkout, does not track all the changes like it would do to the other folders.If there is a change in the submodule from the superproject, first you need to commit the submodule repo and then commit the superproject with a message like "Update reference to submodule".Once your cd inside a submodule, all git commands are with respect to the submodule and not the superproject.Summary of the submodules from the superproject To update all the submodules to their respective master branch: When cloning a repository that has submodules, these submodule folders are empty and need to be checkout: Git difftool # Opens a window with changes Git submodulesĪllow to bring other git repositories ( submodules) within a main git project ( superproject)
0 Comments
Leave a Reply. |