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 | |
#################################################################################################################### | |
# | |
# 说明: | |
# 无论单机版本还是分布式版本,请使用本脚本启动您的程序。本脚本默认项目具有一个run.py的主入口。 | |
# 脚本通过用户输入的参数确认执行本地版还是AFO版本。脚本默认从conf文件夹内加载配置。 | |
# * 对于local(默认)模式,从local_settings中以及hyper_params文件夹中抽取程序运行参数,抽取后输送给run.py执行 | |
# * 对于afo模式,加载afo_settings.xml文件,并将hyper_params中指定的超参配置添加入afo_settings.xml,传递给 | |
# afo进行执行 |
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 Bazel < Formula | |
desc "Google's own build tool" | |
homepage "https://bazel.build/" | |
url "https://github.com/bazelbuild/bazel/releases/download/0.15.0/bazel-0.15.0-dist.zip" | |
sha256 "c3b716e6625e6b8c323350c95cd3ae0f56aeb00458dddd10544d5bead8a7b602" | |
depends_on :java => "1.8" | |
depends_on :macos => :yosemite | |
def install |
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 | |
ts=$(date +"%s") | |
jvmPid=$1 | |
defaultLines=100 | |
defaultTop=20 | |
threadStackLines=${2:-$defaultLines} | |
topThreads=${3:-$defaultTop} | |
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 | |
# this script installs GCC 4.9.3 | |
# to use it navigate to your home directory and type: | |
# sh install-gcc-4.9.3.sh | |
# download and install gcc 4.9.3 | |
wget https://ftp.gnu.org/gnu/gcc/gcc-4.9.3/gcc-4.9.3.tar.gz | |
tar xzf gcc-4.9.3.tar.gz | |
cd gcc-4.9.3 |
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 akka.actor.Actor; | |
import akka.actor.IndirectActorProducer; | |
import org.springframework.context.ApplicationContext; | |
/** | |
* An actor producer that lets Spring create the Actor instances. | |
*/ | |
public class SpringActorProducer implements IndirectActorProducer { | |
final ApplicationContext applicationContext; | |
final String actorBeanName; |
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 akka.actor.AbstractExtensionId; | |
import akka.actor.ExtendedActorSystem; | |
import akka.actor.Extension; | |
import akka.actor.Props; | |
import akka.routing.FromConfig; | |
import org.springframework.context.ApplicationContext; | |
/** | |
* An Akka Extension to provide access to Spring managed Actor Beans. | |
*/ |
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 正在进行的进程 | |
show processlist; | |
mysqladmin processlist -h 10.4.243.25 -P 6002 -uq3boy -p123 | |
# transcation 部分可以看到那个 thread 给 lock 了,然后杀掉解锁 | |
SHOW ENGINE INNODB STATUS \G; | |
#杀掉 mysql 任务 | |
kill id |
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
<settings> | |
<profiles> | |
<profile> | |
<id>nexus</id> | |
<repositories> | |
<repository> | |
<id>local-repository</id> | |
<name>local private repository</name> | |
<url>http://10.64.12.230:8081/nexus/content/groups/public</url> | |
<releases> |
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 bash | |
# Start all hadoop daemons. Run this on master node. | |
bin=`dirname "${BASH_SOURCE-$0}"` | |
bin=`cd "$bin"; pwd` | |
rm_logfile_name=yarn-yarn-resourcemanager-`hostname`.log | |
nm_logfile_name=yarn-yarn-nodemanager-`hostname`.log | |
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 subprocess | |
import pycurl | |
import time | |
from urllib import urlencode | |
from StringIO import StringIO | |
import re | |
from io import BytesIO | |
def refreshIP(): | |
print "Refreshing IP..." |
NewerOlder