Skip to content

Instantly share code, notes, and snippets.

import os
import re
import sys
import importlib.util
import argparse
def extract_variables(template_content):
pattern = re.compile(r"<var\s+(\w+)\s*>")
return sorted(set(pattern.findall(template_content)))
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
xmlns:rss="http://www.itunes.com/dtds/podcast-1.0.dtd">
<channel>
<title>Hens333</title>
<link>https://www.twitch.tv/hens333</link>
<description>Hi, my name is Hens I&apos;m a Dead by Daylight Content Creator. I play both
survivor and killer.- Business Email: business@hens333.com</description>
<generator>generated by vod2pod-rss</generator>
<image>
@jordantgh
jordantgh / gfactor.md
Last active December 3, 2023 23:38
G Factor Thoughts

This classic blog attempts to give a critical analysis of the general intelligence factor 'g'. This factor is what emerges from a factor analysis of the correlation between various tests of mental ability, and is purported to explain a large fraction of the variance in performance across tests. Using Thomson's ability-sampling model, Cosma Shalizi created some simulated test data and performed factor analysis. Using 11 tests which draw from 500 shared and 500 unique 'abilities', all of which are uncorrelated independent random variables, it's shown that a single factor explaining around ~30% of test performance variance emerges. This is suggested to undermine one of the core ideas of 'g' theory, i.e., that the 'single factor' needn't correspond to any single variable of interest. While I in fact affirm this conclusion about 'g', I don't think this is a particularly strong argument concerning the reality or meaningfulness of g.

We must first make sure we don't get confus