Skip to content

Instantly share code, notes, and snippets.

View ncoghlan's full-sized avatar

Alyssa Coghlan ncoghlan

View GitHub Profile
@ncoghlan
ncoghlan / it-reference.md
Last active February 16, 2018 02:10
PEP 505 alternative: the "?it" symbolic reference

Using ?it as a statement local symbolic reference

Core concept

  • (?it=expr) is a new atomic expression for an "it reference binding"
  • subsequent subexpressions (in execution order) can reference the bound subexpression using ?it (an "it reference")
  • ?it is reset between statements, including before entering the suite within a compound statement (if you want a persistent binding, use a named variable)
@ncoghlan
ncoghlan / interactive-example.txt
Created July 24, 2018 15:28
API renames, aliasing, and cross-version pickle compatibility
>>> class C:
... def example(self): pass
...
>>> import pickle
>>> data = pickle.dumps(C.example)
>>> pickle.loads(C.example)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: a bytes-like object is required, not 'function'
>>> pickle.loads(data)
@ncoghlan
ncoghlan / gemma-3-27b-training-description.md
Created June 5, 2025 14:46
Gemma-3-27B generated description of its training environment

(I wanted an initial prompt to check if LM Studio would run this model on my machine, and finding out more about it seemed like a reasonable place to start)

Prompt

Tell me about your training environment and the resulting limitations on your capabilities.

Response

Okay, let's break down my training and its impact on what I can (and can't) do. I'm Gemma, an open-weights AI assistant created by the Gemma team at Google DeepMind. Here's a detailed look: