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
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
robot.py | |
Created by Alexey Filippov on 2012-11-03. | |
Copyright (c) 2012 Alexey Filippov. All rights reserved. | |
""" | |
import sys |
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 Data.List | |
fizzbuzz :: Int -> String | |
fizzbuzz i | |
| divisibleBy 15 = "FizzBuzz" | |
| divisibleBy 5 = "Buzz" | |
| divisibleBy 3 = "Fizz" | |
| otherwise = show i | |
where divisibleBy = (==) 0 . mod i |
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
object Direction extends Enumeration { | |
type Direction = Value | |
val NORTH, EAST, SOUTH, WEST, NONE = Value | |
def getFromShortName(shortName: Char): Direction = shortName match { | |
case 'N' => NORTH | |
case 'E' => EAST | |
case 'S' => SOUTH | |
case 'W' => WEST | |
case _ => NONE |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Needs["JLink`"]; | |
ReinstallJava[ | |
ClassPath -> "C:\\TWS_API\\source\\JavaClient\\TwsApi.jar"]; | |
LoadJavaClass["com.ib.client.Types$MktDataType"]; | |
LoadJavaClass["com.ib.client.TickType"]; | |
myAccounts := {}; | |
SetSharedVariable[myAccounts]; |
OlderNewer