Skip to content

Instantly share code, notes, and snippets.

View bizzguy's full-sized avatar

James Harmon bizzguy

View GitHub Profile
@bizzguy
bizzguy / mistral.tsx
Created April 15, 2025 20:26
API calls for Mistral OCR
import { Mistral } from "@mistralai/mistralai"
const apiKey = process.env.NEXT_PUBLIC_MISTRAL_API_KEY
export async function uploadPdf(formData: FormData) {
try {
const file = formData.get("file") as File
if (!file) {
return { success: false, error: "No file provided" }
@bizzguy
bizzguy / gist:abc9efb510d4d7aa27eca92c02f55a91
Created May 23, 2019 01:11
app/src/main/res/layout/main_fragment.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">
<TextView
android:id="@+id/countText"