This guide will help you set up and run the Nanonets OCR model locally for PDF processing.
GitHub Gist: https://gist.github.com/kordless/652234bf0b32b02e39cef32c71e03400
# 0. Create and activate conda environment first| BOUNDING_BOX_TOOL_NAME = "capture_bounding_boxes" | |
| BOUNDING_BOX_TOOL = { | |
| "type": "function", | |
| "name": BOUNDING_BOX_TOOL_NAME, | |
| "strict": True, | |
| "description": ( | |
| "Capture normalized bounding boxes for salient regions in the provided image. " | |
| "Each box should map to a meaningful real-world entity or text block and use clockwise point order." | |
| ), | |
| "parameters": { |
| import React, { useState, useEffect, useRef } from ‘react’; | |
| const TextCube = () => { | |
| const [faceTexts, setFaceTexts] = useState([’’, ‘’, ‘’, ‘’, ‘’, ‘’]); | |
| const [prompt, setPrompt] = useState(’’); | |
| const [isGenerating, setIsGenerating] = useState(false); | |
| const streamingIntervals = useRef([]); | |
| // Maximum characters to display per face | |
| const maxChars = 140; |
| using System; | |
| using System.Xml; | |
| using System.Net; | |
| using System.IO; | |
| using System.Text; | |
| namespace AconexSampleSheet | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) |
This guide will help you set up and run the Nanonets OCR model locally for PDF processing.
GitHub Gist: https://gist.github.com/kordless/652234bf0b32b02e39cef32c71e03400
# 0. Create and activate conda environment firstI have been utilizing artificial intelligence to enhance and optimize my codebases. After evaluating various models, applications, and editors, I find the claude.ai interface with a Pro Account to be the most effective. Here’s the approach I’ve developed to achieve optimal results:
This gist contains a carefully crafted prompt and a script designed to convert your entire Laravel codebase (excluding the resources folder, which can be easily added if needed) into a TXT file with the following structure:
<File Start: ./path/filename.extension> Content of file <End File: ./path/filename.extension>
To implement this method:
| #!/bin/bash | |
| # Check if a GitHub URL is provided as an argument | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 <github_url>" | |
| exit 1 | |
| fi | |
| # Store the GitHub URL | |
| GIT_URL="$1" |
| // 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
| // You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
| (() => { | |
| const SHOW_SIDES = false; // color sides of DOM nodes? | |
| const COLOR_SURFACE = true; // color tops of DOM nodes? | |
| const COLOR_RANDOM = false; // randomise color? | |
| const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
| const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
| const THICKNESS = 20; // thickness of layers | |
| const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
| #!/bin/bash | |
| # Check if ffmpeg is installed | |
| if ! command -v ffmpeg &> /dev/null; then | |
| echo "Error: ffmpeg is not installed or not in the PATH." >&2 | |
| echo "Please install ffmpeg to use this script." >&2 | |
| exit 1 | |
| fi | |
| interval=3 |
| #!/bin/bash | |
| # Check if interval argument is provided | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 -int <interval_in_seconds>" | |
| exit 1 | |
| fi | |
| # Extract the interval value | |
| interval=$2 |
| // | |
| // Poor Man's Web Server with Regex Routing in 177 LOC of C# | |
| // | |
| // This is a simple standalone http server that handles routing with regular expressions | |
| // matching. For each request the router passes capture groups to handlers as a data dictionary. | |
| // | |
| // Router implementation constructs a single composite regex to match request path, based on | |
| // https://nikic.github.io/2014/02/18/Fast-request-routing-using-regular-expressions.html | |
| // | |
| // One can use `WebServer` and `Router` classes alone, just has to register all custom |