Skip to content

Instantly share code, notes, and snippets.

E3 Modeling Concepts Primer

Foundations for Understanding GEM-E3, PRIMES, and PROMETHEUS


Purpose: This document provides an accessible introduction to all foundational concepts needed to understand the E3Modelling suite (GEM-E3, PRIMES, PROMETHEUS). It is designed for readers with a basic quantitative background but limited exposure to economics, energy systems, or optimization theory.

How to use this document: Read sequentially for a comprehensive foundation, or jump to specific chapters as needed. Each chapter is self-contained but builds on earlier material.


@davidefiocco
davidefiocco / factchecking_agent.ipynb
Created July 27, 2025 21:10
Verify statements extracted from a snippet of text comparing them with web sources
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davidefiocco
davidefiocco / ai_digest.py
Last active July 31, 2025 22:41
Generate an AI digest using smolagents and Exa search
#!/usr/bin/env python3
from smolagents import OpenAIServerModel
from smolagents import CodeAgent, VisitWebpageTool, FinalAnswerTool
from smolagents.tools import tool, Tool
from datetime import datetime
import os
EXA_API_KEY = os.getenv("EXA_API_KEY")
HF_TOKEN = os.getenv("HF_TOKEN")
@davidefiocco
davidefiocco / dataset.jsonl
Last active July 7, 2022 17:20
Example prodigy recipe to use a zero-shot classifier to pre-classify examples when performing labeling for text classification (see https://support.prodi.gy/t/can-one-leverage-zero-shot-classifiers-for-textcat-tasks/4885)
{"text":"Spam spam lovely spam!"}
{"text":"I like scrambled eggs."}
{"text":"I prefer spam!"}
@davidefiocco
davidefiocco / text-classification-in-pytorch-to-refactor-with-pytorch-lightning.ipynb
Last active March 1, 2021 22:03
Text classification in PyTorch to refactor with PyTorch lightning.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davidefiocco
davidefiocco / text-classification-in-pytorch-to-refactor-with-petastorm.ipynb
Last active February 15, 2021 17:58
Text classification in PyTorch to refactor with petastorm.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davidefiocco
davidefiocco / copyedits.jsonl
Created November 5, 2020 17:59
Prodigy recipe to categorize differences in text
{"removed":"These results suggested that the distribution of bacterial communities was driven more by sample types than the separate caves from which samples were collected.","added":"These results suggest that the distribution of bacterial communities is driven more by sample types than the separate caves from which samples were collected.","meta":{"score":1}}
@davidefiocco
davidefiocco / azureml-logging-on-transformers.ipynb
Created October 23, 2020 16:04
AzureML logging on transformers.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davidefiocco
davidefiocco / colafinetuning.ipynb
Last active November 5, 2020 17:57
CoLAfinetuning.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davidefiocco
davidefiocco / batch-bert.ipynb
Created October 22, 2020 15:09
Batch BERT.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.