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
ps -ef | grep tomcat | awk '{print $2}' | xargs kill -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
import hudson.model.* | |
disableChildren(Hudson.instance.items) | |
def disableChildren(items) { | |
for (item in items) { | |
if (item.class.canonicalName == 'com.cloudbees.hudson.plugins.folder.Folder') { | |
disableChildren(((com.cloudbees.hudson.plugins.folder.Folder) item).getItems()) | |
} else if (item.class.canonicalName != 'org.jenkinsci.plugins.workflow.job.WorkflowJob') { |
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
# ubuntu 14.01 comes with nginx I guess.For simple testing purposes I use apache2. | |
######################################################## | |
# Assumption | |
# - nginx & apache2 have already been installed on ubuntu 14.04 | |
# Goal |
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
#Importing Requests package | |
Pkg.add("Requests") | |
using Requests.get; | |
import JSON; | |
url = "http://query.yahooapis.com/v1/public/yql?q=select%20DaysRange%20from%20yahoo.finance.quotes%20where%20symbol%20in%20%28%22EBAY%22,%22GOOG%22%29%20&env=http://datatables.org/alltables.env&format=json"; | |
#Reads the data from HTTP URL | |
es = get(url); |
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
[ | |
{ | |
"id": "/jl2", | |
"cmd": "java -jar /usr/share/jenkins.war --httpPort=10002 ", | |
"cpus": 0.1, | |
"mem": 80, | |
"disk": 0, | |
"instances": 1, | |
"portDefinitions": [ | |
{ |
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
sudo apt-get update && sudo apt-get install -y bind9 iptraf linux-tools-common systemtag systemtap-sdt-dev sysdig lttng-tools nicstat dstat snmp lldpad |
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
//Start spark using https://github.com/databricks/spark-csv#spark-compiled-with-scala-211 | |
//$SPARK_HOME/bin/spark-shell --packages com.databricks:spark-csv_2.11:1.2.0 | |
import org.apache.spark.sql.SQLContext | |
val sqlContext = new SQLContext(sc) | |
//Download Google Stock info CSV from Quandl | |
val df = sqlContext.read.format("com.databricks.spark.csv").option("header", "true").load("YAHOO-GOOG.csv") | |
df.columns |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<style> | |
body { | |
margin: 0px; | |
padding: 0px; | |
} | |
</style> | |
</head> |
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
""" | |
Name: Shrivats | |
Bit Compression of ATGC | |
""" | |
bit_seq = 0 | |
input_seq = 'ATGC' | |
input_seq+='GTAC' | |
# input sequence |
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
def rot(x): | |
k = x[0:len(x)-1] | |
k = x[len(x)-1]+(k) | |
return k | |
x = "UnitedStatesOfAmerica" | |
k = x | |
rotations = [] | |
rotations.append(k) |
NewerOlder