Skip to content

Instantly share code, notes, and snippets.

@andreh7
andreh7 / xgboost2tmva.py
Created July 27, 2018 12:12 — forked from hqucms/xgboost2tmva.py
Convert xgboost model to TMVA xml format. Not fully tested...
import re
from xml.dom.minidom import Document
def SubElement(parent, element_name, **attributes):
"""helper function to create elements in a way similar to ElementTree"""
doc = parent.ownerDocument
element = doc.createElement(element_name)
parent.appendChild(element)
for attr_name, attr_value in attributes.items():
@andreh7
andreh7 / tf-function-convolution.ipynb
Last active May 23, 2019 11:14
Convolution of functions with Tensorflow
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andreh7
andreh7 / pytorch-variable-number-of-inputs.ipynb
Last active March 10, 2021 15:15
Learning a function with a variable number of inputs with PyTorch
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andreh7
andreh7 / pack-for-gcp.py
Created January 4, 2018 10:01
script for packing Kaggle Tensorflow Speech Recognition Challenge data into single npy files
#!/usr/bin/env python
#----------------------------------------------------------------------
# main
#----------------------------------------------------------------------
import sys
argv = sys.argv[1:]
@andreh7
andreh7 / onnx2dot.py
Created November 1, 2017 09:40
build Graphviz graph from ONNX files
#!/usr/bin/env python
import onnx
import pydot
import os
#----------------------------------------------------------------------
def get_tensor_shape(node):
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andreh7
andreh7 / particleFlightTime.ipynb
Created October 31, 2015 23:15
time of flight difference
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.