This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uv pip compile dev-requirements.in requirements.in > dev-requirements.txt | |
uv pip compile requirements.in > requirements.txt | |
uv pip sync dev-requirements.txt requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
baremes = [(0, 10777, 0), (10778, 27478, 11), (27479, 78570, 30), (78571, 168994, 41)] | |
max_bareme, max_pct = 168995, 45 | |
def impot_revenu(val, nombre_parts=1): | |
val = val - val * 0.1 | |
val = val / nombre_parts | |
impot = 0 | |
for min_bareme, max_bareme, pct in baremes: | |
montant_imposable = max( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
MIT License | |
Copyright (c) 2016 Matt Menzenski | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
["which", "there", "their", "about", "would", "these", "other", "words", "could", "write", "first", "water", "after", "where", "right", "think", "three", "years", "place", "sound", "great", "again", "still", "every", "small", "found", "those", "never", "under", "might", "while", "house", "world", "below", "asked", "going", "large", "until", "along", "shall", "being", "often", "earth", "began", "since", "study", "night", "light", "above", "paper", "parts", "young", "story", "point", "times", "heard", "whole", "white", "given", "means", "music", "miles", "thing", "today", "later", "using", "money", "lines", "order", "group", "among", "learn", "known", "space", "table", "early", "trees", "short", "hands", "state", "black", "shown", "stood", "front", "voice", "kinds", "makes", "comes", "close", "power", "lived", "vowel", "taken", "built", "heart", "ready", "quite", "class", "bring", "round", "horse", "shows", "piece", "green", "stand", "birds", "start", "river", "tried", "least", "field", "whose", "girls", "leave |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# forwards the calls to http://localhost:8000/https://google.com to https://google.com - copying the headers, query strings, etc | |
from fastapi import FastAPI, Request, Response | |
from fastapi.middleware.cors import CORSMiddleware | |
import requests | |
app = FastAPI() |
This documents details my release engineering principles. They have been forged through experience, no need to say. :-)
The context is: you want to build your software, and eventually distribute it. You are not alone, and even if, you're not immortal. If you want your creation to live after you,
- An objective, repeatable, exhaustive process.
- No hidden knowledge.
- No environmental prerequisites.
- In three years, you should be able to get the same binaries you get today.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for /f %%i in ('git rev-parse --abbrev-ref HEAD| sed "sI.*/IIg"') do set branch=%%i | |
git show-branch 2> nul | grep '\*' | grep -v "%branch%" | head -n1 | sed 's/.*\[\(.*\)\].*/\1/' | sed 's/[\^~].*//' | |
# How it works: | |
# 1| Display a textual history of all commits. | |
# 2| Ancestors of the current commit are indicated | |
# by a star. Filter out everything else. | |
# 3| Ignore all the commits in the current branch. | |
# 4| The first result will be the nearest ancestor branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
K:\temp>set GIT_CURL_VERBOSE=1 | |
K:\temp>rm -rf Repository | |
K:\temp>git clone http://:@server:8080/tfs/COLLECTION/TeamProject/_git/Repository | |
11:51:47.940501 git.c:348 trace: built-in: git 'clone' 'http://:@server:8080/tfs/COLLECTION/TeamProject/_git/Repository' | |
Clonage dans 'Repository'... | |
11:51:48.024602 run-command.c:351 trace: run_command: 'git-remote-http' 'origin' 'http://:@server:8080/tfs/COLLECTION/TeamProject/_git/Repository' | |
* Couldn't find host server in the _netrc file; using defaults | |
* timeout on name lookup is not supported |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
K:\temp>set GIT_CURL_VERBOSE=1 | |
K:\temp>git clone http://:@server:8080/tfs/COLLECTION/TeamProject/_git/Repository | |
Cloning into 'Repository'... | |
* Couldn't find host server in the _netrc file; using defaults | |
* Adding handle: conn: 0x39c790 | |
* Adding handle: send: 0 | |
* Adding handle: recv: 0 | |
* Curl_addHandleToPipeline: length: 1 | |
* - Conn 0 (0x39c790) send_pipe: 1, recv_pipe: 0 |