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
| """Script to illustrate usage of tf.estimator.Estimator in TF v1.3""" | |
| import tensorflow as tf | |
| from tensorflow.examples.tutorials.mnist import input_data as mnist_data | |
| from tensorflow.contrib import slim | |
| from tensorflow.contrib.learn import ModeKeys | |
| from tensorflow.contrib.learn import learn_runner | |
| # Show debugging output |
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
| http://nadbordrozd.github.io/blog/2016/05/20/text-classification-with-word2vec/ | |
| https://blog.keras.io/using-pre-trained-word-embeddings-in-a-keras-model.html | |
| https://stackoverflow.com/questions/31321209/doc2vec-how-to-get-document-vectors | |
| http://linanqiu.github.io/2015/10/07/word2vec-sentiment/ |
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
| http://nadbordrozd.github.io/blog/2016/05/20/text-classification-with-word2vec/ | |
| https://blog.keras.io/using-pre-trained-word-embeddings-in-a-keras-model.html | |
| https://stackoverflow.com/questions/31321209/doc2vec-how-to-get-document-vectors | |
| http://linanqiu.github.io/2015/10/07/word2vec-sentiment/ | |
| https://rare-technologies.com/doc2vec-tutorial/ | |
| https://radimrehurek.com/gensim/models/doc2vec.html#gensim.models.doc2vec.TaggedDocument | |
| https://www.kaggle.com/tj2552/sentiment-classification-in-5-classes-doc2vec | |
| https://github.com/ibrahimsharaf/Doc2vec |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 pyspark.sql.functions import col | |
| from pyspark.sql.functions import sum as spark_sum | |
| def count_null(col_name): | |
| return spark_sum(col(col_name).isNull().cast('integer')).alias(col_name) | |
| # Build up a list of column expressions, one per column. |
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 PIL import Image, ImageDraw, ImageFont | |
| import sys | |
| ShowText = sys.argv[1] | |
| font = ImageFont.truetype('arialbd.ttf', 15) #load the font | |
| size = font.getsize(ShowText) #calc the size of text in pixels | |
| image = Image.new('1', size, 1) #create a b/w image | |
| draw = ImageDraw.Draw(image) | |
| draw.text((0, 0), ShowText, font=font) #render the text to the bitmap |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.