learning… haskell math how generators work in python french how to draw an instrument
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This post examines the features of [R Markdown](http://www.rstudio.org/docs/authoring/using_markdown) | |
using [knitr](http://yihui.name/knitr/) in Rstudio 0.96. | |
This combination of tools provides an exciting improvement in usability for | |
[reproducible analysis](http://stats.stackexchange.com/a/15006/183). | |
Specifically, this post | |
(1) discusses getting started with R Markdown and `knitr` in Rstudio 0.96; | |
(2) provides a basic example of producing console output and plots using R Markdown; | |
(3) highlights several code chunk options such as caching and controlling how input and output is displayed; | |
(4) demonstrates use of standard Markdown notation as well as the extended features of formulas and tables; and | |
(5) discusses the implications of R Markdown. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mongo localhost:27017/mongo run_command.js | |
mongo localhost:27018/mongo run_command.js | |
mongo localhost:27019/mongo run_command.js | |
# if you don't need connection infomation etc., use --quiet option. | |
# http://www.mongodb.org/display/DOCS/--quiet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.fasterxml.jackson.databind.{DeserializationContext, JsonDeserializer} | |
import org.joda.time.{DateTimeZone, DateTime} | |
import com.fasterxml.jackson.core.JsonParser | |
import java.io.IOException | |
class MicrosoftJsonDateDeserializer extends JsonDeserializer[DateTime] { | |
val Pattern = """\/Date\((\d+)([-+]\d+)?\)\/""".r | |
def deserialize(jsonParser: JsonParser, deserializationContext: DeserializationContext): DateTime = { | |
val dateString = jsonParser.getText |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.jelies.spring3tomcat7.config.quartz; | |
import org.quartz.spi.TriggerFiredBundle; | |
import org.springframework.beans.factory.config.AutowireCapableBeanFactory; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.ApplicationContextAware; | |
import org.springframework.scheduling.quartz.SpringBeanJobFactory; | |
/** | |
* This JobFactory autowires automatically the created quartz bean with spring @Autowired dependencies. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.function.Supplier; | |
public class Cons<T> implements Stream<T>{ | |
private final T head; | |
//stream thunk | |
private final Supplier<Stream<T>> tail; | |
public Cons(T head, Supplier<Stream<T>> tail) { | |
this.head = head; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# = Mongo Collection Stats Script | |
database=${1:-test} | |
mongo --quiet --eval ' | |
var collections = db.getCollectionNames(); | |
print("Collection Count Size StorageSize AvgObjSize nIndexes"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:rabbit="http://www.springframework.org/schema/rabbit" | |
xsi:schemaLocation="http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit-1.2.xsd | |
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> | |
<rabbit:connection-factory id="connectionFactory" /> | |
<rabbit:template id="amqpTemplate" connection-factory="connectionFactory" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Void | |
VOID = lambda void: void | |
# Booleans / Conditionals | |
IF = lambda c: lambda t: lambda f: c(t)(f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* To get started: | |
* git clone https://github.com/twitter/algebird | |
* cd algebird | |
* ./sbt algebird-core/console | |
*/ | |
/** | |
* Let's get some data. Here is Alice in Wonderland, line by line | |
*/ |
OlderNewer