See how a minor change to your commit message style can make a difference.
git commit -m"<type>(<optional scope>): <description>" \ -m"<optional body>" \ -m"<optional footer>"
See how a minor change to your commit message style can make a difference.
git commit -m"<type>(<optional scope>): <description>" \ -m"<optional body>" \ -m"<optional footer>"
| # ----------------------------------------------------------------------------- | |
| # AI-powered Git Commit Function | |
| # Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It: | |
| # 1) gets the current staged changed diff | |
| # 2) sends them to an LLM to write the git commit message | |
| # 3) allows you to easily accept, edit, regenerate, cancel | |
| # But - just read and edit the code however you like | |
| # the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/ | |
| gcm() { |
| import random | |
| from typing import ( | |
| List, | |
| Dict, | |
| Callable, | |
| Union, | |
| ) | |
| import numpy |
| from matplotlib import font_manager | |
| font_dirs = ['path/to/font/'] | |
| font_files = font_manager.findSystemFonts(fontpaths=font_dirs) | |
| for font_file in font_files: | |
| font_manager.fontManager.addfont(font_file) | |
| # set font | |
| plt.rcParams['font.family'] = 'Comic Sans' |
| import click | |
| @click.group() | |
| @click.pass_context | |
| @click.argument('CHALLENGE', type=int) | |
| def challenge(ctx, challenge): | |
| ctx.obj = challenge | |
| @challenge.command() | |
| @click.pass_obj |
| """ Pool example for smart memory instantiation""" | |
| class Reusable: | |
| """Reusable class""" | |
| def test(self): | |
| """Test function""" | |
| print(f"Using object: {id(self)}") |
| """Conditional instantiation""" | |
| class Demo: | |
| """Class with conditional instantiation""" | |
| def __new__(cls, **kwargs): | |
| if kwargs.get("create"): | |
| return super(Demo, cls).__new__(cls) | |
| return None |
| from multiprocessing import Process | |
| from tqdm import tqdm | |
| from functools import partial | |
| import time | |
| def runInParallel(*fns): | |
| """ | |
| Handle processs in paralell | |
| """ |
| name: fmm | |
| channels: | |
| - conda-forge | |
| - anaconda | |
| dependencies: | |
| - python=3.9 | |
| - boost-cpp | |
| - libgdal=3.2.1 | |
| - bzip2 | |
| - expat |