Most (or all) of these methods make use of ANSI escape sequences.
For example, using a dictionary:
ansi = {'underline': '\033[4m', 'bold': '\033[1m', 'end':'\033[0m'}
print '{[bold]}Hello World{[end]}'.format(ansi, ansi)
This document will walk you through compiling your own scientific python distribution from source,
without sudo
, on a linux machine. The core numpy
and scipy
libraries will be linked against
Intel MKL for maximum performance.
This procedure has been tested with Rocks Cluster Linux 6.0 (Mamba) and CentOS 6.3.
If native libraries are not available the following message is displayed with every hadoop command: hadoop checknative
WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Clone hadoop source code
Friend: I tried looking at static linking in Mac OS X and it seems nearly impossible. Take a look at this http://stackoverflow.com/a/3801032
Me: I have no idea what that
-static
flag does, but I'm pretty sure that's not how you link to a library. Let me RTFM a bit.
Minutes later...
def dot_product(x, kernel): | |
""" | |
Wrapper for dot product operation, in order to be compatible with both | |
Theano and Tensorflow | |
Args: | |
x (): input | |
kernel (): weights | |
Returns: | |
""" | |
if K.backend() == 'tensorflow': |
import numpy as np | |
from tensorflow import keras | |
import traceback | |
class ResidualBlock(keras.layers.Layer): | |
def __init__(self, n_layers, n_neurons, **kwargs): | |
super().__init__(**kwargs) | |
self.n_layers = n_layers | |
self.n_neurons = n_neurons | |
self.hidden = [keras.layers.Dense(n_neurons, activation="elu", |