Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfiex committed Jan 9, 2024
1 parent 3ebae30 commit 0257846
Show file tree
Hide file tree
Showing 90 changed files with 26,243 additions and 19 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified .github/.DS_Store
Binary file not shown.
Binary file modified docs/.DS_Store
Binary file not shown.
Binary file added docs/Installations/.DS_Store
Binary file not shown.
69 changes: 69 additions & 0 deletions docs/Installations/new conda mipcvs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Creating a new Mamba Environment



## Installation.

Information on how to install Mamba can be be found <a href='https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html'>here </a>.

Please ensure that you have the latest `curl` and `tar` versions installed and then download the relevant files:

```bash
# Linux Intel (x86_64):
curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
# Linux ARM64:
curl -Ls https://micro.mamba.pm/api/micromamba/linux-aarch64/latest | tar -xvj bin/micromamba
# Linux Power:
curl -Ls https://micro.mamba.pm/api/micromamba/linux-ppc64le/latest | tar -xvj bin/micromamba
# macOS Intel (x86_64):
curl -Ls https://micro.mamba.pm/api/micromamba/osx-64/latest | tar -xvj bin/micromamba
# macOS Silicon/M1 (ARM64):
curl -Ls https://micro.mamba.pm/api/micromamba/osx-arm64/latest | tar -xvj bin/micromamba```
```

### Setting aliases and activating
Start by activating your micromamba installation
```
./micromamba shell init
```
This adds it to our .rc file and allows us to choose a custom mamba environment
```
./bin/micromamba shell init -s bash -p ~/micromamba
or
./micromamba shell init -s zsh -p ~/micromamba
```
Don't forget to `source` the respective rc file.
## Creating a new environment
``` bash
# create a new env
mamba create --name <envname>
#initiate mamba
mamba init
# activate our environment
mamba activate <envname>
```











ca mipcvs

# pip install fastapi-sso

mamba insall uvicorn fastapi itsdangrous requests

pip install fastapi-login
67 changes: 67 additions & 0 deletions docs/MIPCV_Site/jinja2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Jinja2 Quickstart

Jinja2 is a templating engine used to dynamically generate scripted content. This has its application in the creation of the MIPCV website generation.

## Example
Some example uses of the things possible with JINJA are shown below.

### Inline HTML
Escape HTML code in literals with `|safe`, e.g., `{{ item.description |safe }}`.

### Batches
Process items in batches using the `batch` filter.

```jinja2
{% for group in changes|batch(2) %}
<!-- Make a row -->
{% for item in group %}
<!-- Process every two items -->
{% endfor %}
{% endfor %}
```

### Dictionary
Iterate through dictionary items.

```jinja2
{% for key, value in my_dict.items() %}
Key: {{ key }}<br>
Value: {{ value }}<br><br>
{% endfor %}
```

### Conditional Statements
Use `if` statements for conditional rendering.

```jinja2
{% if condition %}
<!-- Content to display if condition is true -->
{% else %}
<!-- Content to display if condition is false -->
{% endif %}
```

### Macros
Define reusable code snippets with macros.

```jinja2
{% macro my_macro(arg) %}
<!-- Reusable code here using {{ arg }} -->
{% endmacro %}
```

### Filters
Apply filters for formatting and transformations.

```jinja2
{{ variable|filter_name }}
```

### Loops
Use `for` loops for iteration.

```jinja2
{% for item in items %}
<!-- Process each item -->
{% endfor %}
```
Binary file added docs/MKDocs/.DS_Store
Binary file not shown.
114 changes: 114 additions & 0 deletions docs/MKDocs/markdown.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Markdown Quick-Start

Markdown is a lightweight markup language creating easy-to-read documentation. Here is a quickstart guide to get you started.

## Advanced tools
Advanced entries can be found at:
https://squidfunk.github.io/mkdocs-material/reference/admonitions/


## General Entries

### Headers
Headers are create sections in your document.

```markdown
# Heading 1
## Heading 2
### Heading 3
```


### Lists
Create ordered and unordered lists to organize content.

```markdown
- Bullet 1
- Bullet 2

