This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# "Check if docker is installed..." | |
if ! command -v docker &> /dev/null; then | |
# Add Docker's official GPG key: | |
sudo apt-get update | |
sudo apt-get -y install ca-certificates curl | |
sudo install -m 0755 -d /etc/apt/keyrings | |
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc | |
sudo chmod a+r /etc/apt/keyrings/docker.asc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { api } from 'dicomweb-client'; // see: https://www.npmjs.com/package/dicomweb-client | |
const c = { | |
name: 'aws', | |
wadoUriRoot: 'https://.../dicomweb', | |
qidoRoot: 'https://.../dicomweb', | |
wadoRoot: 'https://.../dicomweb', | |
qidoSupportsIncludeField: false, | |
supportsReject: false, | |
imageRendering: 'wadors', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import partial | |
# Try to code partial from scratch! (hint, use *args and **kwargs as parameter catch alls) | |
def function_with_several_params(a='None', b='None'): | |
print(a, b) | |
tmp = partial(function_with_several_params, a='hello') | |
tmp(b='goodbye') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def partial(fn, *fargs, **fkwargs): | |
def wrapper_fn(*args, **kwargs): | |
return fn(*fargs, *args, **fkwargs, **kwargs) | |
return wrapper_fn | |
def function_with_several_params(a='None', b='None'): | |
print(a, b) | |
tmp_fn = partial(function_with_several_params, a='hello') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""TODO(isic): Add a description here.""" | |
from __future__ import absolute_import | |
from __future__ import division | |
from __future__ import print_function | |
import tensorflow_datasets as tfds | |
# TODO(isic): BibTeX citation | |
_CITATION = """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
g1 = tf.Graph() | |
with g1.as_default(): | |
v = tf.get_variable(name="v", shape=(), initializer=tf.glorot_uniform_initializer()) | |
saver = tf.train.Saver() | |
sess = tf.Session(graph=g1); | |
saver.restore(sess, "/tmp/model.ckpt") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
g1 = tf.Graph() | |
with g1.as_default(): | |
v = tf.get_variable(name="v", shape=(), initializer=tf.glorot_uniform_initializer()) | |
saver = tf.train.Saver() | |
sess = tf.Session(graph=g1); | |
sess.run(v.initializer) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
g1 = tf.Graph() | |
with g1.as_default(): | |
v = tf.get_variable(name="v", shape=(), initializer=tf.zeros_initializer()) | |
sess = tf.Session(graph=g1); | |
sess.run(v.initializer) | |
# sess.run(tf.global_variables_initializer()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
g1 = tf.Graph() | |
with g1.as_default(): | |
# Add a single variable to our graph | |
v = tf.get_variable(name="v", shape=(), initializer=tf.glorot_uniform_initializer()) | |
sess = tf.Session(graph=g1) | |
sess.run(v.initializer) # Run just the initializer on our variable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
g1 = tf.Graph() | |
with g1.as_default(): | |
my_input = tf.constant([-1,0,1], dtype=tf.float16, name="input") | |
my_printed_input = tf.Print(my_input, [], message="Running the graph", name="print") | |
a = tf.square(my_printed_input, name="A") | |
b = tf.cos(a, name="B") | |
c = tf.sin(a, name="C") |
NewerOlder