- The paper describes an unsupervised approach to train a generic, distributed sentence encoder.
- It also describes a vocabulary expansion method to encode words not seen at training time.
- Link to the paper
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
| # See https://www.terraform.io | |
| # --- | |
| # Variables | |
| # --- | |
| # Deep Learning AMI https://aws.amazon.com/marketplace/pp/B077GCH38C | |
| variable "ami" { | |
| default = "ami-0656a055aec8320d6" | |
| } |
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
| #Proxy list graper | |
| # https://github.com/abdallahelsokary/Proxy-Collector-/blob/master/Proxy_Collector.py | |
| import urllib.request | |
| import urllib.error | |
| import time | |
| def proxy_list(): | |
| try: |
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
| class MyCallBack(Callback): | |
| def __init__(self, x_v, y_v): | |
| super(MyCallBack, self).__init__() | |
| self.x_v, self.y_v = x_v, y_v | |
| self.ps = [] | |
| def on_epoch_end(self, epoch, logs={}): | |
| p = self.model.predict(self.x_v).flatten() | |
| self.ps.append(p) | |
| logs['val_loss'] = log_loss(self.x_y, p) |
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 | |
| from tensorflow.python.client import timeline | |
| from keras import backend as K | |
| run_options = tf.RunOptions(trace_level=tf.RunOptions.FULL_TRACE) | |
| run_metadata = tf.RunMetadata() | |
| model = ... # A Keras model | |
| fn = K.function(model.inputs, model.outputs, options=run_options, run_metadata=run_metadata) |
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 aiohttp import web | |
| from threading import Thread | |
| import asyncio | |
| import time, uuid | |
| loop = asyncio.get_event_loop() | |
| def long_blocking_thing(sleep): | |
| time.sleep(sleep) | |
| return 42 |
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/sh | |
| # | |
| # sftpd wrapper script for executing pre/post session actions | |
| # | |
| # pre session actions and logging here | |
| SOURCE_IP=${SSH_CLIENT%% *} | |
| MSG_SESSION_START="user $LOGNAME session start from $SOURCE_IP" | |
| logger -p local5.notice -t sftpd-wrapper -i "$MSG_SESSION_START" |
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 | |
| # play YUV444 FULL HD file | |
| gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \ | |
| videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y444 ! \ | |
| videoconvert ! \ | |
| autovideosink | |
| # play YUV422 FULL HD file | |
| gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \ |
NewerOlder