Skip to content

Instantly share code, notes, and snippets.

View jilljenn's full-sized avatar

Jill-Jênn Vie jilljenn

View GitHub Profile
@jilljenn
jilljenn / lrc2srt.py
Created April 17, 2022 19:40 — forked from sophana/lrc2srt.py
Convert all LRC files to SRT. With SRT files, you can display lyrics in most media players.
#!/usr/bin/python
import sys
import os
# usage: lrc2srt.py [directory]
# will recusively convert all lrc files to srt in directory
def conv(lrcPath, srtPath):
with open(lrcPath) as lrc:
@jilljenn
jilljenn / inria.py
Created June 5, 2019 17:22
Play Bakuman. live-action's ending when Inria at last dares to update their admission ranking
from urllib.request import urlopen
from datetime import datetime
import os
page = urlopen('https://www.inria.fr/institut/carrieres-metiers/offres/charges-et-chargees-de-recherche-de-classe-normale/admission')
admission = page.read().decode('utf8')
page = urlopen('https://www.inria.fr/institut/carrieres-metiers/offres/charges-et-chargees-de-recherche-de-classe-normale/admissibilite')
admissibility = page.read().decode('utf8')
@jilljenn
jilljenn / oscars.py
Last active August 29, 2015 14:13
Data retriever of Oscars nominees
from urllib.request import urlopen
from urllib.parse import urlencode
from bs4 import BeautifulSoup
import json
import re
# Get your API key at http://developer.rottentomatoes.com
RT_API_KEY = ""
@jilljenn
jilljenn / ruzzle.ml
Created August 20, 2014 09:24
Ruzzle solver in OCaml
type 'a arbre = N of ('a * 'a arbre) list
let read_file filename =
let chan = open_in filename in
let mots = ref [] in
try while true do
mots := input_line chan::!mots;
done; []
with End_of_file -> close_in chan; !mots
@jilljenn
jilljenn / lolcat.html
Last active August 29, 2015 14:05
Minimal CSS for lolcat pictures
/* Example: https://twitter.com/jjvie/status/500613516492283904 */
<style>
body {
background: url('cat.jpg') no-repeat;
}
div {
position: absolute;
font-size: 42px;