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 -*- | |
# | |
# Exécuter avec : | |
# | |
# DJANGO_SETTINGS_MODULE= python only.py | |
# | |
# Requiert django 1.6 et djqmixin | |
# |
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
import sys | |
from functools import partial | |
class A(object): | |
def meth(self): | |
return 'orig' | |
def newmeth(self): |
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
# note que ça peut être /etc/NetworkManager/dnsmasq.d/custom pour utiliser NetworkManager comme aiguilleur. | |
bind-interfaces | |
except-interface=docker0 | |
except-interface=virbr* | |
except-interface=lxcbr* | |
log-queries | |
dns-forward-max=5 | |
# 1h de TTL de base |
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
#!/bin/bash | |
## -*- python -*- | |
# | |
# This python script is callable and sourceable by bash. | |
# | |
# lint python with: flake8 --ignore=E225,E265 py.sh | |
# lint bash with: sed '/^## END BASH/,$d' py.sh | shellcheck - | |
## In bash, declare a variable script, assign value "#". In python, declare a | |
## variable scriptd, assign a heredoc containing the bash script. |
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
# Énigme de la mouche et des TGV | |
# | |
# Un train part de Lille à 7h41 et va vers Paris (250km) a vitesse constante | |
# 250km/h. Simultanément un train part de Paris et va vers Lille à la meme | |
# vitesse. Une mouche dopée à l'EPO vole du train Lillois au train Parisien à | |
# 436 km/h. Arrivée au 2e train, elle fait demi tour et revient vers le 1er, | |
# puis à nouveau etc. Lorsque les 2 trains se croisent et que 2 urluberlus en | |
# profitent pour se dire bonjour à 500km/h, la mouche s'arrête. À ce moment, | |
# quelle distance a-t-elle parcouru sur tous les allers-retours cumulés de plus | |
# en plus courts ? |
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
[tool.poetry] | |
name = "poetrydeps" | |
version = "0.1.0" | |
description = "" | |
authors = ["Your Name <[email protected]>"] | |
[tool.poetry.dependencies] | |
python = "^2.7" | |
[tool.poetry.dev-dependencies] |