sudo yum install git
yum install java-1.7.0-openjdk
mkdir bin
| ;;https://github.com/cognitect-labs/aws-api | |
| (require '[cognitect.aws.client.api :as aws]) | |
| (def ses (aws/client {:api :email})) | |
| (aws/ops ses) | |
| (keys (aws/ops ses)) | |
| (aws/doc ses :SendEmail) |
| ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i "<.m3u8 file URL>" -c copy <file_name>.mp4 |
| response = $.getJSON("/pcr.json"); | |
| data = JSON.parse(response.responseText); | |
| newData = {"Printer":{}, "Cutter": {}, "Router": []} | |
| $(data).each( function() { | |
| obj = this; | |
| if (obj.type == "Router") { | |
| newData[obj.type].push(obj.make); | |
| } else { | |
| if (!newData[obj.type][obj.make]) { |
| from __future__ import division | |
| import numpy | |
| import shlex | |
| from uuid import uuid1 | |
| class d3object: | |
| def __init__(self, | |
| height=100, | |
| width=100, | |
| topHtml='', | |
| bottomHtml='', |
| class SimpleLinearRegression | |
| def initialize(xs, ys) | |
| @xs, @ys = xs, ys | |
| if @xs.length != @ys.length | |
| raise "Unbalanced data. xs need to be same length as ys" | |
| end | |
| end | |
| def y_intercept | |
| mean(@ys) - (slope * mean(@xs)) |
| #!/usr/bin/env ruby | |
| input = ARGV[0] | |
| a = input.count('A'); | |
| c = input.count('C'); | |
| g = input.count('G'); | |
| u = input.count('U') | |
| p "#{a} #{c} #{g} #{u}" |
| #!/usr/bin/env ruby | |
| contents = File.read('1.dataset') | |
| A = contents.gsub(/[CcGgTt]/,'') | |
| C = contents.gsub(/[AaGgTt]/,'') | |
| G = contents.gsub(/[AaCcTt]/,'') | |
| T = contents.gsub(/[AaCcGg]/,'') | |
| puts "#{A.length} #{C.length} #{G.length} #{T.length}" |
| // | |
| // Example usage: phantomjs screenshot.js http://yahoo.com /tmp/yahoo.png | |
| // | |
| var system = require('system'); | |
| var url = system.args[1]; | |
| var filename = system.args[2]; | |
| var page = new WebPage(); | |
| page.open(url, function (status) { |