I love both of you Discord and Spotify, but this new 30 seccond rule gets pretty annoying when my music gets turned off while just talking "to much." I mean talking kind of is the whole point of Discord...
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.
pip install toml
| 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 |
| #!/bin/bash | |
| # args: browser | |
| # example: ./getOpenTabs.sh "Brave Browser" | |
| # credits: | |
| # https://gist.github.com/samyk/65c12468686707b388ec43710430a421 | |
| # TODO: | |
| # validate args | |
| # don't open app if not already open |
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.
| from tabulate import tabulate | |
| def linear_gcd(a, b): | |
| table_cols = [] | |
| (a0, s, t) = (a, 1, 0) | |
| (b0, u, v) = (b, 0, 1) | |
| remainder = quotient = new_u = new_v = None |
| """ | |
| Author : Noah Cardoza | |
| School : De Anza | |
| Class : MATH 22 | |
| Useage : python rabbit.py <number-of-months> | |
| """ | |
| from argparse import ArgumentParser | |
| from tabulate import tabulate |
Ran into an issue where I needed to access a Postgres backup today. To my dismay I realized it was compressed and could only be accessed by importing it into a Postgres database. After fumbleing around for about 20 minutes setting one up, I decided I never wanted to do it again.
Put this in your PATH and use it (pg_quick_recover backup.sql.db) to quickly spin
| # Author: noahcardoza@gmail.com | |
| from os import path | |
| def split_path(location): | |
| """splits the path into a tuple of all it's parts using recursion""" | |
| head, tail = path.split(location) | |
| if tail: |