Skip to content

Instantly share code, notes, and snippets.

View MaximeKjaer's full-sized avatar
🔥
This is fine.

Maxime Kjaer MaximeKjaer

🔥
This is fine.
View GitHub Profile
import sys
import unicodedata
def get_regex(category: str) -> str:
start = None
regex = '['
for i in range(sys.maxunicode):
if unicodedata.category(chr(i)) == category:
if start is None:
start = i

Keybase proof

I hereby claim:

  • I am maximekjaer on github.
  • I am mkjaer (https://keybase.io/mkjaer) on keybase.
  • I have a public key ASCK7HbFowd9bcYCrN897ZwWDOPVJTYvNsgTMDrn5sWT9Qo

To claim this, I am signing this object:

@MaximeKjaer
MaximeKjaer / desugar.scala
Created December 12, 2016 11:21
Desugaring various for-expressions in Scala
/** EXAMPLE 1
* From the 2015 Scala final, exercise 3
* http://lamp.epfl.ch/files/content/sites/lamp/files/teaching/progfun/prev-exams/final-2015.pdf
*/
// For-expresion
for {
msg <- acc
msg2 <- doAction(elem)
} yield {
msg ++ List(msg2)
@MaximeKjaer
MaximeKjaer / Top 238
Created July 19, 2014 15:27
238 most used words
['THE', 'AND', 'HAVE', 'THAT', 'FOR', 'YOU', 'WITH', 'SAY', 'THIS', 'THEY', 'BUT', 'HIS', 'FROM', 'NOT', 'SHE', 'WHAT', 'THEIR', 'CAN', 'WHO', 'GET', 'WOULD', 'HER', 'ALL', 'MAKE', 'ABOUT', 'KNOW', 'WILL', 'ONE', 'TIME', 'THERE', 'YEAR', 'THINK', 'WHEN', 'WHICH', 'THEM', 'SOME', 'PEOPLE', 'TAKE', 'OUT', 'INTO', 'JUST', 'SEE', 'HIM', 'YOUR', 'COME', 'COULD', 'NOW', 'THAN', 'LIKE', 'OTHER', 'HOW', 'THEN', 'ITS', 'OUR', 'TWO', 'MORE', 'THESE', 'WANT', 'WAY', 'LOOK', 'FIRST', 'ALSO', 'NEW', 'BECAUSE', 'DAY', 'USE', 'MAN', 'FIND', 'HERE', 'THING', 'GIVE', 'MANY', 'WELL', 'ONLY', 'THOSE', 'TELL', 'VERY', 'EVEN', 'BACK', 'ANY', 'GOOD', 'WOMAN', 'THROUGH', 'LIFE', 'CHILD', 'WORK', 'DOWN', 'MAY', 'AFTER', 'SHOULD', 'CALL', 'WORLD', 'OVER', 'SCHOOL', 'STILL', 'TRY', 'LAST', 'ASK', 'NEED', 'TOO', 'FEEL', 'THREE', 'STATE', 'NEVER', 'BECOME', 'BETWEEN', 'HIGH', 'REALLY', 'SOMETHING', 'MOST', 'ANOTHER', 'MUCH', 'FAMILY', 'OWN', 'LEAVE', 'PUT', 'OLD', 'WHILE', 'MEAN', 'KEEP', 'STUDENT', 'WHY', 'LET', 'GREAT', 'SAME', 'BIG',