Skip to content

Instantly share code, notes, and snippets.

View NoahCardoza's full-sized avatar
🦾
Harvester v3

Noah Cardoza NoahCardoza

🦾
Harvester v3
View GitHub Profile

This script helps migrate older projects from Pipenv to Poetry without installing new versions of your libraries.

The pipenv-poetry-migrate utility is great, but it doesn't migrate the lock file. This script reads the lock file and pins the versions so you can safely poetry install without getting newer versions of the libraries.

Once you've run the script, verify the contents of pyproject.toml.tmp and if it checks out, replace the original pyproject.toml with mv pyproject.toml.tmp pyproject.toml.

Make sure to install the toml library before running this script.

@NoahCardoza
NoahCardoza / benchmark.jsx
Created March 14, 2025 21:42
tss/makeStyles vs MUI sx prop
import React, { useState, useEffect } from 'react';
import { createRoot } from 'react-dom/client';
import { Box, Button, Typography, Paper } from '@mui/material';
import { makeStyles } from 'tss-react/mui';
import { Profiler } from 'react';
import { sum } from 'lodash';
// Number of components to render in each test
const COMPONENT_COUNT = 1000;
// Number of update cycles to run
@NoahCardoza
NoahCardoza / README.md
Created June 15, 2025 22:11
Pin Poetry Package Versions

Poetry Pin Versions

This script will take the versions from the current lock file and pin them in the pyproject.toml file. This will keep new versions from being installed if for some reason you need to rebuild the poetry.lock file and gives you more control when upgrading packages to ensure the build isn't broken.

Usage

pip install toml