Skip to content

Instantly share code, notes, and snippets.

View peloyeje's full-sized avatar
👋

Jean-Eudes Peloye peloyeje

👋
View GitHub Profile
@peloyeje
peloyeje / siv_license_plate.py
Created October 23, 2018 08:36
SIV French license plate number generator
import itertools
import string
# Code French plate template (SIV format)
# XX-123-XX
plate_template = [
*([string.ascii_uppercase] * 2),
*([string.digits] * 3),
*([string.ascii_uppercase] * 2),
]
@peloyeje
peloyeje / logistic_regression_pytorch.py
Last active October 15, 2018 20:29
Logistic regression example with PyTorch (Marc Lelarge's class "Deep Learning Do-it-Yourself")
import torch
import numpy as np
from scipy.stats import bernoulli
from scipy.special import expit
dtype = torch.FloatTensor
# Model
w_source = np.array([2., -3.])
b_source = np.array([1.])