Skip to content

Instantly share code, notes, and snippets.

View vipulraikar's full-sized avatar

Vipul Pai Raikar vipulraikar

  • Philips Research
  • Cambridge, MA
  • 17:07 (UTC -04:00)
View GitHub Profile
@vipulraikar
vipulraikar / QVTKRenderWindowInteractor.py
Created October 18, 2021 16:26 — forked from dgobbi/QVTKRenderWindowInteractor.py
Simple QVTKRenderWindowInteractor example in Python
# coding=utf-8
"""
A simple VTK widget for PyQt or PySide.
See http://www.trolltech.com for Qt documentation,
http://www.riverbankcomputing.co.uk for PyQt, and
http://pyside.github.io for PySide.
This class is based on the vtkGenericRenderWindowInteractor and is
therefore fairly powerful. It should also play nicely with the
vtk3DWidget code.
@vipulraikar
vipulraikar / bland_altman.py
Created March 10, 2020 13:43 — forked from simonkamronn/bland_altman.py
Bland-Altman plot in Bokeh with vertical histogram and normal fit on the right y-axis
from scipy.stats import norm, shapiro, kstest, anderson
import bokeh.plotting as bplt
from bokeh import layouts
from bokeh.charts import Histogram, Scatter
from bokeh.models import Span
import pandas as pd
import numpy as np
def vertical_histogram(y):

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@vipulraikar
vipulraikar / README.md
Created June 12, 2019 00:25 — forked from asimshankar/README.md
Training TensorFlow models in C

Training TensorFlow models in C

Python is the primary language in which TensorFlow models are typically developed and trained. TensorFlow does have bindings for other programming languages. These bindings have the low-level primitives that are required to build a more complete API, however, lack much of the higher-level API richness of the Python bindings, particularly for defining the model structure.

This gist demonstrates taking a model (a TensorFlow graph) created by a Python program and running the training loop in a C program.

The model

@vipulraikar
vipulraikar / example_trainer.cc
Created May 21, 2019 14:54 — forked from NobodyIsThere/example_trainer.cc
Load a TensorFlow graph in C++
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@vipulraikar
vipulraikar / mnist_tfdata.py
Created February 1, 2019 22:48 — forked from datlife/mnist_tfdata.py
Training Keras model with tf.data
"""An example of how to use tf.Dataset in Keras Model"""
import tensorflow as tf # only work from tensorflow==1.9.0-rc1 and after
_EPOCHS = 5
_NUM_CLASSES = 10
_BATCH_SIZE = 128
def training_pipeline():
# #############
# Load Dataset
@vipulraikar
vipulraikar / Keras.ipynb
Last active January 21, 2019 20:49 — forked from ravnoor/Keras.ipynb
V-Net in Keras and tensorflow
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.