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 matplotlib import pyplot as plt | |
| import numpy as np | |
| def show_many(images, max_rows, max_cols, figsize=(20, 20), titles = None, titles_hspace=.1, plot_title = None): | |
| fig = plt.figure(figsize=figsize, dpi=300) | |
| for idx, image in enumerate(images): | |
| row = idx // max_cols | |
| col = idx % max_cols |
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 tensorflow.keras.preprocessing.sequence import pad_sequences | |
| from tensorflow.keras.preprocessing.text import hashing_trick | |
| def preprocessing(questions, questions_max_length, vocabulary_size): | |
| """ | |
| Stateless preprocessing the text questions to a one-hot encoding and pads to max length questions. | |
| The one-hot encodings max value is the vocabulary size. | |
| The padding is attached at the end of each question up to the maximal question length. | |
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(org.apache.commons.lang3.builder.EqualsBuilder, | |
| org.apache.commons.lang3.builder.HashCodeBuilder, | |
| org.apache.commons.lang3.builder.ToStringBuilder, | |
| org.apache.commons.lang3.builder.ToStringStyle)} | |
| @Override | |
| public boolean equals(Object aObj) { | |
| if(!(aObj instanceof ${enclosing_type})) { | |
| return false; | |
| } |
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 test_connected_models(self): | |
| input1 = Input(shape=(100,)) | |
| dense1 = Dense(1)(input1) | |
| model1 = Model(input1, dense1) | |
| input2 = Input(shape=(200,)) | |
| dense2 = Dense(2)(input2) | |
| model2 = Model(input2, dense2) | |
| # This will work, because there are no intermediate Inputs. |
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
| package de.phisad.mybudget.views.budgetplan; | |
| import javax.faces.application.FacesMessage; | |
| import javax.faces.context.FacesContext; | |
| public class Tab { | |
| private String name; | |
| public Tab(String name) { |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="refresh" content="0; URL=landing_page.xhtml" ></meta> | |
| </head> | |
| <body> | |
| </body> | |
| </html> |
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 os | |
| import tensorflow as tf; | |
| # Just disables the warning, doesn't enable AVX/FMA | |
| os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' | |
| def main(): | |
| tf.enable_eager_execution(); | |
| result = tf.reduce_sum(tf.random_normal([1000,1000])) | |
| print(result) |