1. Numbered item 1
2. Numbered item 2
```


- Bullet 1
- Bullet 2

1. Numbered item 1
2. Numbered item 2


### Links
Hyperlink text to external URLs or pages

```markdown
[Visit MkDocs](https://www.mkdocs.org/)
```
[Visit MkDocs](https://www.mkdocs.org/)

### Images
Insert images into your documentation.

```markdown
![Alt text](image.jpg)
```

### Emphasis
Emphasize text using bold or italics.

```markdown
**Bold text**
*Italic text*
```
**Bold text**
*Italic text*
### Code Blocks
Display code snippets in a formatted block.

```markdown
```python
def example():
print("Hello, MkDocs!")
```
```
```python
def example():
print("Hello, MkDocs!")
```
### Quotes
Quote text for better readability.

```markdown
> This is a quote.
```
> This is a quote.
### Horizontal Rule
Separate sections with a horizontal line.

```markdown
---
```
---
### Tables
Create tables to organize data.

```markdown
| Header 1 | Header 2 |
| -------- | -------- |
| Content 1| Content 2|
```
| Header 1 | Header 2 |
| -------- | -------- |
| Content 1| Content 2|

### Footnotes
Add footnotes for additional information.

```markdown
Here is some text[^1].

[^1]: This is a footnote.
```
Here is some text[^1].

[^1]: This is a footnote.
48 changes: 48 additions & 0 deletions docs/MKDocs/setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Setup and Compilation

### Mamba

#### Install
To install mkdocs, we can use mamba to create a enw environment.
```bash
mamba create --name docs

mamba activate docs

mamba init

mamba install mkdocs mkdocs-material pymdown-extensions
```

#### Build
```bash
mkdocs build --clean
```

### Docker

#### Install
```docker pull squidfunk/mkdocs-material```

#### Creating a site. (Dont run)
```docker run --rm -it -v ${PWD}:/docs squidfunk/mkdocs-material new .```

#### Preview
```docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material```

#### Build
```docker run --rm -it -v ${PWD}:/docs squidfunk/mkdocs-material build```


## Resources
### Demo files and structure:
https://github.com/selfhostedshow/wiki/tree/master
### Permissable items
https://squidfunk.github.io/mkdocs-material/reference/admonitions/



### Developer notes
The following are Notes and will be tidied away in due course.

https://squidfunk.github.io/mkdocs-material/getting-started/
Binary file added docs/Server Config/.DS_Store
Binary file not shown.
16 changes: 16 additions & 0 deletions docs/Server Config/2FA management.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 2FA (CREODIAS)

## Location
We start by going to:
https://identity.cloudferro.com/auth/realms/Creodias-new/account/#/security/signingin


## Install the CISCO DUO app on your mobile device.
[Download Duo Mobile for iOS](https://apps.apple.com/us/app/duo-mobile/id422663827?mt=8)
[Download Duo Mobile for Android](https://play.google.com/store/apps/details?id=com.duosecurity.duomobile&hl=en)

More info can be found [here](https://duo.com/product/multi-factor-authentication-mfa/duo-mobile-app)


## Scan the QR code, and complete form
Follow the instructions and you should then be able to select an alternative 2FA source when logging in.
14 changes: 14 additions & 0 deletions docs/Server Config/floating_ip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Adding a floating IP on CREODIAS
To access our machine externally we first need to give it an address on how to do this. This page does just that.

## What are floating IPs
Floating IPs in OpenStack are public IP addresses assigned to your Virtual Machines.These allow us to host services like SSH or HTTP(s) over the Internet.

## How to assign a Floating IP?
1. Open the instances tab in Horizon
2. Use the dropdown menu and select the `Associate Floating IP` option.
3. You may choose an address from the dropdown menu, but if it’s empty, you need to allocate an address first. Click the + icon on the right.
4. Allocate IP.

!!! warning "The IP address should be associated with a local address from the 192.168.x.x subnet. If you have a 10.x.x.x address change it to an 192.168.x.x address."

Loading

0 comments on commit 0257846

Please sign in to comment.