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
example_tf = tf.nest.map_structure( | |
tf.nest.map_structure(tf.convert_to_tensor, example)) | |
output_types = tf.nest.map_structure(lambda t: t.dtype, tf_example) | |
output_shapes = tf.nest.map_structure(tf.nest.map_structure( | |
lambda t: t.shape.as_list(), tf_example)) |
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
typealias State Uint | |
typealias Observation Uint | |
function decode(x::Vector{Observation}, transition_matrix::Matrix{Float64}, | |
observation_matrix::Matrix{Float64}) | |
n_observations::Uint = uint(length(x)) | |
n_states::Uint = uint(size(transition_matrix)[1]) | |
@assert(size(transition_matrix) == size(transpose(transition_matrix))) |
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
defmodule MyTest do | |
use ExUnit.Case | |
import Mock | |
test_with_mock "test_name", HTTPotion, | |
do | |
new(buck, key, value, _), do: Object[key: {buck, key}, value: value] | |
get_update_metadata(Object[indexes: indexes]), do: indexes | |
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
defmodule Mix.Tasks.Docs.Ghpages do | |
use Mix.Task | |
@moduledoc """ | |
A task for uploading documentation to gh-pages. | |
""" | |
defp run!(command) do | |
if Mix.shell.cmd(command) != 0 do | |
raise Mix.Error, message: "command `#{command}` failed" |
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
class _HashableType(type): | |
""""A metaclass which implements a hash based on the module | |
and class name (so that it is constants across runs | |
instead of the default which is the memory location of | |
the class definition. | |
Use it by changing the metaclass e.g. | |
class ConstantHash(object): | |
__metaclass__ = _HashableType |
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
language: erlang | |
otp_release: | |
- R16B | |
before_install: | |
- git clone https://github.com/elixir-lang/elixir | |
- cd elixir && git checkout v$(cat ../.exenv-version) && make && cd .. | |
before_script: "export PATH=`pwd`/elixir/bin:$PATH" | |
script: "MIX_ENV=test mix do deps.get, test" |
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 pyximport | |
pyximport.install(setup_args={'include_dirs': [np.get_include()]}) |
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
Testing idea |
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
GitHub username: jjh42 | |
Day job: PhD student at the Queensland Brain Institute. | |
Favorite open source project: Well, python would be sucking up. How about VLC, gets me out a codec pickle everytime. | |
Open Source contributions (if any): extremely minor fixes to Sagemath | |
Stranded on an island, what 3 items do you take: Book: Idiot's guide to boat building, my leatherman, peanut butter. | |
Tie-breaker, pick a number between 1 and 20,000: 42 |
NewerOlder