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
PROBLEM=encoder_character_stressor | |
MODEL=transformer_encoder | |
HPARAMS=transformer_base | |
DATA_DIR=$HOME/t2t_data | |
TMP_DIR=/tmp/t2t_datagen | |
TRAIN_DIR=$HOME/t2t_train/$PROBLEM/$MODEL-$HPARAMS | |
BATCH_SIZE=2048 | |
WORKER_GPU=2 | |
TRAIN_STEPS=500000 | |
USR_DIR=. |
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
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 json import load | |
class Number: | |
NAME = 0 | |
TEN_POWER_NAME = 1 | |
def get_number_name(value, number_filename, lang=None, form=None, ten_pow_system=None): | |
num_names = [] | |
with open(number_filename, 'r', encoding='utf-8') as fp: |
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 cv2 | |
import numpy as np | |
img0 = cv2.imread(r'in1.jpg', 0) | |
img1 = cv2.imread(r'in2.jpg', 0) | |
np_subtr = np.subtract(img0, img1) | |
np_mean = np.mean(np_subtr) | |
np_double_mean = np.mean(np_subtr) |
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 ftplib import FTP, FTP_TLS, error_perm | |
def cwd(ftp, path, ret=False): | |
def mkd_cwd(ftp, path): | |
if path != '': | |
try: | |
ftp.cwd(path) | |
except error_perm: | |
mkd_cwd(ftp, '/'.join(path.split('/')[:-1])) | |
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
mysql: | |
image: mysql:latest | |
volumes: | |
- /data/mysql:/var/lib/mysql | |
environment: | |
- MYSQL_ALLOW_EMPTY_PASSWORD=yes | |
rabbitmq: | |
image: rabbitmq:latest | |
phantomjs: | |
image: binux/pyspider:latest |
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
# coding=utf-8 | |
# Copyright 2019 The Tensor2Tensor Authors. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
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
using SDL2; | |
using System; | |
using System.ComponentModel; | |
using System.Runtime.InteropServices; | |
using System.Windows.Forms; | |
namespace DesktopApp1 | |
{ | |
class SDL2Panel : Panel | |
{ |
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
#!/usr/bin/env python3 | |
from http.server import BaseHTTPRequestHandler, HTTPServer | |
import logging | |
from urllib.parse import parse_qsl | |
from elasticsearch import Elasticsearch | |
form = ''' | |
<form method="post" action="."> | |
<input type="text" name="query" value="%s"> | |
<input type="submit" value="Submit"> |
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
libavfilter/avfilter.c | 5 +++++ | |
libavfilter/avfilter.h | 3 +++ | |
libavfilter/formats.c | 14 ++++++++++++-- | |
libavfilter/formats.h | 6 ++++++ | |
libavfilter/video.c | 5 +++++ | |
libavfilter/video.h | 1 + | |
6 files changed, 32 insertions(+), 2 deletions(-) | |
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c | |
index baafd029e9..03e8f3f674 100644 |