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
def fib( n ) | |
return n if ( 0..1 ).include? n | |
( fib( n - 1 ) + fib( n - 2 ) ) | |
end | |
threads = [] | |
4.times do | |
threads << Thread.new do | |
fib(50) while true |
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
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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
PassengerId | Survived | PassengerClass | Name | Sex | Age | SpouseSiblingsAboard | ParentsChildrenAboard | Ticket | Fare | Cabin | Embarked | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 0 | 3 | Braund, Mr. Owen Harris | male | 22 | 1 | 0 | A/5 21171 | 7.25 | S | ||
2 | 1 | 1 | Cumings, Mrs. John Bradley (Florence Briggs Thayer) | female | 38 | 1 | 0 | PC 17599 | 71.2833 | C85 | C | |
3 | 1 | 3 | Heikkinen, Miss. Laina | female | 26 | 0 | 0 | STON/O2. 3101282 | 7.925 | S | ||
4 | 1 | 1 | Futrelle, Mrs. Jacques Heath (Lily May Peel) | female | 35 | 1 | 0 | 113803 | 53.1 | C123 | S | |
5 | 0 | 3 | Allen, Mr. William Henry | male | 35 | 0 | 0 | 373450 | 8.05 | S | ||
6 | 0 | 3 | Moran, Mr. James | male | 0 | 0 | 330877 | 8.4583 | Q | |||
7 | 0 | 1 | McCarthy, Mr. Timothy J | male | 54 | 0 | 0 | 17463 | 51.8625 | E46 | S | |
8 | 0 | 3 | Palsson, Master. Gosta Leonard | male | 2 | 3 | 1 | 349909 | 21.075 | S | ||
9 | 1 | 3 | Johnson, Mrs. Oscar W (Elisabeth Vilhelmina Berg) | female | 27 | 0 | 2 | 347742 | 11.1333 | S |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "Configuration for API queues, security groups and other general configuration", | |
"Resources": { | |
"ApiSecurityGroupProduction": { | |
"Type": "AWS::EC2::SecurityGroup", | |
"Properties": { | |
"GroupDescription": "Group for the api instances", | |
"GroupName": "api_production", | |
"SecurityGroupIngress": [ |
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 sbt._ | |
import Keys._ | |
object ProjectBuild extends Build { | |
val commonName = "db-async-common" | |
val postgresqlName = "postgresql-async" | |
val mysqlName = "mysql-async" | |
lazy val root = Project( |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
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
"25/04/2014";"22:29:30";"2012";"1";"ELEIÇÃO MUNICIPAL 2012";"PB";"19798";"19798";"CAMALAÚ";"29";"11";"PREFEITO";"4929";"16";"0";"4929";"16";"4175";"754";"2995";"562";"618";"0";"0";"07/10/2012";"18:16:58" | |
"25/04/2014";"22:29:30";"2012";"1";"ELEIÇÃO MUNICIPAL 2012";"PB";"20419";"20419";"ITAPORANGA";"33";"13";"VEREADOR";"17157";"51";"0";"17157";"51";"13919";"3238";"12408";"191";"345";"975";"0";"07/10/2012";"18:01:19" | |
"25/04/2014";"22:29:30";"2012";"1";"ELEIÇÃO MUNICIPAL 2012";"PB";"20770";"20770";"MALTA";"51";"11";"PREFEITO";"4677";"15";"0";"4677";"15";"4087";"590";"3889";"38";"160";"0";"0";"07/10/2012";"17:30:26" | |
"25/04/2014";"22:29:30";"2012";"1";"ELEIÇÃO MUNICIPAL 2012";"PB";"21091";"21091";"OLHO D'ÁGUA";"32";"13";"VEREADOR";"6653";"25";"0";"6653";"25";"5538";"1115";"4894";"65";"228";"351";"0";"07/10/2012";"18:17:00" | |
"25/04/2014";"22:29:30";"2012";"1";"ELEIÇÃO MUNICIPAL 2012";"PB";"21113";"21113";"OLIVEDOS";"23";"13";"VEREADOR";"3243";"11";"0";"3243";"11";"3038";"205";"2766";"26";"83";"163";"0";"07/10/2012";" |
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
segment = ARGV[0] | |
taxa = "reference_HAs.fasta" | |
fasta = "2009pdm_extracts.fasta" | |
search = IO.read( taxa ).split('>').inject({}) do |accumulator,line| | |
sorting = line.strip.split("\n") | |
name = sorting.shift | |
accumulator[name.split("|")[1]] = 0 | |
accumulator | |
end |
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 Keys._ | |
name := "hello" | |
version := "1.0" | |
scalaVersion := "2.10.2" | |
lazy val hello = taskKey[Unit]("A custom run task.") |
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
#lang racket | |
(define (sum xs) | |
(cond | |
[(null? xs) 0] | |
[(number? xs) xs] | |
[(list? xs) (+ (sum (car xs)) (sum (cdr xs))) ] | |
[#t 0] | |
)) |
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
exception AssertionFailure of string; | |
fun assert_true( result : bool, message : string ) = | |
if result | |
then result | |
else raise AssertionFailure message | |
fun assert_false( result : bool, message : string ) = | |
if result | |
then raise AssertionFailure message |