Skip to content

Instantly share code, notes, and snippets.

View lucasgruwez's full-sized avatar
👨‍🚀
Engineering / Science student

Lucas Gruwez lucasgruwez

👨‍🚀
Engineering / Science student
View GitHub Profile
@lucasgruwez
lucasgruwez / .vimrc
Last active December 20, 2020 00:49
My .vimrc file
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Set 'nocompatible' to ward off unexpected things that your distro might
" have made, as well as sanely reset options when re-sourcing .vimrc
set nocompatible
" Set to auto read when a file is changed from the outside
@lucasgruwez
lucasgruwez / tex.snippets
Last active April 13, 2024 05:43
Snippets I use with vim for super-productive latex editing
################################################################################
# Set math environment, to allow some snippets to run only when in inline or
# disp math. i.e. sr ==> disregard != di^2egard.
################################################################################
global !p
texMathZones = ['texMathZone'+x for x in ['A', 'AS', 'B', 'BS', 'C', 'CS', 'D', 'DS', 'E', 'ES', 'F', 'FS', 'G', 'GS', 'H', 'HS', 'I', 'IS', 'J', 'JS', 'K', 'KS', 'L', 'LS', 'DS', 'V', 'W', 'X', 'Y', 'Z']]
texIgnoreMathZones = ['texMathText']
@lucasgruwez
lucasgruwez / mpl.py
Created September 4, 2019 09:11
Matplotlib LaTex settings
%matplotlib inline
import numpy as np
from scipy import stats
import matplotlib.pyplot as plt
import matplotlib.font_manager
plt.rcParams["text.usetex"] = True
plt.rcParams["mathtext.fontset"] = "cm"
plt.rcParams["font.family"] = "serif"
@lucasgruwez
lucasgruwez / README.md
Created January 24, 2018 11:45
README.md template for CrypTools

Project name

@lucasgruwez
lucasgruwez / 21.py
Last active September 30, 2017 12:58
Project Euler solutions (21- 40)
import time
def get_divisors(n):
res = [1]
i = 2
while i*i < n:
if n % i == 0:
res.append(i)
res.append(n // i)
i += 1
@lucasgruwez
lucasgruwez / 01.py
Last active September 2, 2017 10:34
Project Euler solutions (1-20)
import time
def get_divisors(n):
res = []
for i in range(1, n):
if i % 3 == 0 or i % 5 == 0:
res.append(i)
return res