Skip to content

Instantly share code, notes, and snippets.

View rphlo's full-sized avatar

Rapha rphlo

View GitHub Profile
@rphlo
rphlo / laby.html
Created May 14, 2026 07:03
Lab Orienteering Game
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>Laby 1vs1</title>
<style>
html {
text-aling: center
height: 100%;
margin: 0;
base64size = (bitsize + 2) / 3 * 4 + 1
#! /usr/bin/env bash
for FILE1 in "$@"
do
ffmpeg -i ${FILE1} -c:v libx264 -profile:v baseline -level 3.0 \
-pix_fmt yuv420p "${FILE1%.*}_whatsapp.mp4"
done
@rphlo
rphlo / sudoku_solver.py
Last active September 7, 2018 12:18
Solve Sudoku in Python
#! /usr/bin/env python3
import copy
class Puzzle():
def __init__(self, cells):
self.cells = cells
self.validate()
def validate(self):
if not isinstance(self.cells, list):
#! /usr/bin/env python
import random
import math
import sys
def get_index_by_coords(x, y, size):
half = int(math.ceil(size/2.0))
if x < half:
import datetime
def get_easter_for_year(year):
a = year % 19
b, c = divmod(year, 100)
d, e = divmod(b, 4)
g = (8 * b +13)//25
h = (19 * a + b - d - g + 15)% 30
j, k = divmod(c, 4)