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
# From .NET Core 3.0 you can use the command: `dotnet new gitignore` to generate a customizable .gitignore file | |
*.swp | |
*.*~ | |
project.lock.json | |
.DS_Store | |
*.pyc | |
# Visual Studio Code | |
.vscode |
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 ast | |
import re | |
def expr(code, context=None): | |
"""Eval a math expression and return the result""" | |
if not context: | |
context = {} | |
code = code.format(**context) |