Skip to content

Instantly share code, notes, and snippets.

View markoshorro's full-sized avatar
馃彙
Focusing

Markos Horro markoshorro

馃彙
Focusing
View GitHub Profile
@markoshorro
markoshorro / fuck.py
Created May 4, 2020 17:41
ParserQui茅nEst谩DelanteDeTi - MECD Premio Nacional Fin de Carrera
import re
import PyPDF2
path_file = "..."
media_pond = 11.23
meritos = 0.9
file = open(path_file, "rb")
pdfReader = PyPDF2.PdfFileReader(file)
@markoshorro
markoshorro / README.txt
Created February 5, 2020 16:15
README Programaci贸n Integrativa
Nombre Proyecto:
----------------
Breve descripci贸n de la aplicaci贸n, y un listado de las funcionalidades m谩s relevantes:
* Caso de uso 1
* Caso de uso 2
* Caso de uso 3
* ...
@markoshorro
markoshorro / Dockerfile
Created February 5, 2020 15:45
Configuraci贸n simple Docker Programaci贸n Integrativa
FROM python:3
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
ADD requirements.txt /code/
RUN pip install -r requirements.txt
ADD . /code/
@markoshorro
markoshorro / getIntFromExpr.cpp
Created December 9, 2019 05:24
Clang: get int value from clang::Expr
/// ASTContext needed, you can get it from CompilerInstance
int64_t getIntFromExpr(const Expr *E, const ASTContext *C) {
clang::Expr::EvalResult R;
if (E->EvaluateAsInt(R, *C)) {
return R.Val.getInt().getExtValue();
}
/// Could be that returning -1 is not safe, you should modify this
return -1;
}
@markoshorro
markoshorro / raytracing.py
Created January 28, 2017 19:46 — forked from rossant/raytracing.py
Very simple ray tracing engine in (almost) pure Python. Depends on NumPy and Matplotlib. Diffuse and specular lighting, simple shadows, reflections, no refraction. Purely sequential algorithm, slow execution.
import numpy as np
import matplotlib.pyplot as plt
w = 400
h = 300
def normalize(x):
x /= np.linalg.norm(x)
return x