Skip to content

Instantly share code, notes, and snippets.

View jferard's full-sized avatar

Julien Férard jferard

View GitHub Profile
@jferard
jferard / naive-scheduling-algorithm.md
Created March 4, 2023 16:09
Notes scheduling algorithm

Notes on a naive scheduling algorithm

J. Férard 2023-03-04.

Start

Let three functions:

  • a function p: task × time_slotpriority (0 means: not task for this time-slot)
  • a function aff1: employee × time_slotaffinity (0 means: not available for this time-slot)
  • a function aff2: employee × taskaffinity (0 means: not concerned by this task)
@jferard
jferard / Collections.vb
Last active August 19, 2022 20:36
Collections For LibreOffice Basic (WIP)
REM Collections For LibreOffice Basic
REM Copyright (C) 2022 J. Férard <https://github.com/jferard>
REM
REM Trying to create a sane API for collections in Basic. This is a work in progress.
REM
Option Explicit
REM
REM Helpers
REM
@jferard
jferard / stylemetool.py
Created March 27, 2022 19:49
A simple LibreOffice Python script to extract the style of a range of cells.
# coding: utf-8
"""
Copyright (C) J. Férard.
A simple LibreOffice Python script to extract the style of a range of cells.
Work in progress.
"""
import uno

Run the unittests, doctests and flake8:

python3.7 -m pytest && python3.7 -m pytest --doctest-modules more_itertools && flake8

More complete version:

python3.7 -m pytest --cov-report term-missing --cov=more_itertools  && python3.7 -m pytest --cov-report term-missing --cov-append --doctest-modules more_itertools --cov=more_itertools && flake8

Rebase:

# Origin/Upstream
git remote add origin ...
git remote add upstream ...
# Stage/commit
Stop tracking a file: 1. update gitignore; 2. run:
git rm -r --cached .
git add .
from sympy import *
from sympy.abc import i
zs = [0]*16
aux = [0]*16
bux = [0]*16
cux = [0]*16
dux = [0]*16
# step 1 : z0, aux, bux
@jferard
jferard / Maven-reminder.md
Last active January 26, 2022 04:42
Some useful maven commands

Load dependencies

mvn dependency:resolve

Load sources

mvn dependency:sources

Load javadocs

# -*- coding: utf-8 -*-
# Purpose: Signing a Mozilla Firefox/Thunderbird add-on with Python requests module
# Author: Julien Férard <www.github.com/jferard>
#
# Created: 2016-10-16
# Copyright: (c) Julien Férard
# Licence: GPL v.3
import requests
import jwt