This is some text.
I love it.
print "Hello World" |
import scala.math.Random | |
// Thanks to a great pairing session with Konstantin, we have finally been able to overcome some problems | |
// by using Stream. | |
def incircle(pair : (Double, Double)): Boolean = pair._1 * pair._1 + pair._2 * pair._2 <= 1.0; | |
val N = 10000 | |
val darts = Stream.continually((math.random, math.random)).take(N) | |
// How many darts fall within the circle? |
import sys | |
from abjad import * | |
# 0=C, 2=D, 3=E, 4=F, 5=F#, 6=G | |
# How to organize a pattern | |
# Write it in C-whatever first. | |
#(C E G)/4 (CC G E)/4 C/2 |
>>> import numpy | |
>>> a = numpy.random.random(1000000) | |
>>> n = 1000000 | |
>>> a = numpy.random.random(n) | |
>>> b = numpy.random.random(n) | |
>>> a | |
array([ 0.13849378, 0.72228591, 0.49816557, ..., 0.08655529, | |
0.02044737, 0.86337785]) | |
>>> b | |
array([ 0.28050175, 0.05473387, 0.99651725, ..., 0.37804476, |
import scala.math.Random | |
// Thanks to a great pairing session with Konstantin, we have finally been able to overcome some problems | |
// by using Stream. | |
def incircle(pair : (Double, Double)): Boolean = pair._1 * pair._1 + pair._2 * pair._2 <= 1.0; | |
val N = 10000 | |
val darts = Stream.continually((math.random, math.random)).take(N) | |
// How many darts fall within the circle? |
csharp> System.Guid.NewGuid() | |
55305008-86b7-4003-913c-f0865b2095c9 |
$ uuidgen | |
9ED55055-AD86-4B9D-B8FE-F18A2DA33259 |
# | |
# Suggested as a possibility by HomeBrew sbt formula | |
# Might be useful in the future | |
# | |
SBT_OPTS="-XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M" | |
// Imports need to be done even though you entered a test:console | |
import org.junit.Test | |
import org.junit._ | |
import org.junit.Assert._ | |
// Create a test class inline | |
scala> :paste | |
// Entering paste mode (ctrl-D to finish) |