##QUERY (PostgreSQL 9.4)
WITH RECURSIVE t(n) AS (
VALUES(1337)
UNION ALL
SELECT CASE WHEN n%2=0 THEN n/2 ELSE 3*n+1 END FROM t WHERE n > 1)
SELECT * FROM t| /* | |
| This is a smaller variant of the new Lato2, serving compressed woff2 files. | |
| Currently: TS-Only | |
| Clients needs to have Lato2 pref turned ON. | |
| The payload is 50% smaller. However, woff2 is not yet well supported, | |
| so we're still providing the woff as fallback. |
| # tidy up the ~/Downloads directory | |
| cd C:\Users\me\Downloads | |
| $week_ago = (Get-Date).AddDays(-7) | |
| dir | Select-Object { | |
| $last_access = $_.lastAccessTime | |
| if ($last_access -lt $week_ago) { | |
| $path = "{0:yyyyMM}" -f $last_access | |
| if (! (Test-Path $path)) { mkdir $path } | |
| if ($_.FullName -notmatch "^20\d\d\d\d") { mv $_.FullName $path } |
| 2016-08-11 00:07:24 -0700 [error]: unexpected error error_class=Errno::EINVAL error="Invalid argument - recvmsg(2)" | |
| 2016-08-11 00:07:24 -0700 [error]: /home/kiyoto/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/serverengine-1.6.4/lib/serverengine/socket_manager_unix.rb:30:in `recv_io' | |
| 2016-08-11 00:07:24 -0700 [error]: /home/kiyoto/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/serverengine-1.6.4/lib/serverengine/socket_manager_unix.rb:30:in `recv_tcp' | |
| 2016-08-11 00:07:24 -0700 [error]: /home/kiyoto/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/serverengine-1.6.4/lib/serverengine/socket_manager.rb:37:in `listen_tcp' | |
| 2016-08-11 00:07:24 -0700 [error]: /home/kiyoto/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/fluentd-0.14.2/lib/fluent/plugin/in_forward.rb:100:in `listen' | |
| 2016-08-11 00:07:24 -0700 [error]: /home/kiyoto/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/fluentd-0.14.2/lib/fluent/plugin/in_forward.rb:68:in `start' | |
| 2016-08-11 00:07:24 -0700 [error]: /home/kiyoto/.rbenv/versions/2.3.1/lib |
##QUERY (PostgreSQL 9.4)
WITH RECURSIVE t(n) AS (
VALUES(1337)
UNION ALL
SELECT CASE WHEN n%2=0 THEN n/2 ELSE 3*n+1 END FROM t WHERE n > 1)
SELECT * FROM t| // Intimate Merger | |
| !function(a,b,c,d){if(!b[a]){b[a]=function(){b[a].instances.push(this),this.init&&this.init()},b[a].instances=[];for(var e=0,f=["td_send","td_send_imid"];e<f.length;e++)b[a].prototype[f[e]]=function(a){return function(){this["tmp_"+a]=this["tmp_"+a]||[],this["tmp_"+a].push(Array.prototype.slice.call(arguments))}}(f[e]);var g=c.getElementsByTagName(d)[0],h=c.createElement(d);h.async=!0,h.src="//cf.im-apps.net/sdk/tdim-1.1.0.min.js",g.parentNode.insertBefore(h,g)}}("TDIM",window,document,"script"); | |
| !function(t,e){if(void 0===e[t]){e[t]=function(){e[t].clients.push(this),this._init=[Array.prototype.slice.call(arguments)]},e[t].clients=[];for(var r=function(t){return function(){return this["_"+t]=this["_"+t]||[],this["_"+t].push(Array.prototype.slice.call(arguments)),this}},n=["addRecord","set","trackEvent","trackPageview","ready"],s=0;s<n.length;s++){var i=n[s];e[t].prototype[i]=r(i)}var a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src=("https:"===document.locatio |
| // See https://developers.google.com/analytics/devguides/reporting/core/v3/reference for how Core Reporting API works | |
| // TODO: Filter by user segment, etc. | |
| INPUTS = { | |
| groupBy: ['country'], | |
| metrics:['visits'], | |
| sortBy:['visits'], | |
| profileId: 'YOUR_GA_PROFILE_ID', | |
| databaseName: 'google_analytics', | |
| tableName: 'sample_report', | |
| tdAPIKey: 'YOUR_TD_API_KEY' |
| CONSTANTS = { | |
| tdAPIKey: 'YOUR_TD_API_KEY_HERE', | |
| databaseName: 'adwords_reports', | |
| tableName: 'sample_report', | |
| timeColName: "Date", | |
| timeLowerBound: Date.parse(new Date())/1000 - 7*86400, | |
| timeUpperBound: Date.parse(new Date())/1000 + 3*86400 | |
| } | |
| function validateDateColumn(o) { |
| CONSTANTS = { | |
| maxColumns: 1000, | |
| rowsPerRead: 200, | |
| maxRows: 100000, | |
| tdAPIKey: 'YOUR_API_KEY', | |
| databaseName: undefined, | |
| tableName: undefined, | |
| timeColName: "time", | |
| timeLowerBound: Date.parse(new Date())/1000 - 7*86400, | |
| timeUpperBound: Date.parse(new Date())/1000 + 3*86400 |
| "","avg_points","num_reviews","time","date","title","location","category" | |
| "1",4,1,"10:40a","02/20/2015","The IoT P2P Backbone","LL21 E/F","Machine Data / IoT" | |
| "2",4.4,10,"11:30a","02/19/2015","Unboxing Data Startups","LL20 BC","Business & Industry" | |
| "3",3.57,7,"11:30a","02/20/2015","The Sushi Principle: Raw Data Is Better","LL21 E/F","Machine Data / IoT" | |
| "4",4,1,"2:20p","02/20/2015","Streaming Analytics: It's Not The Same Game","LL21 E/F","Machine Data / IoT" | |
| "5",3.25,16,"1:30p","02/18/2015","Building A Data Platform","210 C/G","Hadoop Platform" | |
| "6",NA,0,"11:30a","02/20/2015","Silicon Valley Data Science: Ask Us Anything","211 B","Ask Us Anything" | |
| "7",4,1,"10:40a","02/20/2015","Credit Suisse Puts Vendors in the Hot Seat on Data Quality and Governance","230 B","Sponsored" | |
| "8",4.86,7,"9:00a","02/18/2015","Hardcore Data Science","LL20 BC","Hardcore Data Science" | |
| "9",4,6,"1:30p","02/18/2015","Tensor Methods for Large-scale Unsupervised Learning: Applications to Topic and Community Modeling","LL20 BC.","Hardcore D |
| library(ggplot2) | |
| library(dplyr) | |
| library(scrapeR) | |
| strata_speakers <- "http://strataconf.com/big-data-conference-ca-2015/public/schedule/speakers" | |
| speaker_page <- | |
| scrape(url=strata_speakers, | |
| parse=T, headers=T) | |
| href <- xpathSApply(speaker_page[[strata_speakers]], "//a/@href") | |
| href <- unique(href) |