- Plain Strings (207):
foo
- Anchors (208):
k$
- Ranges (202):
^[a-f]*$
- Backrefs (201):
(...).*\1
- Abba (169):
^(.(?!(ll|ss|mm|rr|tt|ff|cc|bb)))*$|^n|ef
- A man, a plan (177):
^(.)[^p].*\1$
- Prime (286):
^(?!(..+)\1+$)
- Four (199):
(.)(.\1){3}
- Order (198):
^[^o].....?$
- Triples (507):
(^39|^44)|(^([0369]|([147][0369]*[258])|(([258]|[147][0369]*[147])([0369]*|[258][0369]*[147])([147]|[258][0369]*[258])))*$)
## Rsync Filter for $HOME | |
# Universal excludes -- These apply to all subdirs | |
- [Cc]ache | |
- temp | |
- tmp | |
- octave-core | |
# Emacs temp files | |
- .#* |
\documentclass{article} | |
\begin{document} | |
We can draw a table with the gridExtra package, and one problem is to | |
pre-determine the size of the table plot to remove the extra white | |
margin. Below is an example that shows you how to do it (courtesy of | |
baptiste auguie). | |
<<setup>>= |
#!/bin/bash | |
# Copyright 2012, Leon van Kammen (Coder of Salvation), All rights reserved. | |
# | |
# this utility can generate database table images from sql-files. | |
# It converts sqldump into graphviz layout (dot) format. | |
# Once having a graphviz file, you can convert it to many image formats (svg/png) or view it | |
# interactively using canviz. | |
# | |
# Redistribution and use in source and binary forms, with or without modification, are | |
# permitted provided that the following conditions are met: |
#!/usr/bin/env python | |
# vim: set sw=4 sts=4 et foldmethod=indent : | |
"""mbox_to_mysql: Import messages from mbox files to a mysql database """ | |
# Mbox message handing is being done by mailbox module, which is a python core module. | |
# However, mbox FILE handling is done internally in this file, because the | |
# mailbox module does far more than we need, and takes up a lot of time to do it. | |
# | |
# Database handling is done through mysql.connector, which is not a core module; |
# My preferred defaults (may be changed in individual chunks) | |
opts_chunk$set(tidy=FALSE, warning=FALSE, message=FALSE, cache=TRUE, | |
comment=NA, verbose=TRUE, fig.width=6, fig.height=4) | |
# Name the cache path and fig.path based on filename... | |
opts_chunk$set(fig.path = paste("figure/", | |
gsub(".Rmd", "", knitr:::knit_concord$get('infile')), | |
"-", sep=""), | |
cache.path = paste(gsub(".Rmd", "", knitr:::knit_concord$get('infile') ), | |
"/", sep="")) |
require(ggplot2) | |
set.seed(42) | |
df <- data.frame(x=1:50, y=rnorm(50, 10, 2), int=rbinom(50,1,0.3)) | |
ggplot(df, aes(x=x, y=y)) + | |
geom_ribbon(aes(ymin=0, ymax=y, fill='#1E90FF'), alpha=0.3) + | |
geom_abline(intercept=10, slope=-0.1 | |
, aes(colour='Linear')) + |
#!/usr/bin/env python | |
# | |
# AccessDump.py | |
# A simple script to dump the contents of a Microsoft Access Database. | |
# It depends upon the mdbtools suite: | |
# http://sourceforge.net/projects/mdbtools/ | |
import sys, subprocess, os | |
DATABASE = sys.argv[1] |
# Here are a few methods for getting text from PDF files. Do read through | |
# the instructions carefully! NOte that this code is written for Windows 7, | |
# slight adjustments may be needed for other OSs | |
# Tell R what folder contains your 1000s of PDFs | |
dest <- "G:/somehere/with/many/PDFs" | |
# make a vector of PDF file names | |
myfiles <- list.files(path = dest, pattern = "pdf", full.names = TRUE) |
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j