Skip to content

Instantly share code, notes, and snippets.

View tokiio's full-sized avatar

Arturo Francisco Díaz Martínez tokiio

View GitHub Profile
@vmandic
vmandic / dotnet core .gitignore
Last active May 18, 2024 08:50
A default .NET Core project .gitignore file - or just type `dotnet new gitignore`
# 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
@mariocesar
mariocesar / expr_test.py
Last active September 9, 2020 21:57
Evaluate mathematical expressions from strings in python and return the result
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)