Skip to content

Instantly share code, notes, and snippets.

View TomBener's full-sized avatar
👨‍💻

TomBen TomBener

👨‍💻
View GitHub Profile
@ivorkchan
ivorkchan / ocr-gemini.py
Created August 20, 2024 21:45
OCR prompt with Gemini.
import google.generativeai as genai
import os
from dotenv import load_dotenv
import time
import signal
load_dotenv()
API_KEY = os.getenv("GOOGLE_API_KEY")
if not API_KEY:
@ninehills
ninehills / chatpdf-zh.ipynb
Last active April 23, 2025 10:17
ChatPDF-zh.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@amix
amix / query_customer_feedback.py
Last active July 25, 2023 17:52
Use LlamaIndex and GPT-3 to query customer insights
import os
import logging
import sys
import textwrap
from llama_index import (
GPTKeywordTableIndex,
SimpleDirectoryReader,
LLMPredictor,
)
@huytd
huytd / wordle.md
Last active April 1, 2025 00:28
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@j-f1
j-f1 / LICENSE
Last active October 7, 2022 06:52
MIT License
Copyright (c) 2021 Jed Fox
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active April 24, 2025 16:40
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@andyrbell
andyrbell / scanner.sh
Last active March 28, 2025 17:57
Make a pdf look scanned using ImageMagick
# use ImageMagick convert
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf
@ttscoff
ttscoff / appinfo.md
Last active September 2, 2024 18:53
appinfo: A quick ruby script for Mac that returns some information for a specified Mac app in Terminal. Includes icon display if using imgcat or chafa are available.

appinfo

A script for getting details of installed Mac apps. Like Get Info but faster and cooler.

Save the script below as appinfo somewhere in your path. Make it executable with chmod a+x appinfo. Then just run appinfo APPNAME to get info on any installed app.

@max-mapper
max-mapper / bibtex.png
Last active November 6, 2024 09:03
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png