Filter | Description | Example |
---|---|---|
allintext | Searches for occurrences of all the keywords given. | allintext:"keyword" |
intext | Searches for the occurrences of keywords all at once or one at a time. | intext:"keyword" |
inurl | Searches for a URL matching one of the keywords. | inurl:"keyword" |
allinurl | Searches for a URL matching all the keywords in the query. | allinurl:"keyword" |
intitle | Searches for occurrences of keywords in title all or one. | intitle:"keyword" |
# Update package list | |
sudo apt-get update | |
# Install prerequisites for Docker | |
sudo apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common \ | |
gnupg |
/** | |
* GenerateStreamedResponse(question, history) | |
* GenerateResponse(question, history) | |
* Should be a class | |
*/ | |
import type OpenAI from 'openai'; | |
// import ollama from './ollama'; | |
import openai from './openai'; | |
import type { ChatResponse, Message } from 'ollama'; |
#!/bin/bash | |
############################################### | |
# To use: | |
# chmod +x install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
version=3.2.0 | |
echo "*****************************************" | |
echo " 1. Prerequisites: Install updates, set time zones, install GCC and make" |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title> fiche technique dispositif flottant IUT</title> | |
<link rel="stylesheet" href="css/sytel.css"> | |
</head> |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
from fusionauth.fusionauth_client import FusionAuthClient | |
class FusionAuthBackend: | |
def authenticate(username: str, password: str, *args, **kwargs): | |
# fusionauth_client. | |
client = FusionAuthClient(settings.FUSION_AUTH_API_KEY, settings.FUSION_AUTH_BASE_URL) | |
_tenant_id = settings.FUSION_AUTH_MAIN_TENANT_ID | |
if _tenant_id != "": | |
client.set_tenant_id(settings.FUSION_AUTH_MAIN_TENANT_ID) |
def is_into_square(latMin, latMax, longMin, longMax, lat , long) -> bool: | |
""" | |
This function check if a point(lat, long) is contained into a square (BBOX) knowing his max and min coordinates | |
:param latMin: min latitude of the BBOx | |
:param latMax: max latitude of the BBOx | |
:param longMin: max longitude of the BBOx | |
:param longMax: max longitude of the BBOx | |
:param lat: the latitude of the point to verified | |
:param long: the longitude of the point to be verified | |
:return: bool |
When it comes to databases and AWS VPC, best practice is to place your database in private subnet. By definition, private subnet in AWS is not reachable from the Internet because no Internet gateway is attached to private subnet. This is the way you protect your data. This kind of configuration is good for security but bad for data management.
How can you easily access and manage your secured data?
There are two basic ways to acees it.
- Access postgres RDS from bastion host. There are following requirements for this.
# Assuming you have a Article Model like this | |
# class Article(models.Model): | |
# ... Some field | |
# media = models.FileField(upload_to="path_to_inner_media_folder", blank=True) | |
from django.core.files.base import ContentFile | |
import os | |
# Create an article with the associated model | |
new_article = Article() |