Skip to content

Instantly share code, notes, and snippets.

View brayevalerien's full-sized avatar

Valérien brayevalerien

View GitHub Profile
@brayevalerien
brayevalerien / monokai.md
Last active June 29, 2024 07:55
Monokai theme color codes

Monokai theme color codes

Intro

This document lists the colors used in the Monokai Pro theme with the Classic filter. Please check the Monokai Pro website for more informations.

Colors

Monokai Pro with Classic filter colors:

Preview Hexadecimal RGB
Activity Bar Background activity bar background preview #272822 (39, 40, 34)
Activity Bar Foreground activity bar foreground preview #f8f8f2 (248, 248, 242)
@brayevalerien
brayevalerien / print_list_and_dict.py
Last active May 2, 2024 15:23
Advanced print_list function in python
import random
def print_list(list_to_print: list, title: str = None, bullet_point: str = "•", max_items: int = None, randomize: bool = False, indent_level: int = 0) -> None:
"""
Prints a list nicely. Handles sublists. Tupples will be displayed as items: ('e1', 'e2', ...).
Author: Valérien BRAYE (@brayevalerien on github)
Args:
list_to_print (list): the list to be printed
@brayevalerien
brayevalerien / markov_whatsapp_generator.py
Created June 21, 2023 22:07
Generate messages from a Whatsapp conversation using Markov Chains
import random
import numpy as np
class MarkovChainGenerator:
def __init__(self, order=1, length=10):
self.order = order
self.length = length
self.transitions = {}
def fit(self, X):
@brayevalerien
brayevalerien / gist:21a86449b6536703dd378374559ee05f
Created May 6, 2024 00:24
Publication ready pyplot theme (thanks to @aeturrell)
plot_settings = {'ytick.labelsize': 16,
'xtick.labelsize': 16,
'font.size': 22,
'figure.figsize': (10, 5),
'axes.titlesize': 22,
'axes.labelsize': 18,
'lines.linewidth': 2,
'lines.markersize': 3,
'legend.fontsize': 11,
'mathtext.fontset': 'stix',