Skip to content

Instantly share code, notes, and snippets.

View noklam's full-sized avatar
🎯
Focusing

Nok Lam Chan noklam

🎯
Focusing
View GitHub Profile
# Fetch some text content in two different categories
from wikipediaapi import Wikipedia
wiki = Wikipedia('RAGBot/0.0', 'en')
docs = [{"text": x,
"category": "person"}
for x in wiki.page('Hayao_Miyazaki').text.split('\n\n')]
docs += [{"text": x,
"category": "film"}
for x in wiki.page('Spirited_Away').text.split('\n\n')]
@noklam
noklam / convert_markdown
Last active November 10, 2019 08:29
A script to batch export all Boostnote file to markdown file without broken linked images
#!/usr/bin/env python3
# coding: utf-8
"""
Author : noklam
Created Time : 2019-11-09 12:30:04
Base on: https://gist.github.com/weaming/32b7b62956b304ff66fbae396ca9c86b
Prerequisite:
python3 -m pip install cson arrow
"""
import json
@weaming
weaming / boostnote2md.py
Last active August 7, 2023 09:51
Convert boostnote cson format data to markdown
#!/usr/bin/env python3
# coding: utf-8
"""
Author : weaming
Created Time : 2018-05-26 21:32:59
Prerequisite:
python3 -m pip install cson arrow
"""
import json
import os
@dcode
dcode / GitHub Flavored Asciidoc (GFA).adoc
Last active October 12, 2024 11:16
Demo of some useful tips for using Asciidoc on GitHub

GitHub Flavored Asciidoc (GFA)