http://example.com
http://example.com
import turtle | |
screen = turtle.Screen() | |
screen.setup(800,600) | |
circle = turtle.Turtle() | |
circle.shape('circle') | |
circle.color('red') | |
circle.speed('fastest') | |
circle.up() |
http://example.com
http://example.com
#' GGPLOT2 FUNCTIONALITY FOR MAPPING TO HEXAGON SIZE AND COLOUR AESTHETICS | |
#' by Robin Edwards, 2013 (geotheory.co.uk, @geotheory) | |
#' This has been adapted from the ggplot bin_hex.R script that underpins geom_hex, etc | |
#' (see https://github.com/hadley/densityvis/blob/master/R/bin-hex.r). | |
#' | |
#' These functions implement aesthetic mapping to hexagon size (area), in addition to the existing | |
#' colour-mapping functionality. The key change is the addition of a new fourth variable (var4) | |
#' to hex_bin(), which complements the inbuilt hexagon binning functionality. The 'frequency.to.area' | |
#' argument enables the default mappings of binned data to colour and var4 to size to be interchanged. | |
#' The hmin/hmax arguments [0,1] set area mapping constraints (hmax can exceed 1). |
var landGrid = [ | |
{ | |
"X": "1", | |
"Y": "1" | |
}, | |
{ | |
"X": "1", | |
"Y": "2" | |
}, | |
{ |
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
$(document).ready(function(){ | |
if (document.location.pathname.match(/\/notifications$/)) { | |
var array = [ | |
"adventure-cat", | |
"agendacat", | |
"andycat", | |
"baracktocat", | |
"bear-cavalry", |
import rpy2.robjects as robjects | |
import pandas.rpy.common as com | |
import pandas as pd | |
## load .RData and converts to pd.DataFrame | |
robj = robjects.r.load('test.RData') | |
# iterate over datasets the file | |
for sets in robj: | |
myRData = com.load_data(sets) | |
# convert to DataFrame |
EMOJI CHEAT SHEET
Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.
People
😄
library(ggplot2) | |
library(rbokeh) | |
library(htmlwidgets) | |
structure(list(wk = structure(c(16069, 16237, 16244, 16251, 16279, | |
16286, 16300, 16307, 16314, 16321, 16328, 16335, 16342, 16349, | |
16356, 16363, 16377, 16384, 16391, 16398, 16412, 16419, 16426, | |
16440, 16447, 16454, 16468, 16475, 16496, 16503, 16510, 16517, | |
16524, 16538, 16552, 16559, 16566, 16573), class = "Date"), n = c(1L, | |
1L, 1L, 1L, 3L, 1L, 3L, 2L, 4L, 2L, 3L, 2L, 5L, 5L, 1L, 1L, 3L, |
import os | |
from subprocess import check_call | |
def post_save(model, os_path, contents_manager): | |
"""post-save hook for converting notebooks to .py and .html files.""" | |
if model['type'] != 'notebook': | |
return # only do this for notebooks | |
d, fname = os.path.split(os_path) | |
check_call(['jupyter', 'nbconvert', '--to', 'script', fname], cwd=d) | |
check_call(['jupyter', 'nbconvert', '--to', 'html', fname], cwd=d) |