Skip to content

Instantly share code, notes, and snippets.

View rlouf's full-sized avatar

Rémi Louf rlouf

View GitHub Profile
@rlouf
rlouf / 2017.json
Last active June 13, 2022 10:02
Nombre de sondages
{"schemaVersion":1,"label":"Présidentielles 2017","message":"59","color":"green"}
@rlouf
rlouf / batching.py
Created December 10, 2020 08:49
2 ways to batch inference
import jax
""" 'Loop over vmaps'
This is what most PPLs do. We synchronize chains at the step level, each step
ends when the `num_chains` have completed their step. We iterate for `num_samples`
steps.
"""
@rlouf
rlouf / gmail.py
Created January 6, 2018 13:57 — forked from jasonrdsouza/gmail.py
Python script to access a gmail account and download particular emails
import email, getpass, imaplib, os
detach_dir = '.' # directory where to save attachments (default: current)
user = raw_input("Enter your GMail username:")
pwd = getpass.getpass("Enter your password: ")
# connecting to the gmail imap server
m = imaplib.IMAP4_SSL("imap.gmail.com")
m.login(user,pwd)
m.select("cs2043") # here you a can choose a mail box like INBOX instead