Skip to content

Instantly share code, notes, and snippets.

View kevinrpb's full-sized avatar
💭
🤷🏽‍♂️

Kevin Romero Peces-Barba kevinrpb

💭
🤷🏽‍♂️
View GitHub Profile
@kevinrpb
kevinrpb / images.md
Last active November 3, 2021 08:57
Image Into Columns Algorithms

Images Into Columns Algorithms

This experiment surged from this tweet by @sindresorhus:

What's the simplest algorithm for splitting a (unordered) set of integers into n-2 even sub-sets where the sum of the elements in each sub-set have the minimum difference? Even better if someone has an example in Swift or JS. All the algorithms I found care about order.

— Sindre Sorhus (@sindresorhus) November 2, 2021

Basically, we want to put images into columns in such a way that the height of the columns is as similar as possible. As some people in the thread mentioned, this can be referred to as Greedy Number Partitioning, and several approximations exist.

In particular, I took three answers

@kevinrpb
kevinrpb / Readme.md
Created May 31, 2021 09:15
Basketball MOO

Basketball MOO

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kevinrpb
kevinrpb / P0bInstructions.md
Last active September 17, 2018 13:39
CS321 Project 0b Instructions

Project 0b - Instructions

This are the instructions on how to do the assignment. It's pretty straightforward, but just in case anyone finds eny difficulties with it. I'd suggest first thing you do is READ THE ASSIGNMENT and come here only if you have trouble. If you do, that's find. Follow the guide or ask for help in Slack. Good luck with it!

Get the repo in local

Everybody should do this again regardless you had done it already. I pushed new changes to the repo you need to have.

  1. Go to the repo page.
  2. Hit 'Clone or download' (big green button).
  3. Select 'Use SSH' and copy the link.
/* HDSS-RF-01 */
(Entradas)
{
[Ruta Fichero]
- CEI001: Ruta a fichero inexistente.
- CEV002: Ruta a fichero existente.
[Sintaxis Fichero]
- CEI003: Fichero con sintaxis JSON incorrecta.