first commit
This commit is contained in:
commit
afc996c387
|
@ -0,0 +1,25 @@
|
|||
Debian is a popular and widely used [[GNU-Linux]] operating system that is known for its stability, security, and vast software repositories. It is one of the oldest and most respected Linux distributions, with a strong focus on free and open-source software.
|
||||
|
||||
## Key Features and Philosophy
|
||||
|
||||
- **Stability**: Debian is renowned for its stability, making it a preferred choice for servers and production environments. The rigorous testing process ensures that only thoroughly vetted packages are included in each release.
|
||||
|
||||
- **Security**: Debian prioritizes security by regularly patching vulnerabilities and providing timely security updates. Its proactive security team actively monitors and responds to potential threats, making it a reliable choice for security-conscious users.
|
||||
|
||||
- **Package Management**: A standout feature of Debian is its advanced package management system. The package manager, known as APT (Advanced Package Tool), simplifies the installation, removal, and updating of software packages. Debian's vast repositories offer thousands of software packages, making it easy to find and install applications.
|
||||
|
||||
- **Community-Driven**: Debian is a community-driven project with a strong emphasis on collaboration and inclusivity. It is developed by a large community of volunteers who contribute to various aspects of the operating system, including packaging, bug fixing, and documentation.
|
||||
|
||||
## Use Cases
|
||||
|
||||
Debian serves a wide range of use cases, including:
|
||||
|
||||
- **Server Systems**: Due to its stability, security, and extensive software support, Debian is commonly used as a server operating system. It powers numerous web servers, database servers, and cloud infrastructure.
|
||||
|
||||
- **Desktop Systems**: Debian provides a reliable and customizable environment for desktop users. Its wide range of software packages caters to different needs and preferences, allowing users to personalize their desktop experience.
|
||||
|
||||
- **Embedded Systems**: Debian's flexibility and modularity make it suitable for embedded systems. Its lightweight editions, such as Debian for Raspberry Pi, enable the use of Debian in IoT devices, home automation, and other embedded applications.
|
||||
|
||||
## Conclusion
|
||||
|
||||
Debian is a mature, stable, and community-driven operating system that offers a rich ecosystem of software packages. Whether you need a reliable server OS, a customizable desktop environment, or an embedded system solution, Debian provides a solid foundation to build upon. Its commitment to free and open-source software and its strong focus on security make it a compelling choice for individuals and organizations alike.
|
|
@ -0,0 +1,27 @@
|
|||
GNU/Linux, often referred to as just Linux, is an open-source operating system that combines the GNU operating system with the Linux kernel. It is a highly flexible and customizable platform that has gained widespread popularity and usage across a wide range of devices and applications.
|
||||
|
||||
## Key Features and Philosophy
|
||||
|
||||
- **Open Source and Free**: GNU/Linux is built upon the principles of open-source software, which means that it is freely available for use, modification, and distribution. The source code is accessible, allowing individuals and communities to contribute to its development and improve upon it.
|
||||
|
||||
- **Modularity**: GNU/Linux is known for its modular nature, which allows users to choose and customize various components of the operating system. This flexibility enables the creation of tailored distributions that cater to specific needs, ranging from lightweight and minimalistic systems to full-featured desktop environments.
|
||||
|
||||
- **Security**: GNU/Linux is renowned for its robust security features. Due to its open-source nature, vulnerabilities and security flaws can be quickly identified and patched by a large community of developers. Additionally, the separation of user privileges and strong permission management contribute to a secure computing environment.
|
||||
|
||||
- **Stability and Performance**: The Linux kernel, upon which GNU/Linux is built, is designed for stability and performance. It efficiently manages system resources, allowing for optimal performance even on resource-constrained devices. Its ability to handle high workloads and support multitasking makes it suitable for servers and demanding computing tasks.
|
||||
|
||||
|
||||
## Distributions and Use Cases
|
||||
|
||||
GNU/Linux is available in a variety of distributions, each with its own focus and target audience. Some well-known distributions include Ubuntu, Debian, Fedora, and CentOS. These distributions cater to different use cases, ranging from desktop systems to servers, embedded devices, and specialized applications like ethical hacking or multimedia production.
|
||||
|
||||
- **Desktop Systems**: GNU/Linux distributions offer a rich selection of desktop environments, such as GNOME, KDE, Xfce, and LXDE. These provide a user-friendly interface, customizable workflows, and a wide range of applications for productivity, multimedia, and more.
|
||||
|
||||
- **Server Systems**: GNU/Linux is widely used as a server operating system due to its stability, security, and scalability. It powers web servers, database servers, cloud infrastructure, and various networking devices.
|
||||
|
||||
- **Embedded Systems**: GNU/Linux is often used in embedded systems and Internet of Things (IoT) devices. Its flexibility, small footprint, and support for a wide range of hardware make it an ideal choice for building custom solutions in these domains.
|
||||
|
||||
|
||||
## Conclusion
|
||||
|
||||
GNU/Linux is a powerful and versatile operating system that embodies the principles of open-source software. Its modularity, security, stability, and performance make it suitable for a wide range of use cases, from desktop systems to servers and embedded devices. With a vast array of distributions available, users can choose the one that best aligns with their requirements and preferences. Whether you are seeking customization, reliability, or community-driven development, GNU/Linux provides a solid foundation for building your computing environment.
|
|
@ -0,0 +1,27 @@
|
|||
To install [[neo4j]] on a [[Debian]] server, you must first add the neo4j repository:
|
||||
|
||||
```
|
||||
$ wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo apt-key add -
|
||||
echo 'deb https://debian.neo4j.com stable latest' | sudo tee /etc/apt/sources.list.d/neo4j.list
|
||||
sudo apt-get update
|
||||
```
|
||||
|
||||
You can then install the latest version:
|
||||
|
||||
```
|
||||
$ sudo apt-get install neo4j
|
||||
```
|
||||
|
||||
[source](https://debian.neo4j.com/)
|
||||
|
||||
By default, the username will be `neo4j` with `neo4j` I you wish to use the neo4j browser (note that this will need correct port forwarding), you will be asked to change the password upon first connection. If you prefer to use neo4j via a third party application, you can set the initial password via the command line
|
||||
|
||||
```
|
||||
$ sudo neo4j-admin dbms set-initial-password <password>
|
||||
```
|
||||
|
||||
```
|
||||
$ sudo apt-get install neo4j
|
||||
```
|
||||
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
```
|
||||
|
||||
```
|
||||
|
||||
|
||||
> [Obsidian](https://obsidian.md/) is a powerful and extensible knowledge base that works on top of your local folder of plain text files.
|
||||
|
||||
This notebook covers how to load documents from an `Obsidian` database.
|
||||
|
||||
Since `Obsidian` is just stored on disk as a folder of Markdown files, the loader just takes a path to this directory.
|
||||
|
||||
`Obsidian` files also sometimes contain [metadata](https://help.obsidian.md/Editing+and+formatting/Metadata) which is a YAML block at the top of the file. These values will be added to the document's metadata. (`ObsidianLoader` can also be passed a `collect_metadata=False` argument to disable this behavior.)
|
||||
|
||||
```
|
||||
from langchain.document_loaders import ObsidianLoader
|
||||
```
|
||||
|
||||
```
|
||||
loader = ObsidianLoader("<path-to-obsidian>")
|
||||
```
|
||||
|
||||
```
|
||||
docs = loader.load()
|
||||
```
|
||||
|
||||
[source](https://python.langchain.com/docs/integrations/document_loaders/obsidian)
|
||||
|
||||
## Document loaders
|
||||
|
||||
[source](https://python.langchain.com/docs/modules/data_connection/document_loaders/)
|
||||
|
||||
## MarkdownHeaderTextSplitter
|
||||
|
||||
[source](https://python.langchain.com/docs/modules/data_connection/document_transformers/text_splitters/markdown_header_metadata)
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
## Set up virtual environnement
|
||||
|
||||
At the root of your repository, first set up a python virtual environnement.
|
||||
|
||||
`$ python -m venv .venv`
|
||||
|
||||
This will be useful to keep track of the dependencies
|
||||
|
||||
[source](https://docs.python.org/3/library/venv.html)
|
||||
|
||||
Activate it
|
||||
`$ source .venv/bin/activate`
|
||||
|
||||
now you should see `(.venv) ~/Code/fastapi-corbia-telegram$ `
|
||||
|
||||
`pip install --upgrade pip`
|
||||
|
||||
`(.venv) ~/Code/fastapi-corbia-telegram$ pip install fastapi[all] uvicorn`
|
||||
|
||||
`(.venv) ~/Code/fastapi-corbia-telegram$ pip freeze > requirements.txt`
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
---
|
||||
collection: lyrics
|
||||
artist: Taylor Swift
|
||||
album: folklore
|
||||
release_date: 2020
|
||||
song: the 1
|
||||
---
|
||||
|
||||
I'm doing good, I'm on some new shit
|
||||
Been saying "yes" instead of "no"
|
||||
I thought I saw you at the bus stop, I didn't though
|
||||
|
||||
I hit the ground running each night
|
||||
I hit the Sunday matinée
|
||||
You know the greatest films of all time were never made
|
||||
|
||||
I guess you never know, never know
|
||||
And if you wanted me, you really should've showed
|
||||
And if you never bleed, you're never gonna grow
|
||||
And it's alright now
|
||||
|
||||
But we were something, don't you think so?
|
||||
Roaring twenties, tossing pennies in the pool
|
||||
And if my wishes came true
|
||||
It would've been you
|
||||
In my defense, I have none
|
||||
For never leaving well enough alone
|
||||
But it would've been fun
|
||||
If you would've been the one
|
||||
|
||||
I have this dream you're doing cool shit
|
||||
Having adventures on your own
|
||||
You meet some woman on the Internet and take her home
|
||||
We never painted by the numbers, baby
|
||||
But we were making it count
|
||||
You know the greatest loves of all time are over now
|
||||
|
||||
I guess you never know, never know
|
||||
And it's another day, waking up alone
|
||||
|
||||
But we were something, don't you think so?
|
||||
Roaring twenties, tossing pennies in the pool
|
||||
And if my wishes came true
|
||||
It would've been you
|
||||
In my defense, I have none
|
||||
For never leaving well enough alone
|
||||
But it would've been fun
|
||||
If you would've been the one
|
||||
|
||||
Hey, yeah-yeah
|
||||
I persist and resist the temptation to ask you
|
||||
If one thing had been different
|
||||
Would everything be different today?
|
||||
|
||||
We were something, don't you think so?
|
||||
Rosé flowing with your chosen family
|
||||
And it would've been sweet
|
||||
If it could've been me
|
||||
In my defense, I have none
|
||||
For digging up the grave another time
|
||||
But it would've been fun
|
||||
If you would've been the one
|
|
@ -0,0 +1,34 @@
|
|||
Ubuntu is a popular [[GNU-Linux]] distribution based on [[Debian]], known for its user-friendly interface and extensive software ecosystem. It is widely used by individuals, businesses, and organizations worldwide. While Ubuntu has garnered a strong following, it is important to consider certain aspects before choosing it as your preferred operating system.
|
||||
|
||||
## Key Features and Philosophy
|
||||
|
||||
- **User-Friendly**: Ubuntu aims to provide a seamless and intuitive user experience, making it accessible to both beginners and experienced users. Its user interface, known as Unity (now transitioning to GNOME), offers simplicity and ease of use.
|
||||
|
||||
- **Software Availability**: Ubuntu boasts a large and diverse software repository, providing users with a vast selection of applications for various purposes. The Ubuntu Software Center makes it easy to discover and install software with just a few clicks.
|
||||
|
||||
- **Community Support**: Ubuntu benefits from a supportive and active community. The Ubuntu Forums, Ask Ubuntu, and various online communities provide resources and assistance for troubleshooting issues, sharing knowledge, and engaging with other users.
|
||||
|
||||
|
||||
## Amazon Ads Controversy
|
||||
|
||||
In the past, Ubuntu faced criticism for including Amazon product ads in its Unity Dash search results. This move was seen by some as intrusive and a breach of privacy. Canonical, the company behind Ubuntu, implemented this feature to generate revenue and support the development of the operating system.
|
||||
|
||||
However, due to the backlash from the community, Canonical responded by making changes to address the concerns. Since Ubuntu 16.04 LTS, the Amazon ads feature has been disabled by default, allowing users to opt-in if they wish.
|
||||
|
||||
## Debian vs. Ubuntu
|
||||
|
||||
Ubuntu is built upon Debian and inherits many of its core features, such as its package management system (APT) and its commitment to free and open-source software. Both distributions offer stability, security, and a wide range of software packages.
|
||||
|
||||
While Ubuntu is often praised for its user-friendly approach and focus on out-of-the-box functionality, Debian excels in stability and security due to its rigorous testing process. Debian's conservative approach to updates and its extensive community involvement make it a preferred choice for servers and critical systems.
|
||||
|
||||
Ultimately, the choice between Debian and Ubuntu depends on individual needs and preferences. Ubuntu may be more suitable for newcomers or those seeking a polished desktop experience, while Debian may be a better fit for those prioritizing stability and long-term support.
|
||||
|
||||
## Trustworthiness of Canonical
|
||||
|
||||
It is essential to approach the issue of trust in software companies with caution and critical thinking. While Canonical, the company behind Ubuntu, has faced scrutiny in the past, it is crucial to evaluate their actions and policies based on individual requirements and beliefs.
|
||||
|
||||
Canonical has made efforts to address community concerns and improve transparency. They have also contributed significantly to the open-source ecosystem, supporting various projects and initiatives.
|
||||
|
||||
Ultimately, the decision to trust a company like Canonical is subjective and should be based on personal research, values, and the specific needs of your use case.
|
||||
|
||||
**Note:** It's important to remember that the views expressed here are not meant to be definitive or represent the only opinion. It is encouraged to conduct further research and make an informed decision based on your own requirements and preferences.
|
|
@ -0,0 +1,83 @@
|
|||
---
|
||||
collection: tech
|
||||
type: database
|
||||
---
|
||||
## Intro
|
||||
|
||||
Weaviate is an open-source vector database. It allows you to store data objects and vector embeddings from your favorite ML-models, and scale seamlessly into billions of data objects.
|
||||
|
||||
## Docker install
|
||||
|
||||
### Prerequisite
|
||||
|
||||
You must have [[Docker]] installed on the server you're gonna run.
|
||||
|
||||
### Configuration
|
||||
#### API key
|
||||
|
||||
```
|
||||
services:
|
||||
weaviate:
|
||||
...
|
||||
environment:
|
||||
...
|
||||
# Enables API key authentication.
|
||||
AUTHENTICATION_APIKEY_ENABLED: 'true'
|
||||
|
||||
# List one or more keys, separated by commas.
|
||||
# Each key corresponds to a specific user identity below.
|
||||
AUTHENTICATION_APIKEY_ALLOWED_KEYS: 'jane-secret-key,anon-secret-key'
|
||||
|
||||
# List one or more user identities, separated by commas.
|
||||
# Each identity corresponds to a specific key above.
|
||||
AUTHENTICATION_APIKEY_USERS: 'jane,anon'
|
||||
```
|
||||
|
||||
[source](https://weaviate.io/developers/weaviate/configuration/authentication)
|
||||
|
||||
|
||||
#### Authorization
|
||||
|
||||
|
||||
```
|
||||
services:
|
||||
weaviate:
|
||||
...
|
||||
environment:
|
||||
...
|
||||
# Enables API key authentication.
|
||||
AUTHENTICATION_APIKEY_ENABLED: 'true'
|
||||
|
||||
# List one or more keys, separated by commas.
|
||||
# Each key corresponds to a specific user identity below.
|
||||
AUTHENTICATION_APIKEY_ALLOWED_KEYS: 'jane-secret-key,anon-secret-key'
|
||||
|
||||
# List one or more user identities, separated by commas.
|
||||
# Each identity corresponds to a specific key above.
|
||||
AUTHENTICATION_APIKEY_USERS: 'jane,anon'
|
||||
AUTHORIZATION_ADMINLIST_ENABLED: 'true'
|
||||
AUTHORIZATION_ADMINLIST_USERS: 'jane'
|
||||
AUTHORIZATION_ADMINLIST_READONLY_USERS: 'anon'
|
||||
```
|
||||
|
||||
[source](https://weaviate.io/developers/weaviate/configuration/authorization)
|
||||
|
||||
|
||||
#### Persistence
|
||||
|
||||
```
|
||||
services:
|
||||
weaviate:
|
||||
volumes:
|
||||
- /path/to/weaviate/data:/var/lib/weaviate
|
||||
```
|
||||
|
||||
Replace `/path/to/weaviate/data` to the path where you want to store the weaviate data on your server
|
||||
|
||||
### Running the Docker container
|
||||
|
||||
#### Manual start
|
||||
|
||||
Once the Weaviate docker-compose.yml is all set, you can simply start it by running `docker compose -f /path/to/weaviate/docker-compose.yml up`
|
||||
|
||||
#### Systemd service file
|
|
@ -0,0 +1,48 @@
|
|||
# SearxNG
|
||||
|
||||
SearxNG is a fork of searx, a meta search engine
|
||||
|
||||
Can be used with langchain
|
||||
|
||||
By default, the install only allows for HTML format,
|
||||
|
||||
So, after install, if you run `$ curl -kLX GET --data-urlencode q='langchain' -d format=json https://searxng.domain.tld`
|
||||
|
||||
You will get this message:
|
||||
```
|
||||
<!doctype html>
|
||||
|
||||
<html lang=en>
|
||||
|
||||
<title>403 Forbidden</title>
|
||||
|
||||
<h1>Forbidden</h1>
|
||||
|
||||
<p>You don't have the permission to access the requested resource. It is either read-protected or not readable by the server.</p>
|
||||
```
|
||||
|
||||
So we need to allow the JSON format.
|
||||
|
||||
`# vim /opt/yunohost/searxng/searx/settings.yml`
|
||||
|
||||
By default, it's in readonly mode so you'll need to be logged in as root
|
||||
|
||||
On line 64:
|
||||
|
||||
```
|
||||
formats:
|
||||
- html
|
||||
```
|
||||
|
||||
So we'll need to change it to
|
||||
|
||||
|
||||
```
|
||||
formats:
|
||||
- html
|
||||
- json
|
||||
```
|
||||
|
||||
Then, we can restart the service with `# systemctl restart uwsgi-app@searxng.service`
|
||||
|
||||
From your local machine you can now test with `$ curl -kLX GET --data-urlencode q='langchain' -d format=json https://searxng.domain.tld`
|
|
@ -0,0 +1,70 @@
|
|||
Neo4j is a highly popular and powerful graph database management system that allows the storage, retrieval, and manipulation of graph data. It is widely used for various applications, ranging from social network analysis and recommendation engines to fraud detection and knowledge graphs.
|
||||
|
||||
## Key Features
|
||||
|
||||
- **Graph Database**: Neo4j is specifically designed to handle graph data, which represents relationships between entities. Unlike traditional relational databases, which store data in tables, Neo4j organizes data in nodes and relationships, enabling efficient traversal and analysis of complex, interconnected data.
|
||||
|
||||
- **Cypher Query Language**: Neo4j utilizes its own query language called Cypher. Cypher is a declarative, SQL-like language that allows developers to query, create, update, and delete graph data in a concise and expressive manner. It simplifies working with graph data and enables powerful graph analytics.
|
||||
|
||||
- **Scalability and Performance**: Neo4j is built to handle large-scale graph datasets efficiently. It employs various optimization techniques, such as indexing and caching, to deliver high performance even when dealing with complex graph queries and traversals.
|
||||
|
||||
- **ACID Compliance**: Neo4j ensures data integrity and consistency by adhering to ACID (Atomicity, Consistency, Isolation, Durability) principles. This ensures that transactions are reliably processed and that data remains consistent even in the presence of concurrent operations.
|
||||
|
||||
|
||||
## Use Cases
|
||||
|
||||
Neo4j is widely used in various domains and applications, including:
|
||||
|
||||
- **Social Networks**: Neo4j's ability to model and query relationships makes it well-suited for social network analysis, recommendation systems, and personalized marketing.
|
||||
|
||||
- **Knowledge Graphs**: Neo4j can represent complex knowledge structures and enable powerful semantic querying, making it valuable for applications like data integration, content recommendation, and research.
|
||||
|
||||
- **Fraud Detection**: The graph-based nature of Neo4j allows for efficient fraud detection and analysis by uncovering complex networks of fraudulent activities and relationships.
|
||||
|
||||
- **Network and IT Operations**: Neo4j can be used to model and analyze network infrastructures, IT asset management, and system dependencies.
|
||||
|
||||
## Conclusion
|
||||
|
||||
Neo4j is a powerful graph database management system that excels at handling complex graph data and performing graph analytics. Its ability to represent and query relationships makes it valuable for a wide range of applications, including social networks, knowledge graphs, fraud detection, and network operations. Whether you need to uncover hidden patterns in your data or build intelligent recommendation systems, Neo4j provides a robust and efficient solution for managing and analyzing graph data.
|
||||
|
||||
## Install on Debian
|
||||
|
||||
To install [[neo4j]] on a [[Debian]] server, you must first add the neo4j repository:
|
||||
|
||||
```
|
||||
$ wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo apt-key add -
|
||||
echo 'deb https://debian.neo4j.com stable latest' | sudo tee /etc/apt/sources.list.d/neo4j.list
|
||||
sudo apt-get update
|
||||
```
|
||||
|
||||
You can then install the latest version:
|
||||
|
||||
```
|
||||
$ sudo apt-get install neo4j
|
||||
```
|
||||
|
||||
[source](https://debian.neo4j.com/)
|
||||
|
||||
### Change default password
|
||||
|
||||
By default, the username will be `neo4j` with `neo4j` I you wish to use the neo4j browser (note that this will need correct port forwarding), you will be asked to change the password upon first connection. If you prefer to use neo4j via a third party application, you can set the initial password via the command line
|
||||
|
||||
```
|
||||
$ sudo neo4j-admin dbms set-initial-password <password>
|
||||
```
|
||||
|
||||
[source](https://neo4j.com/docs/operations-manual/current/configuration/set-initial-password/)
|
||||
|
||||
### Start the neo4j server
|
||||
|
||||
Once neo4j is installed, you can start the server by running:
|
||||
|
||||
```
|
||||
$ sudo systemctl start neo4j
|
||||
```
|
||||
|
||||
To make sure that the server will restart upon reboot, you can run:
|
||||
|
||||
```
|
||||
$ sudo systemctl enable neo4j
|
||||
```
|
Loading…
Reference in New Issue