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 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 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
[ | |
{ | |
"id": "/jl2", | |
"cmd": "java -jar /usr/share/jenkins.war --httpPort=10002 ", | |
"cpus": 0.1, | |
"mem": 80, | |
"disk": 0, | |
"instances": 1, | |
"portDefinitions": [ | |
{ |
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
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 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
//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 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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<style> | |
body { | |
margin: 0px; | |
padding: 0px; | |
} | |
</style> | |
</head> |
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
""" | |
Name: Shrivats | |
Bit Compression of ATGC | |
""" | |
bit_seq = 0 | |
input_seq = 'ATGC' | |
input_seq+='GTAC' | |
# input sequence |
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
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) |
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
var request = require('request'); | |
for(var i = 0; i <= 5000; i++) { | |
setTimeout( | |
function(){ | |
request.post( | |
'http://127.0.0.1:2379/v2/keys/k'+i, | |
{ form: { value: 'load' } }, | |
function (error, response, body) { | |
if (!error | |
&& response.statusCode == 201 |
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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"io/ioutil" | |
"bytes" | |
"strconv" | |
"math/rand" | |
) |
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
#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); |
NewerOlder