Skip to content

Instantly share code, notes, and snippets.

View renaud's full-sized avatar

Renaud Richardet renaud

View GitHub Profile
@renaud
renaud / word_frequencies.tsv
Created March 5, 2025 21:52
fréquences de mots à partir de wikipedia
We can't make this file beautiful and searchable because it's too large.
Word Frequency
de 16572826
la 9352430
le 6569839
et 6516286
l 5768538
à 5180480
en 5159357
des 4290366
les 4279666
group: Chinook
Album = {
AlbumId:number Title:string ArtistId:number
1 "For Those About To Rock We Salute You" 1
2 "Balls to the Wall" 2
3 "Restless and Wild" 2
4 "Let There Be Rock" 1
5 "Big Ones" 3
6 "Jagged Little Pill" 4
group: Chinook
Album = {
AlbumId:number Title:string ArtistId:number
1 "For Those About To Rock We Salute You" 1
2 "Balls to the Wall" 2
3 "Restless and Wild" 2
4 "Let There Be Rock" 1
5 "Big Ones" 3
6 "Jagged Little Pill" 4
@renaud
renaud / README.md
Last active November 23, 2024 22:08
scala_via_python template for Coderunner / Jobe
@renaud
renaud / chinook
Last active November 26, 2024 16:18
chinook
group: Chinook
Album = {
AlbumId:number Title:string ArtistId:number
1 "For Those About To Rock We Salute You" 1
2 "Balls to the Wall" 2
3 "Restless and Wild" 2
4 "Let There Be Rock" 1
5 "Big Ones" 3
6 "Jagged Little Pill" 4
@renaud
renaud / imdbsample
Created November 22, 2024 10:35 — forked from jensdittrich/imdbsample
sample of IMDb
group: IMDB-sample
actors = {
id:number first_name:string last_name:string gender:string
10963 "Chris" "Anastasio" "M"
32638 "Michael" "Beach" "M"
33949 "John" "Bedford Lloyd" "M"
42278 "Michael" "Biehn" "M"
57051 "Captain Kidd" "Brewer Jr." "M"
64610 "Leo" "Burmester" "M"
@renaud
renaud / openai.py
Created May 25, 2024 20:28
OpenAI Playground
from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
model="gpt-3.5-turbo-16k",
messages=[
{
"role": "system",
"content": [
{
[
{
"question": "Une déclaration d’absence peut être prononcée 365 jours après la disparition d’une personne en danger de mort.",
"reponse": "Faux",
"justification": "art. 38 CC pas prononcée mais demandée, prononcé après 2 sommations infructueuse"
},
{
"question": "A défaut de corps, la déclaration d’absence sera prononcée lorsqu’aucune autre issue que la mort n’est envisageable.",
"reponse": "Faux",
"justification": "hypothèse de l’indice de mort (34 CC)"
@renaud
renaud / mosaicml_test.py
Last active May 13, 2023 18:17
run LLM locally
!pip install guidance flash_attn einops transformers
# https://medium.com/@marcotcr/exploring-chatgpt-vs-open-source-models-on-slightly-harder-tasks-aa0395c31610
import guidance
find_roots = guidance('''
{{#system~}}
{{llm.default_system_prompt}}
{{~/system}}
@renaud
renaud / print_sub_processes.py
Created November 1, 2022 10:33
Brightway LCA: script to print sub-processes' contributions
#EDB_EXPORTED_DIR = "/Users/ren/dev/eaternity/kale/bw_data/edb_export"
#import os
#os.environ["BRIGHTWAY2_DIR"] = EDB_EXPORTED_DIR
from bw2data import *
import bw2analyzer as bwa
import sys
from bw2calc import LCA