This file contains 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
#================================= | |
# Sentence-level QE -- BiRNN model | |
#================================= | |
# | |
## Inputs: | |
# 1. Sentences in src language (shape: (mini_batch_size, line_words)) | |
# 2. Parallel machine-translated documents (shape: (mini_batch_size, line_words)) | |
# | |
## Output: | |
# 1. Sentence quality scores (shape: (mini_batch_size,)) |
This file contains 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
TypeScript 25 hrs 24 mins ████████████████▋░░░░ 79.7% | |
JavaScript 2 hrs 45 mins █▊░░░░░░░░░░░░░░░░░░░ 8.7% | |
Docker 1 hr 28 mins ▉░░░░░░░░░░░░░░░░░░░░ 4.6% | |
Markdown 36 mins ▍░░░░░░░░░░░░░░░░░░░░ 1.9% | |
Other 36 mins ▍░░░░░░░░░░░░░░░░░░░░ 1.9% |
This file contains 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
# Generates request data payload to be sent as 'form-data' | |
REQUEST_FORM_DATA_BOUNDARY = "REQUEST_FORM_DATA_BOUNDARY" | |
FORM_DATA_STARTING_PAYLOAD = '--{0}\r\nContent-Disposition: form-data; name=\\"'.format(REQUEST_FORM_DATA_BOUNDARY) | |
FORM_DATA_MIDDLE_PAYLOAD = '\"\r\n\r\n' | |
FORM_DATA_ENDING_PAYLOAD = '--{0}--'.format(REQUEST_FORM_DATA_BOUNDARY) | |
REQUEST_CUSTOM_HEADER = { | |
'content-type': "multipart/form-data; boundary={}".format(REQUEST_FORM_DATA_BOUNDARY), | |
'Content-Type': "", | |
'cache-control': "no-cache" |
This file contains 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 requests | |
from bs4 import BeautifulSoup | |
headers = { | |
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36' | |
} | |
login_data = { | |
'name': '<username>', | |
'pass': '<password>', |
This file contains 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 matplotlib.pyplot as plt | |
# Plot model history more easily | |
# when plotting, smooth out the points by some factor (0.5 = rough, 0.99 = smooth) | |
# method taken from `Deep Learning with Python` by François Chollet | |
def smooth_curve(points, factor=0.75): | |
smoothed_points = [] | |
for point in points: |
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 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 __future__ import print_function | |
import imageio | |
from PIL import Image | |
import numpy as np | |
import keras | |
from keras.layers import Input, Dense, Conv2D, MaxPooling2D, AveragePooling2D, ZeroPadding2D, Dropout, Flatten, Concatenate, Reshape, Activation | |
from keras.models import Model | |
from keras.regularizers import l2 | |
from keras.optimizers import SGD |
This file contains 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 | |
# Adicione um novo remote; pode chamá-lo de "upstream": | |
git remote add upstream https://github.com/usuario/projeto.git | |
# Obtenha todos os branches deste novo remote, | |
# como o upstream/master por exemplo: | |
git fetch upstream |