This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"basics": { | |
"name": "Lucas Jung", | |
"label": "EPFL Computer Science Student / Software Developer", | |
"picture": "https://avatars1.githubusercontent.com/u/63407038?s=460&u=58879e919dd2613767be454455528db0e469f89b&v=4", | |
"email": "[email protected]", | |
"website": "https://gruvw.com", | |
"summary": "Also known as Gruvw, I was born in 2002 in Switzerland. I started to learn how to code at the age of 10. Since then, I have fallen in love with programming and Computer Science in general. I learned a lot about programming by myself before studying Computer Science at EPFL and I wrote many projects (some OpenSource that you can check out on my GitHub). I try to have as much professional experiences as possible in order to develop my skills further and to better understand professional environments. I am passionate and very curious about everything, never missing out an opportunity to learn.", | |
"location": { | |
"countryCode": "Switzerland", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from tqdm import tqdm | |
import matplotlib.pyplot as plt | |
multi = 1e3 # Precision | |
# GPS coords: (°N, °E) | |
pers = [ | |
(, ), | |
(, ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ~/.hyper.js | |
"use strict" | |
module.exports = { | |
config: { | |
updateChannel: 'stable', | |
fontSize: 13, | |
fontFamily: '"Fira Code", monospace', | |
fontWeight: 'normal', | |
fontWeightBold: 'bold', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Alphabet | |
a = "abcdefghijklmnopqrstuvwxyz" | |
# Given data | |
cipher = "ebgrycxgbghitursyneavcgbgryv" | |
partial_text = "t*****************u**i**i***" # supposed valid and not empty (only *) | |
# Function (single char) that does C,T -> K or C,K -> T | |
clear = lambda c, tk: (i := (a.find(c)-a.find(tk)) % len(a), a[i]) # (index, letter) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
def _pad(s, n): | |
p = _alphabet[0] * (n - len(s)) | |
return s + p | |
def _debase(s): | |
val = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def max_from(l, s=0): | |
return max((s := s + e, i) for i, e in enumerate(l)) | |
def max_crossing(l1, l2): | |
s1, i = max_from(reversed(l1)) | |
s2, j = max_from(iter(l2)) | |
return s1 + s2, (i, len(l1) + j) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import glob | |
def main(): | |
if len(sys.argv) < 2: | |
print("Usage: python fix_submission.py <SCIPER1-SCIPER2>") | |
sys.exit(1) | |
PROJECT = sys.argv[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:riverpod/riverpod.dart'; | |
/// Dart Riverpod merging two providers of the same type | |
/// https://stackoverflow.com/questions/78978863/dart-riverpod-merging-two-providers-of-the-same-type | |
// Example StateNotifier for a simple counter. | |
class Counter extends Notifier<int> { | |
@override | |
int build() => 0; | |
void increment() => state++; |