Skip to content

Instantly share code, notes, and snippets.

@arthursoares
arthursoares / README.MD
Created February 21, 2025 16:00
Use ffmpeg, Whisper and other OpenAI LLM to transcribe and summarize a video

Video Transcriber

This project extracts audio from a video file and transcribes it using the OpenAI Whisper API, and uses a prompt with another model of your choice

Prerequisites

  • Python 3.10+ (tested with Python 3.13)
  • pip (Python package installer)
  • An OpenAI API Key with access to audio transcription
@arthursoares
arthursoares / README.md
Created January 31, 2025 21:37
Leica M: 6bit encoding EXIF Fixer for 3rd-party lenses

Leica 6-Bit EXIF Fixer

This script was developed by ChatGPT o1 with human suppervision of Arthur Soares Website / Threads :).

Overview

On a Leica M digital camera, lenses are normally identified via an internal “6-bit encoding.” Leica’s native lenses have unique codes, and the camera writes lens info to the file’s EXIF metadata. However, third-party lenses (Voigtländer, Zeiss, etc.) often lack an official Leica 6-bit code, so photographers commonly “reuse” a Leica lens code with similar focal length and aperture. This results in Leica Summicron lens info showing up in the metadata even when you’re shooting with, say, a Voigtländer 35 mm f/2 Ultron.

This script uses ExifTool to:

{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "HOLOPLOT OS v2.0 Project File",
"description": "This is a beautiful project. We can add multiple references.",
"definitions": {
"beam_coefficients": {
"$ref": "#/$defs/beam_coefficients"
},
"beam_calculation_parameters": {
"$ref": "#/$defs/beam_calculation_parameters"
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "http://holoplot.com/schemas/project/v1.0.0/beam_coefficients.json",
"name": "beam_coefficients",
"description": "stores beams",
"type": "object",
"properties": {
"id": {
"type": "string"
},
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "http://holoplot.com/schemas/project/v1.0.0/beam_calculation_parameters.json",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"enum": [ "COVERAGE_BEAM", "OPTIMIZED_VIRTUAL_SOURCE", "VIRTUAL_SOURCE", "PARAMETRIC_BEAM", "GENERIC_SOURCE_CONFIG" ]
@arthursoares
arthursoares / template.mjml
Last active February 11, 2020 20:28
Updated
<mjml>
<mj-head>
<mj-font name="Nunito Sans" href="https://fonts.googleapis.com/css?family=Nunito+Sans:200,300i,400,700" />
<mj-attributes>
<mj-body background-color="#5C5C73" color="#333" padding="0" letter-spacing="1px" />
<mj-all font-family="Nunito Sans" />
<mj-section background-color="#F5F5FA" padding="30px" />
<mj-text font-size="14px" line-height="20px" font-weight="400" />
<mj-button background-color="#52CCCC" color="white" text-transform="uppercase" font-weight="700" height="50px" inner-padding="3px 60px 0 60px" vertical-align="center" align="left" />
</mj-attributes>
@arthursoares
arthursoares / package.json
Created January 13, 2020 13:29
Ampersand Theme
{
"name": "stackbit-ampersand-theme",
"description": "Stackbit Ampersand Theme",
"version": "0.0.1",
"license": "MIT",
"scripts": {
"develop": "gatsby develop",
"start": "npm run develop",
"build": "gatsby build --prefix-paths",
"serve": "gatsby serve"
# Gender Resources
mutation GenderResources {
createMetric(
input: {
name: "Gender Responsive Metrics: Resources"
description: "Along all dimensions productive resources, women are considerably disadvantaged relative to men. In spite of the type indicator, women are particularly disadvantaged from adequate access to any economic share. This is staggering when considering that half of the world's population are women. A trustworthy measure to highlight all gender disparities in productive, financial and educational resources is mandatory to act in benefit of a sex-disaggregated data source."
calculationMethod: artithmetic_avg
pollModel: one_range
scoreRange: {min: -2, max: 2}
questions: [
{
"data": {
"technologies": [
{
"id": "85vTsNTNFSGXciEvi",
"name": "Faraday Pocket",
"parents": []
},
{
"id": "JsZmeGSRMLcwPeM37",
{
"data": {
"technologies": [
{
"id": "85vTsNTNFSGXciEvi",
"name": "Faraday Pocket",
"parents": []
},
{
"id": "JsZmeGSRMLcwPeM37",