The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.
Add _site to .gitignore. The generated site should not be uploaded to Github since its gets generated by github.
| import time | |
| import urllib2 | |
| import json | |
| from cartodb import CartoDBAPIKey, CartoDBException | |
| from secret import API_KEY | |
| URL = 'http://services.redbullstratos.com/LiveData/Get' | |
| cl = CartoDBAPIKey(API_KEY, 'javi') |
| //Furthest distance travelled from start point. // http://javi.cartodb.com/api/v2/sql?q= | |
| WITH points AS | |
| (SELECT | |
| (SELECT (the_geom) FROM stratos ORDER BY id ASC LIMIT 1) as p1, | |
| (SELECT (the_geom) FROM stratos | |
| WHERE ST_x(the_geom)<180 AND ST_x(the_geom)>-180 AND ST_x(the_geom)<>0 | |
| AND ST_x(the_geom)<>0 ORDER BY ST_Distance(the_geom,(SELECT the_geom | |
| FROM stratos ORDER BY id ASC LIMIT 1)) DESC LIMIT 1) as p2 | |
| ) | |
| SELECT ST_distance(p1::geography,p2::geography) as furthest_distance FROM points |
| Predictive Modeling: Drug Response in Cancer Cell Lines | |
| ======================================================= | |
| This is a demo of **Knitr**, an R package for authoring executable documents, documents that mix formatted text, source code and graphical output. I've used In Sock's demos of drug response in [CCLE][1] data, but I've probably gotten most of the analysis mixed up. Apologies to In Sock. | |
| Analysis of cancer cell lines for drug sensitity using: | |
| * [Cancer Cell Line Encyclopedia][1] | |
| * [Gene Set Enrichment Analysis][2] | |
| Workflow |
| function main() { | |
| var map = L.map('map').setView([0, 0], 3); | |
| L.tileLayer('http://a.tile.stamen.com/toner/{z}/{x}/{y}.png', { | |
| attribution: 'stamen' | |
| }).addTo(map); | |
| cartodb.loadLayer(map, { | |
| user: 'development', |
| // Set the CartoDB user account | |
| var CartoDB = Backbone.CartoDB({ | |
| user: viz2 | |
| }); | |
| // Create a model, here directly from SQL | |
| // You can also do it with simply a table name and list of columns | |
| var parksModel = CartoDB.CartoDBCollection.extend({ | |
| sql: "SELECT name FROM nyc_parks ORDER BY ST_Area(the_geom) DESC LIMIT 10" | |
| }); |
| <?php | |
| /** | |
| * | |
| * SEO report for different metrics | |
| * | |
| * @category SEO | |
| * @author Chema <[email protected]> | |
| * @copyright (c) 2009-2012 Open Classifieds Team | |
| * @license GPL v3 | |
| * Based on seo report script http://www.phpeasycode.com && PHP class SEOstats |
| using System; | |
| using PlainElastic.Net; | |
| using PlainElastic.Net.Queries; | |
| using PlainElastic.Net.Serialization; | |
| using PlainElastic.Net.Utils; | |
| namespace FacetQuerySample | |
| { | |
| class Item |
| var geojson = L.geoJson(data, { | |
| // style for all vector layers (color, opacity, etc.), either function or object (optional) | |
| style: function (feature) { | |
| return feature.properties && feature.properties.style; | |
| }, | |
| // function for creating layers for GeoJSON point features (optional) | |
| pointToLayer: function (feature, latlng) { | |
| return L.marker(latlng, { |
The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.
Add _site to .gitignore. The generated site should not be uploaded to Github since its gets generated by github.
| # Applies Q.nbind to all redis operations and returns a wrapped client | |
| _ = require("underscore")._ | |
| Q = require "q" | |
| nbindOps = (client) -> | |
| functions = _.functions client | |
| # All the ops are available as upper/lowercase functions, I exploit this | |
| # to filter out the Redis operations from the other functions of the client | |
| # |