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
using Base.Test | |
using MacroTools | |
""" | |
argnametype(arg::Expr) | |
Given an argument of the form `x::DType` extracts the argument name (`x`) and | |
data type (`DType`) as a tuple. | |
""" | |
function argnametype(arg::Expr) |
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
typealias Period Union{Dates.TimePeriod, Dates.DatePeriod} | |
# definition of year as 365 days is consistent with Dates package | |
convert_ms(::Type{Dates.Millisecond}, t::Number) = t | |
convert_ms(::Type{Dates.Second}, t::Number) = t/1000 | |
convert_ms(::Type{Dates.Minute}, t::Number) = t/(1000*60) | |
convert_ms(::Type{Dates.Hour}, t::Number) = t/(1000*60*60) | |
convert_ms(::Type{Dates.Day}, t::Number) = t/(1000*60*60*24) | |
convert_ms(::Type{Dates.Year}, t::Number) = t/(1000*60*60*24*365) |
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
using DataFrames | |
using Feather | |
using PyCall | |
@pyimport feather as pyfeather | |
# using DatasToolbox | |
const NROWS = 2*10^6 | |
const FILENAME = "devtest1.feather" | |
const PYTHON_FILENAME = "pythontest.feather" |
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
using DataFrames | |
using PyCall | |
# using DatasToolbox | |
import Base.serialize | |
import Base.deserialize | |
const NROWS = 2*10^6 | |
const FILENAME = "devtest1.jbin" | |
const PICKLE_FILENAME = "devtest1.pkl" |
NewerOlder