This file contains hidden or 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
theme = "onedark" | |
[keys.insert] | |
j = { k = "normal_mode" } # Maps `jk` to exit insert mode |
This file contains hidden or 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
{-# LANGUAGE OverloadedStrings #-} | |
module Main (main) where | |
import Control.Monad.IO.Class | |
import Data.Aeson | |
import Network.HTTP.Req | |
import qualified Text.URI as URI | |
import Data.Maybe (fromJust) |
This file contains hidden or 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
#!/usr/bin/env bash | |
# Convert SIDES conf from pdf to orgmode | |
# Needs some manual adujst sometimes | |
# | |
set -euo pipefail | |
echo $1 | |
out=$(basename $1 ".pdf")".org" | |
pdftotext -layout $1 $out | |
sed -i 's/^\s* Q/** Q/' $out #Create subheadings |
This file contains hidden or 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
(require 'om) | |
(defun mark-late-todo() | |
;; Marke special TODO (here LATE) as done in a subtree. | |
;; Update the buffer directly but you need the cursor on the top of the subtree. | |
;; Given | |
;; #+TODO: TODO(t) LATE(l) | DONE(d) CANCELLED(c) | |
;; * TODO Root node | |
;; ** LATE this node |
This file contains hidden or 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
;; We want to convert a line with a date like this | |
;;2019-10-01 | |
;;To a new datetreenode with some text, like this | |
;; * 2019 | |
;; ** 2019-10 October | |
;; *** 2019-10-10 | |
;; **** Handstand | |
;; It will create the datetree if it does not already exists | |
;; But I could not figure how to work directly on a org node like tis | |
;; * 2019-10-01 |
This file contains hidden or 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
#!/usr/bin/env bash | |
tmp=tmp.csv | |
cp $1 $tmp | |
# Decimal notation | |
sed -i 's/,/\./g' $tmp | |
# Switch to comma | |
sed -i 's/;/,/g' $tmp | |
# Remove header | |
sed -i '1d' $tmp | |
# Add cutsom header |
This file contains hidden or 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
;; Call this function with query-replace-regexp with \,(convert-date) as the replacement (with a backslash) | |
;; Example of search : | |
;; ^\(Sun\|Mon\|Tue\|Wed\|Thu\|Fri\|Sat\).*$ | |
(defun convert-date () | |
(setq dformat "* <%Y-%m-%d>") | |
(setq s (match-string-no-properties 0)) | |
(format-time-string dformat (apply #'encode-time (parse-time-string s))) | |
) |
This file contains hidden or 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
main :: IO () | |
main = hakyll $ do | |
match "notes/*.md" $ do | |
route $ setExtension "tex" | |
compile $ pandocCompiler | |
>>= loadAndApplyTemplate "templates/latex.tex" defaultContext | |
>>= relativizeUrls | |
This file contains hidden or 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
from scipy.spatial import KDTree | |
import numpy as np | |
import itertools | |
import matplotlib.pyplot as plt | |
import random | |
pos = np.zeros((10, 2)) | |
for (i, j) in itertools.product(range(10), range(2)): | |
pos[i,j] = random.randint(0, 10) |
This file contains hidden or 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
d.multicall=incomplete,d.stop= | |
d.multicall=incomplete,d.directory.set=test |