Skip to content

Instantly share code, notes, and snippets.

View fpaupier's full-sized avatar
🎲
Focusing

Frαnçois fpaupier

🎲
Focusing
View GitHub Profile
@imartinez
imartinez / fastapi_streaming_local_llama2.py
Created September 26, 2023 17:21
FastAPI streaming local Llama 2 GGUF LLM using LLamaIndex
import uvicorn
from contextlib import asynccontextmanager
from fastapi import FastAPI
from fastapi.responses import StreamingResponse
from typing import AsyncGenerator
from llama_index.llms import LlamaCPP
from llama_index.llms.llama_utils import messages_to_prompt, completion_to_prompt
llms = {}
@denguir
denguir / cuda_install.md
Last active July 2, 2024 20:03
Installation procedure for CUDA & cuDNN

How to install CUDA & cuDNN on Ubuntu 22.04

Install NVIDIA drivers

Update & upgrade

sudo apt update && sudo apt upgrade

Remove previous NVIDIA installation

@ninely
ninely / main.py
Last active June 27, 2024 07:56
Langchain with fastapi stream example
"""This is an example of how to use async langchain with fastapi and return a streaming response.
The latest version of Langchain has improved its compatibility with asynchronous FastAPI,
making it easier to implement streaming functionality in your applications.
"""
import asyncio
import os
from typing import AsyncIterable, Awaitable
import uvicorn
from dotenv import load_dotenv
@rain-1
rain-1 / LLM.md
Last active June 29, 2024 07:00
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@gregveres
gregveres / font-size.ts
Created May 3, 2022 22:34
font-size for tiptap 2
import { Extension } from "@tiptap/core";
import "@tiptap/extension-text-style";
export type FontSizeOptions = {
types: string[];
};
declare module "@tiptap/core" {
interface Commands<ReturnType> {
fontSize: {

Manipulation (positive ou négative): émotionnelle, de la perception de soi et de la perception de la société

Emotions

  1. Experimental evidence of massive-scale emotional contagion through social networks, (2014).
    Papier très connu de Facebook, l'objectif est de voir à quel point la contagion émotionelle fonctionne sur FB. Les chercheurs font apparaitre plus ou moins de contenus postifs/négatifs dans le NewsFeed.
    "When positive expressions were reduced, people produced fewer positive posts and more negative posts; when negative expressions were reduced, the opposite pattern occurred. These results indicate that emotions expressed by others on Facebook influence our own emotions, constituting experimental evidence for massive-scale contagion via social networks"
@bittner
bittner / keyboard-keys.md
Created February 28, 2019 22:50
Keyboard keys markup in MarkDown

Ctrl + Alt + Space

@rohshall
rohshall / convert.py
Last active February 28, 2024 15:25 — forked from EsotericAlgorithm/convert.py
A script to process azw3, epub, and mobi into text files using calibre ebook-convert
import os
import shlex
import subprocess
sink = open('/dev/null', 'w')
def convert_book(input, output):
subprocess.call("ebook-convert" + " " + input + " " + output, shell=True, stdout=sink, stderr=sink)
@steven2358
steven2358 / ffmpeg.md
Last active June 30, 2024 14:54
FFmpeg cheat sheet
@hewerthomn
hewerthomn / install-oh-my-zsh.sh
Created January 26, 2017 11:30
Offline install of oh-my-zsh on Ubuntu
main() {
# Use colors, but only if connected to a terminal, and that terminal
# supports them.
if which tput >/dev/null 2>&1; then
ncolors=$(tput colors)
fi
if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
RED="$(tput setaf 1)"
GREEN="$(tput setaf 2)"
YELLOW="$(tput setaf 3)"