Skip to content

Instantly share code, notes, and snippets.

View BjornFJohansson's full-sized avatar
😃
happy!

Björn Johansson BjornFJohansson

😃
happy!
View GitHub Profile
module Jekyll
class RenderImgTag < Liquid::Tag
def initialize(tag_name, text, tokens)
super
@url , *@val= text.split(/ /)
if @val.length > 0
@width , *@height = @val[0].split(/x/)
end
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@BjornFJohansson
BjornFJohansson / gist:fc18d7a1cb26fe165384b17cc71e18fe
Created November 4, 2021 12:44 — forked from dvberkel/gist:1950267
Duvals Algorithm for generating Lyndon words
"""Lyndon.py
Algorithms on strings and sequences based on Lyndon words.
David Eppstein, October 2011."""
import unittest
from Eratosthenes import MoebiusFunction
def LengthLimitedLyndonWords(s,n):
"""Generate nonempty Lyndon words of length <= n over an s-symbol alphabet.
The words are generated in lexicographic order, using an algorithm from
@BjornFJohansson
BjornFJohansson / to_jupyter.md
Created September 23, 2022 09:35 — forked from lexnederbragt/to_jupyter.md
Tools to generate Jupyter Notebooks from plain (markup) text files

Tools to generate Jupyter Notebooks from plain (markup) text files:

(Originally posted on twitter, here incorporating responses)

pandoc

As of version 2.6, there is provisional support for using pandoc using jupyter notebookss (.ipynb files) as input and output format.

Notedown

Markdown to Jupyter Notebook, and back https://github.com/aaren/notedown

@BjornFJohansson
BjornFJohansson / gist:b7331f92fd1d0ea51f24fbe9e03183f6
Created December 1, 2022 12:28 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: