Skip to content

Instantly share code, notes, and snippets.

View patatepartie's full-sized avatar

Cyril Ledru patatepartie

View GitHub Profile
@patatepartie
patatepartie / chessputzer_client.rb
Created August 26, 2023 07:16
Using Chessputzer's online instance as an API to generate a FEN from an image of a chessboard
require 'faraday'
conn = Faraday.new('https://www.ocf.berkeley.edu') do |f|
f.request :multipart
f.request :url_encoded
f.adapter :net_http # This is what ended up making it work
end
res = diagram.open do |file|
payload = { :file => Faraday::UploadIO.new(file, 'image/png') }

Keybase proof

I hereby claim:

  • I am patatepartie on github.
  • I am patatepartie (https://keybase.io/patatepartie) on keybase.
  • I have a public key whose fingerprint is 1728 EF76 8812 2B5F E24E 4B41 B301 D20B 4424 3FF5

To claim this, I am signing this object: