Skip to content

Instantly share code, notes, and snippets.

View mdagost's full-sized avatar

Michelangelo D'Agostino mdagost

  • Tegus
  • Chi-town
View GitHub Profile
img.img-explore {
opacity: 0.75;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mdagost
mdagost / np_to_tfrecords.py
Created May 21, 2018 17:14 — forked from swyoon/np_to_tfrecords.py
From numpy ndarray to tfrecords
import numpy as np
import tensorflow as tf
__author__ = "Sangwoong Yoon"
def np_to_tfrecords(X, Y, file_path_prefix, verbose=True):
"""
Converts a Numpy array (or two Numpy arrays) into a tfrecord file.
For supervised learning, feed training inputs to X and training labels to Y.
For unsupervised learning, only feed training inputs to X, and feed None to Y.
@mdagost
mdagost / chicago_ds.md
Last active March 18, 2020 21:44
Potential Chicago Data Science Opportunities

Potential Chicago Data Science Opportunities

  • Civis Analytics
  • ShopRunner
  • Uptake
  • Tempus
  • Datascope/IDEO
  • GrubHub
  • Groupon
  • CapOne Labs
@mdagost
mdagost / mnist_estimator.py
Created December 3, 2017 20:10 — forked from peterroelants/mnist_estimator.py
Example using TensorFlow Estimator, Experiment & Dataset on MNIST data.
"""Script to illustrate usage of tf.estimator.Estimator in TF v1.3"""
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data as mnist_data
from tensorflow.contrib import slim
from tensorflow.contrib.learn import ModeKeys
from tensorflow.contrib.learn import learn_runner
# Show debugging output
@mdagost
mdagost / akmtdfgen.py
Created August 22, 2017 16:17 — forked from timehaven/akmtdfgen.py
kmtdfgen: Keras multithreaded dataframe generator
"""akmtdfgen: A Keras multithreaded dataframe generator.
Works with Python 2.7 and Keras 2.x.
For Python 3.x, need to fiddle with the threadsafe generator code.
Test the generator_from_df() functions by running this file:
python akmtdfgen.py
@mdagost
mdagost / rank_metrics.py
Created July 7, 2017 21:23 — forked from bwhite/rank_metrics.py
Ranking Metrics
"""Information Retrieval metrics
Useful Resources:
http://www.cs.utexas.edu/~mooney/ir-course/slides/Evaluation.ppt
http://www.nii.ac.jp/TechReports/05-014E.pdf
http://www.stanford.edu/class/cs276/handouts/EvaluationNew-handout-6-per.pdf
http://hal.archives-ouvertes.fr/docs/00/72/67/60/PDF/07-busa-fekete.pdf
Learning to Rank for Information Retrieval (Tie-Yan Liu)
"""
import numpy as np
<html>
Hello World
</html>
<script src="https://unpkg.com/jupyter-js-widgets@~2.1.4/dist/embed.js"></script>
<script type="application/vnd.jupyter.widget-state+json">
{
"version_major": 1,
"version_minor": 0,
"state": {
"7da35340b651476ba3926aa15366e2d8": {
"model_name": "LayoutModel",
"model_module": "jupyter-js-widgets",
"model_module_version": "~2.1.4",