Wiki
Wiki
Courses and public working groups
Courses and public working groups
Private Working Groups
Private Working Groups
- New!!! Reading Group
- Theatre
- Admin
- Research
- Teaching
This is an old revision of the document!
#%%
Installer l'extension bookmarks puis
Pour utiliser Git et Notebook, il faut d'abord s'assurer qu'au moment Git push on n'inclue pas les outputs, ce qui permet d'eviter les conflits… Il y a le module nbstripout qui permet de faire ca automatiquement. Si on a pas encore installé nbstripout, faire le 1. Sinon, on passe directement à l'étape 2.
python3.10 -m pip install --upgrade nbstripout
nbstripout --install --attributes .gitattributes
if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then tmux attach -t default || tmux new -s default fi fi
Convention de notation: C pour Ctrl et M pour Alt
import re def replace_symbols(source_file, destination_file): try: with open(source_file, 'r') as source: with open(destination_file, 'w') as destination: content = source.read() # Remplacer les parties entre double dollars (comme $$...$$) par leurs équivalents \[...\] content = re.sub(r'\$\$(.*?)\$\$', r'\\[\1\\]', content, flags=re.DOTALL) # Remplacer les parties entre dollars (comme $...$) par leurs équivalents \(...\) content = re.sub(r'\$(.*?)\$', r'\\(\1\\)', content, flags=re.DOTALL) destination.write(content) except FileNotFoundError: print("Fichier source non trouvé.") except Exception as e: print("Une erreur est survenue :", str(e)) else: print("Remplacement terminé avec succès!") # Exemple d'utilisation source_file = "exos.tex" destination_file = "sortie.tex" replace_symbols(source_file, destination_file)
{ "latex-workshop.synctex.synctexjs.enabled": true, "latex-workshop.synctex.afterBuild.enabled": true, "latex-workshop.view.pdf.viewer": "tab", "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click", "security.workspace.trust.untrustedFiles": "open", "latex-workshop.view.pdf.zoom": "page-width", "editor.wordWrap": "on", "latex-workshop.view.pdf.tab.editorGroup": "below", "editor.bracketPairColorization.enabled": true, "latex-workshop.message.update.show": false, "latex-workshop.message.warning.show": false, "latex-workshop.message.error.show": false, "latex-workshop.message.information.show": false, "git.confirmSync": false, "git.untrackedChanges": "hidden", "editor.suggestSelection": "first", "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue", "workbench.editorAssociations": { "*.ipynb": "jupyter-notebook" }, "notebook.cellToolbarLocation": { "default": "right", "jupyter-notebook": "left" }, "python.defaultInterpreterPath": "C:\\Users\\douc_ran\\Anaconda3\\python.exe", "mdmath.macroFile": "C:\\Users\\douc_ran\\OneDrive\\mymacros.json", "editor.fontSize": 12, "editor.suggest.showStatusBar": true, "editor.suggest.insertMode": "insert", "markdown.extension.katex.macros": { "\\PP": "\\mathbb{P}" }, "window.zoomLevel": 1, "latex-workshop.view.pdf.external.synctex": { "command": "C:\\Users\\douc_ran\\AppData\\Local\\SumatraPDF", "args": [ "-forward-search", "%TEX%", "%LINE%", "-reuse-instance", "-inverse-search", "code \"C:\\Users\\douc_ran\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\outcli.js\" -r -g \"%f:%l\"", "%PDF%", ] }, "jupyter.interactiveWindowMode": "perFile", "[python]": { "editor.formatOnType": true }, "files.autoSave": "afterDelay", "git.openRepositoryInParentFolders": "always", "lightrun.certificatePinningList": [ "515a630cfd1fb908e30087bcc20b7413ad146b9bf2b23d3aaa72c28e45b24fb2", "ee80811b38e7e6c2dc4cc372cbea86bd86b446b012e427f2e19bf094afba5d12" ], "lightrun.serverURL": "https://app.lightrun.com", "lightrun.sendSourceFullPath": true, "git-graph.maxDepthOfRepoSearch": 1, "git.autofetch": true, }