Skip to content

Instantly share code, notes, and snippets.

Alex Rothberg cancan101

Block or report user

Report or block cancan101

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View bnns_issue.c
#include <Accelerate/Accelerate.h>
#include <stdio.h>
#include <sys/time.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, const char * argv[])
{
// Description of the input image stack
View decode_signature.py
sess, meta_graph_def = session_bundle.load_session_bundle_from_path(input)
signatures_any = sess.graph.get_collection(constants.SIGNATURES_KEY)
signatures = manifest_pb2.Signatures()
signatures_any[0].Unpack(signatures)
inputs = signatures.named_signatures['inputs'].generic_signature
input_name = inputs.map['images'].tensor_name
View dicomParser.js
/*! dicom-parser - v1.5.0 - 2016-05-08 | (c) 2014 Chris Hafey | https://github.com/chafey/dicomParser */
(function (root, factory) {
// node.js
if (typeof module !== 'undefined' && module.exports) {
module.exports = factory();
}
else if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([], factory);
View keras-issue.py
from keras.models import Sequential
from keras.layers import Dense, Activation, Flatten
from keras.layers import Convolution2D, MaxPooling2D
from keras.optimizers import Adamax
import numpy as np
from keras.preprocessing.image import ImageDataGenerator
def main():
@cancan101
cancan101 / install-tensorflow.sh
Created Feb 3, 2016 — forked from erikbern/install-tensorflow.sh
Installing TensorFlow on EC2
View install-tensorflow.sh
# Note – this is not a bash script (some of the steps require reboot)
# I named it .sh just so Github does correct syntax highlighting.
#
# This is also available as an AMI in us-east-1 (virginia): ami-cf5028a5
#
# The CUDA part is mostly based on this excellent blog post:
# http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/
# Install various packages
sudo apt-get update
View slow.py
#!/bin/sh
"exec" "python" "-u" "--" "$0" "$@"
import os
import sys
import time
class ForceIOStream:
View broken-enum.json
{
"swaggerVersion": "1.2",
"apis": [
{
"operations": [
{
"parameters": [
{
@cancan101
cancan101 / $ref-issue.json
Created May 11, 2015
Issue with $ref in Swagger 1.2
View $ref-issue.json
{
"swaggerVersion": "1.2",
"apis": [
{
"operations": [
{
"parameters": [
{
View sqlite-issue-unique.py
import sqlite3
import threading
db = sqlite3.connect(":memory:", check_same_thread=False)
CREATE_NON_LINKED_TABLE = 'CREATE TABLE IF NOT EXISTS %s (id INTEGER PRIMARY KEY AUTOINCREMENT, original, cleaned, UNIQUE(original))'
CREATE_LINKED_TABLE = 'CREATE TABLE IF NOT EXISTS %s (id INTEGER PRIMARY KEY AUTOINCREMENT, original, cleaned, study INTEGER, UNIQUE(original, study), FOREIGN KEY(study) REFERENCES studyinstanceuid(id))'
db.isolation_level = None
db.execute(CREATE_NON_LINKED_TABLE % 'studyinstanceuid')
db.execute(CREATE_LINKED_TABLE % 'patientsname')
View travis.yml
sudo: true
language: python
cache:
directories:
- $HOME/.cache/pip
python:
- '2.7'
env:
- SERVICE=s1
- SERVICE=s2
You can’t perform that action at this time.