Skip to content

Instantly share code, notes, and snippets.

View mvandermeulen's full-sized avatar

Mark mvandermeulen

  • Fivenynes
  • Sydney, Australia
  • 04:40 (UTC +10:00)
View GitHub Profile
@mvandermeulen
mvandermeulen / nvim-events.md
Created January 18, 2025 04:25 — forked from dtr2300/nvim-events.md
Overview of Nvim Events

Nvim Events

Nvim recognizes the following events. Names are case-insensitive.

BufAdd
Just after creating a new buffer which is
added to the buffer list, or adding a buffer
@mvandermeulen
mvandermeulen / rag-reranking-gpt-colbert.ipynb
Created January 12, 2025 14:05 — forked from virattt/rag-reranking-gpt-colbert.ipynb
rag-reranking-gpt-colbert.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mvandermeulen
mvandermeulen / order_model.py
Created January 12, 2025 13:58 — forked from rohitgarud/order_model.py
Transform JSON schema from Pydantic model_json_schema() into something simpler for LLM to understand
from enum import Enum
from typing import List, Optional
from datetime import datetime
from pydantic import (
BaseModel,
EmailStr,
Field,
HttpUrl
)

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

​"""Example Google style docstrings.
This module demonstrates documentation as specified by the `Google Python
Style Guide <http://google.github.io/styleguide/pyguide.html>`_.
Docstrings may extend over multiple lines. Sections are created
with a section header and a colon followed by a block of indented text.
Example:
Examples can be given using either the ``Example`` or ``Examples``
sections. Sections support any reStructuredText formatting, including
local M = require("lualine.component"):extend()
M.processing = false
M.spinner_index = 1
-- local spinner_symbols = { "▙ ", "▛ ", "▜ ", "▟ " }
local spinner_symbols = {
"⠋",
"⠙",
"⠹",
@mvandermeulen
mvandermeulen / osx_automount_nfs.md
Created January 12, 2025 13:31 — forked from L422Y/osx_automount_nfs.md
Automounting NFS share in OS X into /Volumes

I have spent quite a bit of time figuring out automounts of NFS shares in OS X...

Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:

/etc/auto_master (see last line):

#
# Automounter master map
#

+auto_master # Use directory service

Basic

Expression How to Read This
$$a + b$$ a plus b
$$a - b$$ a minus b
$$a \times b$$ a times b
$$a / b$$ a over b
$$a &gt; b$$ a is greater than b
$$a &lt; b$$ a is less than b