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
# Itérer sur les environnements existants | |
nouveau_python=python3.11 | |
suffix="py3.11" | |
for environ in $@; | |
do | |
# Activer l'environnement | |
source $environ/bin/activate | |
# Sauvegarder les paquets | |
paquets=$(python -m pip freeze --exclude-editable --all) |
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 python3.10 | |
# -*- coding: utf-8 -*- | |
"""Obtenir les statistiques à jour sur les maladies infectieuses.""" | |
import requests | |
import logging | |
import pathlib | |
import time | |
import datetime as dt |
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 python3 | |
# -*- coding: utf-8 -*- | |
import html.parser | |
import requests, shelve, pathlib | |
class ListParser(html.parser.HTMLParser): | |
def __init__(self, to_feed, *args, **kargs): | |
self.in_good = False |
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 -*- | |
import markdown2 as md2 | |
from string import Template | |
from pathlib import Path | |
MD_EXTRAS = ['code-friendly', | |
'fenced-code-blocks', | |
'footnotes', | |
'header-ids', |
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 | |
import appex, dialogs, console | |
import plistlib, copy, webbrowser, urllib, time | |
# check out http://handleopenurl.com/ | |
db = 'Tasks.txt' | |
url = 'omnifocus://task/%s' | |
due = 'due://x-callback-url/add?title=%s&hourslater=4&x-success=pythonista://&x-error=pythonista://&x-source=Pythonista' |
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 | |
import appex, dialogs, scene | |
import plistlib, copy, webbrowser, urllib, time | |
# check out http://handleopenurl.com/ | |
db = 'Tasks.txt' | |
url = 'omnifocus://task/%s' | |
due = 'due://x-callback-url/add?title=%s&hourslater=4&x-success=pythonista://&x-error=pythonista://&x-source=Pythonista' |
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 | |
import appex, dialogs, scene | |
import plistlib, copy, webbrowser, urllib, time | |
# check out http://handleopenurl.com/ | |
db = 'Tasks.txt' | |
url = 'omnifocus://task/%s' | |
due = 'due://x-callback-url/add?title=%s&hourslater=4&x-success=pythonista://&x-error=pythonista://&x-source=Pythonista' |
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 | |
import webbrowser | |
due = 'due://x-callback-url/add?title=%s&hourslater=4&x-success=pythonista://&x-error=pythonista://&x-source=Pythonista' | |
webbrowser.open(due % 'a') | |
print 'a' | |
webbrowser.open(due % 'b') | |
print 'b' |
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 | |
import webbrowser | |
due = 'due://x-callback-url/add?title=%s&hourslater=4&x-success=pythonista://&x-error=pythonista://&x-source=Pythonista' | |
webbrowser.open(due % 'a') | |
print 'a' | |
webbrowser.open(due % 'b') | |
print 'b' |
NewerOlder