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
# eth0 is public network interface | |
iptables -P INPUT ACCEPT | |
iptables -P OUTPUT ACCEPT | |
# Allow connection RELATED,ESTABLISHED on eth0 | |
iptables -t filter -A INPUT -i eth0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT | |
# Prevent DOCKER chain | |
iptables -t nat -I PREROUTING -m addrtype --dst-type LOCAL -j RETURN |
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 torch | |
import torch.nn as nn | |
from torch.nn import Parameter | |
import math | |
import torch.nn.functional as F | |
class Scale(nn.Module): | |
def __init__(self, channels): | |
super(Scale, self).__init__() |
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
ffmpeg -f video4linux2 -input_format mjpeg -s 1280x720 -i /dev/video0 \ | |
-vf "drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf: \ | |
text=\'%{pts\:gmtime\:0\:%M\\\:%S}\': [email protected]: x=7: y=7: fontsize=24" -vcodec libx264 \ | |
-preset veryfast -f mp4 -pix_fmt yuv420p -y output.mp4 |
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
worker_processes auto; #should be 1 for Windows, for it doesn't support Unix domain socket | |
worker_rlimit_nofile 100000; | |
error_log logs/error.log error; | |
#if the module is compiled as a dynamic module and features relevant | |
#to RTMP are needed, the command below MUST be specified and MUST be | |
#located before events directive, otherwise the module won't be loaded |
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
(dev3) ❯ python synthesis.py --hparams="builder=deepvoice3,preset=deepvoice3_ljspeech" checkpoints_deepvoice3/checkpoint_step000390000.pth test.txt samples | |
Command line args: | |
{'--checkpoint-postnet': None, | |
'--checkpoint-seq2seq': None, | |
'--file-name-suffix': '', | |
'--help': False, | |
'--hparams': 'builder=deepvoice3,preset=deepvoice3_ljspeech', | |
'--max-decoder-steps': '500', | |
'--output-html': False, | |
'--replace_pronunciation_prob': '0.0', |
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
# -------------------------------------------------------- | |
# Fast R-CNN | |
# Copyright (c) 2015 Microsoft | |
# Licensed under The MIT License [see LICENSE for details] | |
# Written by Ross Girshick | |
# -------------------------------------------------------- | |
import os | |
from os.path import join as pjoin | |
import numpy as np |
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 python | |
# -*- coding: utf-8 -*- | |
# vim:fenc=utf-8 | |
# | |
# Copyright © 2017 zc <zc@www> | |
# | |
# Distributed under terms of the MIT license. | |
""" | |
Service registrator agent |
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 com.soundcloud.prometheus.hystrix.HystrixPrometheusMetricsPublisher; | |
import com.vcc.bigdata.micro.cmd.FailCommand; | |
import io.vertx.circuitbreaker.CircuitBreaker; | |
import io.vertx.circuitbreaker.CircuitBreakerOptions; | |
import io.vertx.circuitbreaker.HystrixMetricHandler; | |
import io.vertx.core.AbstractVerticle; | |
import io.vertx.core.http.HttpServer; | |
import io.vertx.core.http.HttpServerOptions; | |
import io.vertx.ext.web.Router; |
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
curl -L "https://github.com/docker/compose/releases/download/1.11.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose |
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 | |
sudo apt-get update | |
sudo apt-get install -y \ | |
linux-image-extra-$(uname -r) \ | |
linux-image-extra-virtual | |
sudo apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ |
NewerOlder