Skip to content

Instantly share code, notes, and snippets.

View MaxGhenis's full-sized avatar

Max Ghenis MaxGhenis

View GitHub Profile
@MaxGhenis
MaxGhenis / openfisca-us-demo.ipynb
Created March 6, 2022 06:11
OpenFisca US demo.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MaxGhenis
MaxGhenis / openfisca-us-tutorial.ipynb
Created March 7, 2022 06:49
OpenFisca US tutorial.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MaxGhenis
MaxGhenis / transcript.txt
Created November 14, 2022 21:11
CDSS director Kim Johnson's response to question on how much time Californians spend dealing with benefit programs
[Grecia Marquez-Nieblas] 13:05:37
a question here. It says how much time does it take for participating Californians to apply for and comply with benefit programs every year?
[Grecia Marquez-Nieblas] 13:05:47
How is this trending
[Kim Johnson] 13:05:49
How much time is that? What the question was
@MaxGhenis
MaxGhenis / gist:1c6ffca799ee526c70092ea6b3c33a89
Created November 14, 2022 21:21
CDSS director Kim Johnson's response on categorical eligibility, administrative burdens, and welfare cliffs
[Grecia Marquez-Nieblas] 13:13:12
So we have one more question here. It says on one hand, categorical, eligibility reduces administrative burdens on the other, it exasperates benefit cliffs.
[Grecia Marquez-Nieblas] 13:13:23
How do you weigh these effects?
[Kim Johnson] 13:13:25
It's it's a great. It's a great question, I mean, I think again benefit cliffs.
[Kim Johnson] 13:13:31
@MaxGhenis
MaxGhenis / gist:113b800695462a55ed577df77de3564d
Created March 18, 2023 04:06
ChatGPT4 React suggestion for policy impact written template
import React from 'react';
const PolicyAnalysis = ({ baseline, reform, impacts, outcomes, incomeChanges, povertyRates, deepPovertyRates, genderPoverty, inequality }) => {
const generateIncomeChangeText = () => {
let text = "";
incomeChanges.average.forEach((value, index) => {
text += `The ${index + 1}${index === 0 ? "st" : index === 1 ? "nd" : index === 2 ? "rd" : "th"} decile experiences an average change of $${value.toFixed(2)}. `;
});
return text;

Prompt:

undefined

Response:

undefined

Prompt:

trump is the gop nominee for president. biden is the dem nominee. i know you have limited information and no real time info, but given what you know, what chance would you give to trump winning? think through how youd give a probabilistic forecast

Response:

Prompt:

is there a way to export a google doc to markdown, with comments? maybe using api?

Response:

Let me help you create a script that can export a Google Doc to Markdown while preserving comments. We'll need to use the Google Docs API.

Google Docs to Markdown Converter with Comments

Click to open code

def compute_tax(income, brackets):
"""
Compute tax given taxable income and a list of brackets.
Each bracket is a tuple: (lower_threshold, upper_threshold, rate).
"""
tax = 0.0
for lower, upper, rate in brackets:
if income > lower:
taxable = min(income, upper) - lower
tax += taxable * rate

Guide to Impersonating Max Ghenis in Code Reviews

  1. Focus on consistency in methodology
    • Point out when approaches differ from established patterns
    • Ask clarifying questions about methodological choices: "Why not reweight for it again?"
  2. Prefer specific technical solutions
    • When identifying issues, suggest specific technical fixes with examples
    • Reference specific libraries or functions: "The PCHIP Interpolator seems ideally suited to this..."
    • Include code snippets or examples when suggesting solutions
  3. Emphasis on proper documentation and linking
  • Encourage proper linking between PRs and issues: "In the future please link PRs to issues to close them automatically"
╭───────────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code research preview! │
│ │
│ /help for help │
│ │
│ cwd: /Users/maxghenis/PolicyEngine/policyengine-us │
╰───────────────────────────────────────────────────────╯
> we got this question, can you investigate? note our parameters and variables
for snap are in gov/usda/snap but we also might reference gov/hhs/tanf/non_cash