hexsha
stringlengths
40
40
size
int64
2
991k
ext
stringclasses
2 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
208
max_stars_repo_name
stringlengths
6
106
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
sequence
max_stars_count
int64
1
33.5k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
208
max_issues_repo_name
stringlengths
6
106
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
sequence
max_issues_count
int64
1
16.3k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
208
max_forks_repo_name
stringlengths
6
106
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
sequence
max_forks_count
int64
1
6.91k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
991k
avg_line_length
float64
1
36k
max_line_length
int64
1
977k
alphanum_fraction
float64
0
1
79676523c55961ddb8155cbe332a7593c482576f
575
ex
Elixir
backend/apps/students_crm_v2/lib/students_crm_v2/interactions/user/get_by_contact.ex
KyivKrishnaAcademy/students_crm_v2
e0ad9b3c5e52dfef5ab8f9179f3c593f935786e6
[ "MIT" ]
null
null
null
backend/apps/students_crm_v2/lib/students_crm_v2/interactions/user/get_by_contact.ex
KyivKrishnaAcademy/students_crm_v2
e0ad9b3c5e52dfef5ab8f9179f3c593f935786e6
[ "MIT" ]
50
2018-07-29T09:17:35.000Z
2019-02-26T05:23:34.000Z
backend/apps/students_crm_v2/lib/students_crm_v2/interactions/user/get_by_contact.ex
KyivKrishnaAcademy/students_crm_v2
e0ad9b3c5e52dfef5ab8f9179f3c593f935786e6
[ "MIT" ]
null
null
null
defmodule StudentsCrmV2.Interactions.User.GetByContact do @moduledoc false alias StudentsCrmV2.Models.{Contact, User} alias StudentsCrmV2.Repo @spec execute(id :: term()) :: {:ok, User.t()} | {:error, :no_user_found} def execute({type, value}) do import Ecto.Query, only: [where: 3, join: 5] User |> join(:inner, [u], c in Contact, c.user_id == u.id) |> where([u, c], c.kind == ^type and c.value == ^value) |> Repo.one() |> result() end defp result(user = %User{}), do: {:ok, user} defp result(_), do: {:error, :no_user_found} end
27.380952
75
0.62087
79677ffcb8c4500f9b7d7f37d5b5da24c1b47f18
2,541
ex
Elixir
lib/steps/patch/copy_erts.ex
tinfoil/burrito
018dd1933b04933c0cf472938f76175b5650ea12
[ "MIT" ]
null
null
null
lib/steps/patch/copy_erts.ex
tinfoil/burrito
018dd1933b04933c0cf472938f76175b5650ea12
[ "MIT" ]
null
null
null
lib/steps/patch/copy_erts.ex
tinfoil/burrito
018dd1933b04933c0cf472938f76175b5650ea12
[ "MIT" ]
null
null
null
defmodule Burrito.Steps.Patch.CopyERTS do @moduledoc """ This step copies the new ERTS bins into the release, as well as replaces built-in NIFs. """ alias Burrito.Builder.Context alias Burrito.Builder.Log alias Burrito.Builder.Step @behaviour Step @impl Step def execute(%Context{} = context) do case context.target.erts_source do # nothing to do {:runtime, _} -> context {:local_unpacked, [path: location]} -> # copy unpacked bins into release working directory do_copy(location, context) end context end defp do_copy(erts_location, %Context{} = context) do Log.info(:step, "Replacing ERTS binaries...") # Clean out current bins dest_bin_path = Path.join(context.work_dir, ["erts-*/", "bin/"]) |> Path.wildcard() |> List.first() File.rm_rf!(dest_bin_path) File.mkdir!(dest_bin_path) # Copy in new bins from unpacked ERTS unpacked_path = Path.join(erts_location, ["otp-*/", "erts-*/"]) |> Path.wildcard() |> List.first() src_bin_path = Path.join(unpacked_path, ["bin/"]) File.cp_r!(src_bin_path, dest_bin_path) # The ERTS comes with some pre-built NIFs, so we need to replace those libs_to_replace = Path.join(context.work_dir, "lib/**/*.{so,dll}") |> Path.wildcard() src_lib_path = Path.join(erts_location, ["otp-*/", "lib/"]) |> Path.wildcard() |> List.first() dest_lib_path = Path.join(context.work_dir, ["lib/"]) Enum.each(libs_to_replace, fn lib_file -> # This replaces the .so or .dll with a wildcard match of .so or .dll # that way it's more generic across ERTS targets (windows, linux, darwin, etc.) possible_src_path = String.replace(lib_file, dest_lib_path, src_lib_path) |> String.replace_suffix(Path.extname(lib_file), "*.{so,dll}") |> Path.wildcard() |> List.first() if possible_src_path && File.exists?(possible_src_path) do File.rm!(lib_file) src_filename = Path.basename(possible_src_path) lib_file_path = Path.dirname(lib_file) new_lib_file = Path.join(lib_file_path, src_filename) File.copy!(possible_src_path, new_lib_file) Log.info( :step, "Replaced NIF \n\tOriginal: #{lib_file}\n\tReplacement: #{possible_src_path}" ) else File.rm!(lib_file) Log.warning( :step, "We couldn't find a replacement for NIF\n\t#{lib_file}\n\tThe binary may not work!" ) end end) end end
31.37037
98
0.639118
7967b52b53374efd047674ee2e75cf28a2229a89
8,068
ex
Elixir
clients/dfa_reporting/lib/google_api/dfa_reporting/v34/api/projects.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
1
2021-12-20T03:40:53.000Z
2021-12-20T03:40:53.000Z
clients/dfa_reporting/lib/google_api/dfa_reporting/v34/api/projects.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
1
2020-08-18T00:11:23.000Z
2020-08-18T00:44:16.000Z
clients/dfa_reporting/lib/google_api/dfa_reporting/v34/api/projects.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed 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 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This file is auto generated by the elixir code generator program. # Do not edit this file manually. defmodule GoogleApi.DFAReporting.V34.Api.Projects do @moduledoc """ API calls for all endpoints tagged `Projects`. """ alias GoogleApi.DFAReporting.V34.Connection alias GoogleApi.Gax.{Request, Response} @library_version Mix.Project.config() |> Keyword.get(:version, "") @doc """ Gets one project by ID. ## Parameters * `connection` (*type:* `GoogleApi.DFAReporting.V34.Connection.t`) - Connection to server * `profile_id` (*type:* `String.t`) - User profile ID associated with this request. * `id` (*type:* `String.t`) - Project ID. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.DFAReporting.V34.Model.Project{}}` on success * `{:error, info}` on failure """ @spec dfareporting_projects_get( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.DFAReporting.V34.Model.Project.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} def dfareporting_projects_get(connection, profile_id, id, optional_params \\ [], opts \\ []) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query } request = Request.new() |> Request.method(:get) |> Request.url("/dfareporting/v3.4/userprofiles/{profileId}/projects/{id}", %{ "profileId" => URI.encode(profile_id, &URI.char_unreserved?/1), "id" => URI.encode(id, &(URI.char_unreserved?(&1) || &1 == ?/)) }) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) |> Response.decode(opts ++ [struct: %GoogleApi.DFAReporting.V34.Model.Project{}]) end @doc """ Retrieves a list of projects, possibly filtered. This method supports paging . ## Parameters * `connection` (*type:* `GoogleApi.DFAReporting.V34.Connection.t`) - Connection to server * `profile_id` (*type:* `String.t`) - User profile ID associated with this request. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:advertiserIds` (*type:* `list(String.t)`) - Select only projects with these advertiser IDs. * `:ids` (*type:* `list(String.t)`) - Select only projects with these IDs. * `:maxResults` (*type:* `integer()`) - Maximum number of results to return. * `:pageToken` (*type:* `String.t`) - Value of the nextPageToken from the previous result page. * `:searchString` (*type:* `String.t`) - Allows searching for projects by name or ID. Wildcards (*) are allowed. For example, "project*2015" will return projects with names like "project June 2015", "project April 2015", or simply "project 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "project" will match projects with name "my project", "project 2015", or simply "project". * `:sortField` (*type:* `String.t`) - Field by which to sort the list. * `:sortOrder` (*type:* `String.t`) - Order of sorted results. * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.DFAReporting.V34.Model.ProjectsListResponse{}}` on success * `{:error, info}` on failure """ @spec dfareporting_projects_list(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.DFAReporting.V34.Model.ProjectsListResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} def dfareporting_projects_list(connection, profile_id, optional_params \\ [], opts \\ []) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :advertiserIds => :query, :ids => :query, :maxResults => :query, :pageToken => :query, :searchString => :query, :sortField => :query, :sortOrder => :query } request = Request.new() |> Request.method(:get) |> Request.url("/dfareporting/v3.4/userprofiles/{profileId}/projects", %{ "profileId" => URI.encode(profile_id, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) |> Response.decode(opts ++ [struct: %GoogleApi.DFAReporting.V34.Model.ProjectsListResponse{}]) end end
47.458824
475
0.630764
7967b6378d916b696aa52a822d12c63d29d3079b
2,066
ex
Elixir
lib/elixir/lib/binary/chars.ex
Nicd/elixir
e62ef92a4be1b562033d35b2d822cc9d6c661077
[ "Apache-2.0" ]
null
null
null
lib/elixir/lib/binary/chars.ex
Nicd/elixir
e62ef92a4be1b562033d35b2d822cc9d6c661077
[ "Apache-2.0" ]
null
null
null
lib/elixir/lib/binary/chars.ex
Nicd/elixir
e62ef92a4be1b562033d35b2d822cc9d6c661077
[ "Apache-2.0" ]
null
null
null
import Kernel, except: [to_binary: 1] defprotocol Binary.Chars do @moduledoc %B""" The Binary.Chars protocol is responsible for converting a structure to a Binary (only if applicable). The only function required to be implemented is `to_binary` which does the conversion. The `to_binary` function automatically imported by Kernel invokes this protocol. String interpolation also invokes to_binary in its arguments. For example, `"foo#{bar}"` is the same as `"foo" <> to_binary(bar)`. """ @only [BitString, List, Number, Atom, Record] def to_binary(thing) end defimpl Binary.Chars, for: Atom do @doc """ Convert the atom literally to a binary, except `nil` which is converted to an empty string. """ def to_binary(nil) do "" end def to_binary(atom) do atom_to_binary(atom, :utf8) end end defimpl Binary.Chars, for: BitString do @doc """ Simply returns the binary itself. """ def to_binary(thing) when is_binary(thing) do thing end end defimpl Binary.Chars, for: List do @doc """ Consider the list is an iolist and converts it to a binary. This allows a list of binaries, or a charlist, or a mix of both, to be converted successfully. ## Examples iex> to_binary('foo') "foo" iex> to_binary(["foo", 'bar']) "foobar" """ def to_binary(thing) do try do iolist_to_binary(thing) rescue ArgumentError -> raise Protocol.UndefinedError, protocol: __MODULE__, structure: thing, extra: "Only iolists are supported" end end end defimpl Binary.Chars, for: Number do @doc """ Simply converts the number (integer or a float) to a binary. """ @digits 20 @limit :math.pow(10, @digits) def to_binary(thing) when is_integer(thing) do integer_to_binary(thing) end def to_binary(thing) when thing > @limit do float_to_binary(thing, scientific: @digits) end def to_binary(thing) do float_to_binary(thing, compact: true, decimals: @digits) end end
22.215054
62
0.669409
7967c7c549bcfa3e27dd02cc6810188d9969e49a
961
ex
Elixir
clients/reseller/lib/google_api/reseller/v1/request_builder.ex
leandrocp/elixir-google-api
a86e46907f396d40aeff8668c3bd81662f44c71e
[ "Apache-2.0" ]
null
null
null
clients/reseller/lib/google_api/reseller/v1/request_builder.ex
leandrocp/elixir-google-api
a86e46907f396d40aeff8668c3bd81662f44c71e
[ "Apache-2.0" ]
null
null
null
clients/reseller/lib/google_api/reseller/v1/request_builder.ex
leandrocp/elixir-google-api
a86e46907f396d40aeff8668c3bd81662f44c71e
[ "Apache-2.0" ]
1
2020-11-10T16:58:27.000Z
2020-11-10T16:58:27.000Z
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); # 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 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an &quot;AS IS&quot; BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This class is auto generated by the swagger code generator program. # https://github.com/swagger-api/swagger-codegen.git # Do not edit the class manually. defmodule GoogleApi.Reseller.V1.RequestBuilder do @moduledoc """ Helper functions for building Tesla requests. This module is no longer used. Please use GoogleApi.Gax.Request instead. """ end
36.961538
77
0.763788
7967f63a8f21ec73711ada8c73368155bfe076bf
974
ex
Elixir
test/support/channel_case.ex
damonkelley/requestbin
1f59df73ad3e47e74ba18a2987bd0b0cce262a13
[ "MIT" ]
4
2016-05-20T04:40:21.000Z
2017-12-20T12:54:55.000Z
test/support/channel_case.ex
damonkelley/requestbin
1f59df73ad3e47e74ba18a2987bd0b0cce262a13
[ "MIT" ]
null
null
null
test/support/channel_case.ex
damonkelley/requestbin
1f59df73ad3e47e74ba18a2987bd0b0cce262a13
[ "MIT" ]
null
null
null
defmodule RequestBin.ChannelCase do @moduledoc """ This module defines the test case to be used by channel tests. Such tests rely on `Phoenix.ChannelTest` and also imports other functionality to make it easier to build and query models. Finally, if the test case interacts with the database, it cannot be async. For this reason, every test runs inside a transaction which is reset at the beginning of the test unless the test case is marked as async. """ use ExUnit.CaseTemplate using do quote do # Import conveniences for testing with channels use Phoenix.ChannelTest alias RequestBin.Repo import Ecto import Ecto.Changeset import Ecto.Query, only: [from: 1, from: 2] # The default endpoint for testing @endpoint RequestBin.Endpoint end end setup tags do unless tags[:async] do Ecto.Adapters.SQL.restart_test_transaction(RequestBin.Repo, []) end :ok end end
23.190476
69
0.704312
79684438d890278bbefee067cbad842eb39c7b06
732
ex
Elixir
lib/central_web/views/admin/general_view.ex
icexuick/teiserver
22f2e255e7e21f977e6b262acf439803626a506c
[ "MIT" ]
null
null
null
lib/central_web/views/admin/general_view.ex
icexuick/teiserver
22f2e255e7e21f977e6b262acf439803626a506c
[ "MIT" ]
null
null
null
lib/central_web/views/admin/general_view.ex
icexuick/teiserver
22f2e255e7e21f977e6b262acf439803626a506c
[ "MIT" ]
null
null
null
defmodule CentralWeb.Admin.GeneralView do use CentralWeb, :view use Timex @build_time_priv Timex.now() def build_time() do @build_time_priv end @spec colours :: {String.t(), String.t(), String.t()} def colours(), do: Central.Admin.AdminLib.colours() @spec icon() :: String.t() def icon(), do: Central.Admin.AdminLib.icon() @spec colours(String.t()) :: {String.t(), String.t(), String.t()} def colours("user"), do: Central.Account.UserLib.colours() def colours("group"), do: Central.Account.GroupLib.colours() def colours("reports"), do: Central.Account.ReportLib.colours() def colours("codes"), do: Central.Account.CodeLib.colours() def colours("tool"), do: Central.Admin.ToolLib.colours() end
31.826087
67
0.689891
7968606f1388ff6730b4c51395dbf52d8ea9b028
2,770
ex
Elixir
clients/service_networking/lib/google_api/service_networking/v1/model/log_descriptor.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
1
2021-12-20T03:40:53.000Z
2021-12-20T03:40:53.000Z
clients/service_networking/lib/google_api/service_networking/v1/model/log_descriptor.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
1
2020-08-18T00:11:23.000Z
2020-08-18T00:44:16.000Z
clients/service_networking/lib/google_api/service_networking/v1/model/log_descriptor.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed 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 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This file is auto generated by the elixir code generator program. # Do not edit this file manually. defmodule GoogleApi.ServiceNetworking.V1.Model.LogDescriptor do @moduledoc """ A description of a log type. Example in YAML format: - name: library.googleapis.com/activity_history description: The history of borrowing and returning library items. display_name: Activity labels: - key: /customer_id description: Identifier of a library customer ## Attributes * `description` (*type:* `String.t`, *default:* `nil`) - A human-readable description of this log. This information appears in the documentation and can contain details. * `displayName` (*type:* `String.t`, *default:* `nil`) - The human-readable name for this log. This information appears on the user interface and should be concise. * `labels` (*type:* `list(GoogleApi.ServiceNetworking.V1.Model.LabelDescriptor.t)`, *default:* `nil`) - The set of labels that are available to describe a specific log entry. Runtime requests that contain labels not specified here are considered invalid. * `name` (*type:* `String.t`, *default:* `nil`) - The name of the log. It must be less than 512 characters long and can include the following characters: upper- and lower-case alphanumeric characters [A-Za-z0-9], and punctuation characters including slash, underscore, hyphen, period [/_-.]. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :description => String.t() | nil, :displayName => String.t() | nil, :labels => list(GoogleApi.ServiceNetworking.V1.Model.LabelDescriptor.t()) | nil, :name => String.t() | nil } field(:description) field(:displayName) field(:labels, as: GoogleApi.ServiceNetworking.V1.Model.LabelDescriptor, type: :list) field(:name) end defimpl Poison.Decoder, for: GoogleApi.ServiceNetworking.V1.Model.LogDescriptor do def decode(value, options) do GoogleApi.ServiceNetworking.V1.Model.LogDescriptor.decode(value, options) end end defimpl Poison.Encoder, for: GoogleApi.ServiceNetworking.V1.Model.LogDescriptor do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) end end
49.464286
295
0.737906
7968802665c34469e646b985d3831106842f2899
150
exs
Elixir
config/integration.exs
frapa/couchdb
6c28960f0fe2eec06aca7d58fd73f3c7cdbe1112
[ "Apache-2.0" ]
1
2022-01-14T20:52:55.000Z
2022-01-14T20:52:55.000Z
config/integration.exs
frapa/couchdb
6c28960f0fe2eec06aca7d58fd73f3c7cdbe1112
[ "Apache-2.0" ]
1
2021-07-28T02:13:39.000Z
2021-07-28T02:13:39.000Z
config/integration.exs
frapa/couchdb
6c28960f0fe2eec06aca7d58fd73f3c7cdbe1112
[ "Apache-2.0" ]
null
null
null
use Mix.Config config :logger, backends: [:console], compile_time_purge_level: :debug, level: :debug config :sasl, sasl_error_logger: false
15
35
0.733333
79688e6143d93c237a072e5da1debcd275ae1c7c
1,684
ex
Elixir
lib/yourbot_web/components/env_var_modal.ex
ConnorRigby/yourbot
eea40e63b0f93963ed14b7efab9ecbe898ab11dd
[ "Apache-2.0" ]
3
2021-11-08T15:19:19.000Z
2021-11-11T03:18:35.000Z
lib/yourbot_web/components/env_var_modal.ex
ConnorRigby/yourbot
eea40e63b0f93963ed14b7efab9ecbe898ab11dd
[ "Apache-2.0" ]
null
null
null
lib/yourbot_web/components/env_var_modal.ex
ConnorRigby/yourbot
eea40e63b0f93963ed14b7efab9ecbe898ab11dd
[ "Apache-2.0" ]
null
null
null
defmodule YourBotWeb.Components.EnvVarModal do use Surface.Component alias SurfaceBulma.Button alias Surface.Components.{ Form, Form.ErrorTag, Form.Field, Form.Label, Form.TextInput, Form.Submit } prop title, :string, required: true prop show, :boolean, required: true prop hide_event, :event, required: true prop changeset, :map, required: true def render(assigns) do ~F""" <div class={"modal", "is-active": @show}> <div class="modal-background" /> <div class="modal-card"> <header class="modal-card-head"> <p class="modal-card-title">{@title}</p> </header> <section class="modal-card-body"> Environment variables are a way to store secrets in your code safely <Form for={@changeset} submit="save" change="change" opts={autocomplete: "off"}> <Field name={:key}> <Label/> <div class="control"> <TextInput opts={role: "var_name_input"}/> </div> <ErrorTag class="help is-danger"/> </Field> <Field name={:value}> <Label/> <div class="control"> <TextInput opts={role: "var_value_input"}/> </div> <ErrorTag class="help is-danger"/> </Field> <Submit opts={disabled: [email protected]?, role: "bot_submit"} click={@hide_event}> Save </Submit> </Form> </section> <footer class="modal-card-foot" style="justify-content: flex-end"> <Button click={@hide_event}>Close</Button> </footer> </div> </div> """ end end
29.54386
111
0.553444
7968aa281fb8de2f4c6e167dc18209dea1968fbd
1,180
exs
Elixir
mix.exs
tongdao/hbasex
4be1f3950cdfde30b5a2f34508e9b9ea86085c9e
[ "MIT" ]
2
2017-08-26T15:11:46.000Z
2017-12-20T02:42:57.000Z
mix.exs
tongdao/hbasex
4be1f3950cdfde30b5a2f34508e9b9ea86085c9e
[ "MIT" ]
null
null
null
mix.exs
tongdao/hbasex
4be1f3950cdfde30b5a2f34508e9b9ea86085c9e
[ "MIT" ]
null
null
null
defmodule Hbasex.Mixfile do use Mix.Project @version File.read!("VERSION") |> String.trim def project do [app: :hbasex, version: @version, elixir: "~> 1.4", build_embedded: Mix.env == :prod, start_permanent: Mix.env == :prod, ##### Uncomment those two lines to generate the /src folder # compilers: [:thrift | Mix.compilers], # thrift_files: Mix.Utils.extract_files(["thrift"], [:thrift]), description: description(), # elixirc_options: [warnings_as_errors: true], package: package(), deps: deps()] end defp description do """ A HBase driver for Elixir using HBase Rest and Thrift Interface (v2) """ end def application do [applications: [:logger, :inets, :riffed], mod: {Hbasex, []}] end defp deps do [ {:riffed, github: "pinterest/riffed"}, {:poolboy, "~> 1.5"}, {:credo, "~> 0.7", only: [:dev, :test]} ] end defp package do [ files: ~w(lib src README.md LICENSE VERSION mix.exs), maintainers: ["Adrien Moreau", "Steffel Fénix"], licenses: ["MIT"], links: %{github: "https://github.com/tongdao/hbasex"} ] end end
24.583333
74
0.595763
7968af377a4e2241dc1cb7403733e0be29e80d0e
2,408
exs
Elixir
maze_generator.exs
pmarreck/elixir-snippets
5f5ee26087bc2ded4e71c4c3eeff1231310ff358
[ "BSD-3-Clause" ]
34
2015-02-27T14:41:12.000Z
2021-09-26T06:06:18.000Z
maze_generator.exs
pmarreck/elixir-snippets
5f5ee26087bc2ded4e71c4c3eeff1231310ff358
[ "BSD-3-Clause" ]
null
null
null
maze_generator.exs
pmarreck/elixir-snippets
5f5ee26087bc2ded4e71c4c3eeff1231310ff358
[ "BSD-3-Clause" ]
3
2016-02-05T16:09:41.000Z
2017-10-21T15:47:04.000Z
defmodule Maze do def generate(w, h, maze \\ %{}, rand_seed \\ :os.timestamp) do :random.seed(rand_seed) :rand.seed(:exs64, rand_seed) maze_tuples = (for i <- 1..w, j <- 1..h, do: {i,j}) maze = Enum.reduce(maze_tuples, maze, fn({i,j}, maze) -> Map.put(maze, {:vis, i, j}, true) end) get(w, h, walk(:random.uniform(w), :random.uniform(h), maze)) end def print(w, h, maze \\ %{}, rand_seed \\ :os.timestamp) do Maze.generate(w, h, maze, rand_seed) |> Enum.each(&IO.puts(&1)) end defp walk(x, y, %{} = maze) do Enum.reduce( Enum.shuffle([{x-1,y}, {x,y+1}, {x+1,y}, {x,y-1}]), %{maze | {:vis, x, y} => false}, fn({i,j}, maze) -> if maze[{:vis, i, j}] do walk(i, j, (if i == x, do: Map.put(maze, {:hor, x, max(y, j)}, "+ "), else: Map.put(maze, {:ver, max(x, i), y}, " "))) else maze end end ) end defp get(w, h, %{} = maze) do Enum.map(1..h, fn j -> [(Enum.map(1..w, fn i -> Map.get(maze, {:hor, i, j}, "+---") end) |> Enum.join) <> "+", (Enum.map(1..w, fn i -> Map.get(maze, {:ver, i, j}, "| ") end) |> Enum.join) <> "|"] end) ++ [String.duplicate("+---", w) <> "+"] |> List.flatten end end # run this inline suite with "elixir #{__ENV__.file} test" if System.argv |> List.first == "test" do ExUnit.start defmodule MazeTest do use ExUnit.Case, async: true @rand_seed {1454, 367294, 550155} test "5x5 output as expected" do assert Maze.generate(5, 5, %{}, @rand_seed) == [ "+---+---+---+---+---+", "| |", "+ +---+---+---+ +", "| | |", "+ +---+ +---+---+", "| | | |", "+ +---+---+---+ +", "| | |", "+ + +---+---+ +", "| | |", "+---+---+---+---+---+" ] end end end # run this inline performance suite with "elixir #{__ENV__.file} perf" if System.argv |> List.first == "perf" do # just a timing utility defmodule Time do def now, do: ({msecs, secs, musecs} = :erlang.timestamp; ((msecs*1000000 + secs)*1000000 + musecs)/1000000) end iters = 5000 i = 20 j = 20 t = Time.now Enum.each(1..iters, fn(_) -> Maze.generate(i,j) end) IO.puts "elapsed time #{Time.now - t} secs for #{iters} iterations of a #{i}x#{j} maze" end
31.684211
133
0.46304
7968d8a8edc0034ac898e9f7e87f8cfafe1aaa15
905
exs
Elixir
test/metadata/metadata_test.exs
g1ntas/ex-accio
18f82b8dba1dbb0087505a3016259ae936a62fbe
[ "MIT" ]
null
null
null
test/metadata/metadata_test.exs
g1ntas/ex-accio
18f82b8dba1dbb0087505a3016259ae936a62fbe
[ "MIT" ]
null
null
null
test/metadata/metadata_test.exs
g1ntas/ex-accio
18f82b8dba1dbb0087505a3016259ae936a62fbe
[ "MIT" ]
null
null
null
defmodule Accio.Metadata.MetadataTest do use ExUnit.Case alias Accio.Metadata.Metadata alias Accio.Metadata.Properties.Command test "parses AST list" do ast = [ {:command, ["command", {:description, "text"}]} ] assert Metadata.parse(ast) == {:ok, %Metadata{command: %Command{command: "command", description: "text"}}} end test "returns error, if property is unknown" do ast = [ {:unknown, ["param"]} ] assert Metadata.parse(ast) == {:error, "Unknown property \"unknown\""} end test "it should return description of the command" do metadata = %Metadata{command: %Command{description: "test"}} assert Metadata.get(metadata, :command, :description) === "test" end test "it should return nil, if no prefered properties are set" do metadata = %Metadata{} assert Metadata.get(metadata, :variables, :definitions) === nil end end
25.857143
110
0.665193
7968e6eecaf84eca1d2e21edea890014daaa1e40
3,311
ex
Elixir
lib/brando/blueprint/attributes.ex
brandocms/brando
4198e0c0920031bd909969055064e4e2b7230d21
[ "MIT" ]
4
2020-10-30T08:40:38.000Z
2022-01-07T22:21:37.000Z
lib/brando/blueprint/attributes.ex
brandocms/brando
4198e0c0920031bd909969055064e4e2b7230d21
[ "MIT" ]
1,162
2020-07-05T11:20:15.000Z
2022-03-31T06:01:49.000Z
lib/brando/blueprint/attributes.ex
brandocms/brando
4198e0c0920031bd909969055064e4e2b7230d21
[ "MIT" ]
null
null
null
defmodule Brando.Blueprint.Attributes do @moduledoc """ ### Attributes #### Uniqueness To create an unique index in the db as well as running `unique_constraint` in the changeset: attribute :email, unique: true If you have fields that need to be unique together: attribute :email, unique: [with: :other_field] If you need uniqueness, but are fine with changing the attribute attribute :slug, unique: [prevent_collision: true] This is good for URL slugs. If it detects a collision it will add `-{x}` to the value, where x is the next in sequence. If you need uniqueness, but validated against another field - for instance if you have a `slug` field, but also a `language` field: attribute :slug, unique: [prevent_collision: :language] This allows you to have `%{slug: "test", language: "en"}` and `%{slug: "test", language: "dk"}` without erroring. """ alias Brando.Blueprint.Attribute @valid_attributes [ {:array, :map}, {:array, :id}, {:array, :integer}, {:array, :string}, :array, :boolean, :date, :datetime, :enum, :naive_datetime, :decimal, :file, :float, :id, :integer, :language, :map, :slug, :status, :string, :text, :time, :timestamp, :uuid, :villain ] def validate_attr!(type) when type in @valid_attributes, do: true def validate_attr!({:__aliases__, _, _}), do: true def validate_attr!({:array, {:__aliases__, _, _}}), do: true def validate_attr!(type), do: raise("Unknown type `#{inspect(type)}` given in blueprint") def build_attr(name, type, opts \\ []) def build_attr(name, :language, opts) do default_languages = case Keyword.get(opts, :languages) do nil -> Brando.config(:languages) || [ [value: "en", text: "English"], [value: "no", text: "Norsk"] ] supplied_langs -> supplied_langs end languages = Enum.map(default_languages, fn [value: lang_code, text: _] -> String.to_atom(lang_code) end) %Attribute{ name: name, type: :language, opts: %{values: languages, required: true} } end def build_attr(name, type, opts) do %Attribute{ name: name, type: type, opts: Enum.into(opts, %{}) } end defmacro attributes(do: block) do attributes(__CALLER__, block) end defp attributes(_caller, block) do quote generated: true, location: :keep do Module.put_attribute(__MODULE__, :brando_macro_context, :attributes) Module.register_attribute(__MODULE__, :attrs, accumulate: true) unquote(block) end end defmacro attribute(name, type, opts \\ []) do validate_attr!(type) attribute(__CALLER__, name, type, opts) end defp attribute(_caller, name, type, opts) do quote location: :keep do attr = build_attr( unquote(name), unquote(type), unquote(opts) ) Module.put_attribute(__MODULE__, :attrs, attr) end end def maybe_add_marked_as_deleted_attribute(true) do [build_attr(:marked_as_deleted, :boolean, default: false, virtual: true)] end def maybe_add_marked_as_deleted_attribute(_), do: [] end
23.48227
77
0.622471
7968f421f2ebadf64247b0a2e0b29e807bbd0f89
1,240
exs
Elixir
rumbrella/apps/rumbl/spec/models/user_repo_spec.exs
antonmi/espec_phoenix
51c44b6b1ece9fb48438b93f9765dfe834ee5544
[ "MIT" ]
144
2015-04-30T15:12:46.000Z
2022-01-07T03:40:26.000Z
rumbrella/apps/rumbl/spec/models/user_repo_spec.exs
antonmi/espec_phoenix
51c44b6b1ece9fb48438b93f9765dfe834ee5544
[ "MIT" ]
57
2015-04-29T11:26:54.000Z
2022-01-05T13:35:10.000Z
rumbrella/apps/rumbl/spec/models/user_repo_spec.exs
antonmi/espec_phoenix
51c44b6b1ece9fb48438b93f9765dfe834ee5544
[ "MIT" ]
46
2015-06-12T11:26:15.000Z
2021-12-15T00:38:26.000Z
defmodule Rumbl.UserRepoSpec do use ESpec.Phoenix, async: true, model: User alias Rumbl.User alias Rumbl.Category @valid_attrs %{name: "A User", username: "eva"} describe "converting unique_constraint on username to error" do before do: insert_user(username: "eric") let :changeset do attrs = Map.put(@valid_attrs, :username, "eric") User.changeset(%User{}, attrs) end it do: Repo.insert(changeset()) |> should(be_error_result()) context "when name has been already taken" do let :new_changeset do {:error, changeset} = Repo.insert(changeset()) changeset end it "has error" do error = [ username: {"has already been taken", [constraint: :unique, constraint_name: "users_username_index"]} ] new_changeset().errors |> should(be error) end end end describe "alphabetical order by name" do before do Repo.insert!(%Category{name: "c"}) Repo.insert!(%Category{name: "a"}) Repo.insert!(%Category{name: "b"}) end let :query do query = Category |> Category.alphabetical() from c in query, select: c.name end it do: Repo.all(query()) |> should(eq ~w(a b c)) end end
26.382979
110
0.626613
79691252dbefc955d1bde8bd1ed31adb661be7d7
289
exs
Elixir
priv/repo/migrations/20180223211408_rename_member_columns.exs
ryancharris/who
187a207576240d07e338a1707e5a8eba2e2852d5
[ "MIT" ]
1
2017-08-08T13:22:23.000Z
2017-08-08T13:22:23.000Z
priv/repo/migrations/20180223211408_rename_member_columns.exs
ryancharris/who
187a207576240d07e338a1707e5a8eba2e2852d5
[ "MIT" ]
null
null
null
priv/repo/migrations/20180223211408_rename_member_columns.exs
ryancharris/who
187a207576240d07e338a1707e5a8eba2e2852d5
[ "MIT" ]
null
null
null
defmodule Who.Repo.Migrations.RenameMemberColumns do use Ecto.Migration def change do rename table(:member), :youtube_url, to: :youtube_account rename table(:member), :facebook_url, to: :facebook_account rename table(:member), :twitter_url, to: :twitter_account end end
28.9
63
0.750865
796933e82e50524f3a9903aba5a676805f818377
1,556
ex
Elixir
lib/facebook/config.ex
namredip/facebook.ex
a50ed04ba52e8c4d2322336928bd0183d7b93bcd
[ "MIT" ]
null
null
null
lib/facebook/config.ex
namredip/facebook.ex
a50ed04ba52e8c4d2322336928bd0183d7b93bcd
[ "MIT" ]
null
null
null
lib/facebook/config.ex
namredip/facebook.ex
a50ed04ba52e8c4d2322336928bd0183d7b93bcd
[ "MIT" ]
1
2018-09-10T15:35:53.000Z
2018-09-10T15:35:53.000Z
defmodule Facebook.Config do @moduledoc """ Config helpers """ # URL to the Facebook Graph including the version. def graph_url do Application.fetch_env! :facebook, :graph_url end def graph_video_url do Application.fetch_env! :facebook, :graph_video_url end # App secret a.k.a. client secret def appsecret do IO.warn("'appsecret' method is deprecated. Please use 'app_secret'", Macro.Env.stacktrace(__ENV__)) app_secret() end def app_secret do with :error <- Application.fetch_env(:facebook, :appsecret) do Application.fetch_env!(:facebook, :app_secret) else {:ok, secret} -> IO.warn("'appsecret' configuration value is deprecated. Please use 'app_secret'", Macro.Env.stacktrace(__ENV__)) secret end end def appsecret(appsecret) do IO.warn("'appsecret' method value is deprecated. Please use 'app_secret'", Macro.Env.stacktrace(__ENV__)) app_secret(appsecret) end def app_secret(app_secret) do case Application.fetch_env(:facebook, :appsecret) do {:ok, _} -> IO.warn("'appsecret' configuration value is deprecated. Please use 'app_secret'", Macro.Env.stacktrace(__ENV__)) Application.put_env :facebook, :appsecret, app_secret _ -> Application.put_env :facebook, :app_secret, app_secret end end # App id, a.k.a. client id def app_id do Application.fetch_env! :facebook, :app_id end # App access token def app_access_token do Application.fetch_env! :facebook, :app_access_token end end
28.290909
120
0.696015
79693434a4596ca64fc37f9cf7bdb5e0a1cb56ff
961
ex
Elixir
web/views/user_view.ex
usecanvas/api-v2
59214db3a2cf12eb939f22fed320fd10cb47cdfe
[ "Apache-2.0" ]
123
2017-04-04T18:15:48.000Z
2021-04-26T08:04:22.000Z
web/views/user_view.ex
usecanvas/api-v2
59214db3a2cf12eb939f22fed320fd10cb47cdfe
[ "Apache-2.0" ]
null
null
null
web/views/user_view.ex
usecanvas/api-v2
59214db3a2cf12eb939f22fed320fd10cb47cdfe
[ "Apache-2.0" ]
17
2017-04-04T18:58:29.000Z
2021-05-10T21:39:16.000Z
defmodule CanvasAPI.UserView do use CanvasAPI.Web, :view alias CanvasAPI.AvatarURL def render("show.json", %{user: user}) do %{data: render_one(user, CanvasAPI.UserView, "user.json")} end def render("user.json", %{user: user}) do %{ id: user.id, attributes: %{ avatar_url: AvatarURL.create(user.email), email: user.email, images: user.images, name: user.name, slack_id: user.slack_id, inserted_at: user.inserted_at, updated_at: user.updated_at }, relationships: %{ canvases: %{ links: %{ related: team_canvas_path(CanvasAPI.Endpoint, :index, user.team.id) } }, team: %{ data: %{ id: user.team.id, type: "team" }, links: %{ related: team_path(CanvasAPI.Endpoint, :show, user.team.id), } } }, type: "user" } end end
23.439024
79
0.529657
796937c718dee64287449fa03cc290e19fb1c5ad
2,235
exs
Elixir
config/prod.exs
Cobenian/rackit
e886ebbf1a590d4031d5f79f868ce2d725e9910a
[ "Apache-2.0" ]
null
null
null
config/prod.exs
Cobenian/rackit
e886ebbf1a590d4031d5f79f868ce2d725e9910a
[ "Apache-2.0" ]
6
2015-06-10T13:33:57.000Z
2015-06-10T14:10:06.000Z
config/prod.exs
Cobenian/rackit
e886ebbf1a590d4031d5f79f868ce2d725e9910a
[ "Apache-2.0" ]
null
null
null
use Mix.Config # For production, we configure the host to read the PORT # from the system environment. Therefore, you will need # to set PORT=80 before running your server. # # You should also configure the url host to something # meaningful, we use this information when generating URLs. # # Finally, we also include the path to a manifest # containing the digested version of static files. This # manifest is generated by the mix phoenix.digest task # which you typically run after static files are built. config :rackit, Rackit.Endpoint, http: [port: {:system, "PORT"}], url: [host: "rack-it.herokuapp.com", port: 80], cache_static_manifest: "priv/static/manifest.json", secret_key_base: System.get_env("SECRET_KEY_BASE") # Do not print debug messages in production config :logger, level: :info # Configure your database config :rackit, Rackit.Repo, adapter: Ecto.Adapters.Postgres, url: System.get_env("DATABASE_URL"), size: 20 # The amount of database connections in the pool # ## SSL Support # # To get SSL working, you will need to add the `https` key # to the previous section and set your `:url` port to 443: # # config :rackit, Rackit.Endpoint, # ... # url: [host: "example.com", port: 443], # https: [port: 443, # keyfile: System.get_env("SOME_APP_SSL_KEY_PATH"), # certfile: System.get_env("SOME_APP_SSL_CERT_PATH")] # # Where those two env variables return an absolute path to # the key and cert in disk or a relative path inside priv, # for example "priv/ssl/server.key". # # We also recommend setting `force_ssl`, ensuring no data is # ever sent via http, always redirecting to https: # # config :rackit, Rackit.Endpoint, # force_ssl: [hsts: true] # # Check `Plug.SSL` for all available options in `force_ssl`. # ## Using releases # # If you are doing OTP releases, you need to instruct Phoenix # to start the server for all endpoints: # # config :phoenix, :serve_endpoints, true # # Alternatively, you can configure exactly which server to # start per endpoint: # # config :rackit, Rackit.Endpoint, server: true # # Finally import the config/prod.secret.exs # which should be versioned separately. #import_config "prod.secret.exs"
32.391304
67
0.717673
79693e78ef628dc24b34b4ec24d05d85aa49d08a
1,672
exs
Elixir
config/dev.exs
brunobamaral/desafio_api
90362b0fa6c0c9e3c4d1c212fe84b7ad264a46f6
[ "Apache-2.0" ]
null
null
null
config/dev.exs
brunobamaral/desafio_api
90362b0fa6c0c9e3c4d1c212fe84b7ad264a46f6
[ "Apache-2.0" ]
null
null
null
config/dev.exs
brunobamaral/desafio_api
90362b0fa6c0c9e3c4d1c212fe84b7ad264a46f6
[ "Apache-2.0" ]
null
null
null
import Config # Configure your database config :desafio_api, DesafioApi.Repo, username: "postgres", password: "postgres", database: "desafio_api_dev", hostname: "localhost", show_sensitive_data_on_connection_error: true, pool_size: 10 # For development, we disable any cache and enable # debugging and code reloading. # # The watchers configuration can be used to run external # watchers to your application. For example, we use it # with webpack to recompile .js and .css sources. config :desafio_api_web, DesafioApiWeb.Endpoint, http: [port: 4000], debug_errors: true, code_reloader: true, check_origin: false, watchers: [] # ## SSL Support # # In order to use HTTPS in development, a self-signed # certificate can be generated by running the following # Mix task: # # mix phx.gen.cert # # Note that this task requires Erlang/OTP 20 or later. # Run `mix help phx.gen.cert` for more information. # # The `http:` config above can be replaced with: # # https: [ # port: 4001, # cipher_suite: :strong, # keyfile: "priv/cert/selfsigned_key.pem", # certfile: "priv/cert/selfsigned.pem" # ], # # If desired, both `http:` and `https:` keys can be # configured to run both http and https servers on # different ports. # Do not include metadata nor timestamps in development logs config :logger, :console, format: "[$level] $message\n" # Initialize plugs at runtime for faster development compilation config :phoenix, :plug_init_mode, :runtime # Set a higher stacktrace during development. Avoid configuring such # in production as building large stacktraces may be expensive. config :phoenix, :stacktrace_depth, 20
28.827586
68
0.730263
79694a93c6e0a9c89f6a93af7c871f119d736204
2,556
ex
Elixir
lib/math/matrix_utils.ex
boydm/scenic_math
94e45cd8ba16362583516059a071cff3fe6d1629
[ "Apache-2.0" ]
10
2018-09-07T21:54:47.000Z
2020-02-03T08:49:49.000Z
lib/math/matrix_utils.ex
boydm/scenic_math
94e45cd8ba16362583516059a071cff3fe6d1629
[ "Apache-2.0" ]
3
2018-09-08T07:46:00.000Z
2018-09-15T01:34:41.000Z
lib/math/matrix_utils.ex
boydm/scenic_math
94e45cd8ba16362583516059a071cff3fe6d1629
[ "Apache-2.0" ]
6
2018-09-07T21:57:19.000Z
2018-09-17T06:58:06.000Z
# # Copyright © 2017 Boyd Multerer. All rights reserved. # defmodule Scenic.Math.Matrix.Utils do @moduledoc """ Helper functions for working with matrices. The matrix format for the main Scenic.Math.Matrix functions is a 64 byte binary blob containing 16 4-byte floats. This is great for doing the math in code, but not so great for reading or understanding the values by a human. These functions transform more readable/writable formats into the binary blob and vice versa. """ alias Scenic.Math # @default_major :row # @matrix_size 4 * 16 # -------------------------------------------------------- # binary format is column-major @doc """ Convert a readable format into a binary blob. Parameters: * matrix_list - a list of 16 numbers Returns: A binary matrix blob """ @spec to_binary(matrix :: Math.matrix_list) :: Math.matrix def to_binary( matrix_list ) # -------------------------------------------------------- # binary format is column-major def to_binary( [ a00, a10, a20, a30, a01, a11, a21, a31, a02, a12, a22, a32, a03, a13, a23, a33 ] ) do << a00::float-size(32)-native, a10::float-size(32)-native, a20::float-size(32)-native, a30::float-size(32)-native, a01::float-size(32)-native, a11::float-size(32)-native, a21::float-size(32)-native, a31::float-size(32)-native, a02::float-size(32)-native, a12::float-size(32)-native, a22::float-size(32)-native, a32::float-size(32)-native, a03::float-size(32)-native, a13::float-size(32)-native, a23::float-size(32)-native, a33::float-size(32)-native >> end @doc """ Convert a binary matrix into a list of 16 numbers. Parameters: * matrix - a binary matrix Returns: A list of 16 nubmers """ def to_list( matrix ) def to_list( << a00::float-size(32)-native, a10::float-size(32)-native, a20::float-size(32)-native, a30::float-size(32)-native, a01::float-size(32)-native, a11::float-size(32)-native, a21::float-size(32)-native, a31::float-size(32)-native, a02::float-size(32)-native, a12::float-size(32)-native, a22::float-size(32)-native, a32::float-size(32)-native, a03::float-size(32)-native, a13::float-size(32)-native, a23::float-size(32)-native, a33::float-size(32)-native >> ) do [ a00, a10, a20, a30, a01, a11, a21, a31, a02, a12, a22, a32, a03, a13, a23, a33 ] end end
23.88785
81
0.595853
79695b370e7fd3f22ccbca5b7020b212491266a1
17,312
exs
Elixir
lib/elixir/test/elixir/module/types/infer_test.exs
cadebward/elixir
64c5466f872bc5c4671b47fa1ff3368d6c4473c1
[ "Apache-2.0" ]
1
2019-10-11T01:36:26.000Z
2019-10-11T01:36:26.000Z
lib/elixir/test/elixir/module/types/infer_test.exs
hiro-riveros/elixir
c6da1cfaa83e420726be25617440fc09f118de52
[ "Apache-2.0" ]
null
null
null
lib/elixir/test/elixir/module/types/infer_test.exs
hiro-riveros/elixir
c6da1cfaa83e420726be25617440fc09f118de52
[ "Apache-2.0" ]
null
null
null
Code.require_file("../../test_helper.exs", __DIR__) defmodule Module.Types.InferTest do use ExUnit.Case, async: true import Module.Types.Infer alias Module.Types defmacrop quoted_pattern(expr) do quote do of_pattern(unquote(Macro.escape(expr)), new_stack(), new_context()) |> lift_result() end end defmacrop quoted_guard(guards, context) do quote do of_guard(unquote(Macro.escape(expand_guards(guards))), new_stack(), unquote(context)) end end defp expand_guards(guards) do fun = quote do fn var!(x) when unquote(guards) -> var!(x) end end {ast, _env} = :elixir_expand.expand(fun, __ENV__) {:fn, _, [{:->, _, [[{:when, _, [_, guards]}], _]}]} = ast guards end defp unify_lift(left, right, context \\ new_context()) do unify(left, right, new_stack(), context) |> lift_result() end defp new_context() do Types.context("types_test.ex", TypesTest, {:test, 0}) end defp new_stack() do %{ Types.stack() | expr_stack: [{:foo, [], nil}] } end defp unify(left, right, context) do unify(left, right, new_stack(), context) end defp lift_result({:ok, type, context}) do {:ok, Types.lift_type(type, context)} end defp lift_result({:error, {Types, reason, location}}) do {:error, {reason, location}} end describe "of_pattern/2" do test "error location" do assert {:error, {{:unable_unify, :binary, :integer, expr, traces}, location}} = quoted_pattern(<<foo::integer, foo::binary>>) assert location == [{"types_test.ex", 63, {TypesTest, :test, 0}}] assert {:<<>>, _, [ {:"::", _, [{:foo, _, nil}, {:integer, _, nil}]}, {:"::", _, [{:foo, _, nil}, {:binary, _, nil}]} ]} = expr assert [ {{:foo, _, nil}, {:type, :binary, {:"::", _, [{:foo, _, nil}, {:binary, _, nil}]}, {"types_test.ex", 63}}}, {{:foo, _, nil}, {:type, :integer, {:"::", _, [{:foo, _, nil}, {:integer, _, nil}]}, {"types_test.ex", 63}}} ] = traces end test "literal" do assert quoted_pattern(true) == {:ok, {:atom, true}} assert quoted_pattern(false) == {:ok, {:atom, false}} assert quoted_pattern(:foo) == {:ok, {:atom, :foo}} assert quoted_pattern(0) == {:ok, :integer} assert quoted_pattern(0.0) == {:ok, :float} assert quoted_pattern("foo") == {:ok, :binary} end test "list" do assert quoted_pattern([]) == {:ok, {:list, :dynamic}} assert quoted_pattern([123]) == {:ok, {:list, :integer}} assert quoted_pattern([123, 456]) == {:ok, {:list, :integer}} assert quoted_pattern([123 | []]) == {:ok, {:list, :integer}} assert quoted_pattern([123, "foo"]) == {:ok, {:list, {:union, [:integer, :binary]}}} assert quoted_pattern([123 | ["foo"]]) == {:ok, {:list, {:union, [:integer, :binary]}}} # TODO: improper list? assert quoted_pattern([123 | 456]) == {:ok, {:list, :integer}} assert quoted_pattern([123, 456 | 789]) == {:ok, {:list, :integer}} assert quoted_pattern([123 | "foo"]) == {:ok, {:list, {:union, [:integer, :binary]}}} end test "tuple" do assert quoted_pattern({}) == {:ok, {:tuple, []}} assert quoted_pattern({:a}) == {:ok, {:tuple, [{:atom, :a}]}} assert quoted_pattern({:a, 123}) == {:ok, {:tuple, [{:atom, :a}, :integer]}} end test "map" do assert quoted_pattern(%{}) == {:ok, {:map, []}} assert quoted_pattern(%{a: :b}) == {:ok, {:map, [{{:atom, :a}, {:atom, :b}}]}} assert quoted_pattern(%{123 => a}) == {:ok, {:map, [{:integer, {:var, 0}}]}} assert quoted_pattern(%{123 => :foo, 456 => :bar}) == {:ok, {:map, [{:integer, {:union, [{:atom, :bar}, {:atom, :foo}]}}]}} assert {:error, {{:unable_unify, {:atom, :foo}, :integer, _, _}, _}} = quoted_pattern(%{a: a = 123, b: a = :foo}) end test "struct" do defmodule :"Elixir.Module.Types.InferTest.Struct" do defstruct foo: :atom, bar: 123, baz: %{} end assert quoted_pattern(%:"Elixir.Module.Types.InferTest.Struct"{}) == {:ok, {:map, [{{:atom, :__struct__}, {:atom, Module.Types.InferTest.Struct}}]}} assert quoted_pattern(%:"Elixir.Module.Types.InferTest.Struct"{foo: 123, bar: :atom}) == {:ok, {:map, [ {{:atom, :__struct__}, {:atom, Module.Types.InferTest.Struct}}, {{:atom, :foo}, :integer}, {{:atom, :bar}, {:atom, :atom}} ]}} end test "struct var" do assert quoted_pattern(%var{}) == {:ok, {:map, [{{:atom, :__struct__}, :atom}]}} assert quoted_pattern(%var{foo: 123}) == {:ok, {:map, [{{:atom, :__struct__}, :atom}, {{:atom, :foo}, :integer}]}} assert quoted_pattern(%var{foo: var}) == {:ok, {:map, [{{:atom, :__struct__}, :atom}, {{:atom, :foo}, :atom}]}} end test "binary" do assert quoted_pattern(<<"foo"::binary>>) == {:ok, :binary} assert quoted_pattern(<<123::integer>>) == {:ok, :binary} assert quoted_pattern(<<foo::integer>>) == {:ok, :binary} assert quoted_pattern(<<123::utf8>>) == {:ok, :binary} assert quoted_pattern(<<"foo"::utf8>>) == {:ok, :binary} assert quoted_pattern({<<foo::integer>>, foo}) == {:ok, {:tuple, [:binary, :integer]}} assert quoted_pattern({<<foo::binary>>, foo}) == {:ok, {:tuple, [:binary, :binary]}} assert quoted_pattern({<<foo::utf8>>, foo}) == {:ok, {:tuple, [:binary, :integer]}} assert {:error, {{:unable_unify, :integer, :binary, _, _}, _}} = quoted_pattern(<<123::binary>>) assert {:error, {{:unable_unify, :binary, :integer, _, _}, _}} = quoted_pattern(<<"foo"::integer>>) assert {:error, {{:unable_unify, :integer, :binary, _, _}, _}} = quoted_pattern(<<foo::binary, foo::integer>>) end test "variables" do assert quoted_pattern(foo) == {:ok, {:var, 0}} assert quoted_pattern({foo}) == {:ok, {:tuple, [{:var, 0}]}} assert quoted_pattern({foo, bar}) == {:ok, {:tuple, [{:var, 0}, {:var, 1}]}} assert quoted_pattern(_) == {:ok, :dynamic} assert quoted_pattern({_ = 123, _}) == {:ok, {:tuple, [:integer, :dynamic]}} end test "assignment" do assert quoted_pattern(x = y) == {:ok, {:var, 0}} assert quoted_pattern(x = 123) == {:ok, :integer} assert quoted_pattern({foo}) == {:ok, {:tuple, [{:var, 0}]}} assert quoted_pattern({x = y}) == {:ok, {:tuple, [{:var, 0}]}} assert quoted_pattern(x = y = 123) == {:ok, :integer} assert quoted_pattern(x = 123 = y) == {:ok, :integer} assert quoted_pattern(123 = x = y) == {:ok, :integer} assert {:error, {{:unable_unify, {:tuple, [var: 0]}, {:var, 0}, _, _}, _}} = quoted_pattern({x} = x) end end describe "unify/3" do test "literal" do assert unify_lift({:atom, :foo}, {:atom, :foo}) == {:ok, {:atom, :foo}} assert {:error, {{:unable_unify, {:atom, :foo}, {:atom, :bar}, _, _}, _}} = unify_lift({:atom, :foo}, {:atom, :bar}) end test "type" do assert unify_lift(:integer, :integer) == {:ok, :integer} assert unify_lift(:binary, :binary) == {:ok, :binary} assert unify_lift(:atom, :atom) == {:ok, :atom} assert unify_lift(:boolean, :boolean) == {:ok, :boolean} assert {:error, {{:unable_unify, :integer, :boolean, _, _}, _}} = unify_lift(:integer, :boolean) end test "subtype" do assert unify_lift(:boolean, :atom) == {:ok, :boolean} assert unify_lift(:atom, :boolean) == {:ok, :boolean} assert unify_lift(:boolean, {:atom, true}) == {:ok, {:atom, true}} assert unify_lift({:atom, true}, :boolean) == {:ok, {:atom, true}} assert unify_lift(:atom, {:atom, true}) == {:ok, {:atom, true}} assert unify_lift({:atom, true}, :atom) == {:ok, {:atom, true}} end test "tuple" do assert unify_lift({:tuple, []}, {:tuple, []}) == {:ok, {:tuple, []}} assert unify_lift({:tuple, [:integer]}, {:tuple, [:integer]}) == {:ok, {:tuple, [:integer]}} assert unify_lift({:tuple, [:boolean]}, {:tuple, [:atom]}) == {:ok, {:tuple, [:boolean]}} assert {:error, {{:unable_unify, {:tuple, [:integer]}, {:tuple, []}, _, _}, _}} = unify_lift({:tuple, [:integer]}, {:tuple, []}) assert {:error, {{:unable_unify, :integer, :atom, _, _}, _}} = unify_lift({:tuple, [:integer]}, {:tuple, [:atom]}) end test "list" do assert unify_lift({:list, :integer}, {:list, :integer}) == {:ok, {:list, :integer}} assert {:error, {{:unable_unify, :atom, :integer, _, _}, _}} = unify_lift({:list, :atom}, {:list, :integer}) end test "map" do assert unify_lift({:map, []}, {:map, []}) == {:ok, {:map, []}} assert unify_lift({:map, [{:integer, :atom}]}, {:map, []}) == {:ok, {:map, [{:integer, :atom}]}} assert unify_lift({:map, []}, {:map, [{:integer, :atom}]}) == {:ok, {:map, [{:integer, :atom}]}} assert unify_lift({:map, [{:integer, :atom}]}, {:map, [{:integer, :atom}]}) == {:ok, {:map, [{:integer, :atom}]}} assert unify_lift({:map, [{:integer, :atom}]}, {:map, [{:atom, :integer}]}) == {:ok, {:map, [{:integer, :atom}, {:atom, :integer}]}} assert unify_lift( {:map, [{{:atom, :foo}, :boolean}]}, {:map, [{{:atom, :foo}, :atom}]} ) == {:ok, {:map, [{{:atom, :foo}, :boolean}]}} assert {:error, {{:unable_unify, :integer, :atom, _, _}, _}} = unify_lift( {:map, [{{:atom, :foo}, :integer}]}, {:map, [{{:atom, :foo}, :atom}]} ) end test "union" do assert unify_lift({:union, []}, {:union, []}) == {:ok, {:union, []}} assert unify_lift({:union, [:integer]}, {:union, [:integer]}) == {:ok, {:union, [:integer]}} assert unify_lift({:union, [:integer, :atom]}, {:union, [:integer, :atom]}) == {:ok, {:union, [:integer, :atom]}} assert unify_lift({:union, [:integer, :atom]}, {:union, [:atom, :integer]}) == {:ok, {:union, [:integer, :atom]}} assert unify_lift({:union, [:atom]}, {:union, [:boolean]}) == {:ok, {:union, [:boolean]}} assert unify_lift({:union, [:boolean]}, {:union, [:atom]}) == {:ok, {:union, [:boolean]}} assert {:error, {{:unable_unify, {:union, [:integer]}, {:union, [:atom]}, _, _}, _}} = unify_lift({:union, [:integer]}, {:union, [:atom]}) end test "dynamic" do assert unify_lift({:atom, :foo}, :dynamic) == {:ok, {:atom, :foo}} assert unify_lift(:dynamic, {:atom, :foo}) == {:ok, {:atom, :foo}} assert unify_lift(:integer, :dynamic) == {:ok, :integer} assert unify_lift(:dynamic, :integer) == {:ok, :integer} end test "vars" do assert {{:var, 0}, var_context} = new_var({:foo, [], nil}, new_context()) assert {{:var, 1}, var_context} = new_var({:bar, [], nil}, var_context) assert {:ok, {:var, 0}, context} = unify({:var, 0}, :integer, var_context) assert Types.lift_type({:var, 0}, context) == :integer assert {:ok, {:var, 0}, context} = unify(:integer, {:var, 0}, var_context) assert Types.lift_type({:var, 0}, context) == :integer assert {:ok, {:var, _}, context} = unify({:var, 0}, {:var, 1}, var_context) assert {:var, _} = Types.lift_type({:var, 0}, context) assert {:var, _} = Types.lift_type({:var, 1}, context) assert {:ok, {:var, 0}, context} = unify({:var, 0}, :integer, var_context) assert {:ok, {:var, 1}, context} = unify({:var, 1}, :integer, context) assert {:ok, {:var, _}, context} = unify({:var, 0}, {:var, 1}, context) assert {:ok, {:var, 0}, context} = unify({:var, 0}, :integer, var_context) assert {:ok, {:var, 1}, context} = unify({:var, 1}, :integer, context) assert {:ok, {:var, _}, context} = unify({:var, 1}, {:var, 0}, context) assert {:ok, {:var, 0}, context} = unify({:var, 0}, :integer, var_context) assert {:ok, {:var, 1}, context} = unify({:var, 1}, :binary, context) assert {:error, {{:unable_unify, :binary, :integer, _, _}, _}} = unify_lift({:var, 0}, {:var, 1}, context) assert {:ok, {:var, 0}, context} = unify({:var, 0}, :integer, var_context) assert {:ok, {:var, 1}, context} = unify({:var, 1}, :binary, context) assert {:error, {{:unable_unify, :integer, :binary, _, _}, _}} = unify_lift({:var, 1}, {:var, 0}, context) end test "vars inside tuples" do assert {{:var, 0}, var_context} = new_var({:foo, [], nil}, new_context()) assert {{:var, 1}, var_context} = new_var({:bar, [], nil}, var_context) assert {:ok, {:tuple, [{:var, 0}]}, context} = unify({:tuple, [{:var, 0}]}, {:tuple, [:integer]}, var_context) assert Types.lift_type({:var, 0}, context) == :integer assert {:ok, {:var, 0}, context} = unify({:var, 0}, :integer, var_context) assert {:ok, {:var, 1}, context} = unify({:var, 1}, :integer, context) assert {:ok, {:tuple, [{:var, _}]}, context} = unify({:tuple, [{:var, 0}]}, {:tuple, [{:var, 1}]}, context) assert {:ok, {:var, 1}, context} = unify({:var, 1}, {:tuple, [{:var, 0}]}, var_context) assert {:ok, {:var, 0}, context} = unify({:var, 0}, :integer, context) assert Types.lift_type({:var, 1}, context) == {:tuple, [:integer]} assert {:ok, {:var, 0}, context} = unify({:var, 0}, :integer, var_context) assert {:ok, {:var, 1}, context} = unify({:var, 1}, :binary, context) assert {:error, {{:unable_unify, :binary, :integer, _, _}, _}} = unify_lift({:tuple, [{:var, 0}]}, {:tuple, [{:var, 1}]}, context) end # TODO: Vars inside unions test "recursive type" do assert {{:var, 0}, var_context} = new_var({:foo, [], nil}, new_context()) assert {{:var, 1}, var_context} = new_var({:bar, [], nil}, var_context) assert {{:var, 2}, var_context} = new_var({:baz, [], nil}, var_context) assert {:ok, {:var, _}, context} = unify({:var, 0}, {:var, 1}, var_context) assert {:ok, {:var, _}, context} = unify({:var, 1}, {:var, 0}, context) assert {:ok, {:var, _}, context} = unify({:var, 0}, {:var, 1}, var_context) assert {:ok, {:var, _}, context} = unify({:var, 1}, {:var, 2}, context) assert {:ok, {:var, _}, context} = unify({:var, 2}, {:var, 0}, context) assert {:ok, {:var, _}, context} = unify({:var, 0}, {:var, 1}, var_context) assert {:error, {{:unable_unify, {:tuple, [var: 0]}, {:var, 0}, _, _}, _}} = unify_lift({:var, 1}, {:tuple, [{:var, 0}]}, context) assert {:ok, {:var, _}, context} = unify({:var, 0}, {:var, 1}, var_context) assert {:ok, {:var, _}, context} = unify({:var, 1}, {:var, 2}, context) assert {:error, {{:unable_unify, {:tuple, [var: 0]}, {:var, 0}, _, _}, _}} = unify_lift({:var, 2}, {:tuple, [{:var, 0}]}, context) end end test "of_guard/2" do assert {{:var, 0}, var_context} = new_var({:x, [], nil}, new_context()) assert {:ok, :boolean, context} = quoted_guard(is_tuple(x), var_context) assert Types.lift_type({:var, 0}, context) == :tuple assert {:ok, :dynamic, context} = quoted_guard(elem(x, 0), var_context) assert Types.lift_type({:var, 0}, context) == :tuple assert {:error, {_, {:unable_unify, :boolean, :tuple, _, _}, _}} = quoted_guard(is_tuple(x) and is_boolean(x), var_context) end test "subtype?/3" do assert subtype?({:atom, :foo}, :atom, new_context()) assert subtype?({:atom, true}, :boolean, new_context()) assert subtype?({:atom, true}, :atom, new_context()) assert subtype?(:boolean, :atom, new_context()) refute subtype?(:integer, :binary, new_context()) refute subtype?(:atom, {:atom, :foo}, new_context()) refute subtype?(:boolean, {:atom, true}, new_context()) refute subtype?(:atom, {:atom, true}, new_context()) refute subtype?(:atom, :boolean, new_context()) end test "to_union/2" do assert to_union([:atom], new_context()) == :atom assert to_union([:integer, :integer], new_context()) == :integer assert to_union([:boolean, :atom], new_context()) == :atom assert to_union([{:atom, :foo}, :boolean, :atom], new_context()) == :atom assert to_union([:binary, :atom], new_context()) == {:union, [:binary, :atom]} assert to_union([:atom, :binary, :atom], new_context()) == {:union, [:atom, :binary]} assert to_union([{:atom, :foo}, :binary, :atom], new_context()) == {:union, [:binary, :atom]} assert {{:var, 0}, var_context} = new_var({:foo, [], nil}, new_context()) assert to_union([{:var, 0}], var_context) == {:var, 0} assert to_union([{:tuple, [:integer]}, {:tuple, [:integer]}], new_context()) == {:tuple, [:integer]} end end
40.448598
98
0.528131
79698f8aa9d17d24b9111d0f30aaee33dd6e5241
4,038
exs
Elixir
examples/play_from_file_h264/run.exs
livinginthepast/specter
65ab35ace7bf34074a58d0ed27a14ddd6bf97034
[ "MIT" ]
8
2022-02-25T09:53:57.000Z
2022-03-28T12:31:56.000Z
examples/play_from_file_h264/run.exs
livinginthepast/specter
65ab35ace7bf34074a58d0ed27a14ddd6bf97034
[ "MIT" ]
10
2022-03-26T14:40:12.000Z
2022-03-30T17:05:53.000Z
examples/play_from_file_h264/run.exs
livinginthepast/specter
65ab35ace7bf34074a58d0ed27a14ddd6bf97034
[ "MIT" ]
1
2022-03-25T21:30:53.000Z
2022-03-25T21:30:53.000Z
# helper module until we add support # for subscribing for various state changes defmodule Stopwatch do def wait_for_ice_gathering_complete(specter, pc) do :ok = Specter.PeerConnection.ice_gathering_state(specter, pc) receive do {:ice_gathering_state, ^pc, :complete} -> IO.puts("ICE gathering complete") {:ice_gathering_state, ^pc, _other} -> wait_for_ice_gathering_complete(specter, pc) end end def wait_for_peer_connection_connected(specter, pc) do :ok = Specter.PeerConnection.connection_state(specter, pc) receive do {:connection_state, ^pc, :connected} -> IO.puts("Peer connection connected") {:connection_state, ^pc, :failed} -> IO.puts("Peer connection failed") exit(:normal) {:connection_state, ^pc, _other} -> wait_for_peer_connection_connected(specter, pc) end end def wait_for_peer_connection_ready(pc) do receive do {:peer_connection_ready, ^pc} -> :ok after: 100 -> {:error, :timeout} end end def wait_for_rtp_sender(pc, track) do receive do {:rtp_sender, ^pc, ^track, rtp_sender} -> {:ok, rtp_sender} after: 100 -> {:error, :timeout} end end def wait_for_set_remote_description(pc) do receive do {:ok, ^pc, :set_remote_description} -> :ok after: 100 -> {:error, :timeout} end end def wait_for_answer(pc) do receive do {:answer, ^pc, answer} -> {:ok, answer} after: 100 -> {:error, :timeout} end end def wait_for_set_local_description(pc) do receive do {:ok, ^pc, :set_local_description} -> :ok after: 100 -> {:error, :timeout} end end def wait_for_local_description(pc) do receive do {:local_description, ^pc, answer} -> {:ok, answer} after: 100 -> {:error, :timeout} end end def wait_for_playback_finished(track) do receive do {:playback_finished, ^track} -> :ok end end def wait_for_peer_connection_close(pc) do receive do {:peer_connection_closed, ^pc} -> :ok after: 100 -> {:error, :timeout} end end end offer = case System.argv() do [offer] -> Base.decode64!(String.trim(offer)) _other -> IO.puts(""" Invalid arguments. Usage: mix run --no-halt examples/play_from_file.exs <base64_browser_offer_string> """) exit(:normal) end {:ok, specter} = Specter.init(ice_servers: ["stun:stun.l.google.com:19302"]) {:ok, media_engine} = Specter.new_media_engine(specter) {:ok, registry} = Specter.new_registry(specter, media_engine) {:ok, api} = Specter.new_api(specter, media_engine, registry) {:ok, pc} = Specter.PeerConnection.new(specter, api) :ok = Stopwatch.wait_for_peer_connection_ready(pc) codec = %Specter.RtpCodecCapability{mime_type: "video/H264"} {:ok, track} = Specter.TrackLocalStaticSample.new(specter, codec, "video", "specter") :ok = Specter.PeerConnection.add_track(specter, pc, track) {:ok, _rtp_sender} = Stopwatch.wait_for_rtp_sender(pc, track) :ok = Specter.PeerConnection.set_remote_description(specter, pc, offer) :ok = Stopwatch.wait_for_set_remote_description(pc) :ok = Specter.PeerConnection.create_answer(specter, pc) {:ok, answer} = Stopwatch.wait_for_answer(pc) :ok = Specter.PeerConnection.set_local_description(specter, pc, answer) :ok = Stopwatch.wait_for_set_local_description(pc) # we don't have to fetch ICE candidates # they will be included automatically in a local description Stopwatch.wait_for_ice_gathering_complete(specter, pc) :ok = Specter.PeerConnection.local_description(specter, pc) {:ok, answer} = Stopwatch.wait_for_local_description(pc) IO.puts(Base.encode64(answer)) Stopwatch.wait_for_peer_connection_connected(specter, pc) :ok = Specter.TrackLocalStaticSample.play_from_file_h264( specter, track, "examples/play_from_file_h264/sample_video.h264" ) :ok = Stopwatch.wait_for_playback_finished(track) :ok = Specter.PeerConnection.close(specter, pc) :ok = Stopwatch.wait_for_peer_connection_close(pc)
28.237762
89
0.698613
7969a003b003adf7248ac9be86d4e35d91705b15
566
ex
Elixir
lib/saitama/workout.ex
tfwright/saitama
7f76ee2c8f01ee9b7a1507667904b9c691124112
[ "Apache-2.0" ]
5
2020-06-18T11:44:20.000Z
2021-08-28T10:39:57.000Z
lib/saitama/workout.ex
tfwright/saitama
7f76ee2c8f01ee9b7a1507667904b9c691124112
[ "Apache-2.0" ]
1
2021-03-10T07:41:31.000Z
2021-03-10T07:41:31.000Z
lib/saitama/workout.ex
tfwright/saitama
7f76ee2c8f01ee9b7a1507667904b9c691124112
[ "Apache-2.0" ]
null
null
null
defmodule Saitama.Workout do use Ecto.Schema import Ecto.Changeset alias Saitama.{Workout, Set} @derive Jason.Encoder @primary_key false embedded_schema do field(:uuid, Ecto.UUID) field(:name, :string) embeds_many(:sets, Set, on_replace: :delete) end @doc false def changeset(%Workout{} = workout, attrs) do workout |> cast(attrs, [:name]) |> validate_required([:name]) |> cast_embed(:sets, required: true, required_message: "must contain at least one item") |> put_change(:uuid, Ecto.UUID.generate()) end end
22.64
92
0.678445
7969a7a225dd2ced151cd31ed5daf4e7ef9942ae
205,527
ex
Elixir
data/auto_generated/video/05882acbf67df48775d33dab86ba447a.ex
breunigs/veloroute
ac3b1eeb2ef2369c27186a138f6ffd8284652dab
[ "0BSD" ]
12
2018-06-15T10:18:43.000Z
2022-01-24T12:50:54.000Z
data/auto_generated/video/05882acbf67df48775d33dab86ba447a.ex
breunigs/veloroute
ac3b1eeb2ef2369c27186a138f6ffd8284652dab
[ "0BSD" ]
15
2018-06-21T18:04:12.000Z
2021-10-16T12:54:39.000Z
data/auto_generated/video/05882acbf67df48775d33dab86ba447a.ex
breunigs/veloroute
ac3b1eeb2ef2369c27186a138f6ffd8284652dab
[ "0BSD" ]
2
2020-03-09T19:21:36.000Z
2022-01-16T03:29:51.000Z
defmodule(Data.AutoGenerated.Video.Rendered_05882acbf67df48775d33dab86ba447a) do @moduledoc "#{"Wandseradweg (FR3): entlang der Wandse in die Innenstadt"} AUTOGENERATED. To update this file, run mix velo.videos.generate. See Video.Rendered for functionality. " @behaviour Video.Rendered @impl Video.Rendered def(name()) do "Wandseradweg (FR3): entlang der Wandse in die Innenstadt" end @impl Video.Rendered def(hash()) do "05882acbf67df48775d33dab86ba447a" end @impl Video.Rendered def(length_ms()) do 863_909 end @impl Video.Rendered def(sources()) do [ {"2021-04-18-freizeitroute3/GX011350", "00:04:44.785", :end}, {"2021-04-18-freizeitroute3/GX011351", :start, :end}, {"2021-04-18-freizeitroute3/GX011352", "00:00:13.714", "00:01:42.569"}, {"2021-04-18-freizeitroute3/GX011352", "00:02:10.497", "00:02:59.413"}, {"2021-04-18-freizeitroute3/GX011352", "00:02:59.880", :end}, {"2021-04-18-freizeitroute3/GX011353", :start, :end}, {"2021-04-18-freizeitroute3/GX011354", :start, :end}, {"2021-04-18-freizeitroute3/GX011355", :start, :end}, {"2021-04-18-freizeitroute3/GX011356", :start, :end}, {"2021-04-18-freizeitroute3/GX011357", :start, :end}, {"2021-04-18-freizeitroute3/GX011358", :start, :end}, {"2021-04-18-freizeitroute3/GX011359", :start, :end}, {"2021-04-18-freizeitroute3/GX011360", :start, "00:02:00.187"}, {"2021-07-26-missing-parts-fr2-fr3/GX012422", "00:00:03.570", "00:00:05.138"}, {"2021-07-26-missing-parts-fr2-fr3/GX012423", :start, "00:00:02.469"}, {"2021-07-26-missing-parts-fr2-fr3/GX012428", :start, :end}, {"2021-07-26-missing-parts-fr2-fr3/GX012429", :start, "00:00:04.037"}, {"2021-04-10-freizeitroute2/GX011242", "00:01:19.846", "00:01:33.660"}, {"2021-06-13-veloroute-5-5a-und-13rein/GX011822", "00:00:15.849", :end}, {"2021-06-13-veloroute-5-5a-und-13rein/GX011823", :start, :end}, {"2021-06-13-veloroute-5-5a-und-13rein/GX011824", :start, :end}, {"2021-06-13-veloroute-5-5a-und-13rein/GX011825", :start, "00:00:01.969"} ] end @impl Video.Rendered def(coords()) do [ %Video.TimedPoint{lat: 53.60234146246246, lon: 10.20949781981982, time_offset_ms: 0}, %Video.TimedPoint{lat: 53.602329, lon: 10.209438, time_offset_ms: 166}, %Video.TimedPoint{lat: 53.602304, lon: 10.20931, time_offset_ms: 500}, %Video.TimedPoint{lat: 53.602299, lon: 10.209177, time_offset_ms: 834}, %Video.TimedPoint{lat: 53.602287, lon: 10.209034, time_offset_ms: 1167}, %Video.TimedPoint{lat: 53.602272, lon: 10.208896, time_offset_ms: 1501}, %Video.TimedPoint{lat: 53.602256, lon: 10.208748, time_offset_ms: 1835}, %Video.TimedPoint{lat: 53.602242, lon: 10.2086, time_offset_ms: 2168}, %Video.TimedPoint{lat: 53.602229, lon: 10.208449, time_offset_ms: 2502}, %Video.TimedPoint{lat: 53.602219, lon: 10.208296, time_offset_ms: 2836}, %Video.TimedPoint{lat: 53.602199, lon: 10.208138, time_offset_ms: 3169}, %Video.TimedPoint{lat: 53.602172, lon: 10.207977, time_offset_ms: 3503}, %Video.TimedPoint{lat: 53.602146, lon: 10.207815, time_offset_ms: 3837}, %Video.TimedPoint{lat: 53.60212, lon: 10.207654, time_offset_ms: 4170}, %Video.TimedPoint{lat: 53.602091, lon: 10.207496, time_offset_ms: 4504}, %Video.TimedPoint{lat: 53.602062, lon: 10.207337, time_offset_ms: 4838}, %Video.TimedPoint{lat: 53.602035, lon: 10.207176, time_offset_ms: 5171}, %Video.TimedPoint{lat: 53.60201, lon: 10.207009, time_offset_ms: 5505}, %Video.TimedPoint{lat: 53.601983, lon: 10.206844, time_offset_ms: 5839}, %Video.TimedPoint{lat: 53.601961, lon: 10.206671, time_offset_ms: 6172}, %Video.TimedPoint{lat: 53.601932, lon: 10.206493, time_offset_ms: 6506}, %Video.TimedPoint{lat: 53.601905, lon: 10.206314, time_offset_ms: 6840}, %Video.TimedPoint{lat: 53.601879, lon: 10.206134, time_offset_ms: 7173}, %Video.TimedPoint{lat: 53.60186, lon: 10.205954, time_offset_ms: 7507}, %Video.TimedPoint{lat: 53.601843, lon: 10.205778, time_offset_ms: 7841}, %Video.TimedPoint{lat: 53.601819, lon: 10.205602, time_offset_ms: 8174}, %Video.TimedPoint{lat: 53.601794, lon: 10.205426, time_offset_ms: 8508}, %Video.TimedPoint{lat: 53.601775, lon: 10.205247, time_offset_ms: 8842}, %Video.TimedPoint{lat: 53.601754, lon: 10.205073, time_offset_ms: 9175}, %Video.TimedPoint{lat: 53.60173, lon: 10.204899, time_offset_ms: 9509}, %Video.TimedPoint{lat: 53.601701, lon: 10.204725, time_offset_ms: 9843}, %Video.TimedPoint{lat: 53.601675, lon: 10.204554, time_offset_ms: 10176}, %Video.TimedPoint{lat: 53.601646, lon: 10.204383, time_offset_ms: 10510}, %Video.TimedPoint{lat: 53.60162, lon: 10.204209, time_offset_ms: 10844}, %Video.TimedPoint{lat: 53.601589, lon: 10.204036, time_offset_ms: 11177}, %Video.TimedPoint{lat: 53.601568, lon: 10.203863, time_offset_ms: 11511}, %Video.TimedPoint{lat: 53.601535, lon: 10.203683, time_offset_ms: 11845}, %Video.TimedPoint{lat: 53.601513, lon: 10.203505, time_offset_ms: 12178}, %Video.TimedPoint{lat: 53.601488, lon: 10.203328, time_offset_ms: 12512}, %Video.TimedPoint{lat: 53.601462, lon: 10.203148, time_offset_ms: 12846}, %Video.TimedPoint{lat: 53.601436, lon: 10.202975, time_offset_ms: 13179}, %Video.TimedPoint{lat: 53.601403, lon: 10.202807, time_offset_ms: 13513}, %Video.TimedPoint{lat: 53.601369, lon: 10.202645, time_offset_ms: 13847}, %Video.TimedPoint{lat: 53.601339, lon: 10.202515, time_offset_ms: 14180}, %Video.TimedPoint{lat: 53.601174, lon: 10.20207, time_offset_ms: 14265}, %Video.TimedPoint{lat: 53.601179, lon: 10.202054, time_offset_ms: 14599}, %Video.TimedPoint{lat: 53.601169, lon: 10.201998, time_offset_ms: 14932}, %Video.TimedPoint{lat: 53.601155, lon: 10.201937, time_offset_ms: 15266}, %Video.TimedPoint{lat: 53.601141, lon: 10.201862, time_offset_ms: 15600}, %Video.TimedPoint{lat: 53.601126, lon: 10.201785, time_offset_ms: 15933}, %Video.TimedPoint{lat: 53.601113, lon: 10.201692, time_offset_ms: 16267}, %Video.TimedPoint{lat: 53.6011, lon: 10.201609, time_offset_ms: 16601}, %Video.TimedPoint{lat: 53.60109, lon: 10.201525, time_offset_ms: 16934}, %Video.TimedPoint{lat: 53.601076, lon: 10.201423, time_offset_ms: 17268}, %Video.TimedPoint{lat: 53.601059, lon: 10.201311, time_offset_ms: 17602}, %Video.TimedPoint{lat: 53.601044, lon: 10.201204, time_offset_ms: 17935}, %Video.TimedPoint{lat: 53.601027, lon: 10.201095, time_offset_ms: 18269}, %Video.TimedPoint{lat: 53.601006, lon: 10.200984, time_offset_ms: 18603}, %Video.TimedPoint{lat: 53.60099, lon: 10.200875, time_offset_ms: 18936}, %Video.TimedPoint{lat: 53.600971, lon: 10.200766, time_offset_ms: 19270}, %Video.TimedPoint{lat: 53.600955, lon: 10.200631, time_offset_ms: 19604}, %Video.TimedPoint{lat: 53.600941, lon: 10.200517, time_offset_ms: 19937}, %Video.TimedPoint{lat: 53.600927, lon: 10.200394, time_offset_ms: 20271}, %Video.TimedPoint{lat: 53.600911, lon: 10.200266, time_offset_ms: 20605}, %Video.TimedPoint{lat: 53.60089, lon: 10.200134, time_offset_ms: 20938}, %Video.TimedPoint{lat: 53.600869, lon: 10.200002, time_offset_ms: 21272}, %Video.TimedPoint{lat: 53.600849, lon: 10.199875, time_offset_ms: 21606}, %Video.TimedPoint{lat: 53.60083, lon: 10.199745, time_offset_ms: 21939}, %Video.TimedPoint{lat: 53.600813, lon: 10.19963, time_offset_ms: 22273}, %Video.TimedPoint{lat: 53.600797, lon: 10.199532, time_offset_ms: 22607}, %Video.TimedPoint{lat: 53.600777, lon: 10.199432, time_offset_ms: 22940}, %Video.TimedPoint{lat: 53.600763, lon: 10.199358, time_offset_ms: 23274}, %Video.TimedPoint{lat: 53.600752, lon: 10.199302, time_offset_ms: 23608}, %Video.TimedPoint{lat: 53.600743, lon: 10.199259, time_offset_ms: 23941}, %Video.TimedPoint{lat: 53.600736, lon: 10.199219, time_offset_ms: 24275}, %Video.TimedPoint{lat: 53.600731, lon: 10.199178, time_offset_ms: 24609}, %Video.TimedPoint{lat: 53.600724, lon: 10.199111, time_offset_ms: 24942}, %Video.TimedPoint{lat: 53.600712, lon: 10.199021, time_offset_ms: 25276}, %Video.TimedPoint{lat: 53.600698, lon: 10.198916, time_offset_ms: 25610}, %Video.TimedPoint{lat: 53.600681, lon: 10.198803, time_offset_ms: 25943}, %Video.TimedPoint{lat: 53.600664, lon: 10.198684, time_offset_ms: 26277}, %Video.TimedPoint{lat: 53.600646, lon: 10.198551, time_offset_ms: 26611}, %Video.TimedPoint{lat: 53.600632, lon: 10.198439, time_offset_ms: 26944}, %Video.TimedPoint{lat: 53.600617, lon: 10.198301, time_offset_ms: 27278}, %Video.TimedPoint{lat: 53.600605, lon: 10.198188, time_offset_ms: 27612}, %Video.TimedPoint{lat: 53.600601, lon: 10.19807, time_offset_ms: 27945}, %Video.TimedPoint{lat: 53.600592, lon: 10.197976, time_offset_ms: 28279}, %Video.TimedPoint{lat: 53.600585, lon: 10.197893, time_offset_ms: 28613}, %Video.TimedPoint{lat: 53.600582, lon: 10.197807, time_offset_ms: 28946}, %Video.TimedPoint{lat: 53.60057, lon: 10.197715, time_offset_ms: 29280}, %Video.TimedPoint{lat: 53.600551, lon: 10.19763, time_offset_ms: 29614}, %Video.TimedPoint{lat: 53.60053, lon: 10.197531, time_offset_ms: 29947}, %Video.TimedPoint{lat: 53.600508, lon: 10.197423, time_offset_ms: 30281}, %Video.TimedPoint{lat: 53.600479, lon: 10.197313, time_offset_ms: 30615}, %Video.TimedPoint{lat: 53.60045, lon: 10.197203, time_offset_ms: 30948}, %Video.TimedPoint{lat: 53.600425, lon: 10.197103, time_offset_ms: 31282}, %Video.TimedPoint{lat: 53.600398, lon: 10.197013, time_offset_ms: 31616}, %Video.TimedPoint{lat: 53.60037, lon: 10.196938, time_offset_ms: 31949}, %Video.TimedPoint{lat: 53.600345, lon: 10.196844, time_offset_ms: 32283}, %Video.TimedPoint{lat: 53.600325, lon: 10.19676, time_offset_ms: 32617}, %Video.TimedPoint{lat: 53.60031, lon: 10.196675, time_offset_ms: 32950}, %Video.TimedPoint{lat: 53.6003, lon: 10.196587, time_offset_ms: 33284}, %Video.TimedPoint{lat: 53.600291, lon: 10.196491, time_offset_ms: 33618}, %Video.TimedPoint{lat: 53.60029, lon: 10.196405, time_offset_ms: 33951}, %Video.TimedPoint{lat: 53.600286, lon: 10.196298, time_offset_ms: 34285}, %Video.TimedPoint{lat: 53.600282, lon: 10.196192, time_offset_ms: 34619}, %Video.TimedPoint{lat: 53.600284, lon: 10.196094, time_offset_ms: 34952}, %Video.TimedPoint{lat: 53.600281, lon: 10.195984, time_offset_ms: 35286}, %Video.TimedPoint{lat: 53.600278, lon: 10.195892, time_offset_ms: 35620}, %Video.TimedPoint{lat: 53.600277, lon: 10.195789, time_offset_ms: 35953}, %Video.TimedPoint{lat: 53.600277, lon: 10.195675, time_offset_ms: 36287}, %Video.TimedPoint{lat: 53.60028, lon: 10.195573, time_offset_ms: 36621}, %Video.TimedPoint{lat: 53.600283, lon: 10.19548, time_offset_ms: 36954}, %Video.TimedPoint{lat: 53.600292, lon: 10.195361, time_offset_ms: 37288}, %Video.TimedPoint{lat: 53.600295, lon: 10.195267, time_offset_ms: 37622}, %Video.TimedPoint{lat: 53.600298, lon: 10.195169, time_offset_ms: 37955}, %Video.TimedPoint{lat: 53.6003, lon: 10.195075, time_offset_ms: 38289}, %Video.TimedPoint{lat: 53.600306, lon: 10.194979, time_offset_ms: 38623}, %Video.TimedPoint{lat: 53.600314, lon: 10.194886, time_offset_ms: 38956}, %Video.TimedPoint{lat: 53.600323, lon: 10.194787, time_offset_ms: 39290}, %Video.TimedPoint{lat: 53.600333, lon: 10.194692, time_offset_ms: 39624}, %Video.TimedPoint{lat: 53.600343, lon: 10.194609, time_offset_ms: 39957}, %Video.TimedPoint{lat: 53.600357, lon: 10.194508, time_offset_ms: 40291}, %Video.TimedPoint{lat: 53.60037, lon: 10.194419, time_offset_ms: 40625}, %Video.TimedPoint{lat: 53.600382, lon: 10.19432, time_offset_ms: 40958}, %Video.TimedPoint{lat: 53.600391, lon: 10.194232, time_offset_ms: 41292}, %Video.TimedPoint{lat: 53.600396, lon: 10.19414, time_offset_ms: 41626}, %Video.TimedPoint{lat: 53.6004, lon: 10.194048, time_offset_ms: 41959}, %Video.TimedPoint{lat: 53.600403, lon: 10.193954, time_offset_ms: 42293}, %Video.TimedPoint{lat: 53.600405, lon: 10.193869, time_offset_ms: 42627}, %Video.TimedPoint{lat: 53.600407, lon: 10.193777, time_offset_ms: 42960}, %Video.TimedPoint{lat: 53.600406, lon: 10.193693, time_offset_ms: 43294}, %Video.TimedPoint{lat: 53.6004, lon: 10.193622, time_offset_ms: 43628}, %Video.TimedPoint{lat: 53.600389, lon: 10.193528, time_offset_ms: 43961}, %Video.TimedPoint{lat: 53.600381, lon: 10.19346, time_offset_ms: 44295}, %Video.TimedPoint{lat: 53.600373, lon: 10.193388, time_offset_ms: 44629}, %Video.TimedPoint{lat: 53.600367, lon: 10.193333, time_offset_ms: 44962}, %Video.TimedPoint{lat: 53.600362, lon: 10.193267, time_offset_ms: 45296}, %Video.TimedPoint{lat: 53.600354, lon: 10.193202, time_offset_ms: 45630}, %Video.TimedPoint{lat: 53.600347, lon: 10.193143, time_offset_ms: 45963}, %Video.TimedPoint{lat: 53.600341, lon: 10.193094, time_offset_ms: 46297}, %Video.TimedPoint{lat: 53.600333, lon: 10.193061, time_offset_ms: 46631}, %Video.TimedPoint{lat: 53.600317, lon: 10.19302, time_offset_ms: 46964}, %Video.TimedPoint{lat: 53.600307, lon: 10.192987, time_offset_ms: 47298}, %Video.TimedPoint{lat: 53.600304, lon: 10.192949, time_offset_ms: 47632}, %Video.TimedPoint{lat: 53.600303, lon: 10.1929, time_offset_ms: 47965}, %Video.TimedPoint{lat: 53.600301, lon: 10.192848, time_offset_ms: 48299}, %Video.TimedPoint{lat: 53.600296, lon: 10.192784, time_offset_ms: 48633}, %Video.TimedPoint{lat: 53.600286, lon: 10.192717, time_offset_ms: 48966}, %Video.TimedPoint{lat: 53.600273, lon: 10.192642, time_offset_ms: 49300}, %Video.TimedPoint{lat: 53.600259, lon: 10.192571, time_offset_ms: 49634}, %Video.TimedPoint{lat: 53.600245, lon: 10.192488, time_offset_ms: 49967}, %Video.TimedPoint{lat: 53.600232, lon: 10.192417, time_offset_ms: 50301}, %Video.TimedPoint{lat: 53.60022, lon: 10.192335, time_offset_ms: 50635}, %Video.TimedPoint{lat: 53.600206, lon: 10.192258, time_offset_ms: 50968}, %Video.TimedPoint{lat: 53.600184, lon: 10.192174, time_offset_ms: 51302}, %Video.TimedPoint{lat: 53.600164, lon: 10.192087, time_offset_ms: 51636}, %Video.TimedPoint{lat: 53.600149, lon: 10.192007, time_offset_ms: 51969}, %Video.TimedPoint{lat: 53.600134, lon: 10.191919, time_offset_ms: 52303}, %Video.TimedPoint{lat: 53.600114, lon: 10.191824, time_offset_ms: 52637}, %Video.TimedPoint{lat: 53.600089, lon: 10.191723, time_offset_ms: 52970}, %Video.TimedPoint{lat: 53.600061, lon: 10.19162, time_offset_ms: 53304}, %Video.TimedPoint{lat: 53.600039, lon: 10.191526, time_offset_ms: 53638}, %Video.TimedPoint{lat: 53.600018, lon: 10.191416, time_offset_ms: 53971}, %Video.TimedPoint{lat: 53.599994, lon: 10.191314, time_offset_ms: 54305}, %Video.TimedPoint{lat: 53.599975, lon: 10.191213, time_offset_ms: 54639}, %Video.TimedPoint{lat: 53.599953, lon: 10.191103, time_offset_ms: 54972}, %Video.TimedPoint{lat: 53.599932, lon: 10.190989, time_offset_ms: 55306}, %Video.TimedPoint{lat: 53.599905, lon: 10.190867, time_offset_ms: 55640}, %Video.TimedPoint{lat: 53.599881, lon: 10.190761, time_offset_ms: 55973}, %Video.TimedPoint{lat: 53.599855, lon: 10.190643, time_offset_ms: 56307}, %Video.TimedPoint{lat: 53.599833, lon: 10.19053, time_offset_ms: 56641}, %Video.TimedPoint{lat: 53.599813, lon: 10.190412, time_offset_ms: 56974}, %Video.TimedPoint{lat: 53.599791, lon: 10.190289, time_offset_ms: 57308}, %Video.TimedPoint{lat: 53.599774, lon: 10.190176, time_offset_ms: 57642}, %Video.TimedPoint{lat: 53.599749, lon: 10.190055, time_offset_ms: 57975}, %Video.TimedPoint{lat: 53.599732, lon: 10.189937, time_offset_ms: 58309}, %Video.TimedPoint{lat: 53.599709, lon: 10.189808, time_offset_ms: 58643}, %Video.TimedPoint{lat: 53.599687, lon: 10.189698, time_offset_ms: 58976}, %Video.TimedPoint{lat: 53.599657, lon: 10.189574, time_offset_ms: 59310}, %Video.TimedPoint{lat: 53.599633, lon: 10.189468, time_offset_ms: 59644}, %Video.TimedPoint{lat: 53.599607, lon: 10.189337, time_offset_ms: 59977}, %Video.TimedPoint{lat: 53.599581, lon: 10.189212, time_offset_ms: 60311}, %Video.TimedPoint{lat: 53.599558, lon: 10.189105, time_offset_ms: 60645}, %Video.TimedPoint{lat: 53.599528, lon: 10.188986, time_offset_ms: 60978}, %Video.TimedPoint{lat: 53.599504, lon: 10.188868, time_offset_ms: 61312}, %Video.TimedPoint{lat: 53.599484, lon: 10.188751, time_offset_ms: 61646}, %Video.TimedPoint{lat: 53.599457, lon: 10.188631, time_offset_ms: 61979}, %Video.TimedPoint{lat: 53.599427, lon: 10.188503, time_offset_ms: 62313}, %Video.TimedPoint{lat: 53.599393, lon: 10.188383, time_offset_ms: 62647}, %Video.TimedPoint{lat: 53.59937, lon: 10.18826, time_offset_ms: 62980}, %Video.TimedPoint{lat: 53.59935, lon: 10.188141, time_offset_ms: 63314}, %Video.TimedPoint{lat: 53.59932, lon: 10.188012, time_offset_ms: 63648}, %Video.TimedPoint{lat: 53.599296, lon: 10.187892, time_offset_ms: 63981}, %Video.TimedPoint{lat: 53.599275, lon: 10.18777, time_offset_ms: 64315}, %Video.TimedPoint{lat: 53.599245, lon: 10.187636, time_offset_ms: 64649}, %Video.TimedPoint{lat: 53.599218, lon: 10.187519, time_offset_ms: 64982}, %Video.TimedPoint{lat: 53.599189, lon: 10.187391, time_offset_ms: 65316}, %Video.TimedPoint{lat: 53.599165, lon: 10.187277, time_offset_ms: 65650}, %Video.TimedPoint{lat: 53.599135, lon: 10.187143, time_offset_ms: 65983}, %Video.TimedPoint{lat: 53.599109, lon: 10.187019, time_offset_ms: 66317}, %Video.TimedPoint{lat: 53.599081, lon: 10.186888, time_offset_ms: 66651}, %Video.TimedPoint{lat: 53.599065, lon: 10.18677, time_offset_ms: 66984}, %Video.TimedPoint{lat: 53.599039, lon: 10.186639, time_offset_ms: 67318}, %Video.TimedPoint{lat: 53.59901, lon: 10.186511, time_offset_ms: 67652}, %Video.TimedPoint{lat: 53.598987, lon: 10.186387, time_offset_ms: 67985}, %Video.TimedPoint{lat: 53.598957, lon: 10.186276, time_offset_ms: 68319}, %Video.TimedPoint{lat: 53.598924, lon: 10.186162, time_offset_ms: 68653}, %Video.TimedPoint{lat: 53.598896, lon: 10.186073, time_offset_ms: 68986}, %Video.TimedPoint{lat: 53.598866, lon: 10.185977, time_offset_ms: 69320}, %Video.TimedPoint{lat: 53.598845, lon: 10.185895, time_offset_ms: 69654}, %Video.TimedPoint{lat: 53.59883, lon: 10.185803, time_offset_ms: 69987}, %Video.TimedPoint{lat: 53.598817, lon: 10.185706, time_offset_ms: 70321}, %Video.TimedPoint{lat: 53.598801, lon: 10.185605, time_offset_ms: 70655}, %Video.TimedPoint{lat: 53.598772, lon: 10.185502, time_offset_ms: 70988}, %Video.TimedPoint{lat: 53.598746, lon: 10.185396, time_offset_ms: 71322}, %Video.TimedPoint{lat: 53.598708, lon: 10.185291, time_offset_ms: 71656}, %Video.TimedPoint{lat: 53.59868, lon: 10.185183, time_offset_ms: 71989}, %Video.TimedPoint{lat: 53.598659, lon: 10.185067, time_offset_ms: 72323}, %Video.TimedPoint{lat: 53.598636, lon: 10.184975, time_offset_ms: 72657}, %Video.TimedPoint{lat: 53.598604, lon: 10.184905, time_offset_ms: 72990}, %Video.TimedPoint{lat: 53.598559, lon: 10.184865, time_offset_ms: 73324}, %Video.TimedPoint{lat: 53.59852, lon: 10.18487, time_offset_ms: 73658}, %Video.TimedPoint{lat: 53.598498, lon: 10.184879, time_offset_ms: 73991}, %Video.TimedPoint{lat: 53.598487, lon: 10.184886, time_offset_ms: 74325}, %Video.TimedPoint{lat: 53.598477, lon: 10.184903, time_offset_ms: 74659}, %Video.TimedPoint{lat: 53.598457, lon: 10.184907, time_offset_ms: 74992}, %Video.TimedPoint{lat: 53.598433, lon: 10.184897, time_offset_ms: 75326}, %Video.TimedPoint{lat: 53.597350149700596, lon: 10.18589651497006, time_offset_ms: 75411}, %Video.TimedPoint{lat: 53.597325, lon: 10.185954, time_offset_ms: 75711}, %Video.TimedPoint{lat: 53.597308, lon: 10.186036, time_offset_ms: 76045}, %Video.TimedPoint{lat: 53.597296, lon: 10.186105, time_offset_ms: 76378}, %Video.TimedPoint{lat: 53.59727, lon: 10.186196, time_offset_ms: 76712}, %Video.TimedPoint{lat: 53.597234, lon: 10.186254, time_offset_ms: 77046}, %Video.TimedPoint{lat: 53.597184, lon: 10.186293, time_offset_ms: 77379}, %Video.TimedPoint{lat: 53.597121, lon: 10.186309, time_offset_ms: 77713}, %Video.TimedPoint{lat: 53.597061, lon: 10.186314, time_offset_ms: 78047}, %Video.TimedPoint{lat: 53.596992, lon: 10.186312, time_offset_ms: 78380}, %Video.TimedPoint{lat: 53.596921, lon: 10.186314, time_offset_ms: 78714}, %Video.TimedPoint{lat: 53.59684, lon: 10.186322, time_offset_ms: 79048}, %Video.TimedPoint{lat: 53.596775, lon: 10.186321, time_offset_ms: 79381}, %Video.TimedPoint{lat: 53.596717, lon: 10.186316, time_offset_ms: 79715}, %Video.TimedPoint{lat: 53.596651, lon: 10.186316, time_offset_ms: 80049}, %Video.TimedPoint{lat: 53.596588, lon: 10.186314, time_offset_ms: 80382}, %Video.TimedPoint{lat: 53.59652, lon: 10.186312, time_offset_ms: 80716}, %Video.TimedPoint{lat: 53.596456, lon: 10.186317, time_offset_ms: 81050}, %Video.TimedPoint{lat: 53.596386, lon: 10.186315, time_offset_ms: 81383}, %Video.TimedPoint{lat: 53.596327, lon: 10.186317, time_offset_ms: 81717}, %Video.TimedPoint{lat: 53.596265, lon: 10.186317, time_offset_ms: 82051}, %Video.TimedPoint{lat: 53.596211, lon: 10.186313, time_offset_ms: 82384}, %Video.TimedPoint{lat: 53.596159, lon: 10.186285, time_offset_ms: 82718}, %Video.TimedPoint{lat: 53.596122, lon: 10.186224, time_offset_ms: 83052}, %Video.TimedPoint{lat: 53.596101, lon: 10.186139, time_offset_ms: 83385}, %Video.TimedPoint{lat: 53.596085, lon: 10.186025, time_offset_ms: 83719}, %Video.TimedPoint{lat: 53.596073, lon: 10.185905, time_offset_ms: 84053}, %Video.TimedPoint{lat: 53.596071, lon: 10.185794, time_offset_ms: 84386}, %Video.TimedPoint{lat: 53.596074, lon: 10.185654, time_offset_ms: 84720}, %Video.TimedPoint{lat: 53.596072, lon: 10.185539, time_offset_ms: 85054}, %Video.TimedPoint{lat: 53.596082, lon: 10.185407, time_offset_ms: 85387}, %Video.TimedPoint{lat: 53.596098, lon: 10.185288, time_offset_ms: 85721}, %Video.TimedPoint{lat: 53.596121, lon: 10.185173, time_offset_ms: 86055}, %Video.TimedPoint{lat: 53.596148, lon: 10.185067, time_offset_ms: 86388}, %Video.TimedPoint{lat: 53.596173, lon: 10.184958, time_offset_ms: 86722}, %Video.TimedPoint{lat: 53.5962, lon: 10.184841, time_offset_ms: 87056}, %Video.TimedPoint{lat: 53.596223, lon: 10.184743, time_offset_ms: 87389}, %Video.TimedPoint{lat: 53.596238, lon: 10.184636, time_offset_ms: 87723}, %Video.TimedPoint{lat: 53.596245, lon: 10.184514, time_offset_ms: 88057}, %Video.TimedPoint{lat: 53.596245, lon: 10.1844, time_offset_ms: 88390}, %Video.TimedPoint{lat: 53.596248, lon: 10.184264, time_offset_ms: 88724}, %Video.TimedPoint{lat: 53.596251, lon: 10.184138, time_offset_ms: 89058}, %Video.TimedPoint{lat: 53.596257, lon: 10.184027, time_offset_ms: 89391}, %Video.TimedPoint{lat: 53.596261, lon: 10.183935, time_offset_ms: 89725}, %Video.TimedPoint{lat: 53.596248, lon: 10.183834, time_offset_ms: 90059}, %Video.TimedPoint{lat: 53.596236, lon: 10.183719, time_offset_ms: 90392}, %Video.TimedPoint{lat: 53.596233, lon: 10.183593, time_offset_ms: 90726}, %Video.TimedPoint{lat: 53.596233, lon: 10.183487, time_offset_ms: 91060}, %Video.TimedPoint{lat: 53.596239, lon: 10.183348, time_offset_ms: 91393}, %Video.TimedPoint{lat: 53.596245, lon: 10.183229, time_offset_ms: 91727}, %Video.TimedPoint{lat: 53.596251, lon: 10.183108, time_offset_ms: 92061}, %Video.TimedPoint{lat: 53.596257, lon: 10.182981, time_offset_ms: 92394}, %Video.TimedPoint{lat: 53.596261, lon: 10.182836, time_offset_ms: 92728}, %Video.TimedPoint{lat: 53.596261, lon: 10.18273, time_offset_ms: 93062}, %Video.TimedPoint{lat: 53.596257, lon: 10.182581, time_offset_ms: 93395}, %Video.TimedPoint{lat: 53.596253, lon: 10.182447, time_offset_ms: 93729}, %Video.TimedPoint{lat: 53.59625, lon: 10.182322, time_offset_ms: 94063}, %Video.TimedPoint{lat: 53.596241, lon: 10.182184, time_offset_ms: 94396}, %Video.TimedPoint{lat: 53.596231, lon: 10.182049, time_offset_ms: 94730}, %Video.TimedPoint{lat: 53.596222, lon: 10.181908, time_offset_ms: 95064}, %Video.TimedPoint{lat: 53.596216, lon: 10.18177, time_offset_ms: 95397}, %Video.TimedPoint{lat: 53.596221, lon: 10.181653, time_offset_ms: 95731}, %Video.TimedPoint{lat: 53.596247, lon: 10.181536, time_offset_ms: 96065}, %Video.TimedPoint{lat: 53.596299, lon: 10.181456, time_offset_ms: 96398}, %Video.TimedPoint{lat: 53.596356, lon: 10.18141, time_offset_ms: 96732}, %Video.TimedPoint{lat: 53.596422, lon: 10.181369, time_offset_ms: 97066}, %Video.TimedPoint{lat: 53.596484, lon: 10.181318, time_offset_ms: 97399}, %Video.TimedPoint{lat: 53.596531, lon: 10.181273, time_offset_ms: 97733}, %Video.TimedPoint{lat: 53.596599, lon: 10.181198, time_offset_ms: 98067}, %Video.TimedPoint{lat: 53.596648, lon: 10.181136, time_offset_ms: 98400}, %Video.TimedPoint{lat: 53.596699, lon: 10.181069, time_offset_ms: 98734}, %Video.TimedPoint{lat: 53.596751, lon: 10.181007, time_offset_ms: 99068}, %Video.TimedPoint{lat: 53.596813, lon: 10.18095, time_offset_ms: 99401}, %Video.TimedPoint{lat: 53.596877, lon: 10.180912, time_offset_ms: 99735}, %Video.TimedPoint{lat: 53.596935, lon: 10.180885, time_offset_ms: 100_069}, %Video.TimedPoint{lat: 53.597, lon: 10.180862, time_offset_ms: 100_402}, %Video.TimedPoint{lat: 53.59706, lon: 10.180839, time_offset_ms: 100_736}, %Video.TimedPoint{lat: 53.597122, lon: 10.180818, time_offset_ms: 101_070}, %Video.TimedPoint{lat: 53.59718, lon: 10.180801, time_offset_ms: 101_403}, %Video.TimedPoint{lat: 53.59724, lon: 10.180769, time_offset_ms: 101_737}, %Video.TimedPoint{lat: 53.597287, lon: 10.180724, time_offset_ms: 102_071}, %Video.TimedPoint{lat: 53.597331, lon: 10.180666, time_offset_ms: 102_404}, %Video.TimedPoint{lat: 53.597355, lon: 10.180604, time_offset_ms: 102_738}, %Video.TimedPoint{lat: 53.597357, lon: 10.180515, time_offset_ms: 103_072}, %Video.TimedPoint{lat: 53.597341, lon: 10.18043, time_offset_ms: 103_405}, %Video.TimedPoint{lat: 53.597326, lon: 10.180351, time_offset_ms: 103_739}, %Video.TimedPoint{lat: 53.597305, lon: 10.180244, time_offset_ms: 104_073}, %Video.TimedPoint{lat: 53.597287, lon: 10.180167, time_offset_ms: 104_406}, %Video.TimedPoint{lat: 53.597265, lon: 10.180062, time_offset_ms: 104_740}, %Video.TimedPoint{lat: 53.597241, lon: 10.179953, time_offset_ms: 105_074}, %Video.TimedPoint{lat: 53.597219, lon: 10.179841, time_offset_ms: 105_407}, %Video.TimedPoint{lat: 53.597208, lon: 10.179731, time_offset_ms: 105_741}, %Video.TimedPoint{lat: 53.597194, lon: 10.179602, time_offset_ms: 106_075}, %Video.TimedPoint{lat: 53.597182, lon: 10.179482, time_offset_ms: 106_408}, %Video.TimedPoint{lat: 53.597169, lon: 10.179365, time_offset_ms: 106_742}, %Video.TimedPoint{lat: 53.597155, lon: 10.179233, time_offset_ms: 107_076}, %Video.TimedPoint{lat: 53.597154, lon: 10.179111, time_offset_ms: 107_409}, %Video.TimedPoint{lat: 53.59715, lon: 10.178968, time_offset_ms: 107_743}, %Video.TimedPoint{lat: 53.597138, lon: 10.17885, time_offset_ms: 108_077}, %Video.TimedPoint{lat: 53.597126, lon: 10.178708, time_offset_ms: 108_410}, %Video.TimedPoint{lat: 53.597119, lon: 10.178542, time_offset_ms: 108_744}, %Video.TimedPoint{lat: 53.597113, lon: 10.1784, time_offset_ms: 109_078}, %Video.TimedPoint{lat: 53.597093, lon: 10.178224, time_offset_ms: 109_411}, %Video.TimedPoint{lat: 53.597084, lon: 10.178068, time_offset_ms: 109_745}, %Video.TimedPoint{lat: 53.59707, lon: 10.177898, time_offset_ms: 110_079}, %Video.TimedPoint{lat: 53.597049, lon: 10.177728, time_offset_ms: 110_412}, %Video.TimedPoint{lat: 53.597027, lon: 10.17757, time_offset_ms: 110_746}, %Video.TimedPoint{lat: 53.596996, lon: 10.17745, time_offset_ms: 111_080}, %Video.TimedPoint{lat: 53.596971, lon: 10.17735, time_offset_ms: 111_413}, %Video.TimedPoint{lat: 53.596952, lon: 10.177268, time_offset_ms: 111_747}, %Video.TimedPoint{lat: 53.59693, lon: 10.177203, time_offset_ms: 112_081}, %Video.TimedPoint{lat: 53.596898, lon: 10.17715, time_offset_ms: 112_414}, %Video.TimedPoint{lat: 53.596842, lon: 10.177105, time_offset_ms: 112_748}, %Video.TimedPoint{lat: 53.596784, lon: 10.177076, time_offset_ms: 113_082}, %Video.TimedPoint{lat: 53.596713, lon: 10.177045, time_offset_ms: 113_415}, %Video.TimedPoint{lat: 53.596645, lon: 10.177016, time_offset_ms: 113_749}, %Video.TimedPoint{lat: 53.596559, lon: 10.176974, time_offset_ms: 114_083}, %Video.TimedPoint{lat: 53.596482, lon: 10.176927, time_offset_ms: 114_416}, %Video.TimedPoint{lat: 53.596397, lon: 10.176865, time_offset_ms: 114_750}, %Video.TimedPoint{lat: 53.596312, lon: 10.176805, time_offset_ms: 115_084}, %Video.TimedPoint{lat: 53.596227, lon: 10.176742, time_offset_ms: 115_417}, %Video.TimedPoint{lat: 53.59615, lon: 10.176679, time_offset_ms: 115_751}, %Video.TimedPoint{lat: 53.596068, lon: 10.176598, time_offset_ms: 116_085}, %Video.TimedPoint{lat: 53.596002, lon: 10.176533, time_offset_ms: 116_418}, %Video.TimedPoint{lat: 53.595944, lon: 10.176464, time_offset_ms: 116_752}, %Video.TimedPoint{lat: 53.595885, lon: 10.176402, time_offset_ms: 117_086}, %Video.TimedPoint{lat: 53.595849, lon: 10.176357, time_offset_ms: 117_419}, %Video.TimedPoint{lat: 53.59584, lon: 10.17631, time_offset_ms: 117_753}, %Video.TimedPoint{lat: 53.595835, lon: 10.176262, time_offset_ms: 118_087}, %Video.TimedPoint{lat: 53.595841, lon: 10.176219, time_offset_ms: 118_420}, %Video.TimedPoint{lat: 53.595866, lon: 10.176153, time_offset_ms: 118_754}, %Video.TimedPoint{lat: 53.595889, lon: 10.176085, time_offset_ms: 119_088}, %Video.TimedPoint{lat: 53.595918, lon: 10.176021, time_offset_ms: 119_421}, %Video.TimedPoint{lat: 53.595944, lon: 10.175948, time_offset_ms: 119_755}, %Video.TimedPoint{lat: 53.595967, lon: 10.175873, time_offset_ms: 120_089}, %Video.TimedPoint{lat: 53.59598, lon: 10.175789, time_offset_ms: 120_422}, %Video.TimedPoint{lat: 53.595989, lon: 10.175725, time_offset_ms: 120_756}, %Video.TimedPoint{lat: 53.595999, lon: 10.175667, time_offset_ms: 121_090}, %Video.TimedPoint{lat: 53.59601, lon: 10.175623, time_offset_ms: 121_423}, %Video.TimedPoint{lat: 53.596021, lon: 10.175584, time_offset_ms: 121_757}, %Video.TimedPoint{lat: 53.59603, lon: 10.175549, time_offset_ms: 122_091}, %Video.TimedPoint{lat: 53.59604, lon: 10.175513, time_offset_ms: 122_424}, %Video.TimedPoint{lat: 53.596049, lon: 10.175478, time_offset_ms: 122_758}, %Video.TimedPoint{lat: 53.59606, lon: 10.175444, time_offset_ms: 123_092}, %Video.TimedPoint{lat: 53.596072, lon: 10.175412, time_offset_ms: 123_425}, %Video.TimedPoint{lat: 53.596081, lon: 10.175382, time_offset_ms: 123_759}, %Video.TimedPoint{lat: 53.59609, lon: 10.175354, time_offset_ms: 124_093}, %Video.TimedPoint{lat: 53.596097, lon: 10.175329, time_offset_ms: 124_426}, %Video.TimedPoint{lat: 53.596106, lon: 10.175308, time_offset_ms: 124_760}, %Video.TimedPoint{lat: 53.596115, lon: 10.175284, time_offset_ms: 125_094}, %Video.TimedPoint{lat: 53.596123, lon: 10.17526, time_offset_ms: 125_427}, %Video.TimedPoint{lat: 53.596132, lon: 10.175237, time_offset_ms: 125_761}, %Video.TimedPoint{lat: 53.596141, lon: 10.175215, time_offset_ms: 126_095}, %Video.TimedPoint{lat: 53.596148, lon: 10.175195, time_offset_ms: 126_428}, %Video.TimedPoint{lat: 53.596156, lon: 10.175175, time_offset_ms: 126_762}, %Video.TimedPoint{lat: 53.596162, lon: 10.175158, time_offset_ms: 127_096}, %Video.TimedPoint{lat: 53.59617, lon: 10.17514, time_offset_ms: 127_429}, %Video.TimedPoint{lat: 53.596177, lon: 10.175124, time_offset_ms: 127_763}, %Video.TimedPoint{lat: 53.596179, lon: 10.175101, time_offset_ms: 128_097}, %Video.TimedPoint{lat: 53.596187, lon: 10.175077, time_offset_ms: 128_430}, %Video.TimedPoint{lat: 53.596199, lon: 10.175051, time_offset_ms: 128_764}, %Video.TimedPoint{lat: 53.596217, lon: 10.175023, time_offset_ms: 129_098}, %Video.TimedPoint{lat: 53.596229, lon: 10.174991, time_offset_ms: 129_431}, %Video.TimedPoint{lat: 53.596245, lon: 10.174954, time_offset_ms: 129_765}, %Video.TimedPoint{lat: 53.596263, lon: 10.174912, time_offset_ms: 130_099}, %Video.TimedPoint{lat: 53.596276, lon: 10.174875, time_offset_ms: 130_432}, %Video.TimedPoint{lat: 53.596299, lon: 10.17481, time_offset_ms: 130_766}, %Video.TimedPoint{lat: 53.596321, lon: 10.174763, time_offset_ms: 131_100}, %Video.TimedPoint{lat: 53.59635, lon: 10.174706, time_offset_ms: 131_433}, %Video.TimedPoint{lat: 53.596377, lon: 10.174653, time_offset_ms: 131_767}, %Video.TimedPoint{lat: 53.596404, lon: 10.1746, time_offset_ms: 132_101}, %Video.TimedPoint{lat: 53.596438, lon: 10.174538, time_offset_ms: 132_434}, %Video.TimedPoint{lat: 53.596463, lon: 10.17449, time_offset_ms: 132_768}, %Video.TimedPoint{lat: 53.596496, lon: 10.174434, time_offset_ms: 133_102}, %Video.TimedPoint{lat: 53.596524, lon: 10.174392, time_offset_ms: 133_435}, %Video.TimedPoint{lat: 53.596555, lon: 10.174341, time_offset_ms: 133_769}, %Video.TimedPoint{lat: 53.596586, lon: 10.174299, time_offset_ms: 134_103}, %Video.TimedPoint{lat: 53.596608, lon: 10.174257, time_offset_ms: 134_436}, %Video.TimedPoint{lat: 53.596619, lon: 10.174223, time_offset_ms: 134_770}, %Video.TimedPoint{lat: 53.596624, lon: 10.174177, time_offset_ms: 135_104}, %Video.TimedPoint{lat: 53.596623, lon: 10.174136, time_offset_ms: 135_437}, %Video.TimedPoint{lat: 53.596633, lon: 10.174085, time_offset_ms: 135_771}, %Video.TimedPoint{lat: 53.596658, lon: 10.174035, time_offset_ms: 136_105}, %Video.TimedPoint{lat: 53.596689, lon: 10.173968, time_offset_ms: 136_438}, %Video.TimedPoint{lat: 53.596724, lon: 10.173908, time_offset_ms: 136_772}, %Video.TimedPoint{lat: 53.596765, lon: 10.173844, time_offset_ms: 137_106}, %Video.TimedPoint{lat: 53.596805, lon: 10.173775, time_offset_ms: 137_439}, %Video.TimedPoint{lat: 53.596847, lon: 10.173701, time_offset_ms: 137_773}, %Video.TimedPoint{lat: 53.596883, lon: 10.173637, time_offset_ms: 138_107}, %Video.TimedPoint{lat: 53.596927, lon: 10.173565, time_offset_ms: 138_440}, %Video.TimedPoint{lat: 53.596979, lon: 10.173487, time_offset_ms: 138_774}, %Video.TimedPoint{lat: 53.597027, lon: 10.173412, time_offset_ms: 139_108}, %Video.TimedPoint{lat: 53.597078, lon: 10.173328, time_offset_ms: 139_441}, %Video.TimedPoint{lat: 53.597128, lon: 10.17325, time_offset_ms: 139_775}, %Video.TimedPoint{lat: 53.597178, lon: 10.17318, time_offset_ms: 140_109}, %Video.TimedPoint{lat: 53.597227, lon: 10.173116, time_offset_ms: 140_442}, %Video.TimedPoint{lat: 53.597287, lon: 10.173046, time_offset_ms: 140_776}, %Video.TimedPoint{lat: 53.597334, lon: 10.172986, time_offset_ms: 141_110}, %Video.TimedPoint{lat: 53.597393, lon: 10.172918, time_offset_ms: 141_443}, %Video.TimedPoint{lat: 53.597448, lon: 10.17285, time_offset_ms: 141_777}, %Video.TimedPoint{lat: 53.5975, lon: 10.172774, time_offset_ms: 142_111}, %Video.TimedPoint{lat: 53.597542, lon: 10.172693, time_offset_ms: 142_444}, %Video.TimedPoint{lat: 53.597581, lon: 10.172613, time_offset_ms: 142_778}, %Video.TimedPoint{lat: 53.597615, lon: 10.17254, time_offset_ms: 143_112}, %Video.TimedPoint{lat: 53.597651, lon: 10.172472, time_offset_ms: 143_445}, %Video.TimedPoint{lat: 53.597697, lon: 10.172408, time_offset_ms: 143_779}, %Video.TimedPoint{lat: 53.597735, lon: 10.172348, time_offset_ms: 144_113}, %Video.TimedPoint{lat: 53.59778, lon: 10.172291, time_offset_ms: 144_446}, %Video.TimedPoint{lat: 53.597827, lon: 10.172212, time_offset_ms: 144_780}, %Video.TimedPoint{lat: 53.597868, lon: 10.172125, time_offset_ms: 145_114}, %Video.TimedPoint{lat: 53.597902, lon: 10.17206, time_offset_ms: 145_447}, %Video.TimedPoint{lat: 53.597944, lon: 10.172007, time_offset_ms: 145_781}, %Video.TimedPoint{lat: 53.597975, lon: 10.171964, time_offset_ms: 146_115}, %Video.TimedPoint{lat: 53.597996, lon: 10.171899, time_offset_ms: 146_448}, %Video.TimedPoint{lat: 53.598005, lon: 10.171796, time_offset_ms: 146_782}, %Video.TimedPoint{lat: 53.59801, lon: 10.17169, time_offset_ms: 147_116}, %Video.TimedPoint{lat: 53.598023, lon: 10.171583, time_offset_ms: 147_449}, %Video.TimedPoint{lat: 53.598045, lon: 10.171493, time_offset_ms: 147_783}, %Video.TimedPoint{lat: 53.598072, lon: 10.171424, time_offset_ms: 148_117}, %Video.TimedPoint{lat: 53.598088, lon: 10.171337, time_offset_ms: 148_450}, %Video.TimedPoint{lat: 53.598105, lon: 10.17127, time_offset_ms: 148_784}, %Video.TimedPoint{lat: 53.598141, lon: 10.171156, time_offset_ms: 149_118}, %Video.TimedPoint{lat: 53.598175, lon: 10.171082, time_offset_ms: 149_451}, %Video.TimedPoint{lat: 53.598208, lon: 10.170995, time_offset_ms: 149_785}, %Video.TimedPoint{lat: 53.59824, lon: 10.170913, time_offset_ms: 150_119}, %Video.TimedPoint{lat: 53.598269, lon: 10.170853, time_offset_ms: 150_452}, %Video.TimedPoint{lat: 53.598301, lon: 10.170782, time_offset_ms: 150_786}, %Video.TimedPoint{lat: 53.598323, lon: 10.170734, time_offset_ms: 151_120}, %Video.TimedPoint{lat: 53.598338, lon: 10.1707, time_offset_ms: 151_453}, %Video.TimedPoint{lat: 53.598368, lon: 10.17065, time_offset_ms: 151_787}, %Video.TimedPoint{lat: 53.598403, lon: 10.170645, time_offset_ms: 152_121}, %Video.TimedPoint{lat: 53.598449, lon: 10.170678, time_offset_ms: 152_454}, %Video.TimedPoint{lat: 53.598516, lon: 10.170714, time_offset_ms: 152_788}, %Video.TimedPoint{lat: 53.598574, lon: 10.17077, time_offset_ms: 153_122}, %Video.TimedPoint{lat: 53.598638, lon: 10.170829, time_offset_ms: 153_455}, %Video.TimedPoint{lat: 53.598701, lon: 10.170876, time_offset_ms: 153_789}, %Video.TimedPoint{lat: 53.598774, lon: 10.170926, time_offset_ms: 154_123}, %Video.TimedPoint{lat: 53.598831, lon: 10.170977, time_offset_ms: 154_456}, %Video.TimedPoint{lat: 53.598889, lon: 10.171027, time_offset_ms: 154_790}, %Video.TimedPoint{lat: 53.598948, lon: 10.171071, time_offset_ms: 155_124}, %Video.TimedPoint{lat: 53.598995, lon: 10.171112, time_offset_ms: 155_457}, %Video.TimedPoint{lat: 53.599058, lon: 10.171143, time_offset_ms: 155_791}, %Video.TimedPoint{lat: 53.599121, lon: 10.17117, time_offset_ms: 156_125}, %Video.TimedPoint{lat: 53.599178, lon: 10.171218, time_offset_ms: 156_458}, %Video.TimedPoint{lat: 53.599234, lon: 10.171267, time_offset_ms: 156_792}, %Video.TimedPoint{lat: 53.599297, lon: 10.171299, time_offset_ms: 157_126}, %Video.TimedPoint{lat: 53.599343, lon: 10.171326, time_offset_ms: 157_459}, %Video.TimedPoint{lat: 53.599372, lon: 10.17137, time_offset_ms: 157_793}, %Video.TimedPoint{lat: 53.599401, lon: 10.171395, time_offset_ms: 158_127}, %Video.TimedPoint{lat: 53.59943, lon: 10.171421, time_offset_ms: 158_460}, %Video.TimedPoint{lat: 53.59943, lon: 10.171481, time_offset_ms: 158_794}, %Video.TimedPoint{lat: 53.59942, lon: 10.17155, time_offset_ms: 159_128}, %Video.TimedPoint{lat: 53.599413, lon: 10.171621, time_offset_ms: 159_461}, %Video.TimedPoint{lat: 53.599407, lon: 10.171685, time_offset_ms: 159_795}, %Video.TimedPoint{lat: 53.599398, lon: 10.171762, time_offset_ms: 160_129}, %Video.TimedPoint{lat: 53.59939, lon: 10.171838, time_offset_ms: 160_462}, %Video.TimedPoint{lat: 53.599397, lon: 10.17192, time_offset_ms: 160_796}, %Video.TimedPoint{lat: 53.599409, lon: 10.171999, time_offset_ms: 161_130}, %Video.TimedPoint{lat: 53.599428, lon: 10.172074, time_offset_ms: 161_463}, %Video.TimedPoint{lat: 53.59945, lon: 10.172131, time_offset_ms: 161_797}, %Video.TimedPoint{lat: 53.599491, lon: 10.172176, time_offset_ms: 162_131}, %Video.TimedPoint{lat: 53.599533, lon: 10.172206, time_offset_ms: 162_464}, %Video.TimedPoint{lat: 53.599584, lon: 10.172225, time_offset_ms: 162_798}, %Video.TimedPoint{lat: 53.599632, lon: 10.172233, time_offset_ms: 163_132}, %Video.TimedPoint{lat: 53.599676, lon: 10.17224, time_offset_ms: 163_465}, %Video.TimedPoint{lat: 53.599729, lon: 10.172247, time_offset_ms: 163_799}, %Video.TimedPoint{lat: 53.59978, lon: 10.172243, time_offset_ms: 164_133}, %Video.TimedPoint{lat: 53.59979597597598, lon: 10.172241402402403, time_offset_ms: 164_266}, %Video.TimedPoint{lat: 53.60004989189189, lon: 10.172306297297297, time_offset_ms: 164_351}, %Video.TimedPoint{lat: 53.600058, lon: 10.172209, time_offset_ms: 164_651}, %Video.TimedPoint{lat: 53.600094, lon: 10.172115, time_offset_ms: 164_985}, %Video.TimedPoint{lat: 53.600137, lon: 10.172041, time_offset_ms: 165_319}, %Video.TimedPoint{lat: 53.600173, lon: 10.171984, time_offset_ms: 165_652}, %Video.TimedPoint{lat: 53.600203, lon: 10.171903, time_offset_ms: 165_986}, %Video.TimedPoint{lat: 53.600226, lon: 10.171832, time_offset_ms: 166_320}, %Video.TimedPoint{lat: 53.600249, lon: 10.17175, time_offset_ms: 166_653}, %Video.TimedPoint{lat: 53.600269, lon: 10.171642, time_offset_ms: 166_987}, %Video.TimedPoint{lat: 53.600289, lon: 10.171552, time_offset_ms: 167_321}, %Video.TimedPoint{lat: 53.600326, lon: 10.17146, time_offset_ms: 167_654}, %Video.TimedPoint{lat: 53.600368, lon: 10.171382, time_offset_ms: 167_988}, %Video.TimedPoint{lat: 53.600415, lon: 10.171282, time_offset_ms: 168_322}, %Video.TimedPoint{lat: 53.600455, lon: 10.171185, time_offset_ms: 168_655}, %Video.TimedPoint{lat: 53.600502, lon: 10.171078, time_offset_ms: 168_989}, %Video.TimedPoint{lat: 53.600548, lon: 10.170961, time_offset_ms: 169_323}, %Video.TimedPoint{lat: 53.600575, lon: 10.170854, time_offset_ms: 169_656}, %Video.TimedPoint{lat: 53.600617, lon: 10.170758, time_offset_ms: 169_990}, %Video.TimedPoint{lat: 53.600651, lon: 10.170675, time_offset_ms: 170_324}, %Video.TimedPoint{lat: 53.600691, lon: 10.170605, time_offset_ms: 170_657}, %Video.TimedPoint{lat: 53.600727, lon: 10.170525, time_offset_ms: 170_991}, %Video.TimedPoint{lat: 53.600758, lon: 10.170456, time_offset_ms: 171_325}, %Video.TimedPoint{lat: 53.600794, lon: 10.170378, time_offset_ms: 171_658}, %Video.TimedPoint{lat: 53.600833, lon: 10.170301, time_offset_ms: 171_992}, %Video.TimedPoint{lat: 53.600874, lon: 10.170224, time_offset_ms: 172_326}, %Video.TimedPoint{lat: 53.600901, lon: 10.170149, time_offset_ms: 172_659}, %Video.TimedPoint{lat: 53.600921, lon: 10.170081, time_offset_ms: 172_993}, %Video.TimedPoint{lat: 53.600932, lon: 10.170006, time_offset_ms: 173_327}, %Video.TimedPoint{lat: 53.600957, lon: 10.169909, time_offset_ms: 173_660}, %Video.TimedPoint{lat: 53.600981, lon: 10.169815, time_offset_ms: 173_994}, %Video.TimedPoint{lat: 53.601002, lon: 10.169723, time_offset_ms: 174_328}, %Video.TimedPoint{lat: 53.601018, lon: 10.169626, time_offset_ms: 174_661}, %Video.TimedPoint{lat: 53.601032, lon: 10.169527, time_offset_ms: 174_995}, %Video.TimedPoint{lat: 53.601047, lon: 10.169421, time_offset_ms: 175_329}, %Video.TimedPoint{lat: 53.601051, lon: 10.169326, time_offset_ms: 175_662}, %Video.TimedPoint{lat: 53.601069, lon: 10.169232, time_offset_ms: 175_996}, %Video.TimedPoint{lat: 53.601102, lon: 10.169158, time_offset_ms: 176_330}, %Video.TimedPoint{lat: 53.601137, lon: 10.169089, time_offset_ms: 176_663}, %Video.TimedPoint{lat: 53.601185, lon: 10.169025, time_offset_ms: 176_997}, %Video.TimedPoint{lat: 53.601241, lon: 10.168987, time_offset_ms: 177_331}, %Video.TimedPoint{lat: 53.601301, lon: 10.16896, time_offset_ms: 177_664}, %Video.TimedPoint{lat: 53.601352, lon: 10.168931, time_offset_ms: 177_998}, %Video.TimedPoint{lat: 53.601412, lon: 10.168875, time_offset_ms: 178_332}, %Video.TimedPoint{lat: 53.601461, lon: 10.168809, time_offset_ms: 178_665}, %Video.TimedPoint{lat: 53.6015, lon: 10.168712, time_offset_ms: 178_999}, %Video.TimedPoint{lat: 53.601509, lon: 10.168608, time_offset_ms: 179_333}, %Video.TimedPoint{lat: 53.601501, lon: 10.168485, time_offset_ms: 179_666}, %Video.TimedPoint{lat: 53.601485, lon: 10.168365, time_offset_ms: 180_000}, %Video.TimedPoint{lat: 53.601477, lon: 10.168243, time_offset_ms: 180_334}, %Video.TimedPoint{lat: 53.601492, lon: 10.16812, time_offset_ms: 180_667}, %Video.TimedPoint{lat: 53.601511, lon: 10.167996, time_offset_ms: 181_001}, %Video.TimedPoint{lat: 53.601536, lon: 10.167881, time_offset_ms: 181_335}, %Video.TimedPoint{lat: 53.601567, lon: 10.167781, time_offset_ms: 181_668}, %Video.TimedPoint{lat: 53.601607, lon: 10.167673, time_offset_ms: 182_002}, %Video.TimedPoint{lat: 53.601637, lon: 10.167566, time_offset_ms: 182_336}, %Video.TimedPoint{lat: 53.601667, lon: 10.16747, time_offset_ms: 182_669}, %Video.TimedPoint{lat: 53.601717, lon: 10.167361, time_offset_ms: 183_003}, %Video.TimedPoint{lat: 53.601763, lon: 10.167278, time_offset_ms: 183_337}, %Video.TimedPoint{lat: 53.601811, lon: 10.167186, time_offset_ms: 183_670}, %Video.TimedPoint{lat: 53.601845, lon: 10.167104, time_offset_ms: 184_004}, %Video.TimedPoint{lat: 53.601882, lon: 10.167029, time_offset_ms: 184_338}, %Video.TimedPoint{lat: 53.601927, lon: 10.16696, time_offset_ms: 184_671}, %Video.TimedPoint{lat: 53.601973, lon: 10.166889, time_offset_ms: 185_005}, %Video.TimedPoint{lat: 53.602018, lon: 10.166805, time_offset_ms: 185_339}, %Video.TimedPoint{lat: 53.602069, lon: 10.166714, time_offset_ms: 185_672}, %Video.TimedPoint{lat: 53.602108, lon: 10.166621, time_offset_ms: 186_006}, %Video.TimedPoint{lat: 53.60214, lon: 10.166524, time_offset_ms: 186_340}, %Video.TimedPoint{lat: 53.602164, lon: 10.166408, time_offset_ms: 186_673}, %Video.TimedPoint{lat: 53.602185, lon: 10.166276, time_offset_ms: 187_007}, %Video.TimedPoint{lat: 53.602206, lon: 10.166153, time_offset_ms: 187_341}, %Video.TimedPoint{lat: 53.602229, lon: 10.166038, time_offset_ms: 187_674}, %Video.TimedPoint{lat: 53.602262, lon: 10.16592, time_offset_ms: 188_008}, %Video.TimedPoint{lat: 53.602288, lon: 10.165818, time_offset_ms: 188_342}, %Video.TimedPoint{lat: 53.602303, lon: 10.165706, time_offset_ms: 188_675}, %Video.TimedPoint{lat: 53.602317, lon: 10.165586, time_offset_ms: 189_009}, %Video.TimedPoint{lat: 53.602325, lon: 10.165485, time_offset_ms: 189_343}, %Video.TimedPoint{lat: 53.602315, lon: 10.165416, time_offset_ms: 189_676}, %Video.TimedPoint{lat: 53.60232, lon: 10.165352, time_offset_ms: 190_010}, %Video.TimedPoint{lat: 53.60233, lon: 10.16528, time_offset_ms: 190_344}, %Video.TimedPoint{lat: 53.602339, lon: 10.165218, time_offset_ms: 190_677}, %Video.TimedPoint{lat: 53.602347, lon: 10.165159, time_offset_ms: 191_011}, %Video.TimedPoint{lat: 53.602343, lon: 10.165121, time_offset_ms: 191_345}, %Video.TimedPoint{lat: 53.602338, lon: 10.165079, time_offset_ms: 191_678}, %Video.TimedPoint{lat: 53.602328, lon: 10.165019, time_offset_ms: 192_012}, %Video.TimedPoint{lat: 53.602313, lon: 10.164953, time_offset_ms: 192_346}, %Video.TimedPoint{lat: 53.602296, lon: 10.164884, time_offset_ms: 192_679}, %Video.TimedPoint{lat: 53.602274, lon: 10.164813, time_offset_ms: 193_013}, %Video.TimedPoint{lat: 53.602255, lon: 10.16474, time_offset_ms: 193_347}, %Video.TimedPoint{lat: 53.60224, lon: 10.164658, time_offset_ms: 193_680}, %Video.TimedPoint{lat: 53.602228, lon: 10.164583, time_offset_ms: 194_014}, %Video.TimedPoint{lat: 53.602221, lon: 10.164502, time_offset_ms: 194_348}, %Video.TimedPoint{lat: 53.602207, lon: 10.164424, time_offset_ms: 194_681}, %Video.TimedPoint{lat: 53.602197, lon: 10.164355, time_offset_ms: 195_015}, %Video.TimedPoint{lat: 53.602183, lon: 10.164272, time_offset_ms: 195_349}, %Video.TimedPoint{lat: 53.602166, lon: 10.164186, time_offset_ms: 195_682}, %Video.TimedPoint{lat: 53.602154, lon: 10.164112, time_offset_ms: 196_016}, %Video.TimedPoint{lat: 53.602142, lon: 10.164028, time_offset_ms: 196_350}, %Video.TimedPoint{lat: 53.602132, lon: 10.163942, time_offset_ms: 196_683}, %Video.TimedPoint{lat: 53.602118, lon: 10.163865, time_offset_ms: 197_017}, %Video.TimedPoint{lat: 53.602087, lon: 10.163793, time_offset_ms: 197_351}, %Video.TimedPoint{lat: 53.602064, lon: 10.163741, time_offset_ms: 197_684}, %Video.TimedPoint{lat: 53.602052, lon: 10.163694, time_offset_ms: 198_018}, %Video.TimedPoint{lat: 53.602051, lon: 10.163655, time_offset_ms: 198_352}, %Video.TimedPoint{lat: 53.602035, lon: 10.163618, time_offset_ms: 198_685}, %Video.TimedPoint{lat: 53.602006, lon: 10.163565, time_offset_ms: 199_019}, %Video.TimedPoint{lat: 53.601975, lon: 10.163506, time_offset_ms: 199_353}, %Video.TimedPoint{lat: 53.601942, lon: 10.163454, time_offset_ms: 199_686}, %Video.TimedPoint{lat: 53.601919, lon: 10.163397, time_offset_ms: 200_020}, %Video.TimedPoint{lat: 53.601884, lon: 10.163333, time_offset_ms: 200_354}, %Video.TimedPoint{lat: 53.60185, lon: 10.163262, time_offset_ms: 200_687}, %Video.TimedPoint{lat: 53.601809, lon: 10.163186, time_offset_ms: 201_021}, %Video.TimedPoint{lat: 53.601766, lon: 10.163107, time_offset_ms: 201_355}, %Video.TimedPoint{lat: 53.601732, lon: 10.163028, time_offset_ms: 201_688}, %Video.TimedPoint{lat: 53.601696, lon: 10.162959, time_offset_ms: 202_022}, %Video.TimedPoint{lat: 53.601656, lon: 10.162888, time_offset_ms: 202_356}, %Video.TimedPoint{lat: 53.601616, lon: 10.162815, time_offset_ms: 202_689}, %Video.TimedPoint{lat: 53.601575, lon: 10.16274, time_offset_ms: 203_023}, %Video.TimedPoint{lat: 53.601539, lon: 10.16267, time_offset_ms: 203_357}, %Video.TimedPoint{lat: 53.601513, lon: 10.162617, time_offset_ms: 203_690}, %Video.TimedPoint{lat: 53.601493, lon: 10.162569, time_offset_ms: 204_024}, %Video.TimedPoint{lat: 53.601489, lon: 10.162529, time_offset_ms: 204_358}, %Video.TimedPoint{lat: 53.601483, lon: 10.162493, time_offset_ms: 204_691}, %Video.TimedPoint{lat: 53.601461, lon: 10.162454, time_offset_ms: 205_025}, %Video.TimedPoint{lat: 53.601437, lon: 10.162421, time_offset_ms: 205_359}, %Video.TimedPoint{lat: 53.601416, lon: 10.162409, time_offset_ms: 205_692}, %Video.TimedPoint{lat: 53.601393, lon: 10.162375, time_offset_ms: 206_026}, %Video.TimedPoint{lat: 53.601368, lon: 10.162325, time_offset_ms: 206_360}, %Video.TimedPoint{lat: 53.60134, lon: 10.162275, time_offset_ms: 206_693}, %Video.TimedPoint{lat: 53.601305, lon: 10.162213, time_offset_ms: 207_027}, %Video.TimedPoint{lat: 53.601277, lon: 10.162153, time_offset_ms: 207_361}, %Video.TimedPoint{lat: 53.601243, lon: 10.16209, time_offset_ms: 207_694}, %Video.TimedPoint{lat: 53.601206, lon: 10.162028, time_offset_ms: 208_028}, %Video.TimedPoint{lat: 53.601171, lon: 10.161965, time_offset_ms: 208_362}, %Video.TimedPoint{lat: 53.601135, lon: 10.161905, time_offset_ms: 208_695}, %Video.TimedPoint{lat: 53.601099, lon: 10.161848, time_offset_ms: 209_029}, %Video.TimedPoint{lat: 53.601064, lon: 10.161794, time_offset_ms: 209_363}, %Video.TimedPoint{lat: 53.601027, lon: 10.161734, time_offset_ms: 209_696}, %Video.TimedPoint{lat: 53.600995, lon: 10.161675, time_offset_ms: 210_030}, %Video.TimedPoint{lat: 53.600963, lon: 10.161624, time_offset_ms: 210_364}, %Video.TimedPoint{lat: 53.600937, lon: 10.161573, time_offset_ms: 210_697}, %Video.TimedPoint{lat: 53.60092, lon: 10.161539, time_offset_ms: 211_031}, %Video.TimedPoint{lat: 53.600907, lon: 10.161515, time_offset_ms: 211_365}, %Video.TimedPoint{lat: 53.60089, lon: 10.161487, time_offset_ms: 211_698}, %Video.TimedPoint{lat: 53.600873, lon: 10.161445, time_offset_ms: 212_032}, %Video.TimedPoint{lat: 53.600854, lon: 10.161419, time_offset_ms: 212_366}, %Video.TimedPoint{lat: 53.600833, lon: 10.161402, time_offset_ms: 212_699}, %Video.TimedPoint{lat: 53.600813, lon: 10.16137, time_offset_ms: 213_033}, %Video.TimedPoint{ lat: 53.600792682634726, lon: 10.161340574850298, time_offset_ms: 213_267 }, %Video.TimedPoint{lat: 53.60076528742515, lon: 10.16129988023952, time_offset_ms: 213_352}, %Video.TimedPoint{lat: 53.600759, lon: 10.16129, time_offset_ms: 213_652}, %Video.TimedPoint{lat: 53.600749, lon: 10.161268, time_offset_ms: 213_986}, %Video.TimedPoint{lat: 53.600733, lon: 10.161246, time_offset_ms: 214_319}, %Video.TimedPoint{lat: 53.600717, lon: 10.161218, time_offset_ms: 214_653}, %Video.TimedPoint{lat: 53.600694, lon: 10.161188, time_offset_ms: 214_987}, %Video.TimedPoint{lat: 53.600675, lon: 10.16116, time_offset_ms: 215_320}, %Video.TimedPoint{lat: 53.600657, lon: 10.16113, time_offset_ms: 215_654}, %Video.TimedPoint{lat: 53.60064, lon: 10.161113, time_offset_ms: 215_988}, %Video.TimedPoint{lat: 53.600632, lon: 10.161104, time_offset_ms: 216_321}, %Video.TimedPoint{lat: 53.600619, lon: 10.161077, time_offset_ms: 216_655}, %Video.TimedPoint{lat: 53.600594, lon: 10.16103, time_offset_ms: 216_989}, %Video.TimedPoint{lat: 53.600562, lon: 10.160977, time_offset_ms: 217_322}, %Video.TimedPoint{lat: 53.600528, lon: 10.160935, time_offset_ms: 217_656}, %Video.TimedPoint{lat: 53.600498, lon: 10.160892, time_offset_ms: 217_990}, %Video.TimedPoint{lat: 53.600468, lon: 10.160852, time_offset_ms: 218_323}, %Video.TimedPoint{lat: 53.600439, lon: 10.160801, time_offset_ms: 218_657}, %Video.TimedPoint{lat: 53.600412, lon: 10.160753, time_offset_ms: 218_991}, %Video.TimedPoint{lat: 53.600391, lon: 10.160709, time_offset_ms: 219_324}, %Video.TimedPoint{lat: 53.60036, lon: 10.160649, time_offset_ms: 219_658}, %Video.TimedPoint{lat: 53.600335, lon: 10.160607, time_offset_ms: 219_992}, %Video.TimedPoint{lat: 53.600312, lon: 10.160564, time_offset_ms: 220_325}, %Video.TimedPoint{lat: 53.600305, lon: 10.160503, time_offset_ms: 220_659}, %Video.TimedPoint{lat: 53.600315, lon: 10.160443, time_offset_ms: 220_993}, %Video.TimedPoint{lat: 53.600323, lon: 10.160366, time_offset_ms: 221_326}, %Video.TimedPoint{lat: 53.60033, lon: 10.160294, time_offset_ms: 221_660}, %Video.TimedPoint{lat: 53.600334, lon: 10.160217, time_offset_ms: 221_994}, %Video.TimedPoint{lat: 53.600339, lon: 10.160127, time_offset_ms: 222_327}, %Video.TimedPoint{lat: 53.600356, lon: 10.160043, time_offset_ms: 222_661}, %Video.TimedPoint{lat: 53.600369, lon: 10.159961, time_offset_ms: 222_995}, %Video.TimedPoint{lat: 53.600382, lon: 10.159875, time_offset_ms: 223_328}, %Video.TimedPoint{lat: 53.600391, lon: 10.159768, time_offset_ms: 223_662}, %Video.TimedPoint{lat: 53.600402, lon: 10.15966, time_offset_ms: 223_996}, %Video.TimedPoint{lat: 53.600411, lon: 10.159557, time_offset_ms: 224_329}, %Video.TimedPoint{lat: 53.600421, lon: 10.159439, time_offset_ms: 224_663}, %Video.TimedPoint{lat: 53.600427, lon: 10.159331, time_offset_ms: 224_997}, %Video.TimedPoint{lat: 53.600436, lon: 10.159235, time_offset_ms: 225_330}, %Video.TimedPoint{lat: 53.600452, lon: 10.159143, time_offset_ms: 225_664}, %Video.TimedPoint{lat: 53.60046, lon: 10.159049, time_offset_ms: 225_998}, %Video.TimedPoint{lat: 53.600465, lon: 10.158962, time_offset_ms: 226_331}, %Video.TimedPoint{lat: 53.600473, lon: 10.158851, time_offset_ms: 226_665}, %Video.TimedPoint{lat: 53.600483, lon: 10.158748, time_offset_ms: 226_999}, %Video.TimedPoint{lat: 53.600491, lon: 10.158651, time_offset_ms: 227_332}, %Video.TimedPoint{lat: 53.600501, lon: 10.158539, time_offset_ms: 227_666}, %Video.TimedPoint{lat: 53.600509, lon: 10.158436, time_offset_ms: 228_000}, %Video.TimedPoint{lat: 53.600522, lon: 10.158326, time_offset_ms: 228_333}, %Video.TimedPoint{lat: 53.600538, lon: 10.15823, time_offset_ms: 228_667}, %Video.TimedPoint{lat: 53.600546, lon: 10.158124, time_offset_ms: 229_001}, %Video.TimedPoint{lat: 53.600556, lon: 10.158013, time_offset_ms: 229_334}, %Video.TimedPoint{lat: 53.600572, lon: 10.157917, time_offset_ms: 229_668}, %Video.TimedPoint{lat: 53.600593, lon: 10.157818, time_offset_ms: 230_002}, %Video.TimedPoint{lat: 53.600613, lon: 10.157736, time_offset_ms: 230_335}, %Video.TimedPoint{lat: 53.600637, lon: 10.157644, time_offset_ms: 230_669}, %Video.TimedPoint{lat: 53.600661, lon: 10.157567, time_offset_ms: 231_003}, %Video.TimedPoint{lat: 53.600674, lon: 10.157476, time_offset_ms: 231_336}, %Video.TimedPoint{lat: 53.600681, lon: 10.157379, time_offset_ms: 231_670}, %Video.TimedPoint{lat: 53.600681, lon: 10.157284, time_offset_ms: 232_004}, %Video.TimedPoint{lat: 53.600695, lon: 10.157184, time_offset_ms: 232_337}, %Video.TimedPoint{lat: 53.600709, lon: 10.157097, time_offset_ms: 232_671}, %Video.TimedPoint{lat: 53.600715, lon: 10.156997, time_offset_ms: 233_005}, %Video.TimedPoint{lat: 53.600734, lon: 10.156898, time_offset_ms: 233_338}, %Video.TimedPoint{lat: 53.600735, lon: 10.156802, time_offset_ms: 233_672}, %Video.TimedPoint{lat: 53.600733, lon: 10.156715, time_offset_ms: 234_006}, %Video.TimedPoint{lat: 53.60073, lon: 10.156644, time_offset_ms: 234_339}, %Video.TimedPoint{lat: 53.600729, lon: 10.156592, time_offset_ms: 234_673}, %Video.TimedPoint{lat: 53.600717, lon: 10.156554, time_offset_ms: 235_007}, %Video.TimedPoint{lat: 53.600702, lon: 10.156511, time_offset_ms: 235_340}, %Video.TimedPoint{lat: 53.600694, lon: 10.156449, time_offset_ms: 235_674}, %Video.TimedPoint{lat: 53.600679, lon: 10.156387, time_offset_ms: 236_008}, %Video.TimedPoint{lat: 53.600637, lon: 10.156335, time_offset_ms: 236_341}, %Video.TimedPoint{lat: 53.600575, lon: 10.156309, time_offset_ms: 236_675}, %Video.TimedPoint{lat: 53.600505, lon: 10.156286, time_offset_ms: 237_009}, %Video.TimedPoint{lat: 53.600445, lon: 10.156268, time_offset_ms: 237_342}, %Video.TimedPoint{lat: 53.600382, lon: 10.156257, time_offset_ms: 237_676}, %Video.TimedPoint{lat: 53.600325, lon: 10.156227, time_offset_ms: 238_010}, %Video.TimedPoint{lat: 53.600314, lon: 10.156162, time_offset_ms: 238_343}, %Video.TimedPoint{lat: 53.600327, lon: 10.156086, time_offset_ms: 238_677}, %Video.TimedPoint{lat: 53.600359, lon: 10.156003, time_offset_ms: 239_011}, %Video.TimedPoint{lat: 53.600398, lon: 10.155932, time_offset_ms: 239_344}, %Video.TimedPoint{lat: 53.600434, lon: 10.15586, time_offset_ms: 239_678}, %Video.TimedPoint{lat: 53.600475, lon: 10.155784, time_offset_ms: 240_012}, %Video.TimedPoint{lat: 53.60052, lon: 10.155698, time_offset_ms: 240_345}, %Video.TimedPoint{lat: 53.600562, lon: 10.15561, time_offset_ms: 240_679}, %Video.TimedPoint{lat: 53.600605, lon: 10.155524, time_offset_ms: 241_013}, %Video.TimedPoint{lat: 53.600651, lon: 10.155448, time_offset_ms: 241_346}, %Video.TimedPoint{lat: 53.600678, lon: 10.15539, time_offset_ms: 241_680}, %Video.TimedPoint{lat: 53.600679, lon: 10.155344, time_offset_ms: 242_014}, %Video.TimedPoint{lat: 53.600655, lon: 10.155318, time_offset_ms: 242_347}, %Video.TimedPoint{lat: 53.600617, lon: 10.1553, time_offset_ms: 242_681}, %Video.TimedPoint{lat: 53.600568, lon: 10.155291, time_offset_ms: 243_015}, %Video.TimedPoint{lat: 53.600503, lon: 10.155289, time_offset_ms: 243_348}, %Video.TimedPoint{lat: 53.600438, lon: 10.155289, time_offset_ms: 243_682}, %Video.TimedPoint{lat: 53.600373, lon: 10.15529, time_offset_ms: 244_016}, %Video.TimedPoint{lat: 53.600312, lon: 10.155291, time_offset_ms: 244_349}, %Video.TimedPoint{lat: 53.600247, lon: 10.155268, time_offset_ms: 244_683}, %Video.TimedPoint{lat: 53.600211, lon: 10.1552, time_offset_ms: 245_017}, %Video.TimedPoint{lat: 53.600187, lon: 10.155103, time_offset_ms: 245_350}, %Video.TimedPoint{lat: 53.600168, lon: 10.154985, time_offset_ms: 245_684}, %Video.TimedPoint{lat: 53.600161, lon: 10.154882, time_offset_ms: 246_018}, %Video.TimedPoint{lat: 53.600158, lon: 10.154794, time_offset_ms: 246_351}, %Video.TimedPoint{lat: 53.600146, lon: 10.154686, time_offset_ms: 246_685}, %Video.TimedPoint{lat: 53.600124, lon: 10.154578, time_offset_ms: 247_019}, %Video.TimedPoint{lat: 53.600101, lon: 10.154462, time_offset_ms: 247_352}, %Video.TimedPoint{lat: 53.600081, lon: 10.154334, time_offset_ms: 247_686}, %Video.TimedPoint{lat: 53.600054, lon: 10.154207, time_offset_ms: 248_020}, %Video.TimedPoint{lat: 53.600019, lon: 10.15408, time_offset_ms: 248_353}, %Video.TimedPoint{lat: 53.599984, lon: 10.153968, time_offset_ms: 248_687}, %Video.TimedPoint{lat: 53.599944, lon: 10.153853, time_offset_ms: 249_021}, %Video.TimedPoint{lat: 53.599914, lon: 10.15374, time_offset_ms: 249_354}, %Video.TimedPoint{lat: 53.599892, lon: 10.153612, time_offset_ms: 249_688}, %Video.TimedPoint{lat: 53.59988, lon: 10.153481, time_offset_ms: 250_022}, %Video.TimedPoint{lat: 53.599867, lon: 10.153361, time_offset_ms: 250_355}, %Video.TimedPoint{lat: 53.59984, lon: 10.153239, time_offset_ms: 250_689}, %Video.TimedPoint{lat: 53.599818, lon: 10.153127, time_offset_ms: 251_023}, %Video.TimedPoint{lat: 53.599819, lon: 10.153002, time_offset_ms: 251_356}, %Video.TimedPoint{lat: 53.599844, lon: 10.152913, time_offset_ms: 251_690}, %Video.TimedPoint{lat: 53.599878, lon: 10.152841, time_offset_ms: 252_024}, %Video.TimedPoint{lat: 53.599911, lon: 10.152767, time_offset_ms: 252_357}, %Video.TimedPoint{lat: 53.599943, lon: 10.152694, time_offset_ms: 252_691}, %Video.TimedPoint{lat: 53.599968, lon: 10.15264, time_offset_ms: 253_025}, %Video.TimedPoint{lat: 53.599998, lon: 10.152575, time_offset_ms: 253_358}, %Video.TimedPoint{lat: 53.600028, lon: 10.152514, time_offset_ms: 253_692}, %Video.TimedPoint{lat: 53.600059, lon: 10.152456, time_offset_ms: 254_026}, %Video.TimedPoint{lat: 53.600092, lon: 10.152402, time_offset_ms: 254_359}, %Video.TimedPoint{lat: 53.600118, lon: 10.152351, time_offset_ms: 254_693}, %Video.TimedPoint{lat: 53.600133, lon: 10.1523, time_offset_ms: 255_027}, %Video.TimedPoint{lat: 53.600141, lon: 10.152264, time_offset_ms: 255_360}, %Video.TimedPoint{lat: 53.600152, lon: 10.152186, time_offset_ms: 255_445}, %Video.TimedPoint{lat: 53.60016, lon: 10.152168, time_offset_ms: 255_779}, %Video.TimedPoint{lat: 53.60018, lon: 10.152129, time_offset_ms: 256_112}, %Video.TimedPoint{lat: 53.600207, lon: 10.152086, time_offset_ms: 256_446}, %Video.TimedPoint{lat: 53.600232, lon: 10.152039, time_offset_ms: 256_780}, %Video.TimedPoint{lat: 53.600256, lon: 10.151986, time_offset_ms: 257_113}, %Video.TimedPoint{lat: 53.600277, lon: 10.151931, time_offset_ms: 257_447}, %Video.TimedPoint{lat: 53.600293, lon: 10.151885, time_offset_ms: 257_781}, %Video.TimedPoint{lat: 53.600297, lon: 10.151858, time_offset_ms: 258_114}, %Video.TimedPoint{lat: 53.600302, lon: 10.151812, time_offset_ms: 258_199}, %Video.TimedPoint{lat: 53.600259, lon: 10.15177, time_offset_ms: 258_866}, %Video.TimedPoint{lat: 53.600067, lon: 10.151756, time_offset_ms: 259_867}, %Video.TimedPoint{lat: 53.599994, lon: 10.151722, time_offset_ms: 260_201}, %Video.TimedPoint{lat: 53.599797, lon: 10.151567, time_offset_ms: 261_202}, %Video.TimedPoint{lat: 53.599742, lon: 10.1515, time_offset_ms: 261_536}, %Video.TimedPoint{lat: 53.599718, lon: 10.151405, time_offset_ms: 261_869}, %Video.TimedPoint{lat: 53.599719, lon: 10.151306, time_offset_ms: 262_203}, %Video.TimedPoint{lat: 53.599705, lon: 10.15121, time_offset_ms: 262_537}, %Video.TimedPoint{lat: 53.599656, lon: 10.151122, time_offset_ms: 262_870}, %Video.TimedPoint{lat: 53.599595, lon: 10.151061, time_offset_ms: 263_204}, %Video.TimedPoint{lat: 53.599527, lon: 10.151022, time_offset_ms: 263_538}, %Video.TimedPoint{lat: 53.599226, lon: 10.150936, time_offset_ms: 264_872}, %Video.TimedPoint{lat: 53.599152, lon: 10.150903, time_offset_ms: 265_206}, %Video.TimedPoint{lat: 53.599099, lon: 10.150848, time_offset_ms: 265_540}, %Video.TimedPoint{lat: 53.598989, lon: 10.150683, time_offset_ms: 266_874}, %Video.TimedPoint{lat: 53.598958, lon: 10.150627, time_offset_ms: 267_208}, %Video.TimedPoint{lat: 53.598904, lon: 10.15049, time_offset_ms: 267_875}, %Video.TimedPoint{lat: 53.598863, lon: 10.150314, time_offset_ms: 268_543}, %Video.TimedPoint{lat: 53.598777, lon: 10.149747, time_offset_ms: 270_545}, %Video.TimedPoint{lat: 53.598766, lon: 10.149552, time_offset_ms: 271_212}, %Video.TimedPoint{lat: 53.598745, lon: 10.149461, time_offset_ms: 271_546}, %Video.TimedPoint{lat: 53.598714, lon: 10.149395, time_offset_ms: 271_879}, %Video.TimedPoint{lat: 53.598667, lon: 10.149329, time_offset_ms: 272_213}, %Video.TimedPoint{lat: 53.598566, lon: 10.149228, time_offset_ms: 272_880}, %Video.TimedPoint{lat: 53.59854, lon: 10.149146, time_offset_ms: 273_214}, %Video.TimedPoint{lat: 53.598551, lon: 10.149052, time_offset_ms: 273_548}, %Video.TimedPoint{lat: 53.598467, lon: 10.148706, time_offset_ms: 274_882}, %Video.TimedPoint{lat: 53.59844, lon: 10.148612, time_offset_ms: 275_216}, %Video.TimedPoint{lat: 53.598361, lon: 10.148409, time_offset_ms: 275_883}, %Video.TimedPoint{lat: 53.598312, lon: 10.148166, time_offset_ms: 276_551}, %Video.TimedPoint{lat: 53.598277, lon: 10.148045, time_offset_ms: 276_884}, %Video.TimedPoint{lat: 53.598235, lon: 10.147937, time_offset_ms: 277_218}, %Video.TimedPoint{lat: 53.598182, lon: 10.147859, time_offset_ms: 277_552}, %Video.TimedPoint{lat: 53.598118, lon: 10.147832, time_offset_ms: 277_885}, %Video.TimedPoint{lat: 53.598007, lon: 10.147843, time_offset_ms: 278_553}, %Video.TimedPoint{lat: 53.597959, lon: 10.147831, time_offset_ms: 278_886}, %Video.TimedPoint{lat: 53.597908, lon: 10.147775, time_offset_ms: 279_220}, %Video.TimedPoint{lat: 53.597794, lon: 10.147508, time_offset_ms: 280_221}, %Video.TimedPoint{lat: 53.597624, lon: 10.147168, time_offset_ms: 281_556}, %Video.TimedPoint{lat: 53.597532, lon: 10.146947, time_offset_ms: 282_890}, %Video.TimedPoint{lat: 53.597444, lon: 10.146762, time_offset_ms: 283_891}, %Video.TimedPoint{lat: 53.597365, lon: 10.146422, time_offset_ms: 285_226}, %Video.TimedPoint{lat: 53.597338, lon: 10.146235, time_offset_ms: 285_893}, %Video.TimedPoint{lat: 53.597277, lon: 10.146004, time_offset_ms: 286_894}, %Video.TimedPoint{lat: 53.597198, lon: 10.145613, time_offset_ms: 288_229}, %Video.TimedPoint{lat: 53.59715, lon: 10.145438, time_offset_ms: 288_896}, %Video.TimedPoint{lat: 53.597141, lon: 10.145364, time_offset_ms: 289_230}, %Video.TimedPoint{lat: 53.597153, lon: 10.145312, time_offset_ms: 289_564}, %Video.TimedPoint{lat: 53.597175, lon: 10.145265, time_offset_ms: 289_897}, %Video.TimedPoint{lat: 53.597248, lon: 10.145158, time_offset_ms: 290_565}, %Video.TimedPoint{lat: 53.597339, lon: 10.145069, time_offset_ms: 291_232}, %Video.TimedPoint{lat: 53.597513, lon: 10.144872, time_offset_ms: 292_567}, %Video.TimedPoint{lat: 53.597831, lon: 10.144591, time_offset_ms: 294_902}, %Video.TimedPoint{lat: 53.597852, lon: 10.144558, time_offset_ms: 295_236}, %Video.TimedPoint{lat: 53.597853, lon: 10.144512, time_offset_ms: 295_570}, %Video.TimedPoint{lat: 53.597835, lon: 10.144445, time_offset_ms: 295_903}, %Video.TimedPoint{lat: 53.597803, lon: 10.144369, time_offset_ms: 296_237}, %Video.TimedPoint{lat: 53.597677, lon: 10.144142, time_offset_ms: 297_238}, %Video.TimedPoint{lat: 53.597558, lon: 10.143887, time_offset_ms: 298_239}, %Video.TimedPoint{lat: 53.597425, lon: 10.143639, time_offset_ms: 299_240}, %Video.TimedPoint{lat: 53.597264, lon: 10.143286, time_offset_ms: 300_575}, %Video.TimedPoint{lat: 53.597236, lon: 10.143186, time_offset_ms: 300_908}, %Video.TimedPoint{lat: 53.597203, lon: 10.142989, time_offset_ms: 301_576}, %Video.TimedPoint{lat: 53.597172, lon: 10.142892, time_offset_ms: 301_909}, %Video.TimedPoint{lat: 53.597128, lon: 10.142825, time_offset_ms: 302_243}, %Video.TimedPoint{lat: 53.597064, lon: 10.14282, time_offset_ms: 302_577}, %Video.TimedPoint{lat: 53.596862, lon: 10.142937, time_offset_ms: 303_578}, %Video.TimedPoint{lat: 53.5968, lon: 10.142959, time_offset_ms: 303_911}, %Video.TimedPoint{lat: 53.596727, lon: 10.142947, time_offset_ms: 304_245}, %Video.TimedPoint{lat: 53.596675, lon: 10.142889, time_offset_ms: 304_579}, %Video.TimedPoint{lat: 53.59657, lon: 10.142726, time_offset_ms: 305_246}, %Video.TimedPoint{lat: 53.596413, lon: 10.142518, time_offset_ms: 306_247}, %Video.TimedPoint{lat: 53.596299, lon: 10.142421, time_offset_ms: 306_914}, %Video.TimedPoint{lat: 53.596245, lon: 10.142385, time_offset_ms: 307_248}, %Video.TimedPoint{lat: 53.596181, lon: 10.14237, time_offset_ms: 307_582}, %Video.TimedPoint{lat: 53.596042, lon: 10.142379, time_offset_ms: 308_249}, %Video.TimedPoint{lat: 53.59587, lon: 10.142352, time_offset_ms: 309_250}, %Video.TimedPoint{lat: 53.595827, lon: 10.142289, time_offset_ms: 309_584}, %Video.TimedPoint{lat: 53.595836, lon: 10.142211, time_offset_ms: 309_917}, %Video.TimedPoint{lat: 53.595876, lon: 10.142113, time_offset_ms: 310_251}, %Video.TimedPoint{lat: 53.595957, lon: 10.141945, time_offset_ms: 310_918}, %Video.TimedPoint{lat: 53.59601, lon: 10.14186, time_offset_ms: 311_252}, %Video.TimedPoint{lat: 53.596177, lon: 10.141643, time_offset_ms: 312_587}, %Video.TimedPoint{lat: 53.596278, lon: 10.141559, time_offset_ms: 313_588}, %Video.TimedPoint{lat: 53.596337, lon: 10.141477, time_offset_ms: 314_589}, %Video.TimedPoint{lat: 53.59635, lon: 10.141383, time_offset_ms: 315_590}, %Video.TimedPoint{lat: 53.596334, lon: 10.141101, time_offset_ms: 316_924}, %Video.TimedPoint{lat: 53.596341, lon: 10.141024, time_offset_ms: 317_258}, %Video.TimedPoint{lat: 53.596357, lon: 10.140954, time_offset_ms: 317_592}, %Video.TimedPoint{lat: 53.596356, lon: 10.140871, time_offset_ms: 317_925}, %Video.TimedPoint{lat: 53.596338, lon: 10.140742, time_offset_ms: 318_593}, %Video.TimedPoint{lat: 53.59632, lon: 10.140669, time_offset_ms: 318_926}, %Video.TimedPoint{lat: 53.596256, lon: 10.140525, time_offset_ms: 319_594}, %Video.TimedPoint{lat: 53.596239, lon: 10.140456, time_offset_ms: 319_927}, %Video.TimedPoint{lat: 53.596293, lon: 10.140231, time_offset_ms: 320_928}, %Video.TimedPoint{lat: 53.596327, lon: 10.140166, time_offset_ms: 321_262}, %Video.TimedPoint{lat: 53.596344, lon: 10.140084, time_offset_ms: 321_596}, %Video.TimedPoint{lat: 53.596347, lon: 10.139956, time_offset_ms: 321_929}, %Video.TimedPoint{lat: 53.596332, lon: 10.139828, time_offset_ms: 322_263}, %Video.TimedPoint{lat: 53.596297, lon: 10.139692, time_offset_ms: 322_597}, %Video.TimedPoint{lat: 53.596271, lon: 10.139551, time_offset_ms: 322_930}, %Video.TimedPoint{lat: 53.59623757189295, lon: 10.139439116567612, time_offset_ms: 323_264}, %Video.TimedPoint{lat: 53.59622893970522, lon: 10.139341550926208, time_offset_ms: 323_598}, %Video.TimedPoint{lat: 53.59625540874773, lon: 10.139252845403671, time_offset_ms: 323_931}, %Video.TimedPoint{lat: 53.59626067425189, lon: 10.139168542327882, time_offset_ms: 324_265}, %Video.TimedPoint{lat: 53.59626522638848, lon: 10.13908830919266, time_offset_ms: 325_032}, %Video.TimedPoint{lat: 53.59625502598474, lon: 10.138898006116866, time_offset_ms: 325_366}, %Video.TimedPoint{lat: 53.59624398411984, lon: 10.138744230653762, time_offset_ms: 325_700}, %Video.TimedPoint{lat: 53.59622349057752, lon: 10.138529107969283, time_offset_ms: 326_033}, %Video.TimedPoint{lat: 53.596186, lon: 10.138167, time_offset_ms: 326_701}, %Video.TimedPoint{lat: 53.596115, lon: 10.13796, time_offset_ms: 327_368}, %Video.TimedPoint{lat: 53.59611, lon: 10.137861, time_offset_ms: 327_702}, %Video.TimedPoint{lat: 53.596124, lon: 10.137758, time_offset_ms: 328_035}, %Video.TimedPoint{lat: 53.596181, lon: 10.137555, time_offset_ms: 328_703}, %Video.TimedPoint{lat: 53.596228, lon: 10.137202, time_offset_ms: 329_704}, %Video.TimedPoint{lat: 53.596242, lon: 10.136961, time_offset_ms: 330_371}, %Video.TimedPoint{lat: 53.596229, lon: 10.136854, time_offset_ms: 330_705}, %Video.TimedPoint{lat: 53.596161, lon: 10.136554, time_offset_ms: 331_706}, %Video.TimedPoint{lat: 53.596094, lon: 10.136392, time_offset_ms: 332_373}, %Video.TimedPoint{lat: 53.596046, lon: 10.136197, time_offset_ms: 333_040}, %Video.TimedPoint{lat: 53.596017, lon: 10.136114, time_offset_ms: 333_374}, %Video.TimedPoint{lat: 53.595991, lon: 10.135869, time_offset_ms: 334_375}, %Video.TimedPoint{lat: 53.595932, lon: 10.135688, time_offset_ms: 335_042}, %Video.TimedPoint{lat: 53.595907, lon: 10.135577, time_offset_ms: 335_376}, %Video.TimedPoint{lat: 53.595792, lon: 10.135383, time_offset_ms: 336_043}, %Video.TimedPoint{lat: 53.595744, lon: 10.135274, time_offset_ms: 336_377}, %Video.TimedPoint{lat: 53.595694, lon: 10.135152, time_offset_ms: 336_711}, %Video.TimedPoint{lat: 53.595667, lon: 10.135055, time_offset_ms: 337_044}, %Video.TimedPoint{lat: 53.59566, lon: 10.134981, time_offset_ms: 337_378}, %Video.TimedPoint{lat: 53.5957, lon: 10.134688, time_offset_ms: 338_379}, %Video.TimedPoint{lat: 53.595725, lon: 10.134597, time_offset_ms: 338_713}, %Video.TimedPoint{lat: 53.595766, lon: 10.13452, time_offset_ms: 339_046}, %Video.TimedPoint{lat: 53.596098, lon: 10.134132, time_offset_ms: 341_048}, %Video.TimedPoint{lat: 53.596137, lon: 10.134047, time_offset_ms: 341_382}, %Video.TimedPoint{lat: 53.596167, lon: 10.133948, time_offset_ms: 341_716}, %Video.TimedPoint{lat: 53.596197, lon: 10.133744, time_offset_ms: 342_383}, %Video.TimedPoint{lat: 53.596194, lon: 10.13364, time_offset_ms: 342_717}, %Video.TimedPoint{lat: 53.596157, lon: 10.133045, time_offset_ms: 345_052}, %Video.TimedPoint{lat: 53.596134, lon: 10.132969, time_offset_ms: 346_053}, %Video.TimedPoint{lat: 53.59614, lon: 10.132934, time_offset_ms: 346_138}, %Video.TimedPoint{lat: 53.596136, lon: 10.132915, time_offset_ms: 346_472}, %Video.TimedPoint{lat: 53.596124, lon: 10.132868, time_offset_ms: 346_805}, %Video.TimedPoint{lat: 53.596107, lon: 10.132804, time_offset_ms: 347_139}, %Video.TimedPoint{lat: 53.596091, lon: 10.132725, time_offset_ms: 347_473}, %Video.TimedPoint{lat: 53.596078, lon: 10.132629, time_offset_ms: 347_806}, %Video.TimedPoint{lat: 53.596065, lon: 10.132552, time_offset_ms: 348_140}, %Video.TimedPoint{lat: 53.596049, lon: 10.132449, time_offset_ms: 348_474}, %Video.TimedPoint{lat: 53.596038, lon: 10.132366, time_offset_ms: 348_807}, %Video.TimedPoint{lat: 53.596024, lon: 10.132287, time_offset_ms: 349_141}, %Video.TimedPoint{lat: 53.596004, lon: 10.132207, time_offset_ms: 349_475}, %Video.TimedPoint{lat: 53.595987, lon: 10.132118, time_offset_ms: 349_808}, %Video.TimedPoint{lat: 53.595971, lon: 10.132024, time_offset_ms: 350_142}, %Video.TimedPoint{lat: 53.595954, lon: 10.131929, time_offset_ms: 350_476}, %Video.TimedPoint{lat: 53.595935, lon: 10.131817, time_offset_ms: 350_809}, %Video.TimedPoint{lat: 53.595915, lon: 10.131718, time_offset_ms: 351_143}, %Video.TimedPoint{lat: 53.595891, lon: 10.131612, time_offset_ms: 351_477}, %Video.TimedPoint{lat: 53.59586, lon: 10.131527, time_offset_ms: 351_810}, %Video.TimedPoint{lat: 53.595817, lon: 10.131432, time_offset_ms: 352_144}, %Video.TimedPoint{lat: 53.595772, lon: 10.13133, time_offset_ms: 352_478}, %Video.TimedPoint{lat: 53.595725, lon: 10.131234, time_offset_ms: 352_811}, %Video.TimedPoint{lat: 53.595674, lon: 10.131132, time_offset_ms: 353_145}, %Video.TimedPoint{lat: 53.595622, lon: 10.131027, time_offset_ms: 353_479}, %Video.TimedPoint{lat: 53.595579, lon: 10.130926, time_offset_ms: 353_812}, %Video.TimedPoint{lat: 53.595534, lon: 10.130816, time_offset_ms: 354_146}, %Video.TimedPoint{lat: 53.595496, lon: 10.130717, time_offset_ms: 354_480}, %Video.TimedPoint{lat: 53.595449, lon: 10.130604, time_offset_ms: 354_813}, %Video.TimedPoint{lat: 53.595402, lon: 10.130483, time_offset_ms: 355_147}, %Video.TimedPoint{lat: 53.595361, lon: 10.130365, time_offset_ms: 355_481}, %Video.TimedPoint{lat: 53.595325, lon: 10.13023, time_offset_ms: 355_814}, %Video.TimedPoint{lat: 53.595285, lon: 10.130109, time_offset_ms: 356_148}, %Video.TimedPoint{lat: 53.595246, lon: 10.12999, time_offset_ms: 356_482}, %Video.TimedPoint{lat: 53.5952, lon: 10.129858, time_offset_ms: 356_815}, %Video.TimedPoint{lat: 53.595152, lon: 10.129741, time_offset_ms: 357_149}, %Video.TimedPoint{lat: 53.5951, lon: 10.129622, time_offset_ms: 357_483}, %Video.TimedPoint{lat: 53.595057, lon: 10.129508, time_offset_ms: 357_816}, %Video.TimedPoint{lat: 53.595009, lon: 10.129381, time_offset_ms: 358_150}, %Video.TimedPoint{lat: 53.594957, lon: 10.129256, time_offset_ms: 358_484}, %Video.TimedPoint{lat: 53.594924, lon: 10.129128, time_offset_ms: 358_817}, %Video.TimedPoint{lat: 53.594906, lon: 10.128988, time_offset_ms: 359_151}, %Video.TimedPoint{lat: 53.594884, lon: 10.128865, time_offset_ms: 359_485}, %Video.TimedPoint{lat: 53.594859, lon: 10.128726, time_offset_ms: 359_818}, %Video.TimedPoint{lat: 53.594838, lon: 10.128582, time_offset_ms: 360_152}, %Video.TimedPoint{lat: 53.594827, lon: 10.128433, time_offset_ms: 360_486}, %Video.TimedPoint{lat: 53.594834, lon: 10.128281, time_offset_ms: 360_819}, %Video.TimedPoint{lat: 53.594843, lon: 10.128134, time_offset_ms: 361_153}, %Video.TimedPoint{lat: 53.594853, lon: 10.127994, time_offset_ms: 361_487}, %Video.TimedPoint{lat: 53.594857, lon: 10.127857, time_offset_ms: 361_820}, %Video.TimedPoint{lat: 53.594853, lon: 10.127733, time_offset_ms: 362_154}, %Video.TimedPoint{lat: 53.594834, lon: 10.127569, time_offset_ms: 362_488}, %Video.TimedPoint{lat: 53.594815, lon: 10.127436, time_offset_ms: 362_821}, %Video.TimedPoint{lat: 53.594789, lon: 10.1273, time_offset_ms: 363_155}, %Video.TimedPoint{lat: 53.594762, lon: 10.127165, time_offset_ms: 363_489}, %Video.TimedPoint{lat: 53.594725, lon: 10.127046, time_offset_ms: 363_822}, %Video.TimedPoint{lat: 53.594666, lon: 10.126915, time_offset_ms: 364_156}, %Video.TimedPoint{lat: 53.594611, lon: 10.126803, time_offset_ms: 364_490}, %Video.TimedPoint{lat: 53.594556, lon: 10.126668, time_offset_ms: 364_823}, %Video.TimedPoint{lat: 53.594515, lon: 10.126542, time_offset_ms: 365_157}, %Video.TimedPoint{lat: 53.594469, lon: 10.126423, time_offset_ms: 365_491}, %Video.TimedPoint{lat: 53.594421, lon: 10.126304, time_offset_ms: 365_824}, %Video.TimedPoint{lat: 53.594391, lon: 10.126165, time_offset_ms: 366_158}, %Video.TimedPoint{lat: 53.594369, lon: 10.126039, time_offset_ms: 366_492}, %Video.TimedPoint{lat: 53.594339, lon: 10.125897, time_offset_ms: 366_825}, %Video.TimedPoint{lat: 53.594315, lon: 10.125758, time_offset_ms: 367_159}, %Video.TimedPoint{lat: 53.594298, lon: 10.12561, time_offset_ms: 367_493}, %Video.TimedPoint{lat: 53.594282, lon: 10.12545, time_offset_ms: 367_826}, %Video.TimedPoint{lat: 53.594269, lon: 10.125318, time_offset_ms: 368_160}, %Video.TimedPoint{lat: 53.594253, lon: 10.125169, time_offset_ms: 368_494}, %Video.TimedPoint{lat: 53.594234, lon: 10.125023, time_offset_ms: 368_827}, %Video.TimedPoint{lat: 53.594214, lon: 10.1249, time_offset_ms: 369_161}, %Video.TimedPoint{lat: 53.594196, lon: 10.124764, time_offset_ms: 369_495}, %Video.TimedPoint{lat: 53.594178, lon: 10.124622, time_offset_ms: 369_828}, %Video.TimedPoint{lat: 53.594173, lon: 10.124501, time_offset_ms: 370_162}, %Video.TimedPoint{lat: 53.594166, lon: 10.124373, time_offset_ms: 370_496}, %Video.TimedPoint{lat: 53.594155, lon: 10.124237, time_offset_ms: 370_829}, %Video.TimedPoint{lat: 53.594135, lon: 10.124101, time_offset_ms: 371_163}, %Video.TimedPoint{lat: 53.594116, lon: 10.123981, time_offset_ms: 371_497}, %Video.TimedPoint{lat: 53.594088, lon: 10.123845, time_offset_ms: 371_830}, %Video.TimedPoint{lat: 53.594065, lon: 10.12374, time_offset_ms: 372_164}, %Video.TimedPoint{lat: 53.594028, lon: 10.123632, time_offset_ms: 372_498}, %Video.TimedPoint{lat: 53.593985, lon: 10.123517, time_offset_ms: 372_831}, %Video.TimedPoint{lat: 53.593941, lon: 10.123402, time_offset_ms: 373_165}, %Video.TimedPoint{lat: 53.593899, lon: 10.123289, time_offset_ms: 373_499}, %Video.TimedPoint{lat: 53.593858, lon: 10.123184, time_offset_ms: 373_832}, %Video.TimedPoint{lat: 53.593824, lon: 10.123079, time_offset_ms: 374_166}, %Video.TimedPoint{lat: 53.593787, lon: 10.122987, time_offset_ms: 374_500}, %Video.TimedPoint{lat: 53.59374, lon: 10.122875, time_offset_ms: 374_833}, %Video.TimedPoint{lat: 53.593701, lon: 10.122779, time_offset_ms: 375_167}, %Video.TimedPoint{lat: 53.593671, lon: 10.122688, time_offset_ms: 375_501}, %Video.TimedPoint{lat: 53.593631, lon: 10.122598, time_offset_ms: 375_834}, %Video.TimedPoint{lat: 53.593589, lon: 10.122512, time_offset_ms: 376_168}, %Video.TimedPoint{lat: 53.593564, lon: 10.122424, time_offset_ms: 376_502}, %Video.TimedPoint{lat: 53.593549, lon: 10.122364, time_offset_ms: 376_835}, %Video.TimedPoint{lat: 53.593534, lon: 10.122315, time_offset_ms: 377_169}, %Video.TimedPoint{lat: 53.593525, lon: 10.122268, time_offset_ms: 377_503}, %Video.TimedPoint{lat: 53.593511, lon: 10.122196, time_offset_ms: 377_836}, %Video.TimedPoint{lat: 53.593491, lon: 10.12212, time_offset_ms: 378_170}, %Video.TimedPoint{lat: 53.593467, lon: 10.122027, time_offset_ms: 378_504}, %Video.TimedPoint{lat: 53.593446, lon: 10.121939, time_offset_ms: 378_837}, %Video.TimedPoint{lat: 53.593441, lon: 10.121858, time_offset_ms: 379_171}, %Video.TimedPoint{lat: 53.593459, lon: 10.121773, time_offset_ms: 379_505}, %Video.TimedPoint{lat: 53.593475, lon: 10.121725, time_offset_ms: 379_838}, %Video.TimedPoint{lat: 53.593483, lon: 10.121699, time_offset_ms: 380_172}, %Video.TimedPoint{lat: 53.593499, lon: 10.121667, time_offset_ms: 380_506}, %Video.TimedPoint{lat: 53.593511, lon: 10.121639, time_offset_ms: 380_839}, %Video.TimedPoint{lat: 53.593521, lon: 10.121605, time_offset_ms: 381_173}, %Video.TimedPoint{lat: 53.593537, lon: 10.121523, time_offset_ms: 381_507}, %Video.TimedPoint{lat: 53.593558, lon: 10.121443, time_offset_ms: 381_840}, %Video.TimedPoint{lat: 53.593562, lon: 10.121353, time_offset_ms: 382_174}, %Video.TimedPoint{lat: 53.593543, lon: 10.121252, time_offset_ms: 382_508}, %Video.TimedPoint{lat: 53.593518, lon: 10.121144, time_offset_ms: 382_841}, %Video.TimedPoint{lat: 53.59349, lon: 10.121063, time_offset_ms: 383_175}, %Video.TimedPoint{lat: 53.593468, lon: 10.120994, time_offset_ms: 383_509}, %Video.TimedPoint{lat: 53.593449, lon: 10.12094, time_offset_ms: 383_842}, %Video.TimedPoint{lat: 53.59343, lon: 10.120874, time_offset_ms: 384_176}, %Video.TimedPoint{lat: 53.593413, lon: 10.120798, time_offset_ms: 384_510}, %Video.TimedPoint{lat: 53.593392, lon: 10.120698, time_offset_ms: 384_843}, %Video.TimedPoint{lat: 53.593383, lon: 10.120594, time_offset_ms: 385_177}, %Video.TimedPoint{lat: 53.593365, lon: 10.120479, time_offset_ms: 385_511}, %Video.TimedPoint{lat: 53.593344, lon: 10.12039, time_offset_ms: 385_844}, %Video.TimedPoint{lat: 53.593319, lon: 10.120271, time_offset_ms: 386_178}, %Video.TimedPoint{lat: 53.593299, lon: 10.120174, time_offset_ms: 386_512}, %Video.TimedPoint{lat: 53.593267, lon: 10.12009, time_offset_ms: 386_845}, %Video.TimedPoint{lat: 53.59323, lon: 10.12002, time_offset_ms: 387_179}, %Video.TimedPoint{lat: 53.59319, lon: 10.119929, time_offset_ms: 387_513}, %Video.TimedPoint{lat: 53.593148, lon: 10.119842, time_offset_ms: 387_846}, %Video.TimedPoint{lat: 53.593103, lon: 10.119752, time_offset_ms: 388_180}, %Video.TimedPoint{lat: 53.59306, lon: 10.119655, time_offset_ms: 388_514}, %Video.TimedPoint{lat: 53.593006, lon: 10.119559, time_offset_ms: 388_847}, %Video.TimedPoint{lat: 53.592959, lon: 10.11947, time_offset_ms: 389_181}, %Video.TimedPoint{lat: 53.592908, lon: 10.119387, time_offset_ms: 389_515}, %Video.TimedPoint{lat: 53.592835, lon: 10.119316, time_offset_ms: 389_848}, %Video.TimedPoint{lat: 53.592767, lon: 10.11926, time_offset_ms: 390_182}, %Video.TimedPoint{lat: 53.592694, lon: 10.119207, time_offset_ms: 390_516}, %Video.TimedPoint{lat: 53.592629, lon: 10.119148, time_offset_ms: 390_849}, %Video.TimedPoint{lat: 53.592578, lon: 10.119073, time_offset_ms: 391_183}, %Video.TimedPoint{lat: 53.592549, lon: 10.118982, time_offset_ms: 391_517}, %Video.TimedPoint{lat: 53.592537, lon: 10.118879, time_offset_ms: 391_850}, %Video.TimedPoint{lat: 53.592533, lon: 10.118762, time_offset_ms: 392_184}, %Video.TimedPoint{lat: 53.592553, lon: 10.118657, time_offset_ms: 392_518}, %Video.TimedPoint{lat: 53.592572, lon: 10.118565, time_offset_ms: 392_851}, %Video.TimedPoint{lat: 53.592596, lon: 10.118464, time_offset_ms: 393_185}, %Video.TimedPoint{lat: 53.59262, lon: 10.118387, time_offset_ms: 393_519}, %Video.TimedPoint{lat: 53.592645, lon: 10.118324, time_offset_ms: 393_852}, %Video.TimedPoint{lat: 53.592666, lon: 10.118267, time_offset_ms: 394_186}, %Video.TimedPoint{lat: 53.592691, lon: 10.118196, time_offset_ms: 394_520}, %Video.TimedPoint{lat: 53.592715, lon: 10.118102, time_offset_ms: 394_853}, %Video.TimedPoint{lat: 53.592733, lon: 10.118003, time_offset_ms: 395_187}, %Video.TimedPoint{lat: 53.592749, lon: 10.117885, time_offset_ms: 395_521}, %Video.TimedPoint{lat: 53.592766, lon: 10.11776, time_offset_ms: 395_854}, %Video.TimedPoint{lat: 53.592778, lon: 10.117659, time_offset_ms: 396_188}, %Video.TimedPoint{lat: 53.592791, lon: 10.117542, time_offset_ms: 396_522}, %Video.TimedPoint{lat: 53.592798, lon: 10.117432, time_offset_ms: 396_855}, %Video.TimedPoint{lat: 53.592788, lon: 10.117334, time_offset_ms: 397_189}, %Video.TimedPoint{lat: 53.592756, lon: 10.117224, time_offset_ms: 397_523}, %Video.TimedPoint{lat: 53.592728, lon: 10.117127, time_offset_ms: 397_856}, %Video.TimedPoint{lat: 53.592702, lon: 10.117037, time_offset_ms: 398_190}, %Video.TimedPoint{lat: 53.592677, lon: 10.116953, time_offset_ms: 398_524}, %Video.TimedPoint{lat: 53.592654, lon: 10.116879, time_offset_ms: 398_857}, %Video.TimedPoint{lat: 53.59263, lon: 10.116801, time_offset_ms: 399_191}, %Video.TimedPoint{lat: 53.592608, lon: 10.116722, time_offset_ms: 399_525}, %Video.TimedPoint{lat: 53.592583, lon: 10.116634, time_offset_ms: 399_858}, %Video.TimedPoint{lat: 53.592557, lon: 10.116555, time_offset_ms: 400_192}, %Video.TimedPoint{lat: 53.592539, lon: 10.116488, time_offset_ms: 400_526}, %Video.TimedPoint{lat: 53.592518, lon: 10.116417, time_offset_ms: 400_859}, %Video.TimedPoint{lat: 53.5925, lon: 10.116351, time_offset_ms: 401_193}, %Video.TimedPoint{lat: 53.592484, lon: 10.116297, time_offset_ms: 401_527}, %Video.TimedPoint{lat: 53.592463, lon: 10.116235, time_offset_ms: 401_860}, %Video.TimedPoint{lat: 53.592443, lon: 10.116163, time_offset_ms: 402_194}, %Video.TimedPoint{lat: 53.592423, lon: 10.116101, time_offset_ms: 402_528}, %Video.TimedPoint{lat: 53.592405, lon: 10.116052, time_offset_ms: 402_861}, %Video.TimedPoint{lat: 53.592384, lon: 10.116004, time_offset_ms: 403_195}, %Video.TimedPoint{lat: 53.592363, lon: 10.115949, time_offset_ms: 403_529}, %Video.TimedPoint{lat: 53.592334, lon: 10.1159, time_offset_ms: 403_862}, %Video.TimedPoint{lat: 53.592309, lon: 10.115851, time_offset_ms: 404_196}, %Video.TimedPoint{lat: 53.592278, lon: 10.115805, time_offset_ms: 404_530}, %Video.TimedPoint{lat: 53.592236, lon: 10.115759, time_offset_ms: 404_863}, %Video.TimedPoint{lat: 53.592201, lon: 10.115722, time_offset_ms: 405_197}, %Video.TimedPoint{lat: 53.59217, lon: 10.115684, time_offset_ms: 405_531}, %Video.TimedPoint{lat: 53.592134, lon: 10.115645, time_offset_ms: 405_864}, %Video.TimedPoint{lat: 53.5921, lon: 10.115605, time_offset_ms: 406_198}, %Video.TimedPoint{lat: 53.592063, lon: 10.115568, time_offset_ms: 406_532}, %Video.TimedPoint{lat: 53.59203, lon: 10.115538, time_offset_ms: 406_865}, %Video.TimedPoint{lat: 53.592005, lon: 10.115514, time_offset_ms: 407_199}, %Video.TimedPoint{lat: 53.591982, lon: 10.115476, time_offset_ms: 407_533}, %Video.TimedPoint{lat: 53.591957, lon: 10.11544, time_offset_ms: 407_866}, %Video.TimedPoint{lat: 53.591927, lon: 10.115409, time_offset_ms: 408_200}, %Video.TimedPoint{lat: 53.591889, lon: 10.115368, time_offset_ms: 408_534}, %Video.TimedPoint{lat: 53.591849, lon: 10.115322, time_offset_ms: 408_867}, %Video.TimedPoint{lat: 53.591803, lon: 10.115255, time_offset_ms: 409_201}, %Video.TimedPoint{lat: 53.591772, lon: 10.115198, time_offset_ms: 409_535}, %Video.TimedPoint{lat: 53.591754, lon: 10.115146, time_offset_ms: 409_868}, %Video.TimedPoint{lat: 53.59174, lon: 10.115089, time_offset_ms: 410_202}, %Video.TimedPoint{lat: 53.591721, lon: 10.115019, time_offset_ms: 410_536}, %Video.TimedPoint{lat: 53.591707, lon: 10.114958, time_offset_ms: 410_869}, %Video.TimedPoint{lat: 53.591689, lon: 10.114887, time_offset_ms: 411_203}, %Video.TimedPoint{lat: 53.591668, lon: 10.11482, time_offset_ms: 411_537}, %Video.TimedPoint{lat: 53.591641, lon: 10.114751, time_offset_ms: 411_870}, %Video.TimedPoint{lat: 53.591618, lon: 10.114699, time_offset_ms: 412_204}, %Video.TimedPoint{lat: 53.591586, lon: 10.114637, time_offset_ms: 412_538}, %Video.TimedPoint{lat: 53.591552, lon: 10.11459, time_offset_ms: 412_871}, %Video.TimedPoint{lat: 53.591511, lon: 10.114533, time_offset_ms: 413_205}, %Video.TimedPoint{lat: 53.591481, lon: 10.114481, time_offset_ms: 413_539}, %Video.TimedPoint{lat: 53.591456, lon: 10.114435, time_offset_ms: 413_872}, %Video.TimedPoint{lat: 53.591426, lon: 10.114389, time_offset_ms: 414_206}, %Video.TimedPoint{lat: 53.591395, lon: 10.114354, time_offset_ms: 414_540}, %Video.TimedPoint{lat: 53.591366, lon: 10.114312, time_offset_ms: 414_873}, %Video.TimedPoint{lat: 53.591341, lon: 10.114261, time_offset_ms: 415_207}, %Video.TimedPoint{lat: 53.591311, lon: 10.114214, time_offset_ms: 415_541}, %Video.TimedPoint{lat: 53.591271, lon: 10.114163, time_offset_ms: 415_874}, %Video.TimedPoint{lat: 53.591223, lon: 10.1141, time_offset_ms: 416_208}, %Video.TimedPoint{lat: 53.591186, lon: 10.114047, time_offset_ms: 416_542}, %Video.TimedPoint{lat: 53.591147, lon: 10.113985, time_offset_ms: 416_875}, %Video.TimedPoint{lat: 53.591106, lon: 10.113934, time_offset_ms: 417_209}, %Video.TimedPoint{lat: 53.591071, lon: 10.113901, time_offset_ms: 417_543}, %Video.TimedPoint{lat: 53.591036, lon: 10.11388, time_offset_ms: 417_876}, %Video.TimedPoint{lat: 53.590993, lon: 10.113869, time_offset_ms: 418_210}, %Video.TimedPoint{lat: 53.590951, lon: 10.113862, time_offset_ms: 418_544}, %Video.TimedPoint{lat: 53.590907, lon: 10.113856, time_offset_ms: 418_877}, %Video.TimedPoint{lat: 53.590866, lon: 10.113839, time_offset_ms: 419_211}, %Video.TimedPoint{lat: 53.590814, lon: 10.113806, time_offset_ms: 419_545}, %Video.TimedPoint{lat: 53.590766, lon: 10.113788, time_offset_ms: 419_878}, %Video.TimedPoint{lat: 53.590704, lon: 10.113769, time_offset_ms: 420_212}, %Video.TimedPoint{lat: 53.590646, lon: 10.11376, time_offset_ms: 420_546}, %Video.TimedPoint{lat: 53.590583, lon: 10.113761, time_offset_ms: 420_879}, %Video.TimedPoint{lat: 53.590513, lon: 10.113769, time_offset_ms: 421_213}, %Video.TimedPoint{lat: 53.590454, lon: 10.113775, time_offset_ms: 421_547}, %Video.TimedPoint{lat: 53.590378, lon: 10.113776, time_offset_ms: 421_880}, %Video.TimedPoint{lat: 53.590318, lon: 10.11378, time_offset_ms: 422_214}, %Video.TimedPoint{lat: 53.590254, lon: 10.113808, time_offset_ms: 422_548}, %Video.TimedPoint{lat: 53.590187, lon: 10.113853, time_offset_ms: 422_881}, %Video.TimedPoint{lat: 53.590124, lon: 10.113891, time_offset_ms: 423_215}, %Video.TimedPoint{lat: 53.590054, lon: 10.113936, time_offset_ms: 423_549}, %Video.TimedPoint{lat: 53.58999, lon: 10.113979, time_offset_ms: 423_882}, %Video.TimedPoint{lat: 53.589933, lon: 10.114005, time_offset_ms: 424_216}, %Video.TimedPoint{lat: 53.589872, lon: 10.114019, time_offset_ms: 424_550}, %Video.TimedPoint{lat: 53.58981, lon: 10.114032, time_offset_ms: 424_883}, %Video.TimedPoint{lat: 53.589748, lon: 10.114049, time_offset_ms: 425_217}, %Video.TimedPoint{lat: 53.58969, lon: 10.114037, time_offset_ms: 425_551}, %Video.TimedPoint{lat: 53.589631, lon: 10.11401, time_offset_ms: 425_884}, %Video.TimedPoint{lat: 53.589568, lon: 10.113984, time_offset_ms: 426_218}, %Video.TimedPoint{lat: 53.589495, lon: 10.113956, time_offset_ms: 426_552}, %Video.TimedPoint{lat: 53.589424, lon: 10.11393, time_offset_ms: 426_885}, %Video.TimedPoint{lat: 53.589346, lon: 10.113902, time_offset_ms: 427_219}, %Video.TimedPoint{lat: 53.589258, lon: 10.113869, time_offset_ms: 427_553}, %Video.TimedPoint{lat: 53.589184, lon: 10.11384, time_offset_ms: 427_886}, %Video.TimedPoint{lat: 53.589101, lon: 10.113808, time_offset_ms: 428_220}, %Video.TimedPoint{lat: 53.589018, lon: 10.113778, time_offset_ms: 428_554}, %Video.TimedPoint{lat: 53.588934, lon: 10.113755, time_offset_ms: 428_887}, %Video.TimedPoint{lat: 53.588863, lon: 10.113734, time_offset_ms: 429_221}, %Video.TimedPoint{lat: 53.588769, lon: 10.1137, time_offset_ms: 429_555}, %Video.TimedPoint{lat: 53.588698, lon: 10.113676, time_offset_ms: 429_888}, %Video.TimedPoint{lat: 53.588622, lon: 10.113649, time_offset_ms: 430_222}, %Video.TimedPoint{lat: 53.588535, lon: 10.113628, time_offset_ms: 430_556}, %Video.TimedPoint{lat: 53.588466, lon: 10.113611, time_offset_ms: 430_889}, %Video.TimedPoint{lat: 53.588379, lon: 10.11359, time_offset_ms: 431_223}, %Video.TimedPoint{lat: 53.588305, lon: 10.113581, time_offset_ms: 431_557}, %Video.TimedPoint{lat: 53.588234, lon: 10.11358, time_offset_ms: 431_890}, %Video.TimedPoint{lat: 53.588167, lon: 10.113581, time_offset_ms: 432_224}, %Video.TimedPoint{lat: 53.58809, lon: 10.113582, time_offset_ms: 432_558}, %Video.TimedPoint{lat: 53.588006, lon: 10.113583, time_offset_ms: 432_891}, %Video.TimedPoint{lat: 53.587934, lon: 10.113579, time_offset_ms: 433_225}, %Video.TimedPoint{lat: 53.587857, lon: 10.113577, time_offset_ms: 433_559}, %Video.TimedPoint{lat: 53.58779, lon: 10.113581, time_offset_ms: 433_892}, %Video.TimedPoint{lat: 53.58771, lon: 10.113573, time_offset_ms: 434_226}, %Video.TimedPoint{lat: 53.587645, lon: 10.113547, time_offset_ms: 434_560}, %Video.TimedPoint{lat: 53.587577, lon: 10.11349, time_offset_ms: 434_893}, %Video.TimedPoint{lat: 53.587513, lon: 10.11341, time_offset_ms: 435_227}, %Video.TimedPoint{lat: 53.587444, lon: 10.113336, time_offset_ms: 435_561}, %Video.TimedPoint{lat: 53.587393, lon: 10.113281, time_offset_ms: 435_894}, %Video.TimedPoint{lat: 53.58732, lon: 10.113199, time_offset_ms: 436_228}, %Video.TimedPoint{lat: 53.587265, lon: 10.113134, time_offset_ms: 436_562}, %Video.TimedPoint{lat: 53.587214, lon: 10.113055, time_offset_ms: 436_895}, %Video.TimedPoint{lat: 53.587166, lon: 10.112977, time_offset_ms: 437_229}, %Video.TimedPoint{lat: 53.587116, lon: 10.1129, time_offset_ms: 437_563}, %Video.TimedPoint{lat: 53.587075, lon: 10.112835, time_offset_ms: 437_896}, %Video.TimedPoint{lat: 53.587022, lon: 10.112764, time_offset_ms: 438_230}, %Video.TimedPoint{lat: 53.586976, lon: 10.112688, time_offset_ms: 438_564}, %Video.TimedPoint{lat: 53.586942, lon: 10.112597, time_offset_ms: 438_897}, %Video.TimedPoint{lat: 53.586899, lon: 10.112486, time_offset_ms: 439_231}, %Video.TimedPoint{lat: 53.586862, lon: 10.11239, time_offset_ms: 439_565}, %Video.TimedPoint{lat: 53.586829, lon: 10.112278, time_offset_ms: 439_898}, %Video.TimedPoint{lat: 53.586783, lon: 10.112161, time_offset_ms: 440_232}, %Video.TimedPoint{lat: 53.58674, lon: 10.112061, time_offset_ms: 440_566}, %Video.TimedPoint{lat: 53.586691, lon: 10.111944, time_offset_ms: 440_899}, %Video.TimedPoint{lat: 53.586645, lon: 10.111832, time_offset_ms: 441_233}, %Video.TimedPoint{lat: 53.586602, lon: 10.111732, time_offset_ms: 441_567}, %Video.TimedPoint{lat: 53.586544, lon: 10.111622, time_offset_ms: 441_900}, %Video.TimedPoint{lat: 53.586486, lon: 10.111529, time_offset_ms: 442_234}, %Video.TimedPoint{lat: 53.586435, lon: 10.11143, time_offset_ms: 442_568}, %Video.TimedPoint{lat: 53.586378, lon: 10.111314, time_offset_ms: 442_901}, %Video.TimedPoint{lat: 53.586322, lon: 10.111191, time_offset_ms: 443_235}, %Video.TimedPoint{lat: 53.586274, lon: 10.111075, time_offset_ms: 443_569}, %Video.TimedPoint{lat: 53.586224, lon: 10.110975, time_offset_ms: 443_902}, %Video.TimedPoint{lat: 53.586169, lon: 10.110871, time_offset_ms: 444_236}, %Video.TimedPoint{lat: 53.586117, lon: 10.110786, time_offset_ms: 444_570}, %Video.TimedPoint{lat: 53.586075, lon: 10.11071, time_offset_ms: 444_903}, %Video.TimedPoint{lat: 53.586054, lon: 10.110646, time_offset_ms: 445_237}, %Video.TimedPoint{lat: 53.586018, lon: 10.110566, time_offset_ms: 445_571}, %Video.TimedPoint{lat: 53.585973, lon: 10.110473, time_offset_ms: 445_904}, %Video.TimedPoint{lat: 53.585921, lon: 10.110384, time_offset_ms: 446_238}, %Video.TimedPoint{lat: 53.585873, lon: 10.11031, time_offset_ms: 446_572}, %Video.TimedPoint{lat: 53.585831, lon: 10.110223, time_offset_ms: 446_905}, %Video.TimedPoint{lat: 53.585796, lon: 10.11013, time_offset_ms: 447_239}, %Video.TimedPoint{lat: 53.585765, lon: 10.110054, time_offset_ms: 447_573}, %Video.TimedPoint{lat: 53.585734, lon: 10.110001, time_offset_ms: 447_906}, %Video.TimedPoint{lat: 53.585703, lon: 10.109939, time_offset_ms: 448_240}, %Video.TimedPoint{lat: 53.585678, lon: 10.109875, time_offset_ms: 448_574}, %Video.TimedPoint{lat: 53.585664, lon: 10.109803, time_offset_ms: 448_907}, %Video.TimedPoint{lat: 53.585651, lon: 10.109753, time_offset_ms: 449_241}, %Video.TimedPoint{lat: 53.585619, lon: 10.109708, time_offset_ms: 449_575}, %Video.TimedPoint{lat: 53.585588, lon: 10.109685, time_offset_ms: 449_908}, %Video.TimedPoint{lat: 53.585557, lon: 10.109684, time_offset_ms: 450_242}, %Video.TimedPoint{lat: 53.585511, lon: 10.109684, time_offset_ms: 450_576}, %Video.TimedPoint{lat: 53.585459, lon: 10.109685, time_offset_ms: 450_909}, %Video.TimedPoint{lat: 53.585415, lon: 10.109691, time_offset_ms: 451_243}, %Video.TimedPoint{lat: 53.585364, lon: 10.109708, time_offset_ms: 451_577}, %Video.TimedPoint{lat: 53.585319, lon: 10.109727, time_offset_ms: 451_910}, %Video.TimedPoint{lat: 53.585277, lon: 10.109744, time_offset_ms: 452_244}, %Video.TimedPoint{lat: 53.585237, lon: 10.109755, time_offset_ms: 452_578}, %Video.TimedPoint{lat: 53.585205, lon: 10.10976, time_offset_ms: 452_911}, %Video.TimedPoint{lat: 53.585178, lon: 10.109771, time_offset_ms: 453_245}, %Video.TimedPoint{lat: 53.585142, lon: 10.109788, time_offset_ms: 453_579}, %Video.TimedPoint{lat: 53.5851, lon: 10.109796, time_offset_ms: 453_912}, %Video.TimedPoint{lat: 53.585054, lon: 10.109787, time_offset_ms: 454_246}, %Video.TimedPoint{lat: 53.585019, lon: 10.10977, time_offset_ms: 454_580}, %Video.TimedPoint{lat: 53.584991, lon: 10.109745, time_offset_ms: 454_913}, %Video.TimedPoint{lat: 53.584958, lon: 10.109713, time_offset_ms: 455_247}, %Video.TimedPoint{lat: 53.584928, lon: 10.10968, time_offset_ms: 455_581}, %Video.TimedPoint{lat: 53.584904, lon: 10.109645, time_offset_ms: 455_914}, %Video.TimedPoint{lat: 53.584882, lon: 10.109611, time_offset_ms: 456_248}, %Video.TimedPoint{lat: 53.584846, lon: 10.109571, time_offset_ms: 456_582}, %Video.TimedPoint{lat: 53.584809, lon: 10.10953, time_offset_ms: 456_915}, %Video.TimedPoint{lat: 53.584771, lon: 10.109484, time_offset_ms: 457_249}, %Video.TimedPoint{lat: 53.584739, lon: 10.109438, time_offset_ms: 457_583}, %Video.TimedPoint{lat: 53.584715, lon: 10.109378, time_offset_ms: 457_916}, %Video.TimedPoint{lat: 53.5847, lon: 10.109323, time_offset_ms: 458_250}, %Video.TimedPoint{lat: 53.584683, lon: 10.109253, time_offset_ms: 458_584}, %Video.TimedPoint{lat: 53.584671, lon: 10.109198, time_offset_ms: 458_917}, %Video.TimedPoint{lat: 53.584658, lon: 10.109123, time_offset_ms: 459_251}, %Video.TimedPoint{lat: 53.584649, lon: 10.109071, time_offset_ms: 459_585}, %Video.TimedPoint{lat: 53.58464, lon: 10.109006, time_offset_ms: 459_918}, %Video.TimedPoint{lat: 53.584629, lon: 10.10893, time_offset_ms: 460_252}, %Video.TimedPoint{lat: 53.584608, lon: 10.108833, time_offset_ms: 460_586}, %Video.TimedPoint{lat: 53.584584, lon: 10.108729, time_offset_ms: 460_919}, %Video.TimedPoint{lat: 53.584566, lon: 10.108634, time_offset_ms: 461_253}, %Video.TimedPoint{lat: 53.584545, lon: 10.108524, time_offset_ms: 461_587}, %Video.TimedPoint{lat: 53.584522, lon: 10.108434, time_offset_ms: 461_920}, %Video.TimedPoint{lat: 53.584496, lon: 10.108341, time_offset_ms: 462_254}, %Video.TimedPoint{lat: 53.584468, lon: 10.108243, time_offset_ms: 462_588}, %Video.TimedPoint{lat: 53.584438, lon: 10.108145, time_offset_ms: 462_921}, %Video.TimedPoint{lat: 53.584396, lon: 10.108044, time_offset_ms: 463_255}, %Video.TimedPoint{lat: 53.584351, lon: 10.10794, time_offset_ms: 463_589}, %Video.TimedPoint{lat: 53.584313, lon: 10.107864, time_offset_ms: 463_922}, %Video.TimedPoint{lat: 53.584267, lon: 10.107764, time_offset_ms: 464_256}, %Video.TimedPoint{lat: 53.584221, lon: 10.107673, time_offset_ms: 464_590}, %Video.TimedPoint{lat: 53.584172, lon: 10.107576, time_offset_ms: 464_923}, %Video.TimedPoint{lat: 53.584113, lon: 10.107461, time_offset_ms: 465_257}, %Video.TimedPoint{lat: 53.584077, lon: 10.107359, time_offset_ms: 465_591}, %Video.TimedPoint{lat: 53.584031, lon: 10.107233, time_offset_ms: 465_924}, %Video.TimedPoint{lat: 53.583976, lon: 10.10712, time_offset_ms: 466_258}, %Video.TimedPoint{lat: 53.583914, lon: 10.107, time_offset_ms: 466_592}, %Video.TimedPoint{lat: 53.583859, lon: 10.10686, time_offset_ms: 466_925}, %Video.TimedPoint{lat: 53.583813, lon: 10.106731, time_offset_ms: 467_259}, %Video.TimedPoint{lat: 53.583767, lon: 10.106598, time_offset_ms: 467_593}, %Video.TimedPoint{lat: 53.583728, lon: 10.106492, time_offset_ms: 467_926}, %Video.TimedPoint{lat: 53.583684, lon: 10.10635, time_offset_ms: 468_260}, %Video.TimedPoint{lat: 53.58365, lon: 10.106228, time_offset_ms: 468_594}, %Video.TimedPoint{lat: 53.583614, lon: 10.10609, time_offset_ms: 468_927}, %Video.TimedPoint{lat: 53.583586, lon: 10.105969, time_offset_ms: 469_261}, %Video.TimedPoint{lat: 53.583555, lon: 10.105859, time_offset_ms: 469_595}, %Video.TimedPoint{lat: 53.583517, lon: 10.105745, time_offset_ms: 469_928}, %Video.TimedPoint{lat: 53.583482, lon: 10.105644, time_offset_ms: 470_262}, %Video.TimedPoint{lat: 53.583448, lon: 10.105552, time_offset_ms: 470_596}, %Video.TimedPoint{lat: 53.583414, lon: 10.105469, time_offset_ms: 470_929}, %Video.TimedPoint{lat: 53.583392, lon: 10.105377, time_offset_ms: 471_263}, %Video.TimedPoint{lat: 53.583371, lon: 10.105265, time_offset_ms: 471_597}, %Video.TimedPoint{lat: 53.583336, lon: 10.105135, time_offset_ms: 471_930}, %Video.TimedPoint{lat: 53.583293, lon: 10.105037, time_offset_ms: 472_264}, %Video.TimedPoint{lat: 53.583237, lon: 10.10493, time_offset_ms: 472_598}, %Video.TimedPoint{lat: 53.583178, lon: 10.104822, time_offset_ms: 472_931}, %Video.TimedPoint{lat: 53.583125, lon: 10.104733, time_offset_ms: 473_265}, %Video.TimedPoint{lat: 53.583062, lon: 10.104645, time_offset_ms: 473_599}, %Video.TimedPoint{lat: 53.583014, lon: 10.104573, time_offset_ms: 473_932}, %Video.TimedPoint{lat: 53.582951, lon: 10.104472, time_offset_ms: 474_266}, %Video.TimedPoint{lat: 53.582914, lon: 10.10438, time_offset_ms: 474_600}, %Video.TimedPoint{lat: 53.582876, lon: 10.104249, time_offset_ms: 474_933}, %Video.TimedPoint{lat: 53.582843, lon: 10.104124, time_offset_ms: 475_267}, %Video.TimedPoint{lat: 53.582814, lon: 10.103993, time_offset_ms: 475_601}, %Video.TimedPoint{lat: 53.582791, lon: 10.103865, time_offset_ms: 475_934}, %Video.TimedPoint{lat: 53.582766, lon: 10.103739, time_offset_ms: 476_268}, %Video.TimedPoint{lat: 53.582745, lon: 10.103611, time_offset_ms: 476_602}, %Video.TimedPoint{lat: 53.582733, lon: 10.103481, time_offset_ms: 476_935}, %Video.TimedPoint{lat: 53.582718, lon: 10.103344, time_offset_ms: 477_269}, %Video.TimedPoint{lat: 53.582692, lon: 10.103251, time_offset_ms: 477_603}, %Video.TimedPoint{lat: 53.582663, lon: 10.103166, time_offset_ms: 477_936}, %Video.TimedPoint{lat: 53.582611, lon: 10.103093, time_offset_ms: 478_270}, %Video.TimedPoint{lat: 53.582554, lon: 10.103024, time_offset_ms: 478_604}, %Video.TimedPoint{lat: 53.582504, lon: 10.102965, time_offset_ms: 478_937}, %Video.TimedPoint{lat: 53.582446, lon: 10.102922, time_offset_ms: 479_271}, %Video.TimedPoint{lat: 53.582396, lon: 10.102892, time_offset_ms: 479_605}, %Video.TimedPoint{lat: 53.582351, lon: 10.10287, time_offset_ms: 479_938}, %Video.TimedPoint{lat: 53.582298, lon: 10.102846, time_offset_ms: 480_272}, %Video.TimedPoint{lat: 53.582258, lon: 10.102831, time_offset_ms: 480_606}, %Video.TimedPoint{lat: 53.582224, lon: 10.102827, time_offset_ms: 480_939}, %Video.TimedPoint{lat: 53.582204, lon: 10.102819, time_offset_ms: 481_273}, %Video.TimedPoint{lat: 53.582181, lon: 10.102817, time_offset_ms: 481_607}, %Video.TimedPoint{lat: 53.582162, lon: 10.102826, time_offset_ms: 481_940}, %Video.TimedPoint{lat: 53.582139, lon: 10.102838, time_offset_ms: 482_274}, %Video.TimedPoint{lat: 53.582121, lon: 10.102848, time_offset_ms: 482_608}, %Video.TimedPoint{lat: 53.582101, lon: 10.102858, time_offset_ms: 482_941}, %Video.TimedPoint{lat: 53.582085, lon: 10.102866, time_offset_ms: 483_275}, %Video.TimedPoint{lat: 53.582067, lon: 10.102874, time_offset_ms: 483_609}, %Video.TimedPoint{lat: 53.582052, lon: 10.102883, time_offset_ms: 483_942}, %Video.TimedPoint{lat: 53.582029, lon: 10.102893, time_offset_ms: 484_276}, %Video.TimedPoint{lat: 53.581992, lon: 10.102904, time_offset_ms: 484_610}, %Video.TimedPoint{lat: 53.581942, lon: 10.102917, time_offset_ms: 484_943}, %Video.TimedPoint{lat: 53.581895, lon: 10.102896, time_offset_ms: 485_277}, %Video.TimedPoint{lat: 53.581854, lon: 10.102842, time_offset_ms: 485_611}, %Video.TimedPoint{lat: 53.581825, lon: 10.102755, time_offset_ms: 485_944}, %Video.TimedPoint{lat: 53.5818, lon: 10.102661, time_offset_ms: 486_278}, %Video.TimedPoint{lat: 53.581775, lon: 10.10256, time_offset_ms: 486_612}, %Video.TimedPoint{lat: 53.581761, lon: 10.102454, time_offset_ms: 486_945}, %Video.TimedPoint{lat: 53.581761, lon: 10.102351, time_offset_ms: 487_279}, %Video.TimedPoint{lat: 53.581765, lon: 10.102262, time_offset_ms: 487_613}, %Video.TimedPoint{lat: 53.58177, lon: 10.102181, time_offset_ms: 487_946}, %Video.TimedPoint{lat: 53.581772, lon: 10.102116, time_offset_ms: 488_280}, %Video.TimedPoint{lat: 53.581769, lon: 10.102069, time_offset_ms: 488_614}, %Video.TimedPoint{lat: 53.581768, lon: 10.101981, time_offset_ms: 488_699}, %Video.TimedPoint{lat: 53.581768, lon: 10.101968, time_offset_ms: 489_033}, %Video.TimedPoint{lat: 53.581769, lon: 10.10192, time_offset_ms: 489_366}, %Video.TimedPoint{lat: 53.581769, lon: 10.10186, time_offset_ms: 489_700}, %Video.TimedPoint{lat: 53.581768, lon: 10.101799, time_offset_ms: 490_034}, %Video.TimedPoint{lat: 53.581767, lon: 10.101726, time_offset_ms: 490_367}, %Video.TimedPoint{lat: 53.581758, lon: 10.101647, time_offset_ms: 490_701}, %Video.TimedPoint{lat: 53.58175, lon: 10.101584, time_offset_ms: 491_035}, %Video.TimedPoint{lat: 53.581745, lon: 10.101506, time_offset_ms: 491_368}, %Video.TimedPoint{lat: 53.58175, lon: 10.101415, time_offset_ms: 491_702}, %Video.TimedPoint{lat: 53.581757, lon: 10.101309, time_offset_ms: 492_036}, %Video.TimedPoint{lat: 53.58175, lon: 10.101182, time_offset_ms: 492_369}, %Video.TimedPoint{lat: 53.581732, lon: 10.10106, time_offset_ms: 492_703}, %Video.TimedPoint{lat: 53.581715, lon: 10.10096, time_offset_ms: 493_037}, %Video.TimedPoint{lat: 53.581698, lon: 10.100888, time_offset_ms: 493_370}, %Video.TimedPoint{lat: 53.581678, lon: 10.100811, time_offset_ms: 493_704}, %Video.TimedPoint{lat: 53.581662, lon: 10.100731, time_offset_ms: 494_038}, %Video.TimedPoint{lat: 53.58165, lon: 10.100645, time_offset_ms: 494_371}, %Video.TimedPoint{lat: 53.581649, lon: 10.100568, time_offset_ms: 494_705}, %Video.TimedPoint{lat: 53.581653, lon: 10.100526, time_offset_ms: 495_039}, %Video.TimedPoint{lat: 53.581655, lon: 10.10049, time_offset_ms: 495_372}, %Video.TimedPoint{lat: 53.58166, lon: 10.100459, time_offset_ms: 495_706}, %Video.TimedPoint{lat: 53.581665, lon: 10.100428, time_offset_ms: 496_040}, %Video.TimedPoint{lat: 53.581676, lon: 10.100399, time_offset_ms: 496_373}, %Video.TimedPoint{lat: 53.581689, lon: 10.10037, time_offset_ms: 496_707}, %Video.TimedPoint{lat: 53.581697, lon: 10.100347, time_offset_ms: 497_041}, %Video.TimedPoint{lat: 53.5817, lon: 10.10033, time_offset_ms: 497_374}, %Video.TimedPoint{lat: 53.581708, lon: 10.100314, time_offset_ms: 497_708}, %Video.TimedPoint{lat: 53.581717, lon: 10.100297, time_offset_ms: 498_042}, %Video.TimedPoint{lat: 53.581728, lon: 10.100274, time_offset_ms: 498_375}, %Video.TimedPoint{lat: 53.581738, lon: 10.100248, time_offset_ms: 498_709}, %Video.TimedPoint{lat: 53.581753, lon: 10.100208, time_offset_ms: 499_043}, %Video.TimedPoint{lat: 53.581768, lon: 10.100155, time_offset_ms: 499_376}, %Video.TimedPoint{lat: 53.581785, lon: 10.100083, time_offset_ms: 499_710}, %Video.TimedPoint{lat: 53.581793, lon: 10.099993, time_offset_ms: 500_044}, %Video.TimedPoint{lat: 53.581794, lon: 10.099914, time_offset_ms: 500_377}, %Video.TimedPoint{lat: 53.581793, lon: 10.099848, time_offset_ms: 500_711}, %Video.TimedPoint{lat: 53.581792, lon: 10.099776, time_offset_ms: 501_045}, %Video.TimedPoint{lat: 53.581792, lon: 10.099703, time_offset_ms: 501_378}, %Video.TimedPoint{lat: 53.581796, lon: 10.099631, time_offset_ms: 501_712}, %Video.TimedPoint{lat: 53.581792, lon: 10.099545, time_offset_ms: 502_046}, %Video.TimedPoint{lat: 53.581789, lon: 10.099461, time_offset_ms: 502_379}, %Video.TimedPoint{lat: 53.581782, lon: 10.099404, time_offset_ms: 502_713}, %Video.TimedPoint{lat: 53.581757, lon: 10.09935, time_offset_ms: 503_047}, %Video.TimedPoint{lat: 53.58171, lon: 10.099323, time_offset_ms: 503_380}, %Video.TimedPoint{lat: 53.581674, lon: 10.099314, time_offset_ms: 503_714}, %Video.TimedPoint{lat: 53.58164, lon: 10.099306, time_offset_ms: 504_048}, %Video.TimedPoint{lat: 53.581595, lon: 10.099287, time_offset_ms: 504_381}, %Video.TimedPoint{lat: 53.581545, lon: 10.099287, time_offset_ms: 504_715}, %Video.TimedPoint{lat: 53.581481, lon: 10.09929, time_offset_ms: 505_049}, %Video.TimedPoint{lat: 53.581406, lon: 10.099268, time_offset_ms: 505_382}, %Video.TimedPoint{lat: 53.58133, lon: 10.099217, time_offset_ms: 505_716}, %Video.TimedPoint{lat: 53.581259, lon: 10.099152, time_offset_ms: 506_050}, %Video.TimedPoint{lat: 53.581201, lon: 10.099073, time_offset_ms: 506_383}, %Video.TimedPoint{lat: 53.58115, lon: 10.09899, time_offset_ms: 506_717}, %Video.TimedPoint{lat: 53.581097, lon: 10.098912, time_offset_ms: 507_051}, %Video.TimedPoint{lat: 53.581034, lon: 10.098845, time_offset_ms: 507_384}, %Video.TimedPoint{lat: 53.580973, lon: 10.098783, time_offset_ms: 507_718}, %Video.TimedPoint{lat: 53.580912, lon: 10.09872, time_offset_ms: 508_052}, %Video.TimedPoint{lat: 53.580844, lon: 10.098648, time_offset_ms: 508_385}, %Video.TimedPoint{lat: 53.580785, lon: 10.09858, time_offset_ms: 508_719}, %Video.TimedPoint{lat: 53.580713, lon: 10.098504, time_offset_ms: 509_053}, %Video.TimedPoint{lat: 53.580646, lon: 10.098429, time_offset_ms: 509_386}, %Video.TimedPoint{lat: 53.580581, lon: 10.098341, time_offset_ms: 509_720}, %Video.TimedPoint{lat: 53.580517, lon: 10.098228, time_offset_ms: 510_054}, %Video.TimedPoint{lat: 53.580477, lon: 10.098122, time_offset_ms: 510_387}, %Video.TimedPoint{lat: 53.58044, lon: 10.097981, time_offset_ms: 510_721}, %Video.TimedPoint{lat: 53.580409, lon: 10.097846, time_offset_ms: 511_055}, %Video.TimedPoint{lat: 53.580388, lon: 10.097704, time_offset_ms: 511_388}, %Video.TimedPoint{lat: 53.580383, lon: 10.097558, time_offset_ms: 511_722}, %Video.TimedPoint{lat: 53.580396, lon: 10.09743, time_offset_ms: 512_056}, %Video.TimedPoint{lat: 53.580422, lon: 10.097295, time_offset_ms: 512_389}, %Video.TimedPoint{lat: 53.580446, lon: 10.097178, time_offset_ms: 512_723}, %Video.TimedPoint{lat: 53.580463, lon: 10.097068, time_offset_ms: 513_057}, %Video.TimedPoint{lat: 53.580476, lon: 10.096933, time_offset_ms: 513_390}, %Video.TimedPoint{lat: 53.580496, lon: 10.096821, time_offset_ms: 513_724}, %Video.TimedPoint{lat: 53.580531, lon: 10.096705, time_offset_ms: 514_058}, %Video.TimedPoint{lat: 53.580561, lon: 10.096598, time_offset_ms: 514_391}, %Video.TimedPoint{lat: 53.580585, lon: 10.096469, time_offset_ms: 514_725}, %Video.TimedPoint{lat: 53.5806, lon: 10.096353, time_offset_ms: 515_059}, %Video.TimedPoint{lat: 53.580614, lon: 10.096229, time_offset_ms: 515_392}, %Video.TimedPoint{lat: 53.580627, lon: 10.096094, time_offset_ms: 515_726}, %Video.TimedPoint{lat: 53.580637, lon: 10.095966, time_offset_ms: 516_060}, %Video.TimedPoint{lat: 53.58065, lon: 10.095836, time_offset_ms: 516_393}, %Video.TimedPoint{lat: 53.580661, lon: 10.095729, time_offset_ms: 516_727}, %Video.TimedPoint{lat: 53.580662, lon: 10.095594, time_offset_ms: 517_061}, %Video.TimedPoint{lat: 53.580647, lon: 10.095477, time_offset_ms: 517_394}, %Video.TimedPoint{lat: 53.580629, lon: 10.09535, time_offset_ms: 517_728}, %Video.TimedPoint{lat: 53.580611, lon: 10.095264, time_offset_ms: 518_062}, %Video.TimedPoint{lat: 53.58059, lon: 10.095167, time_offset_ms: 518_395}, %Video.TimedPoint{lat: 53.58057, lon: 10.095097, time_offset_ms: 518_729}, %Video.TimedPoint{lat: 53.580551, lon: 10.095033, time_offset_ms: 519_063}, %Video.TimedPoint{lat: 53.58053, lon: 10.094966, time_offset_ms: 519_396}, %Video.TimedPoint{lat: 53.580501, lon: 10.09489, time_offset_ms: 519_730}, %Video.TimedPoint{lat: 53.580468, lon: 10.094817, time_offset_ms: 520_064}, %Video.TimedPoint{lat: 53.580434, lon: 10.094734, time_offset_ms: 520_397}, %Video.TimedPoint{lat: 53.580393, lon: 10.094657, time_offset_ms: 520_731}, %Video.TimedPoint{lat: 53.580339, lon: 10.09458, time_offset_ms: 521_065}, %Video.TimedPoint{lat: 53.580282, lon: 10.09451, time_offset_ms: 521_398}, %Video.TimedPoint{lat: 53.580223, lon: 10.09442, time_offset_ms: 521_732}, %Video.TimedPoint{lat: 53.580174, lon: 10.094334, time_offset_ms: 522_066}, %Video.TimedPoint{lat: 53.580136, lon: 10.094258, time_offset_ms: 522_399}, %Video.TimedPoint{lat: 53.580111, lon: 10.094196, time_offset_ms: 522_733}, %Video.TimedPoint{lat: 53.580085, lon: 10.094116, time_offset_ms: 523_067}, %Video.TimedPoint{lat: 53.580059, lon: 10.09404, time_offset_ms: 523_400}, %Video.TimedPoint{lat: 53.580037, lon: 10.093959, time_offset_ms: 523_734}, %Video.TimedPoint{lat: 53.580027, lon: 10.093862, time_offset_ms: 524_068}, %Video.TimedPoint{lat: 53.580021, lon: 10.093772, time_offset_ms: 524_401}, %Video.TimedPoint{lat: 53.580015, lon: 10.093684, time_offset_ms: 524_735}, %Video.TimedPoint{lat: 53.580007, lon: 10.0936, time_offset_ms: 525_069}, %Video.TimedPoint{lat: 53.580002, lon: 10.093543, time_offset_ms: 525_402}, %Video.TimedPoint{lat: 53.58, lon: 10.093494, time_offset_ms: 525_736}, %Video.TimedPoint{lat: 53.579994, lon: 10.093448, time_offset_ms: 526_070}, %Video.TimedPoint{lat: 53.579988, lon: 10.093401, time_offset_ms: 526_403}, %Video.TimedPoint{lat: 53.579985, lon: 10.093354, time_offset_ms: 526_737}, %Video.TimedPoint{lat: 53.579986, lon: 10.09331, time_offset_ms: 527_071}, %Video.TimedPoint{lat: 53.57999, lon: 10.093264, time_offset_ms: 527_404}, %Video.TimedPoint{lat: 53.579991, lon: 10.093233, time_offset_ms: 527_738}, %Video.TimedPoint{lat: 53.579993, lon: 10.093199, time_offset_ms: 528_072}, %Video.TimedPoint{lat: 53.579998, lon: 10.093176, time_offset_ms: 528_405}, %Video.TimedPoint{lat: 53.579995, lon: 10.093146, time_offset_ms: 528_739}, %Video.TimedPoint{lat: 53.579992, lon: 10.093111, time_offset_ms: 529_073}, %Video.TimedPoint{lat: 53.579991, lon: 10.093074, time_offset_ms: 529_406}, %Video.TimedPoint{lat: 53.57999, lon: 10.093033, time_offset_ms: 529_740}, %Video.TimedPoint{lat: 53.579991, lon: 10.092989, time_offset_ms: 530_074}, %Video.TimedPoint{lat: 53.580002, lon: 10.092953, time_offset_ms: 530_407}, %Video.TimedPoint{lat: 53.580009, lon: 10.09292, time_offset_ms: 530_741}, %Video.TimedPoint{lat: 53.580011, lon: 10.092892, time_offset_ms: 531_075}, %Video.TimedPoint{lat: 53.580012, lon: 10.092864, time_offset_ms: 531_408}, %Video.TimedPoint{lat: 53.580009, lon: 10.092831, time_offset_ms: 531_742}, %Video.TimedPoint{lat: 53.580003, lon: 10.092791, time_offset_ms: 532_076}, %Video.TimedPoint{lat: 53.57999, lon: 10.092723, time_offset_ms: 532_409}, %Video.TimedPoint{lat: 53.579993, lon: 10.092644, time_offset_ms: 532_743}, %Video.TimedPoint{lat: 53.579998, lon: 10.092551, time_offset_ms: 533_077}, %Video.TimedPoint{lat: 53.580006, lon: 10.092461, time_offset_ms: 533_410}, %Video.TimedPoint{lat: 53.58001, lon: 10.092345, time_offset_ms: 533_744}, %Video.TimedPoint{lat: 53.580018, lon: 10.092244, time_offset_ms: 534_078}, %Video.TimedPoint{lat: 53.580011, lon: 10.092131, time_offset_ms: 534_411}, %Video.TimedPoint{lat: 53.579985, lon: 10.09202, time_offset_ms: 534_745}, %Video.TimedPoint{lat: 53.579944, lon: 10.091934, time_offset_ms: 535_079}, %Video.TimedPoint{lat: 53.579879, lon: 10.091866, time_offset_ms: 535_412}, %Video.TimedPoint{lat: 53.579825, lon: 10.091844, time_offset_ms: 535_746}, %Video.TimedPoint{lat: 53.579768, lon: 10.09184, time_offset_ms: 536_080}, %Video.TimedPoint{lat: 53.57971, lon: 10.091809, time_offset_ms: 536_413}, %Video.TimedPoint{lat: 53.579661, lon: 10.091757, time_offset_ms: 536_747}, %Video.TimedPoint{lat: 53.579598, lon: 10.091702, time_offset_ms: 537_081}, %Video.TimedPoint{lat: 53.579535, lon: 10.091661, time_offset_ms: 537_414}, %Video.TimedPoint{lat: 53.579473, lon: 10.091618, time_offset_ms: 537_748}, %Video.TimedPoint{lat: 53.579408, lon: 10.091568, time_offset_ms: 538_082}, %Video.TimedPoint{lat: 53.579339, lon: 10.091499, time_offset_ms: 538_415}, %Video.TimedPoint{lat: 53.579284, lon: 10.091432, time_offset_ms: 538_749}, %Video.TimedPoint{lat: 53.579228, lon: 10.091345, time_offset_ms: 539_083}, %Video.TimedPoint{lat: 53.579187, lon: 10.091245, time_offset_ms: 539_416}, %Video.TimedPoint{lat: 53.579162, lon: 10.091145, time_offset_ms: 539_750}, %Video.TimedPoint{lat: 53.579147, lon: 10.091054, time_offset_ms: 540_084}, %Video.TimedPoint{lat: 53.579137, lon: 10.090993, time_offset_ms: 540_417}, %Video.TimedPoint{lat: 53.579123, lon: 10.090937, time_offset_ms: 540_751}, %Video.TimedPoint{lat: 53.579103, lon: 10.090884, time_offset_ms: 541_085}, %Video.TimedPoint{lat: 53.579079, lon: 10.0908, time_offset_ms: 541_418}, %Video.TimedPoint{lat: 53.579072, lon: 10.090709, time_offset_ms: 541_752}, %Video.TimedPoint{lat: 53.579056, lon: 10.090584, time_offset_ms: 542_086}, %Video.TimedPoint{lat: 53.579027, lon: 10.090473, time_offset_ms: 542_419}, %Video.TimedPoint{lat: 53.578987, lon: 10.090362, time_offset_ms: 542_753}, %Video.TimedPoint{lat: 53.578939, lon: 10.090258, time_offset_ms: 543_087}, %Video.TimedPoint{lat: 53.578887, lon: 10.090159, time_offset_ms: 543_420}, %Video.TimedPoint{lat: 53.578838, lon: 10.090062, time_offset_ms: 543_754}, %Video.TimedPoint{lat: 53.578782, lon: 10.089952, time_offset_ms: 544_088}, %Video.TimedPoint{lat: 53.578743, lon: 10.089863, time_offset_ms: 544_421}, %Video.TimedPoint{lat: 53.5787, lon: 10.089739, time_offset_ms: 544_755}, %Video.TimedPoint{lat: 53.578668, lon: 10.089605, time_offset_ms: 545_089}, %Video.TimedPoint{lat: 53.578649, lon: 10.089494, time_offset_ms: 545_422}, %Video.TimedPoint{lat: 53.578633, lon: 10.08936, time_offset_ms: 545_756}, %Video.TimedPoint{lat: 53.57862, lon: 10.089262, time_offset_ms: 546_090}, %Video.TimedPoint{lat: 53.578609, lon: 10.089172, time_offset_ms: 546_423}, %Video.TimedPoint{lat: 53.578608, lon: 10.089084, time_offset_ms: 546_757}, %Video.TimedPoint{lat: 53.578616, lon: 10.088979, time_offset_ms: 547_091}, %Video.TimedPoint{lat: 53.578622, lon: 10.088885, time_offset_ms: 547_424}, %Video.TimedPoint{lat: 53.578625, lon: 10.088776, time_offset_ms: 547_758}, %Video.TimedPoint{lat: 53.578633, lon: 10.08867, time_offset_ms: 548_092}, %Video.TimedPoint{lat: 53.578636, lon: 10.088574, time_offset_ms: 548_425}, %Video.TimedPoint{lat: 53.578635, lon: 10.08848, time_offset_ms: 548_759}, %Video.TimedPoint{lat: 53.578636, lon: 10.088431, time_offset_ms: 549_093}, %Video.TimedPoint{lat: 53.578628, lon: 10.088361, time_offset_ms: 549_426}, %Video.TimedPoint{lat: 53.578614, lon: 10.088244, time_offset_ms: 549_760}, %Video.TimedPoint{lat: 53.578608, lon: 10.088132, time_offset_ms: 550_094}, %Video.TimedPoint{lat: 53.578607, lon: 10.08802, time_offset_ms: 550_427}, %Video.TimedPoint{lat: 53.578606, lon: 10.087907, time_offset_ms: 550_761}, %Video.TimedPoint{lat: 53.578603, lon: 10.087802, time_offset_ms: 551_095}, %Video.TimedPoint{lat: 53.5786, lon: 10.087698, time_offset_ms: 551_428}, %Video.TimedPoint{lat: 53.578593, lon: 10.087598, time_offset_ms: 551_762}, %Video.TimedPoint{lat: 53.578594, lon: 10.087506, time_offset_ms: 552_096}, %Video.TimedPoint{lat: 53.578597, lon: 10.087406, time_offset_ms: 552_429}, %Video.TimedPoint{lat: 53.57858, lon: 10.087316, time_offset_ms: 552_763}, %Video.TimedPoint{lat: 53.578574, lon: 10.087241, time_offset_ms: 553_097}, %Video.TimedPoint{lat: 53.578582, lon: 10.087171, time_offset_ms: 553_430}, %Video.TimedPoint{lat: 53.578591, lon: 10.08711, time_offset_ms: 553_764}, %Video.TimedPoint{lat: 53.578596, lon: 10.087045, time_offset_ms: 554_098}, %Video.TimedPoint{lat: 53.578585, lon: 10.086982, time_offset_ms: 554_431}, %Video.TimedPoint{lat: 53.578572, lon: 10.086905, time_offset_ms: 554_765}, %Video.TimedPoint{lat: 53.578575, lon: 10.086835, time_offset_ms: 555_099}, %Video.TimedPoint{lat: 53.578576, lon: 10.086771, time_offset_ms: 555_432}, %Video.TimedPoint{lat: 53.578576, lon: 10.086724, time_offset_ms: 555_766}, %Video.TimedPoint{lat: 53.578569, lon: 10.086682, time_offset_ms: 556_100}, %Video.TimedPoint{lat: 53.578567, lon: 10.08662, time_offset_ms: 556_433}, %Video.TimedPoint{lat: 53.578567, lon: 10.086559, time_offset_ms: 556_767}, %Video.TimedPoint{lat: 53.578562, lon: 10.086499, time_offset_ms: 557_101}, %Video.TimedPoint{lat: 53.578555, lon: 10.086403, time_offset_ms: 557_434}, %Video.TimedPoint{lat: 53.578546, lon: 10.086291, time_offset_ms: 557_768}, %Video.TimedPoint{lat: 53.578529, lon: 10.086147, time_offset_ms: 558_102}, %Video.TimedPoint{lat: 53.578516, lon: 10.086018, time_offset_ms: 558_435}, %Video.TimedPoint{lat: 53.578501, lon: 10.085863, time_offset_ms: 558_769}, %Video.TimedPoint{lat: 53.57849, lon: 10.085718, time_offset_ms: 559_103}, %Video.TimedPoint{lat: 53.578483, lon: 10.085579, time_offset_ms: 559_436}, %Video.TimedPoint{lat: 53.57848, lon: 10.085438, time_offset_ms: 559_770}, %Video.TimedPoint{lat: 53.578477, lon: 10.085301, time_offset_ms: 560_104}, %Video.TimedPoint{lat: 53.578479, lon: 10.085164, time_offset_ms: 560_437}, %Video.TimedPoint{lat: 53.578492, lon: 10.085043, time_offset_ms: 560_771}, %Video.TimedPoint{lat: 53.578501, lon: 10.084933, time_offset_ms: 561_105}, %Video.TimedPoint{lat: 53.578503, lon: 10.084817, time_offset_ms: 561_438}, %Video.TimedPoint{lat: 53.578506, lon: 10.084699, time_offset_ms: 561_772}, %Video.TimedPoint{lat: 53.578509, lon: 10.084585, time_offset_ms: 562_106}, %Video.TimedPoint{lat: 53.578515, lon: 10.084473, time_offset_ms: 562_439}, %Video.TimedPoint{lat: 53.578525, lon: 10.08435, time_offset_ms: 562_773}, %Video.TimedPoint{lat: 53.578531, lon: 10.084238, time_offset_ms: 563_107}, %Video.TimedPoint{lat: 53.578536, lon: 10.084122, time_offset_ms: 563_440}, %Video.TimedPoint{lat: 53.578531, lon: 10.084001, time_offset_ms: 563_774}, %Video.TimedPoint{lat: 53.57852, lon: 10.083882, time_offset_ms: 564_108}, %Video.TimedPoint{lat: 53.57851, lon: 10.083792, time_offset_ms: 564_441}, %Video.TimedPoint{lat: 53.578493, lon: 10.083706, time_offset_ms: 564_775}, %Video.TimedPoint{lat: 53.578478, lon: 10.083606, time_offset_ms: 565_109}, %Video.TimedPoint{lat: 53.57848, lon: 10.083499, time_offset_ms: 565_442}, %Video.TimedPoint{lat: 53.578484, lon: 10.083392, time_offset_ms: 565_776}, %Video.TimedPoint{lat: 53.578497, lon: 10.08328, time_offset_ms: 566_110}, %Video.TimedPoint{lat: 53.578521, lon: 10.083169, time_offset_ms: 566_443}, %Video.TimedPoint{lat: 53.578565, lon: 10.083093, time_offset_ms: 566_777}, %Video.TimedPoint{lat: 53.578611, lon: 10.083017, time_offset_ms: 567_111}, %Video.TimedPoint{lat: 53.578666, lon: 10.082939, time_offset_ms: 567_444}, %Video.TimedPoint{lat: 53.57871, lon: 10.082869, time_offset_ms: 567_778}, %Video.TimedPoint{lat: 53.578748, lon: 10.082792, time_offset_ms: 568_112}, %Video.TimedPoint{lat: 53.578775, lon: 10.082727, time_offset_ms: 568_445}, %Video.TimedPoint{lat: 53.578793, lon: 10.08267, time_offset_ms: 568_779}, %Video.TimedPoint{lat: 53.578809, lon: 10.082617, time_offset_ms: 569_113}, %Video.TimedPoint{lat: 53.578816, lon: 10.082557, time_offset_ms: 569_446}, %Video.TimedPoint{lat: 53.578814, lon: 10.08248, time_offset_ms: 569_780}, %Video.TimedPoint{lat: 53.578822, lon: 10.082396, time_offset_ms: 570_114}, %Video.TimedPoint{lat: 53.578825, lon: 10.082288, time_offset_ms: 570_447}, %Video.TimedPoint{lat: 53.578813, lon: 10.082187, time_offset_ms: 570_781}, %Video.TimedPoint{lat: 53.578799, lon: 10.082093, time_offset_ms: 571_115}, %Video.TimedPoint{lat: 53.578781, lon: 10.082003, time_offset_ms: 571_448}, %Video.TimedPoint{lat: 53.578767, lon: 10.081945, time_offset_ms: 571_782}, %Video.TimedPoint{lat: 53.578748, lon: 10.081902, time_offset_ms: 572_116}, %Video.TimedPoint{lat: 53.578735, lon: 10.081881, time_offset_ms: 572_449}, %Video.TimedPoint{lat: 53.578721, lon: 10.081856, time_offset_ms: 572_783}, %Video.TimedPoint{lat: 53.578707, lon: 10.081826, time_offset_ms: 573_117}, %Video.TimedPoint{lat: 53.578699, lon: 10.081806, time_offset_ms: 573_450}, %Video.TimedPoint{lat: 53.578696, lon: 10.081796, time_offset_ms: 573_784}, %Video.TimedPoint{lat: 53.578694, lon: 10.081792, time_offset_ms: 574_118}, %Video.TimedPoint{lat: 53.578688, lon: 10.081766, time_offset_ms: 574_451}, %Video.TimedPoint{lat: 53.578689, lon: 10.081717, time_offset_ms: 574_785}, %Video.TimedPoint{lat: 53.578686, lon: 10.081668, time_offset_ms: 575_119}, %Video.TimedPoint{lat: 53.57867, lon: 10.081608, time_offset_ms: 575_452}, %Video.TimedPoint{lat: 53.578649, lon: 10.081542, time_offset_ms: 575_786}, %Video.TimedPoint{lat: 53.578626, lon: 10.08147, time_offset_ms: 576_120}, %Video.TimedPoint{lat: 53.578597, lon: 10.081393, time_offset_ms: 576_453}, %Video.TimedPoint{lat: 53.578563, lon: 10.08132, time_offset_ms: 576_787}, %Video.TimedPoint{lat: 53.578521, lon: 10.081233, time_offset_ms: 577_121}, %Video.TimedPoint{lat: 53.578482, lon: 10.081139, time_offset_ms: 577_454}, %Video.TimedPoint{lat: 53.578447, lon: 10.081044, time_offset_ms: 577_788}, %Video.TimedPoint{lat: 53.578414, lon: 10.080936, time_offset_ms: 578_122}, %Video.TimedPoint{lat: 53.578383, lon: 10.080833, time_offset_ms: 578_455}, %Video.TimedPoint{lat: 53.578353, lon: 10.080746, time_offset_ms: 578_789}, %Video.TimedPoint{lat: 53.578322, lon: 10.080633, time_offset_ms: 579_123}, %Video.TimedPoint{lat: 53.578285, lon: 10.080521, time_offset_ms: 579_456}, %Video.TimedPoint{lat: 53.578247, lon: 10.080399, time_offset_ms: 579_790}, %Video.TimedPoint{lat: 53.578216, lon: 10.080278, time_offset_ms: 580_124}, %Video.TimedPoint{lat: 53.578177, lon: 10.080147, time_offset_ms: 580_457}, %Video.TimedPoint{lat: 53.578137, lon: 10.080019, time_offset_ms: 580_791}, %Video.TimedPoint{lat: 53.578097, lon: 10.079892, time_offset_ms: 581_125}, %Video.TimedPoint{lat: 53.578057, lon: 10.079774, time_offset_ms: 581_458}, %Video.TimedPoint{lat: 53.578028, lon: 10.079678, time_offset_ms: 581_792}, %Video.TimedPoint{lat: 53.577987, lon: 10.079573, time_offset_ms: 582_126}, %Video.TimedPoint{lat: 53.577933, lon: 10.079468, time_offset_ms: 582_459}, %Video.TimedPoint{lat: 53.577881, lon: 10.079362, time_offset_ms: 582_793}, %Video.TimedPoint{lat: 53.577837, lon: 10.079252, time_offset_ms: 583_127}, %Video.TimedPoint{lat: 53.577795, lon: 10.079126, time_offset_ms: 583_460}, %Video.TimedPoint{lat: 53.577762, lon: 10.079011, time_offset_ms: 583_794}, %Video.TimedPoint{lat: 53.57773, lon: 10.078886, time_offset_ms: 584_128}, %Video.TimedPoint{lat: 53.577704, lon: 10.078759, time_offset_ms: 584_461}, %Video.TimedPoint{lat: 53.577682, lon: 10.078631, time_offset_ms: 584_795}, %Video.TimedPoint{lat: 53.577659, lon: 10.078498, time_offset_ms: 585_129}, %Video.TimedPoint{lat: 53.577649, lon: 10.078379, time_offset_ms: 585_462}, %Video.TimedPoint{lat: 53.577663, lon: 10.078278, time_offset_ms: 585_796}, %Video.TimedPoint{lat: 53.577686, lon: 10.078179, time_offset_ms: 586_130}, %Video.TimedPoint{lat: 53.577708, lon: 10.078094, time_offset_ms: 586_463}, %Video.TimedPoint{lat: 53.577741, lon: 10.078001, time_offset_ms: 586_797}, %Video.TimedPoint{lat: 53.57777, lon: 10.077924, time_offset_ms: 587_131}, %Video.TimedPoint{lat: 53.577797, lon: 10.077839, time_offset_ms: 587_464}, %Video.TimedPoint{lat: 53.577806, lon: 10.077758, time_offset_ms: 587_798}, %Video.TimedPoint{lat: 53.577819, lon: 10.077671, time_offset_ms: 588_132}, %Video.TimedPoint{lat: 53.577846, lon: 10.077579, time_offset_ms: 588_465}, %Video.TimedPoint{lat: 53.577879, lon: 10.077477, time_offset_ms: 588_799}, %Video.TimedPoint{lat: 53.577916, lon: 10.077375, time_offset_ms: 589_133}, %Video.TimedPoint{lat: 53.577934, lon: 10.07731, time_offset_ms: 589_466}, %Video.TimedPoint{lat: 53.577943, lon: 10.077271, time_offset_ms: 589_800}, %Video.TimedPoint{lat: 53.577951, lon: 10.077229, time_offset_ms: 590_134}, %Video.TimedPoint{lat: 53.577958, lon: 10.077174, time_offset_ms: 590_467}, %Video.TimedPoint{lat: 53.577966, lon: 10.077098, time_offset_ms: 590_801}, %Video.TimedPoint{lat: 53.577979, lon: 10.076995, time_offset_ms: 591_135}, %Video.TimedPoint{lat: 53.577995, lon: 10.076885, time_offset_ms: 591_468}, %Video.TimedPoint{lat: 53.578004, lon: 10.076784, time_offset_ms: 591_802}, %Video.TimedPoint{lat: 53.578013, lon: 10.076684, time_offset_ms: 592_136}, %Video.TimedPoint{lat: 53.578006, lon: 10.076595, time_offset_ms: 592_469}, %Video.TimedPoint{lat: 53.577988, lon: 10.076489, time_offset_ms: 592_803}, %Video.TimedPoint{lat: 53.577963, lon: 10.076369, time_offset_ms: 593_137}, %Video.TimedPoint{lat: 53.577943, lon: 10.07624, time_offset_ms: 593_470}, %Video.TimedPoint{lat: 53.577924, lon: 10.07611, time_offset_ms: 593_804}, %Video.TimedPoint{lat: 53.577903, lon: 10.075977, time_offset_ms: 594_138}, %Video.TimedPoint{lat: 53.577883, lon: 10.075859, time_offset_ms: 594_471}, %Video.TimedPoint{lat: 53.577858, lon: 10.075737, time_offset_ms: 594_805}, %Video.TimedPoint{lat: 53.577841, lon: 10.0756, time_offset_ms: 595_139}, %Video.TimedPoint{lat: 53.577828, lon: 10.075448, time_offset_ms: 595_472}, %Video.TimedPoint{lat: 53.577808, lon: 10.075317, time_offset_ms: 595_806}, %Video.TimedPoint{lat: 53.577791, lon: 10.07518, time_offset_ms: 596_140}, %Video.TimedPoint{lat: 53.577778, lon: 10.075033, time_offset_ms: 596_473}, %Video.TimedPoint{lat: 53.577759, lon: 10.074903, time_offset_ms: 596_807}, %Video.TimedPoint{lat: 53.57773, lon: 10.074772, time_offset_ms: 597_141}, %Video.TimedPoint{lat: 53.577687, lon: 10.074662, time_offset_ms: 597_474}, %Video.TimedPoint{lat: 53.577638, lon: 10.074569, time_offset_ms: 597_808}, %Video.TimedPoint{lat: 53.577596, lon: 10.074479, time_offset_ms: 598_142}, %Video.TimedPoint{lat: 53.577557, lon: 10.074384, time_offset_ms: 598_475}, %Video.TimedPoint{lat: 53.577522, lon: 10.074299, time_offset_ms: 598_809}, %Video.TimedPoint{lat: 53.577485, lon: 10.074231, time_offset_ms: 599_143}, %Video.TimedPoint{lat: 53.577441, lon: 10.074189, time_offset_ms: 599_476}, %Video.TimedPoint{lat: 53.577393, lon: 10.074145, time_offset_ms: 599_810}, %Video.TimedPoint{lat: 53.577336, lon: 10.074101, time_offset_ms: 600_144}, %Video.TimedPoint{lat: 53.577282, lon: 10.07406, time_offset_ms: 600_477}, %Video.TimedPoint{lat: 53.577211, lon: 10.07401, time_offset_ms: 600_811}, %Video.TimedPoint{lat: 53.577139, lon: 10.073955, time_offset_ms: 601_145}, %Video.TimedPoint{lat: 53.577077, lon: 10.073888, time_offset_ms: 601_478}, %Video.TimedPoint{lat: 53.577019, lon: 10.073824, time_offset_ms: 601_812}, %Video.TimedPoint{lat: 53.576959, lon: 10.073772, time_offset_ms: 602_146}, %Video.TimedPoint{lat: 53.576898, lon: 10.073714, time_offset_ms: 602_479}, %Video.TimedPoint{lat: 53.576832, lon: 10.073653, time_offset_ms: 602_813}, %Video.TimedPoint{lat: 53.576777, lon: 10.073594, time_offset_ms: 603_147}, %Video.TimedPoint{lat: 53.576722, lon: 10.073534, time_offset_ms: 603_480}, %Video.TimedPoint{lat: 53.576677, lon: 10.073478, time_offset_ms: 603_814}, %Video.TimedPoint{lat: 53.576639, lon: 10.073422, time_offset_ms: 604_148}, %Video.TimedPoint{lat: 53.576615, lon: 10.073368, time_offset_ms: 604_481}, %Video.TimedPoint{lat: 53.576597, lon: 10.073328, time_offset_ms: 604_815}, %Video.TimedPoint{lat: 53.576569, lon: 10.073285, time_offset_ms: 605_149}, %Video.TimedPoint{lat: 53.576543, lon: 10.073234, time_offset_ms: 605_482}, %Video.TimedPoint{lat: 53.576524, lon: 10.073179, time_offset_ms: 605_816}, %Video.TimedPoint{lat: 53.576506, lon: 10.073138, time_offset_ms: 606_150}, %Video.TimedPoint{lat: 53.576457, lon: 10.073032, time_offset_ms: 606_235}, %Video.TimedPoint{lat: 53.576454, lon: 10.073013, time_offset_ms: 606_569}, %Video.TimedPoint{lat: 53.576445, lon: 10.072955, time_offset_ms: 606_902}, %Video.TimedPoint{lat: 53.576422, lon: 10.072881, time_offset_ms: 607_236}, %Video.TimedPoint{lat: 53.576386, lon: 10.072811, time_offset_ms: 607_570}, %Video.TimedPoint{lat: 53.576354, lon: 10.072739, time_offset_ms: 607_903}, %Video.TimedPoint{lat: 53.576328, lon: 10.07264, time_offset_ms: 608_237}, %Video.TimedPoint{lat: 53.576303, lon: 10.072539, time_offset_ms: 608_571}, %Video.TimedPoint{lat: 53.576282, lon: 10.072449, time_offset_ms: 608_904}, %Video.TimedPoint{lat: 53.576253, lon: 10.072338, time_offset_ms: 609_238}, %Video.TimedPoint{lat: 53.576229, lon: 10.072235, time_offset_ms: 609_572}, %Video.TimedPoint{lat: 53.576205, lon: 10.072119, time_offset_ms: 609_905}, %Video.TimedPoint{lat: 53.576191, lon: 10.072008, time_offset_ms: 610_239}, %Video.TimedPoint{lat: 53.576175, lon: 10.071881, time_offset_ms: 610_573}, %Video.TimedPoint{lat: 53.576158, lon: 10.071781, time_offset_ms: 610_906}, %Video.TimedPoint{lat: 53.576118, lon: 10.071659, time_offset_ms: 611_240}, %Video.TimedPoint{lat: 53.576072, lon: 10.071545, time_offset_ms: 611_574}, %Video.TimedPoint{lat: 53.576032, lon: 10.071425, time_offset_ms: 611_907}, %Video.TimedPoint{lat: 53.575993, lon: 10.071301, time_offset_ms: 612_241}, %Video.TimedPoint{lat: 53.575959, lon: 10.071182, time_offset_ms: 612_574}, %Video.TimedPoint{lat: 53.575925, lon: 10.071064, time_offset_ms: 612_908}, %Video.TimedPoint{lat: 53.575899, lon: 10.070934, time_offset_ms: 613_242}, %Video.TimedPoint{lat: 53.575896, lon: 10.07082, time_offset_ms: 613_575}, %Video.TimedPoint{lat: 53.575904, lon: 10.070684, time_offset_ms: 613_909}, %Video.TimedPoint{lat: 53.575914, lon: 10.070575, time_offset_ms: 614_243}, %Video.TimedPoint{lat: 53.575925, lon: 10.070511, time_offset_ms: 614_576}, %Video.TimedPoint{lat: 53.575941, lon: 10.070459, time_offset_ms: 614_910}, %Video.TimedPoint{lat: 53.57595, lon: 10.070419, time_offset_ms: 615_244}, %Video.TimedPoint{lat: 53.575955, lon: 10.070388, time_offset_ms: 615_577}, %Video.TimedPoint{lat: 53.575963, lon: 10.070353, time_offset_ms: 615_911}, %Video.TimedPoint{lat: 53.575973, lon: 10.07033, time_offset_ms: 616_245}, %Video.TimedPoint{lat: 53.575964, lon: 10.07028, time_offset_ms: 616_330}, %Video.TimedPoint{lat: 53.57597, lon: 10.070261, time_offset_ms: 616_664}, %Video.TimedPoint{lat: 53.575985, lon: 10.070214, time_offset_ms: 616_997}, %Video.TimedPoint{lat: 53.576005, lon: 10.070137, time_offset_ms: 617_331}, %Video.TimedPoint{lat: 53.576019, lon: 10.070065, time_offset_ms: 617_665}, %Video.TimedPoint{lat: 53.576003, lon: 10.070015, time_offset_ms: 617_998}, %Video.TimedPoint{lat: 53.575973, lon: 10.069992, time_offset_ms: 618_332}, %Video.TimedPoint{lat: 53.575926, lon: 10.069965, time_offset_ms: 618_666}, %Video.TimedPoint{lat: 53.57589, lon: 10.069939, time_offset_ms: 618_999}, %Video.TimedPoint{lat: 53.575866, lon: 10.069919, time_offset_ms: 619_333}, %Video.TimedPoint{lat: 53.575862, lon: 10.069888, time_offset_ms: 619_667}, %Video.TimedPoint{lat: 53.575877, lon: 10.069844, time_offset_ms: 620_000}, %Video.TimedPoint{lat: 53.575887, lon: 10.069792, time_offset_ms: 620_334}, %Video.TimedPoint{lat: 53.575898, lon: 10.069722, time_offset_ms: 620_668}, %Video.TimedPoint{lat: 53.575921, lon: 10.069659, time_offset_ms: 621_001}, %Video.TimedPoint{lat: 53.575945, lon: 10.069583, time_offset_ms: 621_335}, %Video.TimedPoint{lat: 53.575973, lon: 10.069498, time_offset_ms: 621_669}, %Video.TimedPoint{lat: 53.57601, lon: 10.069403, time_offset_ms: 622_002}, %Video.TimedPoint{lat: 53.576041, lon: 10.069299, time_offset_ms: 622_336}, %Video.TimedPoint{lat: 53.576067, lon: 10.069182, time_offset_ms: 622_670}, %Video.TimedPoint{lat: 53.576084, lon: 10.069074, time_offset_ms: 623_003}, %Video.TimedPoint{lat: 53.576102, lon: 10.068956, time_offset_ms: 623_337}, %Video.TimedPoint{lat: 53.576106, lon: 10.068856, time_offset_ms: 623_671}, %Video.TimedPoint{lat: 53.576101, lon: 10.06874, time_offset_ms: 624_004}, %Video.TimedPoint{lat: 53.576092, lon: 10.068622, time_offset_ms: 624_338}, %Video.TimedPoint{lat: 53.576083, lon: 10.068503, time_offset_ms: 624_672}, %Video.TimedPoint{lat: 53.57607, lon: 10.068389, time_offset_ms: 625_005}, %Video.TimedPoint{lat: 53.576057, lon: 10.068287, time_offset_ms: 625_339}, %Video.TimedPoint{lat: 53.576043, lon: 10.068212, time_offset_ms: 625_673}, %Video.TimedPoint{lat: 53.576022, lon: 10.06817, time_offset_ms: 626_006}, %Video.TimedPoint{lat: 53.576003, lon: 10.068127, time_offset_ms: 626_340}, %Video.TimedPoint{lat: 53.576008, lon: 10.068094, time_offset_ms: 626_674}, %Video.TimedPoint{lat: 53.576035, lon: 10.068076, time_offset_ms: 627_007}, %Video.TimedPoint{lat: 53.576078, lon: 10.068059, time_offset_ms: 627_341}, %Video.TimedPoint{lat: 53.576127, lon: 10.068032, time_offset_ms: 627_675}, %Video.TimedPoint{lat: 53.576171, lon: 10.067994, time_offset_ms: 628_008}, %Video.TimedPoint{lat: 53.576187, lon: 10.067943, time_offset_ms: 628_342}, %Video.TimedPoint{lat: 53.576173, lon: 10.067901, time_offset_ms: 628_676}, %Video.TimedPoint{lat: 53.576151, lon: 10.067831, time_offset_ms: 629_009}, %Video.TimedPoint{lat: 53.57613, lon: 10.067762, time_offset_ms: 629_343}, %Video.TimedPoint{lat: 53.576113, lon: 10.067683, time_offset_ms: 629_677}, %Video.TimedPoint{lat: 53.576106, lon: 10.067598, time_offset_ms: 630_010}, %Video.TimedPoint{lat: 53.576095, lon: 10.067511, time_offset_ms: 630_344}, %Video.TimedPoint{lat: 53.576082, lon: 10.067431, time_offset_ms: 630_678}, %Video.TimedPoint{lat: 53.576064, lon: 10.067347, time_offset_ms: 631_011}, %Video.TimedPoint{lat: 53.576049, lon: 10.067273, time_offset_ms: 631_345}, %Video.TimedPoint{lat: 53.576037, lon: 10.067201, time_offset_ms: 631_679}, %Video.TimedPoint{lat: 53.576031, lon: 10.067142, time_offset_ms: 632_012}, %Video.TimedPoint{lat: 53.576017, lon: 10.067092, time_offset_ms: 632_346}, %Video.TimedPoint{lat: 53.575993, lon: 10.067048, time_offset_ms: 632_680}, %Video.TimedPoint{lat: 53.57595, lon: 10.066966, time_offset_ms: 633_013}, %Video.TimedPoint{lat: 53.57591, lon: 10.066893, time_offset_ms: 633_347}, %Video.TimedPoint{lat: 53.575859, lon: 10.06683, time_offset_ms: 633_681}, %Video.TimedPoint{lat: 53.575796, lon: 10.066769, time_offset_ms: 634_014}, %Video.TimedPoint{lat: 53.575735, lon: 10.066707, time_offset_ms: 634_348}, %Video.TimedPoint{lat: 53.575668, lon: 10.066644, time_offset_ms: 634_682}, %Video.TimedPoint{lat: 53.575606, lon: 10.066603, time_offset_ms: 635_015}, %Video.TimedPoint{lat: 53.575551, lon: 10.066564, time_offset_ms: 635_349}, %Video.TimedPoint{lat: 53.575516, lon: 10.066514, time_offset_ms: 635_683}, %Video.TimedPoint{lat: 53.575467, lon: 10.066438, time_offset_ms: 636_016}, %Video.TimedPoint{lat: 53.575428, lon: 10.066355, time_offset_ms: 636_350}, %Video.TimedPoint{lat: 53.575406, lon: 10.066253, time_offset_ms: 636_684}, %Video.TimedPoint{lat: 53.575386, lon: 10.066147, time_offset_ms: 637_017}, %Video.TimedPoint{lat: 53.575385, lon: 10.066044, time_offset_ms: 637_351}, %Video.TimedPoint{lat: 53.575384, lon: 10.06592, time_offset_ms: 637_685}, %Video.TimedPoint{lat: 53.575382, lon: 10.065794, time_offset_ms: 638_018}, %Video.TimedPoint{lat: 53.575373, lon: 10.065687, time_offset_ms: 638_352}, %Video.TimedPoint{lat: 53.57534, lon: 10.065599, time_offset_ms: 638_686}, %Video.TimedPoint{lat: 53.575295, lon: 10.065541, time_offset_ms: 639_019}, %Video.TimedPoint{lat: 53.575241, lon: 10.065477, time_offset_ms: 639_353}, %Video.TimedPoint{lat: 53.575201, lon: 10.065426, time_offset_ms: 639_687}, %Video.TimedPoint{lat: 53.575176, lon: 10.065362, time_offset_ms: 640_020}, %Video.TimedPoint{lat: 53.575177, lon: 10.06531, time_offset_ms: 640_354}, %Video.TimedPoint{lat: 53.5752, lon: 10.065267, time_offset_ms: 640_688}, %Video.TimedPoint{lat: 53.575226, lon: 10.065218, time_offset_ms: 641_021}, %Video.TimedPoint{lat: 53.575249, lon: 10.065145, time_offset_ms: 641_355}, %Video.TimedPoint{lat: 53.575257, lon: 10.065051, time_offset_ms: 641_689}, %Video.TimedPoint{lat: 53.575246, lon: 10.064954, time_offset_ms: 642_022}, %Video.TimedPoint{lat: 53.575232, lon: 10.064859, time_offset_ms: 642_356}, %Video.TimedPoint{lat: 53.575226, lon: 10.064752, time_offset_ms: 642_690}, %Video.TimedPoint{lat: 53.575216, lon: 10.064651, time_offset_ms: 643_023}, %Video.TimedPoint{lat: 53.575201, lon: 10.064541, time_offset_ms: 643_357}, %Video.TimedPoint{lat: 53.575181, lon: 10.06444, time_offset_ms: 643_691}, %Video.TimedPoint{lat: 53.575163, lon: 10.064336, time_offset_ms: 644_024}, %Video.TimedPoint{lat: 53.575163, lon: 10.064247, time_offset_ms: 644_358}, %Video.TimedPoint{lat: 53.575174, lon: 10.064178, time_offset_ms: 644_692}, %Video.TimedPoint{lat: 53.575181, lon: 10.064114, time_offset_ms: 645_025}, %Video.TimedPoint{lat: 53.575202, lon: 10.064087, time_offset_ms: 645_359}, %Video.TimedPoint{lat: 53.575228, lon: 10.064048, time_offset_ms: 645_693}, %Video.TimedPoint{lat: 53.575244, lon: 10.063975, time_offset_ms: 646_026}, %Video.TimedPoint{lat: 53.575264, lon: 10.063876, time_offset_ms: 646_360}, %Video.TimedPoint{lat: 53.575276, lon: 10.063788, time_offset_ms: 646_694}, %Video.TimedPoint{lat: 53.575277, lon: 10.063671, time_offset_ms: 647_027}, %Video.TimedPoint{lat: 53.575275, lon: 10.063559, time_offset_ms: 647_361}, %Video.TimedPoint{lat: 53.57527, lon: 10.063449, time_offset_ms: 647_695}, %Video.TimedPoint{lat: 53.575261, lon: 10.063345, time_offset_ms: 648_028}, %Video.TimedPoint{lat: 53.575256, lon: 10.063234, time_offset_ms: 648_362}, %Video.TimedPoint{lat: 53.57526, lon: 10.063135, time_offset_ms: 648_696}, %Video.TimedPoint{lat: 53.575249, lon: 10.063024, time_offset_ms: 649_029}, %Video.TimedPoint{lat: 53.575233, lon: 10.0629, time_offset_ms: 649_363}, %Video.TimedPoint{lat: 53.575229, lon: 10.062786, time_offset_ms: 649_697}, %Video.TimedPoint{lat: 53.575232, lon: 10.062713, time_offset_ms: 650_030}, %Video.TimedPoint{lat: 53.575227, lon: 10.062634, time_offset_ms: 650_364}, %Video.TimedPoint{lat: 53.57522, lon: 10.062563, time_offset_ms: 650_698}, %Video.TimedPoint{lat: 53.575206, lon: 10.06249, time_offset_ms: 651_031}, %Video.TimedPoint{lat: 53.57518, lon: 10.062397, time_offset_ms: 651_365}, %Video.TimedPoint{lat: 53.575157, lon: 10.062317, time_offset_ms: 651_699}, %Video.TimedPoint{lat: 53.575132, lon: 10.062203, time_offset_ms: 652_032}, %Video.TimedPoint{lat: 53.575116, lon: 10.062095, time_offset_ms: 652_366}, %Video.TimedPoint{lat: 53.57511, lon: 10.061994, time_offset_ms: 652_700}, %Video.TimedPoint{lat: 53.575092, lon: 10.061889, time_offset_ms: 653_033}, %Video.TimedPoint{lat: 53.575071, lon: 10.061786, time_offset_ms: 653_367}, %Video.TimedPoint{lat: 53.575059, lon: 10.061679, time_offset_ms: 653_701}, %Video.TimedPoint{lat: 53.575062, lon: 10.061572, time_offset_ms: 654_034}, %Video.TimedPoint{lat: 53.575052, lon: 10.061475, time_offset_ms: 654_368}, %Video.TimedPoint{lat: 53.575032, lon: 10.061362, time_offset_ms: 654_701}, %Video.TimedPoint{lat: 53.575012, lon: 10.061233, time_offset_ms: 655_035}, %Video.TimedPoint{lat: 53.574995, lon: 10.061121, time_offset_ms: 655_369}, %Video.TimedPoint{lat: 53.574974, lon: 10.061002, time_offset_ms: 655_702}, %Video.TimedPoint{lat: 53.574955, lon: 10.060881, time_offset_ms: 656_036}, %Video.TimedPoint{lat: 53.574935, lon: 10.060753, time_offset_ms: 656_370}, %Video.TimedPoint{lat: 53.574915, lon: 10.060632, time_offset_ms: 656_703}, %Video.TimedPoint{lat: 53.574895, lon: 10.060511, time_offset_ms: 657_037}, %Video.TimedPoint{lat: 53.574878, lon: 10.060407, time_offset_ms: 657_371}, %Video.TimedPoint{lat: 53.574856, lon: 10.06028, time_offset_ms: 657_704}, %Video.TimedPoint{lat: 53.57483, lon: 10.060175, time_offset_ms: 658_038}, %Video.TimedPoint{lat: 53.574806, lon: 10.060072, time_offset_ms: 658_372}, %Video.TimedPoint{lat: 53.574793, lon: 10.059949, time_offset_ms: 658_705}, %Video.TimedPoint{lat: 53.574788, lon: 10.059863, time_offset_ms: 659_039}, %Video.TimedPoint{lat: 53.574767, lon: 10.059758, time_offset_ms: 659_373}, %Video.TimedPoint{lat: 53.574749, lon: 10.059669, time_offset_ms: 659_706}, %Video.TimedPoint{lat: 53.574742, lon: 10.059572, time_offset_ms: 660_040}, %Video.TimedPoint{lat: 53.574742, lon: 10.059488, time_offset_ms: 660_374}, %Video.TimedPoint{lat: 53.574741, lon: 10.059403, time_offset_ms: 660_707}, %Video.TimedPoint{lat: 53.574741, lon: 10.059311, time_offset_ms: 661_041}, %Video.TimedPoint{lat: 53.574746, lon: 10.059232, time_offset_ms: 661_375}, %Video.TimedPoint{lat: 53.57478, lon: 10.059167, time_offset_ms: 661_708}, %Video.TimedPoint{lat: 53.574831, lon: 10.059123, time_offset_ms: 662_042}, %Video.TimedPoint{lat: 53.574898, lon: 10.059077, time_offset_ms: 662_376}, %Video.TimedPoint{lat: 53.574966, lon: 10.059031, time_offset_ms: 662_709}, %Video.TimedPoint{lat: 53.575028, lon: 10.058988, time_offset_ms: 663_043}, %Video.TimedPoint{lat: 53.575097, lon: 10.058942, time_offset_ms: 663_377}, %Video.TimedPoint{lat: 53.57517, lon: 10.058901, time_offset_ms: 663_710}, %Video.TimedPoint{lat: 53.575241, lon: 10.058861, time_offset_ms: 664_044}, %Video.TimedPoint{lat: 53.57531, lon: 10.058839, time_offset_ms: 664_378}, %Video.TimedPoint{lat: 53.575382, lon: 10.058814, time_offset_ms: 664_711}, %Video.TimedPoint{lat: 53.575447, lon: 10.058777, time_offset_ms: 665_045}, %Video.TimedPoint{lat: 53.57552, lon: 10.058738, time_offset_ms: 665_379}, %Video.TimedPoint{lat: 53.575587, lon: 10.058709, time_offset_ms: 665_712}, %Video.TimedPoint{lat: 53.575658, lon: 10.058689, time_offset_ms: 666_046}, %Video.TimedPoint{lat: 53.575733, lon: 10.058684, time_offset_ms: 666_380}, %Video.TimedPoint{lat: 53.575796, lon: 10.058695, time_offset_ms: 666_713}, %Video.TimedPoint{lat: 53.575856, lon: 10.058722, time_offset_ms: 667_047}, %Video.TimedPoint{lat: 53.575904, lon: 10.058759, time_offset_ms: 667_381}, %Video.TimedPoint{lat: 53.575935, lon: 10.058807, time_offset_ms: 667_714}, %Video.TimedPoint{lat: 53.575958, lon: 10.058853, time_offset_ms: 668_048}, %Video.TimedPoint{lat: 53.57598, lon: 10.058877, time_offset_ms: 668_382}, %Video.TimedPoint{lat: 53.57599, lon: 10.058873, time_offset_ms: 668_715}, %Video.TimedPoint{lat: 53.576113, lon: 10.058804, time_offset_ms: 668_800}, %Video.TimedPoint{lat: 53.576131, lon: 10.05879, time_offset_ms: 669_134}, %Video.TimedPoint{lat: 53.576167, lon: 10.058771, time_offset_ms: 669_467}, %Video.TimedPoint{lat: 53.576199, lon: 10.058758, time_offset_ms: 669_801}, %Video.TimedPoint{lat: 53.576211, lon: 10.058682, time_offset_ms: 669_886}, %Video.TimedPoint{lat: 53.5762, lon: 10.058653, time_offset_ms: 670_220}, %Video.TimedPoint{lat: 53.576183, lon: 10.058582, time_offset_ms: 670_553}, %Video.TimedPoint{lat: 53.576168, lon: 10.05851, time_offset_ms: 670_887}, %Video.TimedPoint{lat: 53.576153, lon: 10.058431, time_offset_ms: 671_221}, %Video.TimedPoint{lat: 53.576144, lon: 10.058335, time_offset_ms: 671_554}, %Video.TimedPoint{lat: 53.57613, lon: 10.058237, time_offset_ms: 671_888}, %Video.TimedPoint{lat: 53.576107, lon: 10.058162, time_offset_ms: 672_222}, %Video.TimedPoint{lat: 53.576087, lon: 10.058069, time_offset_ms: 672_555}, %Video.TimedPoint{lat: 53.576077, lon: 10.057981, time_offset_ms: 672_889}, %Video.TimedPoint{lat: 53.576062, lon: 10.057874, time_offset_ms: 673_223}, %Video.TimedPoint{lat: 53.576042, lon: 10.057787, time_offset_ms: 673_556}, %Video.TimedPoint{lat: 53.576008, lon: 10.057701, time_offset_ms: 673_890}, %Video.TimedPoint{lat: 53.576, lon: 10.057619, time_offset_ms: 674_224}, %Video.TimedPoint{lat: 53.575996, lon: 10.057536, time_offset_ms: 674_557}, %Video.TimedPoint{lat: 53.575984, lon: 10.057436, time_offset_ms: 674_891}, %Video.TimedPoint{lat: 53.575962, lon: 10.057333, time_offset_ms: 675_225}, %Video.TimedPoint{lat: 53.575935, lon: 10.057216, time_offset_ms: 675_558}, %Video.TimedPoint{lat: 53.5759, lon: 10.057123, time_offset_ms: 675_892}, %Video.TimedPoint{lat: 53.575854, lon: 10.057026, time_offset_ms: 676_226}, %Video.TimedPoint{lat: 53.57582, lon: 10.056934, time_offset_ms: 676_559}, %Video.TimedPoint{lat: 53.575794, lon: 10.056833, time_offset_ms: 676_893}, %Video.TimedPoint{lat: 53.575768, lon: 10.056715, time_offset_ms: 677_227}, %Video.TimedPoint{lat: 53.575742, lon: 10.056618, time_offset_ms: 677_560}, %Video.TimedPoint{lat: 53.575715, lon: 10.056518, time_offset_ms: 677_894}, %Video.TimedPoint{lat: 53.575693, lon: 10.056402, time_offset_ms: 678_228}, %Video.TimedPoint{lat: 53.575669, lon: 10.056299, time_offset_ms: 678_561}, %Video.TimedPoint{lat: 53.57564, lon: 10.056193, time_offset_ms: 678_895}, %Video.TimedPoint{lat: 53.57561, lon: 10.05607, time_offset_ms: 679_229}, %Video.TimedPoint{lat: 53.575583, lon: 10.055971, time_offset_ms: 679_562}, %Video.TimedPoint{lat: 53.575557, lon: 10.055876, time_offset_ms: 679_896}, %Video.TimedPoint{lat: 53.57552, lon: 10.055758, time_offset_ms: 680_230}, %Video.TimedPoint{lat: 53.575482, lon: 10.055647, time_offset_ms: 680_563}, %Video.TimedPoint{lat: 53.57544, lon: 10.05554, time_offset_ms: 680_897}, %Video.TimedPoint{lat: 53.575398, lon: 10.055428, time_offset_ms: 681_231}, %Video.TimedPoint{lat: 53.575359, lon: 10.055328, time_offset_ms: 681_564}, %Video.TimedPoint{lat: 53.575319, lon: 10.05522, time_offset_ms: 681_898}, %Video.TimedPoint{lat: 53.57528, lon: 10.055127, time_offset_ms: 682_232}, %Video.TimedPoint{lat: 53.575237, lon: 10.055028, time_offset_ms: 682_565}, %Video.TimedPoint{lat: 53.575193, lon: 10.054931, time_offset_ms: 682_899}, %Video.TimedPoint{lat: 53.57515, lon: 10.054839, time_offset_ms: 683_233}, %Video.TimedPoint{lat: 53.57511, lon: 10.054753, time_offset_ms: 683_566}, %Video.TimedPoint{lat: 53.575069, lon: 10.05465, time_offset_ms: 683_900}, %Video.TimedPoint{lat: 53.575032, lon: 10.054539, time_offset_ms: 684_234}, %Video.TimedPoint{lat: 53.574999, lon: 10.054429, time_offset_ms: 684_567}, %Video.TimedPoint{lat: 53.574968, lon: 10.054317, time_offset_ms: 684_901}, %Video.TimedPoint{lat: 53.574936, lon: 10.054202, time_offset_ms: 685_235}, %Video.TimedPoint{lat: 53.574911, lon: 10.054087, time_offset_ms: 685_568}, %Video.TimedPoint{lat: 53.574888, lon: 10.053963, time_offset_ms: 685_902}, %Video.TimedPoint{lat: 53.574862, lon: 10.053843, time_offset_ms: 686_236}, %Video.TimedPoint{lat: 53.574838, lon: 10.053734, time_offset_ms: 686_569}, %Video.TimedPoint{lat: 53.574812, lon: 10.053611, time_offset_ms: 686_903}, %Video.TimedPoint{lat: 53.574785, lon: 10.053492, time_offset_ms: 687_237}, %Video.TimedPoint{lat: 53.574759, lon: 10.053387, time_offset_ms: 687_570}, %Video.TimedPoint{lat: 53.574721, lon: 10.053271, time_offset_ms: 687_904}, %Video.TimedPoint{lat: 53.574684, lon: 10.053166, time_offset_ms: 688_238}, %Video.TimedPoint{lat: 53.57465, lon: 10.05307, time_offset_ms: 688_571}, %Video.TimedPoint{lat: 53.57461, lon: 10.052947, time_offset_ms: 688_905}, %Video.TimedPoint{lat: 53.574575, lon: 10.052841, time_offset_ms: 689_239}, %Video.TimedPoint{lat: 53.574529, lon: 10.052733, time_offset_ms: 689_572}, %Video.TimedPoint{lat: 53.574482, lon: 10.052632, time_offset_ms: 689_906}, %Video.TimedPoint{lat: 53.574437, lon: 10.052535, time_offset_ms: 690_240}, %Video.TimedPoint{lat: 53.574382, lon: 10.052445, time_offset_ms: 690_573}, %Video.TimedPoint{lat: 53.574322, lon: 10.052369, time_offset_ms: 690_907}, %Video.TimedPoint{lat: 53.574263, lon: 10.052282, time_offset_ms: 691_241}, %Video.TimedPoint{lat: 53.574213, lon: 10.052196, time_offset_ms: 691_574}, %Video.TimedPoint{lat: 53.574171, lon: 10.052094, time_offset_ms: 691_908}, %Video.TimedPoint{lat: 53.574135, lon: 10.051967, time_offset_ms: 692_242}, %Video.TimedPoint{lat: 53.57411, lon: 10.051842, time_offset_ms: 692_575}, %Video.TimedPoint{lat: 53.574088, lon: 10.051704, time_offset_ms: 692_909}, %Video.TimedPoint{lat: 53.574067, lon: 10.051584, time_offset_ms: 693_243}, %Video.TimedPoint{lat: 53.574043, lon: 10.051461, time_offset_ms: 693_576}, %Video.TimedPoint{lat: 53.57402, lon: 10.051337, time_offset_ms: 693_910}, %Video.TimedPoint{lat: 53.573996, lon: 10.05121, time_offset_ms: 694_244}, %Video.TimedPoint{lat: 53.573976, lon: 10.051087, time_offset_ms: 694_577}, %Video.TimedPoint{lat: 53.573956, lon: 10.050977, time_offset_ms: 694_911}, %Video.TimedPoint{lat: 53.573928, lon: 10.050843, time_offset_ms: 695_245}, %Video.TimedPoint{lat: 53.573907, lon: 10.050742, time_offset_ms: 695_578}, %Video.TimedPoint{lat: 53.573883, lon: 10.050629, time_offset_ms: 695_912}, %Video.TimedPoint{lat: 53.573861, lon: 10.050522, time_offset_ms: 696_246}, %Video.TimedPoint{lat: 53.573843, lon: 10.05042, time_offset_ms: 696_579}, %Video.TimedPoint{lat: 53.573823, lon: 10.050314, time_offset_ms: 696_913}, %Video.TimedPoint{lat: 53.573803, lon: 10.05023, time_offset_ms: 697_247}, %Video.TimedPoint{lat: 53.57378, lon: 10.050135, time_offset_ms: 697_580}, %Video.TimedPoint{lat: 53.573768, lon: 10.050054, time_offset_ms: 697_914}, %Video.TimedPoint{lat: 53.573759, lon: 10.049987, time_offset_ms: 698_248}, %Video.TimedPoint{lat: 53.573754, lon: 10.049943, time_offset_ms: 698_581}, %Video.TimedPoint{lat: 53.573752, lon: 10.049902, time_offset_ms: 698_915}, %Video.TimedPoint{lat: 53.573754, lon: 10.04986, time_offset_ms: 699_249}, %Video.TimedPoint{lat: 53.573753, lon: 10.049825, time_offset_ms: 699_582}, %Video.TimedPoint{lat: 53.573739, lon: 10.049804, time_offset_ms: 699_916}, %Video.TimedPoint{lat: 53.573728, lon: 10.049777, time_offset_ms: 700_250}, %Video.TimedPoint{lat: 53.573726, lon: 10.049763, time_offset_ms: 700_583}, %Video.TimedPoint{lat: 53.573721, lon: 10.049737, time_offset_ms: 700_917}, %Video.TimedPoint{lat: 53.57371, lon: 10.049673, time_offset_ms: 701_251}, %Video.TimedPoint{lat: 53.57369, lon: 10.049576, time_offset_ms: 701_584}, %Video.TimedPoint{lat: 53.573665, lon: 10.049458, time_offset_ms: 701_918}, %Video.TimedPoint{lat: 53.573633, lon: 10.049323, time_offset_ms: 702_252}, %Video.TimedPoint{lat: 53.573601, lon: 10.049178, time_offset_ms: 702_585}, %Video.TimedPoint{lat: 53.573568, lon: 10.049051, time_offset_ms: 702_919}, %Video.TimedPoint{lat: 53.573527, lon: 10.048911, time_offset_ms: 703_253}, %Video.TimedPoint{lat: 53.573496, lon: 10.048798, time_offset_ms: 703_586}, %Video.TimedPoint{lat: 53.573459, lon: 10.048663, time_offset_ms: 703_920}, %Video.TimedPoint{lat: 53.573429, lon: 10.048503, time_offset_ms: 704_254}, %Video.TimedPoint{lat: 53.573392, lon: 10.048369, time_offset_ms: 704_587}, %Video.TimedPoint{lat: 53.573358, lon: 10.048244, time_offset_ms: 704_921}, %Video.TimedPoint{lat: 53.573315, lon: 10.048092, time_offset_ms: 705_255}, %Video.TimedPoint{lat: 53.573277, lon: 10.047944, time_offset_ms: 705_588}, %Video.TimedPoint{lat: 53.573241, lon: 10.047811, time_offset_ms: 705_922}, %Video.TimedPoint{lat: 53.573209, lon: 10.04766, time_offset_ms: 706_256}, %Video.TimedPoint{lat: 53.57318, lon: 10.04753, time_offset_ms: 706_589}, %Video.TimedPoint{lat: 53.573147, lon: 10.047391, time_offset_ms: 706_923}, %Video.TimedPoint{lat: 53.573108, lon: 10.047251, time_offset_ms: 707_257}, %Video.TimedPoint{lat: 53.573075, lon: 10.047112, time_offset_ms: 707_590}, %Video.TimedPoint{lat: 53.573059, lon: 10.046975, time_offset_ms: 707_924}, %Video.TimedPoint{lat: 53.573046, lon: 10.046809, time_offset_ms: 708_258}, %Video.TimedPoint{lat: 53.573037, lon: 10.046656, time_offset_ms: 708_591}, %Video.TimedPoint{lat: 53.573027, lon: 10.046517, time_offset_ms: 708_925}, %Video.TimedPoint{lat: 53.57302, lon: 10.046371, time_offset_ms: 709_259}, %Video.TimedPoint{lat: 53.573017, lon: 10.046243, time_offset_ms: 709_592}, %Video.TimedPoint{lat: 53.573006, lon: 10.046088, time_offset_ms: 709_926}, %Video.TimedPoint{lat: 53.572995, lon: 10.045951, time_offset_ms: 710_260}, %Video.TimedPoint{lat: 53.572985, lon: 10.045816, time_offset_ms: 710_593}, %Video.TimedPoint{lat: 53.572977, lon: 10.04568, time_offset_ms: 710_927}, %Video.TimedPoint{lat: 53.572962, lon: 10.045532, time_offset_ms: 711_261}, %Video.TimedPoint{lat: 53.572943, lon: 10.045393, time_offset_ms: 711_594}, %Video.TimedPoint{lat: 53.572934, lon: 10.045263, time_offset_ms: 711_928}, %Video.TimedPoint{lat: 53.572926, lon: 10.045126, time_offset_ms: 712_262}, %Video.TimedPoint{lat: 53.572914, lon: 10.044985, time_offset_ms: 712_595}, %Video.TimedPoint{lat: 53.572907, lon: 10.044858, time_offset_ms: 712_929}, %Video.TimedPoint{lat: 53.572897, lon: 10.044733, time_offset_ms: 713_263}, %Video.TimedPoint{lat: 53.572889, lon: 10.044605, time_offset_ms: 713_596}, %Video.TimedPoint{lat: 53.572874, lon: 10.044472, time_offset_ms: 713_930}, %Video.TimedPoint{lat: 53.572859, lon: 10.044337, time_offset_ms: 714_264}, %Video.TimedPoint{lat: 53.572815, lon: 10.044208, time_offset_ms: 714_597}, %Video.TimedPoint{lat: 53.572751, lon: 10.044149, time_offset_ms: 714_931}, %Video.TimedPoint{lat: 53.572655, lon: 10.044131, time_offset_ms: 715_265}, %Video.TimedPoint{lat: 53.572573, lon: 10.044122, time_offset_ms: 715_598}, %Video.TimedPoint{lat: 53.572487, lon: 10.044111, time_offset_ms: 715_932}, %Video.TimedPoint{lat: 53.572404, lon: 10.044097, time_offset_ms: 716_266}, %Video.TimedPoint{lat: 53.57232, lon: 10.044059, time_offset_ms: 716_599}, %Video.TimedPoint{lat: 53.572259, lon: 10.043954, time_offset_ms: 716_933}, %Video.TimedPoint{lat: 53.572223, lon: 10.043826, time_offset_ms: 717_267}, %Video.TimedPoint{lat: 53.572189, lon: 10.04369, time_offset_ms: 717_600}, %Video.TimedPoint{lat: 53.572159, lon: 10.043568, time_offset_ms: 717_934}, %Video.TimedPoint{lat: 53.572121, lon: 10.043421, time_offset_ms: 718_268}, %Video.TimedPoint{lat: 53.572087, lon: 10.043286, time_offset_ms: 718_601}, %Video.TimedPoint{lat: 53.572044, lon: 10.043134, time_offset_ms: 718_935}, %Video.TimedPoint{lat: 53.572006, lon: 10.043003, time_offset_ms: 719_269}, %Video.TimedPoint{lat: 53.571957, lon: 10.042862, time_offset_ms: 719_602}, %Video.TimedPoint{lat: 53.571915, lon: 10.042717, time_offset_ms: 719_936}, %Video.TimedPoint{lat: 53.571877, lon: 10.042579, time_offset_ms: 720_270}, %Video.TimedPoint{lat: 53.571834, lon: 10.042414, time_offset_ms: 720_603}, %Video.TimedPoint{lat: 53.571801, lon: 10.042282, time_offset_ms: 720_937}, %Video.TimedPoint{lat: 53.571771, lon: 10.042133, time_offset_ms: 721_271}, %Video.TimedPoint{lat: 53.57173, lon: 10.041988, time_offset_ms: 721_604}, %Video.TimedPoint{lat: 53.571692, lon: 10.041851, time_offset_ms: 721_938}, %Video.TimedPoint{lat: 53.57166, lon: 10.041722, time_offset_ms: 722_272}, %Video.TimedPoint{lat: 53.571619, lon: 10.041573, time_offset_ms: 722_605}, %Video.TimedPoint{lat: 53.57158, lon: 10.04144, time_offset_ms: 722_939}, %Video.TimedPoint{lat: 53.571539, lon: 10.041299, time_offset_ms: 723_273}, %Video.TimedPoint{lat: 53.571497, lon: 10.041145, time_offset_ms: 723_606}, %Video.TimedPoint{lat: 53.571467, lon: 10.041027, time_offset_ms: 723_940}, %Video.TimedPoint{lat: 53.571423, lon: 10.040861, time_offset_ms: 724_274}, %Video.TimedPoint{lat: 53.571388, lon: 10.040738, time_offset_ms: 724_607}, %Video.TimedPoint{lat: 53.571347, lon: 10.040598, time_offset_ms: 724_941}, %Video.TimedPoint{lat: 53.571308, lon: 10.040472, time_offset_ms: 725_275}, %Video.TimedPoint{lat: 53.571263, lon: 10.040345, time_offset_ms: 725_608}, %Video.TimedPoint{lat: 53.571223, lon: 10.040229, time_offset_ms: 725_942}, %Video.TimedPoint{lat: 53.571181, lon: 10.040118, time_offset_ms: 726_276}, %Video.TimedPoint{lat: 53.57114, lon: 10.040009, time_offset_ms: 726_609}, %Video.TimedPoint{lat: 53.571109, lon: 10.039924, time_offset_ms: 726_943}, %Video.TimedPoint{lat: 53.57109, lon: 10.039868, time_offset_ms: 727_277}, %Video.TimedPoint{lat: 53.571073, lon: 10.039816, time_offset_ms: 727_610}, %Video.TimedPoint{lat: 53.571045, lon: 10.03974, time_offset_ms: 727_944}, %Video.TimedPoint{lat: 53.57101, lon: 10.039662, time_offset_ms: 728_278}, %Video.TimedPoint{lat: 53.570966, lon: 10.039567, time_offset_ms: 728_611}, %Video.TimedPoint{lat: 53.57092, lon: 10.039463, time_offset_ms: 728_945}, %Video.TimedPoint{lat: 53.570876, lon: 10.039351, time_offset_ms: 729_279}, %Video.TimedPoint{lat: 53.570824, lon: 10.039223, time_offset_ms: 729_612}, %Video.TimedPoint{lat: 53.57078, lon: 10.039119, time_offset_ms: 729_946}, %Video.TimedPoint{lat: 53.570729, lon: 10.038984, time_offset_ms: 730_280}, %Video.TimedPoint{lat: 53.570679, lon: 10.038864, time_offset_ms: 730_613}, %Video.TimedPoint{lat: 53.570632, lon: 10.038773, time_offset_ms: 730_947}, %Video.TimedPoint{lat: 53.570577, lon: 10.038656, time_offset_ms: 731_281}, %Video.TimedPoint{lat: 53.570523, lon: 10.038536, time_offset_ms: 731_614}, %Video.TimedPoint{lat: 53.570466, lon: 10.038432, time_offset_ms: 731_948}, %Video.TimedPoint{lat: 53.570401, lon: 10.038315, time_offset_ms: 732_282}, %Video.TimedPoint{lat: 53.57035, lon: 10.038212, time_offset_ms: 732_615}, %Video.TimedPoint{lat: 53.570294, lon: 10.038095, time_offset_ms: 732_949}, %Video.TimedPoint{lat: 53.570241, lon: 10.037994, time_offset_ms: 733_283}, %Video.TimedPoint{lat: 53.57019, lon: 10.037893, time_offset_ms: 733_616}, %Video.TimedPoint{lat: 53.570145, lon: 10.037804, time_offset_ms: 733_950}, %Video.TimedPoint{lat: 53.570108, lon: 10.037724, time_offset_ms: 734_284}, %Video.TimedPoint{lat: 53.570078, lon: 10.037659, time_offset_ms: 734_617}, %Video.TimedPoint{lat: 53.570061, lon: 10.037615, time_offset_ms: 734_951}, %Video.TimedPoint{lat: 53.57004, lon: 10.037567, time_offset_ms: 735_285}, %Video.TimedPoint{lat: 53.570011, lon: 10.037514, time_offset_ms: 735_618}, %Video.TimedPoint{lat: 53.569965, lon: 10.037454, time_offset_ms: 735_952}, %Video.TimedPoint{lat: 53.569927, lon: 10.037403, time_offset_ms: 736_286}, %Video.TimedPoint{lat: 53.569891, lon: 10.037346, time_offset_ms: 736_619}, %Video.TimedPoint{lat: 53.569855, lon: 10.037284, time_offset_ms: 736_953}, %Video.TimedPoint{lat: 53.569808, lon: 10.037212, time_offset_ms: 737_287}, %Video.TimedPoint{lat: 53.569758, lon: 10.037119, time_offset_ms: 737_620}, %Video.TimedPoint{lat: 53.56971, lon: 10.03702, time_offset_ms: 737_954}, %Video.TimedPoint{lat: 53.569661, lon: 10.036924, time_offset_ms: 738_288}, %Video.TimedPoint{lat: 53.569611, lon: 10.036816, time_offset_ms: 738_621}, %Video.TimedPoint{lat: 53.569561, lon: 10.036699, time_offset_ms: 738_955}, %Video.TimedPoint{lat: 53.569511, lon: 10.036576, time_offset_ms: 739_289}, %Video.TimedPoint{lat: 53.569469, lon: 10.036469, time_offset_ms: 739_622}, %Video.TimedPoint{lat: 53.569415, lon: 10.03635, time_offset_ms: 739_956}, %Video.TimedPoint{lat: 53.569371, lon: 10.036232, time_offset_ms: 740_290}, %Video.TimedPoint{lat: 53.569319, lon: 10.036107, time_offset_ms: 740_623}, %Video.TimedPoint{lat: 53.569258, lon: 10.035978, time_offset_ms: 740_957}, %Video.TimedPoint{lat: 53.569202, lon: 10.035876, time_offset_ms: 741_291}, %Video.TimedPoint{lat: 53.569141, lon: 10.035769, time_offset_ms: 741_624}, %Video.TimedPoint{lat: 53.569085, lon: 10.03566, time_offset_ms: 741_958}, %Video.TimedPoint{lat: 53.569024, lon: 10.035546, time_offset_ms: 742_292}, %Video.TimedPoint{lat: 53.568969, lon: 10.035443, time_offset_ms: 742_625}, %Video.TimedPoint{lat: 53.568905, lon: 10.035325, time_offset_ms: 742_959}, %Video.TimedPoint{lat: 53.568848, lon: 10.035221, time_offset_ms: 743_293}, %Video.TimedPoint{lat: 53.568782, lon: 10.035097, time_offset_ms: 743_626}, %Video.TimedPoint{lat: 53.568716, lon: 10.034976, time_offset_ms: 743_960}, %Video.TimedPoint{lat: 53.568663, lon: 10.034872, time_offset_ms: 744_294}, %Video.TimedPoint{lat: 53.568604, lon: 10.034758, time_offset_ms: 744_627}, %Video.TimedPoint{lat: 53.568541, lon: 10.034636, time_offset_ms: 744_961}, %Video.TimedPoint{lat: 53.568484, lon: 10.03454, time_offset_ms: 745_295}, %Video.TimedPoint{lat: 53.568419, lon: 10.034441, time_offset_ms: 745_628}, %Video.TimedPoint{lat: 53.56836, lon: 10.034326, time_offset_ms: 745_962}, %Video.TimedPoint{lat: 53.568308, lon: 10.034218, time_offset_ms: 746_296}, %Video.TimedPoint{lat: 53.568247, lon: 10.034132, time_offset_ms: 746_629}, %Video.TimedPoint{lat: 53.568184, lon: 10.034027, time_offset_ms: 746_963}, %Video.TimedPoint{lat: 53.568136, lon: 10.03393, time_offset_ms: 747_297}, %Video.TimedPoint{lat: 53.568083, lon: 10.033832, time_offset_ms: 747_630}, %Video.TimedPoint{lat: 53.568032, lon: 10.033731, time_offset_ms: 747_964}, %Video.TimedPoint{lat: 53.567981, lon: 10.033632, time_offset_ms: 748_298}, %Video.TimedPoint{lat: 53.56792, lon: 10.033521, time_offset_ms: 748_631}, %Video.TimedPoint{lat: 53.567867, lon: 10.033422, time_offset_ms: 748_965}, %Video.TimedPoint{lat: 53.567812, lon: 10.033315, time_offset_ms: 749_299}, %Video.TimedPoint{lat: 53.567766, lon: 10.033224, time_offset_ms: 749_632}, %Video.TimedPoint{lat: 53.567707, lon: 10.033131, time_offset_ms: 749_966}, %Video.TimedPoint{lat: 53.567645, lon: 10.03303, time_offset_ms: 750_300}, %Video.TimedPoint{lat: 53.567589, lon: 10.032901, time_offset_ms: 750_633}, %Video.TimedPoint{lat: 53.567548, lon: 10.03279, time_offset_ms: 750_967}, %Video.TimedPoint{lat: 53.567481, lon: 10.032661, time_offset_ms: 751_301}, %Video.TimedPoint{lat: 53.567429, lon: 10.032568, time_offset_ms: 751_634}, %Video.TimedPoint{lat: 53.567366, lon: 10.032447, time_offset_ms: 751_968}, %Video.TimedPoint{lat: 53.56731, lon: 10.032339, time_offset_ms: 752_302}, %Video.TimedPoint{lat: 53.567245, lon: 10.032211, time_offset_ms: 752_635}, %Video.TimedPoint{lat: 53.567191, lon: 10.032105, time_offset_ms: 752_969}, %Video.TimedPoint{lat: 53.567131, lon: 10.031985, time_offset_ms: 753_303}, %Video.TimedPoint{lat: 53.567082, lon: 10.031875, time_offset_ms: 753_636}, %Video.TimedPoint{lat: 53.567026, lon: 10.031743, time_offset_ms: 753_970}, %Video.TimedPoint{lat: 53.56698, lon: 10.031656, time_offset_ms: 754_304}, %Video.TimedPoint{lat: 53.566941, lon: 10.031582, time_offset_ms: 754_637}, %Video.TimedPoint{lat: 53.56691, lon: 10.031506, time_offset_ms: 754_971}, %Video.TimedPoint{lat: 53.566898, lon: 10.031399, time_offset_ms: 755_305}, %Video.TimedPoint{lat: 53.566889, lon: 10.031304, time_offset_ms: 755_638}, %Video.TimedPoint{lat: 53.566881, lon: 10.031198, time_offset_ms: 755_972}, %Video.TimedPoint{lat: 53.566879, lon: 10.031088, time_offset_ms: 756_306}, %Video.TimedPoint{lat: 53.566886, lon: 10.030969, time_offset_ms: 756_639}, %Video.TimedPoint{lat: 53.566899, lon: 10.030842, time_offset_ms: 756_973}, %Video.TimedPoint{lat: 53.566925, lon: 10.030684, time_offset_ms: 757_307}, %Video.TimedPoint{lat: 53.566955, lon: 10.03055, time_offset_ms: 757_640}, %Video.TimedPoint{lat: 53.56699, lon: 10.030403, time_offset_ms: 757_974}, %Video.TimedPoint{lat: 53.567021, lon: 10.030255, time_offset_ms: 758_308}, %Video.TimedPoint{lat: 53.567054, lon: 10.030111, time_offset_ms: 758_641}, %Video.TimedPoint{lat: 53.567095, lon: 10.029943, time_offset_ms: 758_975}, %Video.TimedPoint{lat: 53.567128, lon: 10.029802, time_offset_ms: 759_309}, %Video.TimedPoint{lat: 53.567168, lon: 10.029624, time_offset_ms: 759_642}, %Video.TimedPoint{lat: 53.567198, lon: 10.029476, time_offset_ms: 759_976}, %Video.TimedPoint{lat: 53.567229, lon: 10.029327, time_offset_ms: 760_310}, %Video.TimedPoint{lat: 53.567239, lon: 10.029173, time_offset_ms: 760_643}, %Video.TimedPoint{lat: 53.567234, lon: 10.029025, time_offset_ms: 760_977}, %Video.TimedPoint{lat: 53.567224, lon: 10.028889, time_offset_ms: 761_311}, %Video.TimedPoint{lat: 53.567201, lon: 10.028741, time_offset_ms: 761_644}, %Video.TimedPoint{lat: 53.567184, lon: 10.028594, time_offset_ms: 761_978}, %Video.TimedPoint{lat: 53.567169, lon: 10.028458, time_offset_ms: 762_312}, %Video.TimedPoint{lat: 53.567154, lon: 10.028306, time_offset_ms: 762_645}, %Video.TimedPoint{lat: 53.567147, lon: 10.028162, time_offset_ms: 762_979}, %Video.TimedPoint{lat: 53.56714, lon: 10.028029, time_offset_ms: 763_313}, %Video.TimedPoint{lat: 53.567126, lon: 10.027863, time_offset_ms: 763_646}, %Video.TimedPoint{lat: 53.567119, lon: 10.027723, time_offset_ms: 763_980}, %Video.TimedPoint{lat: 53.56711, lon: 10.027581, time_offset_ms: 764_314}, %Video.TimedPoint{lat: 53.567093, lon: 10.027432, time_offset_ms: 764_647}, %Video.TimedPoint{lat: 53.56708, lon: 10.027293, time_offset_ms: 764_981}, %Video.TimedPoint{lat: 53.56707, lon: 10.027152, time_offset_ms: 765_315}, %Video.TimedPoint{lat: 53.567065, lon: 10.027046, time_offset_ms: 765_648}, %Video.TimedPoint{lat: 53.567021, lon: 10.026952, time_offset_ms: 765_982}, %Video.TimedPoint{lat: 53.566979, lon: 10.026898, time_offset_ms: 766_316}, %Video.TimedPoint{lat: 53.566933, lon: 10.026849, time_offset_ms: 766_649}, %Video.TimedPoint{lat: 53.566871, lon: 10.026786, time_offset_ms: 766_983}, %Video.TimedPoint{lat: 53.566814, lon: 10.026719, time_offset_ms: 767_317}, %Video.TimedPoint{lat: 53.566761, lon: 10.026656, time_offset_ms: 767_650}, %Video.TimedPoint{lat: 53.566704, lon: 10.026604, time_offset_ms: 767_984}, %Video.TimedPoint{lat: 53.566659, lon: 10.026562, time_offset_ms: 768_318}, %Video.TimedPoint{lat: 53.566629, lon: 10.02652, time_offset_ms: 768_651}, %Video.TimedPoint{lat: 53.566609, lon: 10.026476, time_offset_ms: 768_985}, %Video.TimedPoint{lat: 53.566593, lon: 10.02644, time_offset_ms: 769_319}, %Video.TimedPoint{lat: 53.566579, lon: 10.026414, time_offset_ms: 769_652}, %Video.TimedPoint{lat: 53.56656, lon: 10.026381, time_offset_ms: 769_986}, %Video.TimedPoint{lat: 53.566523, lon: 10.026339, time_offset_ms: 770_320}, %Video.TimedPoint{lat: 53.566494, lon: 10.026282, time_offset_ms: 770_653}, %Video.TimedPoint{lat: 53.566459, lon: 10.026195, time_offset_ms: 770_987}, %Video.TimedPoint{lat: 53.566428, lon: 10.0261, time_offset_ms: 771_321}, %Video.TimedPoint{lat: 53.566397, lon: 10.025996, time_offset_ms: 771_654}, %Video.TimedPoint{lat: 53.566367, lon: 10.025912, time_offset_ms: 771_988}, %Video.TimedPoint{lat: 53.566324, lon: 10.025817, time_offset_ms: 772_322}, %Video.TimedPoint{lat: 53.566278, lon: 10.025746, time_offset_ms: 772_655}, %Video.TimedPoint{lat: 53.566226, lon: 10.025655, time_offset_ms: 772_989}, %Video.TimedPoint{lat: 53.566169, lon: 10.025566, time_offset_ms: 773_323}, %Video.TimedPoint{lat: 53.566115, lon: 10.025494, time_offset_ms: 773_656}, %Video.TimedPoint{lat: 53.566064, lon: 10.025428, time_offset_ms: 773_990}, %Video.TimedPoint{lat: 53.566006, lon: 10.025363, time_offset_ms: 774_324}, %Video.TimedPoint{lat: 53.565963, lon: 10.025278, time_offset_ms: 774_657}, %Video.TimedPoint{lat: 53.565936, lon: 10.025171, time_offset_ms: 774_991}, %Video.TimedPoint{lat: 53.565926, lon: 10.025068, time_offset_ms: 775_325}, %Video.TimedPoint{lat: 53.565924, lon: 10.024956, time_offset_ms: 775_658}, %Video.TimedPoint{lat: 53.565937, lon: 10.024866, time_offset_ms: 775_992}, %Video.TimedPoint{lat: 53.56595, lon: 10.024772, time_offset_ms: 776_326}, %Video.TimedPoint{lat: 53.565952, lon: 10.024666, time_offset_ms: 776_659}, %Video.TimedPoint{lat: 53.565954, lon: 10.024518, time_offset_ms: 776_993}, %Video.TimedPoint{lat: 53.565961, lon: 10.02438, time_offset_ms: 777_327}, %Video.TimedPoint{lat: 53.565967, lon: 10.024252, time_offset_ms: 777_660}, %Video.TimedPoint{lat: 53.565975, lon: 10.024161, time_offset_ms: 777_994}, %Video.TimedPoint{lat: 53.56599, lon: 10.024045, time_offset_ms: 778_328}, %Video.TimedPoint{lat: 53.566003, lon: 10.023961, time_offset_ms: 778_661}, %Video.TimedPoint{lat: 53.566016, lon: 10.023876, time_offset_ms: 778_995}, %Video.TimedPoint{lat: 53.566035, lon: 10.023807, time_offset_ms: 779_329}, %Video.TimedPoint{lat: 53.566067, lon: 10.023736, time_offset_ms: 779_662}, %Video.TimedPoint{lat: 53.566099, lon: 10.023676, time_offset_ms: 779_996}, %Video.TimedPoint{lat: 53.566122, lon: 10.023611, time_offset_ms: 780_330}, %Video.TimedPoint{lat: 53.566128, lon: 10.023528, time_offset_ms: 780_663}, %Video.TimedPoint{lat: 53.566128, lon: 10.023406, time_offset_ms: 780_997}, %Video.TimedPoint{lat: 53.566125, lon: 10.023299, time_offset_ms: 781_331}, %Video.TimedPoint{lat: 53.566123, lon: 10.023177, time_offset_ms: 781_664}, %Video.TimedPoint{lat: 53.566126, lon: 10.023055, time_offset_ms: 781_998}, %Video.TimedPoint{lat: 53.566134, lon: 10.022934, time_offset_ms: 782_332}, %Video.TimedPoint{lat: 53.566144, lon: 10.022809, time_offset_ms: 782_665}, %Video.TimedPoint{lat: 53.566142, lon: 10.022678, time_offset_ms: 782_999}, %Video.TimedPoint{lat: 53.566144, lon: 10.022568, time_offset_ms: 783_333}, %Video.TimedPoint{lat: 53.566148, lon: 10.022438, time_offset_ms: 783_666}, %Video.TimedPoint{lat: 53.566158, lon: 10.02231, time_offset_ms: 784_000}, %Video.TimedPoint{lat: 53.56615, lon: 10.022162, time_offset_ms: 784_334}, %Video.TimedPoint{lat: 53.566145, lon: 10.022033, time_offset_ms: 784_667}, %Video.TimedPoint{lat: 53.566135, lon: 10.021892, time_offset_ms: 785_001}, %Video.TimedPoint{lat: 53.566131, lon: 10.021748, time_offset_ms: 785_335}, %Video.TimedPoint{lat: 53.566122, lon: 10.021607, time_offset_ms: 785_668}, %Video.TimedPoint{lat: 53.566109, lon: 10.021465, time_offset_ms: 786_002}, %Video.TimedPoint{lat: 53.566102, lon: 10.021328, time_offset_ms: 786_336}, %Video.TimedPoint{lat: 53.566117, lon: 10.021214, time_offset_ms: 786_669}, %Video.TimedPoint{lat: 53.566156, lon: 10.021103, time_offset_ms: 787_003}, %Video.TimedPoint{lat: 53.566189, lon: 10.021003, time_offset_ms: 787_337}, %Video.TimedPoint{lat: 53.566215, lon: 10.020879, time_offset_ms: 787_670}, %Video.TimedPoint{lat: 53.566222, lon: 10.020745, time_offset_ms: 788_004}, %Video.TimedPoint{lat: 53.566194, lon: 10.020613, time_offset_ms: 788_338}, %Video.TimedPoint{lat: 53.566139, lon: 10.020509, time_offset_ms: 788_671}, %Video.TimedPoint{lat: 53.566077, lon: 10.020409, time_offset_ms: 789_005}, %Video.TimedPoint{lat: 53.566029, lon: 10.020326, time_offset_ms: 789_339}, %Video.TimedPoint{lat: 53.565978, lon: 10.02025, time_offset_ms: 789_672}, %Video.TimedPoint{lat: 53.565941, lon: 10.020187, time_offset_ms: 790_006}, %Video.TimedPoint{lat: 53.56593357784431, lon: 10.020174964071856, time_offset_ms: 790_073}, %Video.TimedPoint{lat: 53.56596037125748, lon: 10.020164353293413, time_offset_ms: 790_158}, %Video.TimedPoint{lat: 53.565946, lon: 10.020141, time_offset_ms: 790_258}, %Video.TimedPoint{lat: 53.565901, lon: 10.020069, time_offset_ms: 790_591}, %Video.TimedPoint{lat: 53.565872, lon: 10.020018, time_offset_ms: 790_925}, %Video.TimedPoint{lat: 53.565857, lon: 10.019989, time_offset_ms: 791_258}, %Video.TimedPoint{lat: 53.565843, lon: 10.01997, time_offset_ms: 791_592}, %Video.TimedPoint{lat: 53.56583979041916, lon: 10.019957161676647, time_offset_ms: 791_726}, %Video.TimedPoint{lat: 53.565854, lon: 10.019839, time_offset_ms: 791_811}, %Video.TimedPoint{lat: 53.565868, lon: 10.019834, time_offset_ms: 792_145}, %Video.TimedPoint{lat: 53.565903, lon: 10.01983, time_offset_ms: 792_478}, %Video.TimedPoint{lat: 53.565945, lon: 10.019818, time_offset_ms: 792_812}, %Video.TimedPoint{lat: 53.565987, lon: 10.019783, time_offset_ms: 793_145}, %Video.TimedPoint{lat: 53.566039, lon: 10.019739, time_offset_ms: 793_479}, %Video.TimedPoint{lat: 53.566088, lon: 10.019692, time_offset_ms: 793_813}, %Video.TimedPoint{lat: 53.566116, lon: 10.019664, time_offset_ms: 794_146}, %Video.TimedPoint{lat: 53.56612121556886, lon: 10.019655976047904, time_offset_ms: 794_280}, %Video.TimedPoint{lat: 53.566171, lon: 10.019607, time_offset_ms: 794_365}, %Video.TimedPoint{lat: 53.566164, lon: 10.019596, time_offset_ms: 794_699}, %Video.TimedPoint{lat: 53.566146, lon: 10.019543, time_offset_ms: 795_032}, %Video.TimedPoint{lat: 53.566117, lon: 10.019481, time_offset_ms: 795_366}, %Video.TimedPoint{lat: 53.566085, lon: 10.019409, time_offset_ms: 795_699}, %Video.TimedPoint{lat: 53.566065, lon: 10.01931, time_offset_ms: 796_033}, %Video.TimedPoint{lat: 53.566047, lon: 10.019193, time_offset_ms: 796_367}, %Video.TimedPoint{lat: 53.566037, lon: 10.01906, time_offset_ms: 796_700}, %Video.TimedPoint{lat: 53.566036, lon: 10.018922, time_offset_ms: 797_034}, %Video.TimedPoint{lat: 53.56604, lon: 10.018765, time_offset_ms: 797_367}, %Video.TimedPoint{lat: 53.566037, lon: 10.018597, time_offset_ms: 797_701}, %Video.TimedPoint{lat: 53.566037, lon: 10.018434, time_offset_ms: 798_034}, %Video.TimedPoint{lat: 53.566034, lon: 10.018271, time_offset_ms: 798_368}, %Video.TimedPoint{lat: 53.566031, lon: 10.018114, time_offset_ms: 798_702}, %Video.TimedPoint{lat: 53.566053, lon: 10.017971, time_offset_ms: 799_035}, %Video.TimedPoint{lat: 53.566072, lon: 10.017826, time_offset_ms: 799_369}, %Video.TimedPoint{lat: 53.566086, lon: 10.017673, time_offset_ms: 799_702}, %Video.TimedPoint{lat: 53.566094, lon: 10.017524, time_offset_ms: 800_036}, %Video.TimedPoint{lat: 53.566103, lon: 10.017378, time_offset_ms: 800_370}, %Video.TimedPoint{lat: 53.566104, lon: 10.017234, time_offset_ms: 800_703}, %Video.TimedPoint{lat: 53.566123, lon: 10.017119, time_offset_ms: 801_037}, %Video.TimedPoint{lat: 53.566118, lon: 10.017053, time_offset_ms: 801_370}, %Video.TimedPoint{lat: 53.566108, lon: 10.017024, time_offset_ms: 801_704}, %Video.TimedPoint{lat: 53.566034, lon: 10.017009, time_offset_ms: 801_789}, %Video.TimedPoint{lat: 53.566022, lon: 10.016989, time_offset_ms: 802_123}, %Video.TimedPoint{lat: 53.566012, lon: 10.016927, time_offset_ms: 802_456}, %Video.TimedPoint{lat: 53.566003, lon: 10.016844, time_offset_ms: 802_790}, %Video.TimedPoint{lat: 53.565972, lon: 10.016786, time_offset_ms: 803_123}, %Video.TimedPoint{lat: 53.565915, lon: 10.016781, time_offset_ms: 803_457}, %Video.TimedPoint{lat: 53.565842, lon: 10.01678, time_offset_ms: 803_791}, %Video.TimedPoint{lat: 53.565762, lon: 10.016779, time_offset_ms: 804_124}, %Video.TimedPoint{lat: 53.565675, lon: 10.016776, time_offset_ms: 804_458}, %Video.TimedPoint{lat: 53.565587, lon: 10.016784, time_offset_ms: 804_791}, %Video.TimedPoint{lat: 53.565501, lon: 10.016804, time_offset_ms: 805_125}, %Video.TimedPoint{lat: 53.56541, lon: 10.016813, time_offset_ms: 805_459}, %Video.TimedPoint{lat: 53.565312, lon: 10.016813, time_offset_ms: 805_792}, %Video.TimedPoint{lat: 53.5653021257485, lon: 10.016812389221558, time_offset_ms: 805_826}, %Video.TimedPoint{lat: 53.56525224550898, lon: 10.016747502994013, time_offset_ms: 805_911}, %Video.TimedPoint{lat: 53.565199, lon: 10.016744, time_offset_ms: 806_145}, %Video.TimedPoint{lat: 53.565118, lon: 10.016737, time_offset_ms: 806_479}, %Video.TimedPoint{lat: 53.565033, lon: 10.01671, time_offset_ms: 806_812}, %Video.TimedPoint{lat: 53.564943, lon: 10.016686, time_offset_ms: 807_146}, %Video.TimedPoint{lat: 53.564848, lon: 10.01667, time_offset_ms: 807_480}, %Video.TimedPoint{lat: 53.564753, lon: 10.016655, time_offset_ms: 807_813}, %Video.TimedPoint{lat: 53.564655, lon: 10.016639, time_offset_ms: 808_147}, %Video.TimedPoint{lat: 53.564556, lon: 10.016617, time_offset_ms: 808_481}, %Video.TimedPoint{lat: 53.564457, lon: 10.016592, time_offset_ms: 808_814}, %Video.TimedPoint{lat: 53.564359, lon: 10.016558, time_offset_ms: 809_148}, %Video.TimedPoint{lat: 53.564259, lon: 10.016517, time_offset_ms: 809_482}, %Video.TimedPoint{lat: 53.564167, lon: 10.01647, time_offset_ms: 809_815}, %Video.TimedPoint{lat: 53.564072, lon: 10.016411, time_offset_ms: 810_149}, %Video.TimedPoint{lat: 53.563982, lon: 10.016347, time_offset_ms: 810_483}, %Video.TimedPoint{lat: 53.563896, lon: 10.016278, time_offset_ms: 810_816}, %Video.TimedPoint{lat: 53.563814, lon: 10.016206, time_offset_ms: 811_150}, %Video.TimedPoint{lat: 53.563734, lon: 10.016132, time_offset_ms: 811_484}, %Video.TimedPoint{lat: 53.563655, lon: 10.016059, time_offset_ms: 811_817}, %Video.TimedPoint{lat: 53.563584, lon: 10.015972, time_offset_ms: 812_151}, %Video.TimedPoint{lat: 53.563522, lon: 10.015862, time_offset_ms: 812_485}, %Video.TimedPoint{lat: 53.563456, lon: 10.015758, time_offset_ms: 812_818}, %Video.TimedPoint{lat: 53.56339, lon: 10.01566, time_offset_ms: 813_152}, %Video.TimedPoint{lat: 53.56332, lon: 10.015559, time_offset_ms: 813_486}, %Video.TimedPoint{lat: 53.56325, lon: 10.015453, time_offset_ms: 813_819}, %Video.TimedPoint{lat: 53.563178, lon: 10.015355, time_offset_ms: 814_153}, %Video.TimedPoint{lat: 53.563104, lon: 10.015255, time_offset_ms: 814_487}, %Video.TimedPoint{lat: 53.563028, lon: 10.015158, time_offset_ms: 814_820}, %Video.TimedPoint{lat: 53.562952, lon: 10.015075, time_offset_ms: 815_154}, %Video.TimedPoint{lat: 53.562876, lon: 10.014996, time_offset_ms: 815_488}, %Video.TimedPoint{lat: 53.562796, lon: 10.014915, time_offset_ms: 815_821}, %Video.TimedPoint{lat: 53.562719, lon: 10.014821, time_offset_ms: 816_155}, %Video.TimedPoint{lat: 53.562639, lon: 10.014738, time_offset_ms: 816_489}, %Video.TimedPoint{lat: 53.56255, lon: 10.014667, time_offset_ms: 816_822}, %Video.TimedPoint{lat: 53.562464, lon: 10.014594, time_offset_ms: 817_156}, %Video.TimedPoint{lat: 53.562375, lon: 10.014518, time_offset_ms: 817_490}, %Video.TimedPoint{lat: 53.562286, lon: 10.014441, time_offset_ms: 817_823}, %Video.TimedPoint{lat: 53.562197, lon: 10.01436, time_offset_ms: 818_157}, %Video.TimedPoint{lat: 53.562105, lon: 10.014278, time_offset_ms: 818_491}, %Video.TimedPoint{lat: 53.562017, lon: 10.014188, time_offset_ms: 818_824}, %Video.TimedPoint{lat: 53.56193, lon: 10.014091, time_offset_ms: 819_158}, %Video.TimedPoint{lat: 53.561847, lon: 10.01399, time_offset_ms: 819_492}, %Video.TimedPoint{ lat: 53.561791024024025, lon: 10.013927726726727, time_offset_ms: 819_725 }, %Video.TimedPoint{lat: 53.561782, lon: 10.0139385, time_offset_ms: 819_810}, %Video.TimedPoint{lat: 53.561743, lon: 10.013902, time_offset_ms: 819_977}, %Video.TimedPoint{lat: 53.561658, lon: 10.013842, time_offset_ms: 820_311}, %Video.TimedPoint{lat: 53.561581, lon: 10.013767, time_offset_ms: 820_644}, %Video.TimedPoint{lat: 53.561513, lon: 10.013681, time_offset_ms: 820_978}, %Video.TimedPoint{lat: 53.561447, lon: 10.013589, time_offset_ms: 821_312}, %Video.TimedPoint{lat: 53.56138, lon: 10.013493, time_offset_ms: 821_645}, %Video.TimedPoint{lat: 53.56131, lon: 10.013405, time_offset_ms: 821_979}, %Video.TimedPoint{lat: 53.561233, lon: 10.013324, time_offset_ms: 822_313}, %Video.TimedPoint{lat: 53.561161, lon: 10.013225, time_offset_ms: 822_646}, %Video.TimedPoint{lat: 53.561092, lon: 10.013124, time_offset_ms: 822_980}, %Video.TimedPoint{lat: 53.56103, lon: 10.013004, time_offset_ms: 823_314}, %Video.TimedPoint{lat: 53.560963, lon: 10.012891, time_offset_ms: 823_647}, %Video.TimedPoint{lat: 53.560887, lon: 10.012784, time_offset_ms: 823_981}, %Video.TimedPoint{lat: 53.560813, lon: 10.012678, time_offset_ms: 824_315}, %Video.TimedPoint{lat: 53.560747, lon: 10.012566, time_offset_ms: 824_648}, %Video.TimedPoint{lat: 53.560682, lon: 10.012444, time_offset_ms: 824_982}, %Video.TimedPoint{lat: 53.560623, lon: 10.012321, time_offset_ms: 825_316}, %Video.TimedPoint{lat: 53.560558, lon: 10.012201, time_offset_ms: 825_649}, %Video.TimedPoint{lat: 53.560504, lon: 10.012064, time_offset_ms: 825_983}, %Video.TimedPoint{lat: 53.560477, lon: 10.011931, time_offset_ms: 826_317}, %Video.TimedPoint{lat: 53.560467, lon: 10.011799, time_offset_ms: 826_650}, %Video.TimedPoint{lat: 53.560465, lon: 10.011658, time_offset_ms: 826_984}, %Video.TimedPoint{lat: 53.560479, lon: 10.011529, time_offset_ms: 827_318}, %Video.TimedPoint{lat: 53.560483, lon: 10.011402, time_offset_ms: 827_651}, %Video.TimedPoint{lat: 53.560463, lon: 10.011272, time_offset_ms: 827_985}, %Video.TimedPoint{lat: 53.560433, lon: 10.011153, time_offset_ms: 828_319}, %Video.TimedPoint{lat: 53.560399, lon: 10.011037, time_offset_ms: 828_652}, %Video.TimedPoint{lat: 53.560353, lon: 10.010912, time_offset_ms: 828_986}, %Video.TimedPoint{lat: 53.560309, lon: 10.010794, time_offset_ms: 829_320}, %Video.TimedPoint{lat: 53.560259, lon: 10.010673, time_offset_ms: 829_653}, %Video.TimedPoint{lat: 53.560205, lon: 10.010549, time_offset_ms: 829_987}, %Video.TimedPoint{lat: 53.560147, lon: 10.010432, time_offset_ms: 830_321}, %Video.TimedPoint{lat: 53.560088, lon: 10.010308, time_offset_ms: 830_654}, %Video.TimedPoint{lat: 53.560034, lon: 10.010185, time_offset_ms: 830_988}, %Video.TimedPoint{lat: 53.559978, lon: 10.010066, time_offset_ms: 831_322}, %Video.TimedPoint{lat: 53.559921, lon: 10.009946, time_offset_ms: 831_655}, %Video.TimedPoint{lat: 53.559861, lon: 10.009823, time_offset_ms: 831_989}, %Video.TimedPoint{lat: 53.559805, lon: 10.009708, time_offset_ms: 832_323}, %Video.TimedPoint{lat: 53.559747, lon: 10.009596, time_offset_ms: 832_656}, %Video.TimedPoint{lat: 53.559686, lon: 10.009474, time_offset_ms: 832_990}, %Video.TimedPoint{lat: 53.559619, lon: 10.009345, time_offset_ms: 833_324}, %Video.TimedPoint{lat: 53.559554, lon: 10.009218, time_offset_ms: 833_657}, %Video.TimedPoint{lat: 53.559491, lon: 10.009106, time_offset_ms: 833_991}, %Video.TimedPoint{lat: 53.559426, lon: 10.008986, time_offset_ms: 834_325}, %Video.TimedPoint{lat: 53.559364, lon: 10.008861, time_offset_ms: 834_658}, %Video.TimedPoint{lat: 53.559302, lon: 10.008735, time_offset_ms: 834_992}, %Video.TimedPoint{lat: 53.559241, lon: 10.008609, time_offset_ms: 835_325}, %Video.TimedPoint{lat: 53.559193, lon: 10.00848, time_offset_ms: 835_659}, %Video.TimedPoint{lat: 53.559149, lon: 10.008359, time_offset_ms: 835_993}, %Video.TimedPoint{lat: 53.559106, lon: 10.008241, time_offset_ms: 836_326}, %Video.TimedPoint{lat: 53.559053, lon: 10.008104, time_offset_ms: 836_660}, %Video.TimedPoint{lat: 53.558999, lon: 10.007973, time_offset_ms: 836_994}, %Video.TimedPoint{lat: 53.558947, lon: 10.007844, time_offset_ms: 837_327}, %Video.TimedPoint{lat: 53.558897, lon: 10.007713, time_offset_ms: 837_661}, %Video.TimedPoint{lat: 53.55885, lon: 10.007581, time_offset_ms: 837_995}, %Video.TimedPoint{lat: 53.558806, lon: 10.007462, time_offset_ms: 838_328}, %Video.TimedPoint{lat: 53.558756, lon: 10.007344, time_offset_ms: 838_662}, %Video.TimedPoint{lat: 53.558708, lon: 10.007206, time_offset_ms: 838_996}, %Video.TimedPoint{lat: 53.558664, lon: 10.007073, time_offset_ms: 839_329}, %Video.TimedPoint{lat: 53.558619, lon: 10.006938, time_offset_ms: 839_663}, %Video.TimedPoint{lat: 53.558567, lon: 10.006804, time_offset_ms: 839_997}, %Video.TimedPoint{lat: 53.558512, lon: 10.006671, time_offset_ms: 840_330}, %Video.TimedPoint{lat: 53.558463, lon: 10.006543, time_offset_ms: 840_664}, %Video.TimedPoint{lat: 53.558408, lon: 10.006418, time_offset_ms: 840_998}, %Video.TimedPoint{lat: 53.558354, lon: 10.006303, time_offset_ms: 841_331}, %Video.TimedPoint{lat: 53.558288, lon: 10.006208, time_offset_ms: 841_665}, %Video.TimedPoint{lat: 53.558239, lon: 10.006098, time_offset_ms: 841_999}, %Video.TimedPoint{lat: 53.5582, lon: 10.005972, time_offset_ms: 842_332}, %Video.TimedPoint{lat: 53.558173, lon: 10.005833, time_offset_ms: 842_666}, %Video.TimedPoint{lat: 53.558136, lon: 10.005704, time_offset_ms: 843_000}, %Video.TimedPoint{lat: 53.558091, lon: 10.005578, time_offset_ms: 843_333}, %Video.TimedPoint{lat: 53.558044, lon: 10.005455, time_offset_ms: 843_667}, %Video.TimedPoint{lat: 53.558019, lon: 10.005329, time_offset_ms: 844_001}, %Video.TimedPoint{lat: 53.557985, lon: 10.005194, time_offset_ms: 844_334}, %Video.TimedPoint{lat: 53.557941, lon: 10.005069, time_offset_ms: 844_668}, %Video.TimedPoint{lat: 53.557895, lon: 10.004942, time_offset_ms: 845_002}, %Video.TimedPoint{lat: 53.55785, lon: 10.004816, time_offset_ms: 845_335}, %Video.TimedPoint{lat: 53.557802, lon: 10.004698, time_offset_ms: 845_669}, %Video.TimedPoint{lat: 53.557765, lon: 10.004587, time_offset_ms: 846_003}, %Video.TimedPoint{lat: 53.557725, lon: 10.004473, time_offset_ms: 846_336}, %Video.TimedPoint{lat: 53.557682, lon: 10.004355, time_offset_ms: 846_670}, %Video.TimedPoint{lat: 53.557645, lon: 10.004257, time_offset_ms: 847_004}, %Video.TimedPoint{lat: 53.557605, lon: 10.004151, time_offset_ms: 847_337}, %Video.TimedPoint{lat: 53.557573, lon: 10.004045, time_offset_ms: 847_671}, %Video.TimedPoint{lat: 53.557548, lon: 10.003942, time_offset_ms: 848_005}, %Video.TimedPoint{lat: 53.557527, lon: 10.003824, time_offset_ms: 848_338}, %Video.TimedPoint{lat: 53.557508, lon: 10.003701, time_offset_ms: 848_672}, %Video.TimedPoint{lat: 53.557493, lon: 10.003579, time_offset_ms: 849_006}, %Video.TimedPoint{lat: 53.557483, lon: 10.003456, time_offset_ms: 849_339}, %Video.TimedPoint{lat: 53.55748, lon: 10.003343, time_offset_ms: 849_673}, %Video.TimedPoint{lat: 53.557474, lon: 10.00324, time_offset_ms: 850_007}, %Video.TimedPoint{lat: 53.55747, lon: 10.003143, time_offset_ms: 850_340}, %Video.TimedPoint{lat: 53.557466, lon: 10.003046, time_offset_ms: 850_674}, %Video.TimedPoint{lat: 53.557463, lon: 10.002945, time_offset_ms: 851_008}, %Video.TimedPoint{lat: 53.55746, lon: 10.002843, time_offset_ms: 851_341}, %Video.TimedPoint{lat: 53.557456, lon: 10.00274, time_offset_ms: 851_675}, %Video.TimedPoint{lat: 53.557458, lon: 10.002632, time_offset_ms: 852_009}, %Video.TimedPoint{lat: 53.557456, lon: 10.002531, time_offset_ms: 852_342}, %Video.TimedPoint{lat: 53.557454, lon: 10.00244, time_offset_ms: 852_676}, %Video.TimedPoint{lat: 53.557448, lon: 10.002354, time_offset_ms: 853_010}, %Video.TimedPoint{lat: 53.557435, lon: 10.00229, time_offset_ms: 853_343}, %Video.TimedPoint{lat: 53.557417, lon: 10.002261, time_offset_ms: 853_677}, %Video.TimedPoint{lat: 53.557382, lon: 10.002219, time_offset_ms: 853_762}, %Video.TimedPoint{lat: 53.557371, lon: 10.002215, time_offset_ms: 854_096}, %Video.TimedPoint{lat: 53.557331, lon: 10.002204, time_offset_ms: 854_429}, %Video.TimedPoint{lat: 53.557269, lon: 10.002194, time_offset_ms: 854_763}, %Video.TimedPoint{lat: 53.557194, lon: 10.002159, time_offset_ms: 855_097}, %Video.TimedPoint{lat: 53.557116, lon: 10.002115, time_offset_ms: 855_430}, %Video.TimedPoint{lat: 53.55705, lon: 10.002036, time_offset_ms: 855_764}, %Video.TimedPoint{lat: 53.556993, lon: 10.001933, time_offset_ms: 856_098}, %Video.TimedPoint{lat: 53.556922, lon: 10.00185, time_offset_ms: 856_431}, %Video.TimedPoint{lat: 53.556856, lon: 10.001734, time_offset_ms: 856_765}, %Video.TimedPoint{lat: 53.556796, lon: 10.001602, time_offset_ms: 857_099}, %Video.TimedPoint{lat: 53.55674, lon: 10.001458, time_offset_ms: 857_432}, %Video.TimedPoint{lat: 53.556695, lon: 10.001316, time_offset_ms: 857_766}, %Video.TimedPoint{lat: 53.556651, lon: 10.001212, time_offset_ms: 858_099}, %Video.TimedPoint{lat: 53.556615, lon: 10.001163, time_offset_ms: 858_433}, %Video.TimedPoint{lat: 53.556588, lon: 10.001062, time_offset_ms: 858_767}, %Video.TimedPoint{lat: 53.556531, lon: 10.00094, time_offset_ms: 859_100}, %Video.TimedPoint{lat: 53.55647, lon: 10.000848, time_offset_ms: 859_434}, %Video.TimedPoint{lat: 53.556442, lon: 10.000798, time_offset_ms: 859_768}, %Video.TimedPoint{lat: 53.556394, lon: 10.00071, time_offset_ms: 859_853}, %Video.TimedPoint{lat: 53.556379, lon: 10.000703, time_offset_ms: 860_187}, %Video.TimedPoint{lat: 53.55633, lon: 10.000709, time_offset_ms: 860_520}, %Video.TimedPoint{lat: 53.556263, lon: 10.000714, time_offset_ms: 860_854}, %Video.TimedPoint{lat: 53.556194, lon: 10.000701, time_offset_ms: 861_188}, %Video.TimedPoint{lat: 53.556132, lon: 10.000673, time_offset_ms: 861_521}, %Video.TimedPoint{lat: 53.556082, lon: 10.000653, time_offset_ms: 861_855}, %Video.TimedPoint{lat: 53.555989, lon: 10.000579, time_offset_ms: 861_940}, %Video.TimedPoint{lat: 53.555978, lon: 10.000574, time_offset_ms: 862_274}, %Video.TimedPoint{lat: 53.555936, lon: 10.00056, time_offset_ms: 862_607}, %Video.TimedPoint{lat: 53.555874, lon: 10.000531, time_offset_ms: 862_941}, %Video.TimedPoint{lat: 53.555806, lon: 10.000492, time_offset_ms: 863_275}, %Video.TimedPoint{lat: 53.555732, lon: 10.000441, time_offset_ms: 863_608}, %Video.TimedPoint{lat: 53.55566080538922, lon: 10.000391434131737, time_offset_ms: 863_909} ] end @impl Video.Rendered def(rendered?()) do true end end
80.378178
98
0.705265
7969b1369e1f32429a27b171d65a3e42dd5ab366
507
ex
Elixir
lib/slipstream/events/reply_received.ex
fhunleth/slipstream
cebd924384b93b7dd3c1aa6ae2ac8d237e942f18
[ "Apache-2.0" ]
63
2021-02-10T16:18:11.000Z
2022-03-18T11:06:44.000Z
lib/slipstream/events/reply_received.ex
fhunleth/slipstream
cebd924384b93b7dd3c1aa6ae2ac8d237e942f18
[ "Apache-2.0" ]
21
2021-01-30T21:00:06.000Z
2021-12-27T04:27:15.000Z
lib/slipstream/events/reply_received.ex
fhunleth/slipstream
cebd924384b93b7dd3c1aa6ae2ac8d237e942f18
[ "Apache-2.0" ]
6
2021-02-26T23:56:49.000Z
2022-03-26T09:28:13.000Z
defmodule Slipstream.Events.ReplyReceived do @moduledoc false # a message that says that a push from the client has been replied-to by # the server defstruct [:topic, :reply, :ref] def to_reply(%{"status" => status, "response" => response}) when status in ["ok", "error"] and map_size(response) == 0 do String.to_atom(status) end def to_reply(%{"status" => status, "response" => response}) when status in ["ok", "error"] do {String.to_atom(status), response} end end
26.684211
74
0.662722
7969b27c7adde7e7aa1e3426f2f09b639b668673
417
exs
Elixir
priv/repo/migrations/20210417155728_create_balances.exs
mcintyre94/CentralTipsBot
626145478d3516493e72d271b045d1f19275fef5
[ "MIT" ]
null
null
null
priv/repo/migrations/20210417155728_create_balances.exs
mcintyre94/CentralTipsBot
626145478d3516493e72d271b045d1f19275fef5
[ "MIT" ]
null
null
null
priv/repo/migrations/20210417155728_create_balances.exs
mcintyre94/CentralTipsBot
626145478d3516493e72d271b045d1f19275fef5
[ "MIT" ]
null
null
null
defmodule Centraltipsbot.Repo.Migrations.CreateBalances do use Ecto.Migration def change do create table(:balances, primary_key: false) do add :id, :binary_id, primary_key: true add :source, :string add :source_id, :string add :balance, :decimal timestamps() end create unique_index(:balances, [:source, :source_id], name: :balances_unique_source_source_id) end end
24.529412
98
0.70024
7969bac4031d2deff9fcedbf10397126e6e0eb6c
6,515
ex
Elixir
clients/network_management/lib/google_api/network_management/v1/model/policy.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
1
2021-12-20T03:40:53.000Z
2021-12-20T03:40:53.000Z
clients/network_management/lib/google_api/network_management/v1/model/policy.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
1
2020-08-18T00:11:23.000Z
2020-08-18T00:44:16.000Z
clients/network_management/lib/google_api/network_management/v1/model/policy.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed 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 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This file is auto generated by the elixir code generator program. # Do not edit this file manually. defmodule GoogleApi.NetworkManagement.V1.Model.Policy do @moduledoc """ An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:[email protected]", "group:[email protected]", "domain:google.com", "serviceAccount:[email protected]" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:[email protected]" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). ## Attributes * `auditConfigs` (*type:* `list(GoogleApi.NetworkManagement.V1.Model.AuditConfig.t)`, *default:* `nil`) - Specifies cloud audit logging configuration for this policy. * `bindings` (*type:* `list(GoogleApi.NetworkManagement.V1.Model.Binding.t)`, *default:* `nil`) - Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. * `etag` (*type:* `String.t`, *default:* `nil`) - `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. * `version` (*type:* `integer()`, *default:* `nil`) - Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :auditConfigs => list(GoogleApi.NetworkManagement.V1.Model.AuditConfig.t()) | nil, :bindings => list(GoogleApi.NetworkManagement.V1.Model.Binding.t()) | nil, :etag => String.t() | nil, :version => integer() | nil } field(:auditConfigs, as: GoogleApi.NetworkManagement.V1.Model.AuditConfig, type: :list) field(:bindings, as: GoogleApi.NetworkManagement.V1.Model.Binding, type: :list) field(:etag) field(:version) end defimpl Poison.Decoder, for: GoogleApi.NetworkManagement.V1.Model.Policy do def decode(value, options) do GoogleApi.NetworkManagement.V1.Model.Policy.decode(value, options) end end defimpl Poison.Encoder, for: GoogleApi.NetworkManagement.V1.Model.Policy do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) end end
116.339286
2,012
0.753952
7969d62f0dfe095b241db719c0c3130b765e9770
408
exs
Elixir
priv/templates/model/migration.exs
scrogson/phoenix
e5745b9360fa1163246eb507490f1ce760cc0219
[ "MIT" ]
null
null
null
priv/templates/model/migration.exs
scrogson/phoenix
e5745b9360fa1163246eb507490f1ce760cc0219
[ "MIT" ]
null
null
null
priv/templates/model/migration.exs
scrogson/phoenix
e5745b9360fa1163246eb507490f1ce760cc0219
[ "MIT" ]
null
null
null
defmodule <%= base %>.Repo.Migrations.Create<%= scoped %> do use Ecto.Migration def change do create table(:<%= plural %>) do <%= for {k, v} <- attrs do %> add <%= inspect k %>, <%= inspect v %><%= defaults[k] %> <% end %><%= for {_, i, _} <- assocs do %> add <%= inspect i %>, :integer <% end %> timestamps end <%= for index <- indexes do %> <%= index %> <% end %> end end
27.2
91
0.512255
7969eb55ba0126daf1b62768e5f47058cd3757be
9,463
exs
Elixir
test/ecto/datetime_test.exs
rbishop/ecto
a8a3215c9e2e35f7556f54c8d47d78a3670796d8
[ "Apache-2.0" ]
null
null
null
test/ecto/datetime_test.exs
rbishop/ecto
a8a3215c9e2e35f7556f54c8d47d78a3670796d8
[ "Apache-2.0" ]
null
null
null
test/ecto/datetime_test.exs
rbishop/ecto
a8a3215c9e2e35f7556f54c8d47d78a3670796d8
[ "Apache-2.0" ]
null
null
null
defmodule Ecto.DateTest do use ExUnit.Case, async: true @date %Ecto.Date{year: 2015, month: 12, day: 31} test "cast itself" do assert Ecto.Date.cast(@date) == {:ok, @date} end test "cast strings" do assert Ecto.Date.cast("2015-12-31") == {:ok, @date} assert Ecto.Date.cast("2015-00-23") == :error assert Ecto.Date.cast("2015-13-23") == :error assert Ecto.Date.cast("2015-01-00") == :error assert Ecto.Date.cast("2015-01-32") == :error end test "cast maps" do assert Ecto.Date.cast(%{"year" => "2015", "month" => "12", "day" => "31"}) == {:ok, @date} assert Ecto.Date.cast(%{year: 2015, month: 12, day: 31}) == {:ok, @date} assert Ecto.Date.cast(%{"year" => "2015", "month" => "", "day" => "31"}) == :error assert Ecto.Date.cast(%{"year" => "2015", "month" => nil, "day" => "31"}) == :error assert Ecto.Date.cast(%{"year" => "2015", "month" => nil}) == :error end test "cast erl date" do assert Ecto.Date.cast({2015, 12, 31}) == {:ok, @date} assert Ecto.Date.cast({2015, 13, 31}) == :error end test "dump itself into a date triplet" do assert Ecto.Date.dump(@date) == {:ok, {2015, 12, 31}} assert Ecto.Date.dump({2015, 12, 31}) == :error end test "load a date triplet" do assert Ecto.Date.load({2015, 12, 31}) == {:ok, @date} assert Ecto.Date.load(@date) == :error end test "to_string" do assert to_string(@date) == "2015-12-31" assert Ecto.Date.to_string(@date) == "2015-12-31" end test "to_iso8601" do assert Ecto.Date.to_iso8601(@date) == "2015-12-31" end test "to_erl and from_erl" do assert @date |> Ecto.Date.to_erl |> Ecto.Date.from_erl == @date end test "inspect protocol" do assert inspect(@date) == "#Ecto.Date<2015-12-31>" end end defmodule Ecto.TimeTest do use ExUnit.Case, async: true @time %Ecto.Time{hour: 23, min: 50, sec: 07, usec: 0} @time_zero %Ecto.Time{hour: 23, min: 50, sec: 0, usec: 0} @time_usec %Ecto.Time{hour: 12, min: 40, sec: 33, usec: 30000} test "cast itself" do assert Ecto.Time.cast(@time) == {:ok, @time} assert Ecto.Time.cast(@time_zero) == {:ok, @time_zero} end test "cast strings" do assert Ecto.Time.cast("23:50:07") == {:ok, @time} assert Ecto.Time.cast("23:50:07Z") == {:ok, @time} assert Ecto.Time.cast("23:50:07.030") == {:ok, %{@time | usec: 30000}} assert Ecto.Time.cast("23:50:07.123456") == {:ok, %{@time | usec: 123456}} assert Ecto.Time.cast("23:50:07.123456Z") == {:ok, %{@time | usec: 123456}} assert Ecto.Time.cast("23:50:07.000123Z") == {:ok, %{@time | usec: 123}} assert Ecto.Time.cast("24:01:01") == :error assert Ecto.Time.cast("00:61:00") == :error assert Ecto.Time.cast("00:00:61") == :error assert Ecto.Time.cast("00:00:009") == :error assert Ecto.Time.cast("00:00:00.A00") == :error end test "cast maps" do assert Ecto.Time.cast(%{"hour" => "23", "min" => "50", "sec" => "07"}) == {:ok, @time} assert Ecto.Time.cast(%{hour: 23, min: 50, sec: 07}) == {:ok, @time} assert Ecto.Time.cast(%{"hour" => "23", "min" => "50"}) == {:ok, @time_zero} assert Ecto.Time.cast(%{hour: 23, min: 50}) == {:ok, @time_zero} assert Ecto.Time.cast(%{hour: 12, min: 40, sec: 33, usec: 30_000}) == {:ok, @time_usec} assert Ecto.Time.cast(%{"hour" => 12, "min" => 40, "sec" => 33, "usec" => 30_000}) == {:ok, @time_usec} assert Ecto.Time.cast(%{"hour" => "", "min" => "50"}) == :error assert Ecto.Time.cast(%{hour: 23, min: nil}) == :error end test "cast tuple" do assert Ecto.Time.cast({23, 50, 07}) == {:ok, @time} assert Ecto.Time.cast({12, 40, 33, 30000}) == {:ok, @time_usec} assert Ecto.Time.cast({00, 61, 33}) == :error end test "dump itself into a time tuple" do assert Ecto.Time.dump(@time) == {:ok, {23, 50, 7, 0}} assert Ecto.Time.dump(@time_usec) == {:ok, {12, 40, 33, 30000}} assert Ecto.Time.dump({23, 50, 07}) == :error end test "load tuple" do assert Ecto.Time.load({23, 50, 07}) == {:ok, @time} assert Ecto.Time.load({12, 40, 33, 30000}) == {:ok, @time_usec} assert Ecto.Time.load(@time) == :error end test "to_string" do assert to_string(@time) == "23:50:07" assert Ecto.Time.to_string(@time) == "23:50:07" assert to_string(@time_usec) == "12:40:33.030000" assert Ecto.Time.to_string(@time_usec) == "12:40:33.030000" assert to_string(%Ecto.Time{hour: 1, min: 2, sec: 3, usec: 4}) == "01:02:03.000004" assert Ecto.Time.to_string(%Ecto.Time{hour: 1, min: 2, sec: 3, usec: 4}) == "01:02:03.000004" end test "to_iso8601" do assert Ecto.Time.to_iso8601(@time) == "23:50:07" assert Ecto.Time.to_iso8601(@time_usec) == "12:40:33.030000" end test "to_erl and from_erl" do assert @time |> Ecto.Time.to_erl |> Ecto.Time.from_erl == @time end test "inspect protocol" do assert inspect(@time) == "#Ecto.Time<23:50:07>" assert inspect(@time_usec) == "#Ecto.Time<12:40:33.030000>" end end defmodule Ecto.DateTimeTest do use ExUnit.Case, async: true @datetime %Ecto.DateTime{year: 2015, month: 1, day: 23, hour: 23, min: 50, sec: 07, usec: 0} @datetime_zero %Ecto.DateTime{year: 2015, month: 1, day: 23, hour: 23, min: 50, sec: 0, usec: 0} @datetime_usec %Ecto.DateTime{year: 2015, month: 1, day: 23, hour: 23, min: 50, sec: 07, usec: 8000} @datetime_notime %Ecto.DateTime{year: 2015, month: 1, day: 23, hour: 0, min: 0, sec: 0, usec: 0} test "cast itself" do assert Ecto.DateTime.cast(@datetime) == {:ok, @datetime} assert Ecto.DateTime.cast(@datetime_usec) == {:ok, @datetime_usec} end test "cast strings" do assert Ecto.DateTime.cast("2015-01-23 23:50:07") == {:ok, @datetime} assert Ecto.DateTime.cast("2015-01-23T23:50:07") == {:ok, @datetime} assert Ecto.DateTime.cast("2015-01-23T23:50:07Z") == {:ok, @datetime} assert Ecto.DateTime.cast("2015-01-23T23:50:07.000Z") == {:ok, @datetime} assert Ecto.DateTime.cast("2015-01-23P23:50:07") == :error assert Ecto.DateTime.cast("2015-01-23T23:50:07.008") == {:ok, @datetime_usec} assert Ecto.DateTime.cast("2015-01-23T23:50:07.008Z") == {:ok, @datetime_usec} end test "cast maps" do assert Ecto.DateTime.cast(%{"year" => "2015", "month" => "1", "day" => "23", "hour" => "23", "min" => "50", "sec" => "07"}) == {:ok, @datetime} assert Ecto.DateTime.cast(%{year: 2015, month: 1, day: 23, hour: 23, min: 50, sec: 07}) == {:ok, @datetime} assert Ecto.DateTime.cast(%{"year" => "2015", "month" => "1", "day" => "23", "hour" => "23", "min" => "50"}) == {:ok, @datetime_zero} assert Ecto.DateTime.cast(%{year: 2015, month: 1, day: 23, hour: 23, min: 50}) == {:ok, @datetime_zero} assert Ecto.DateTime.cast(%{year: 2015, month: 1, day: 23, hour: 23, min: 50, sec: 07, usec: 8_000}) == {:ok, @datetime_usec} assert Ecto.DateTime.cast(%{"year" => 2015, "month" => 1, "day" => 23, "hour" => 23, "min" => 50, "sec" => 07, "usec" => 8_000}) == {:ok, @datetime_usec} assert Ecto.DateTime.cast(%{"year" => "2015", "month" => "1", "day" => "23", "hour" => "", "min" => "50"}) == :error assert Ecto.DateTime.cast(%{year: 2015, month: 1, day: 23, hour: 23, min: nil}) == :error end test "cast tuple" do assert Ecto.DateTime.cast({{2015, 1, 23}, {23, 50, 07}}) == {:ok, @datetime} assert Ecto.DateTime.cast({{2015, 1, 23}, {23, 50, 07, 8000}}) == {:ok, @datetime_usec} assert Ecto.DateTime.cast({{2015, 1, 23}, {25, 50, 07, 8000}}) == :error end test "dump itself to a tuple" do assert Ecto.DateTime.dump(@datetime) == {:ok, {{2015, 1, 23}, {23, 50, 07, 0}}} assert Ecto.DateTime.dump(@datetime_usec) == {:ok, {{2015, 1, 23}, {23, 50, 07, 8000}}} assert Ecto.DateTime.dump({{2015, 1, 23}, {23, 50, 07}}) == :error end test "load tuple" do assert Ecto.DateTime.load({{2015, 1, 23}, {23, 50, 07}}) == {:ok, @datetime} assert Ecto.DateTime.load({{2015, 1, 23}, {23, 50, 07, 8000}}) == {:ok, @datetime_usec} assert Ecto.DateTime.load(@datetime) == :error end test "from_date" do assert Ecto.DateTime.from_date(%Ecto.Date{year: 2015, month: 1, day: 23}) == @datetime_notime end test "to_string" do assert to_string(@datetime) == "2015-01-23 23:50:07" assert Ecto.DateTime.to_string(@datetime) == "2015-01-23 23:50:07" assert to_string(@datetime_usec) == "2015-01-23 23:50:07.008000" assert Ecto.DateTime.to_string(@datetime_usec) == "2015-01-23 23:50:07.008000" end test "to_iso8601" do assert Ecto.DateTime.to_iso8601(@datetime) == "2015-01-23T23:50:07Z" assert Ecto.DateTime.to_iso8601(@datetime_usec) == "2015-01-23T23:50:07.008000Z" end test "to_erl and from_erl" do assert @datetime |> Ecto.DateTime.to_erl |> Ecto.DateTime.from_erl == @datetime end test "inspect protocol" do assert inspect(@datetime) == "#Ecto.DateTime<2015-01-23T23:50:07Z>" assert inspect(@datetime_usec) == "#Ecto.DateTime<2015-01-23T23:50:07.008000Z>" end end
36.256705
102
0.574871
7969fb1344dc50ba909b21468bbf977ffa8832b1
276
exs
Elixir
bench_pg/Elixir/retailixir/test/retailixir_web/views/layout_view_test.exs
cassinius/api-bench
d6f578c2096b5057de28541c5c527a2f2fe9ae99
[ "MIT" ]
null
null
null
bench_pg/Elixir/retailixir/test/retailixir_web/views/layout_view_test.exs
cassinius/api-bench
d6f578c2096b5057de28541c5c527a2f2fe9ae99
[ "MIT" ]
27
2020-04-20T06:05:50.000Z
2021-12-09T22:06:37.000Z
bench_pg/Elixir/retailixir/test/retailixir_web/views/layout_view_test.exs
cassinius/api-bench
d6f578c2096b5057de28541c5c527a2f2fe9ae99
[ "MIT" ]
null
null
null
defmodule RetailixirWeb.LayoutViewTest do use RetailixirWeb.ConnCase, async: true # When testing helpers, you may want to import Phoenix.HTML and # use functions such as safe_to_string() to convert the helper # result into an HTML string. # import Phoenix.HTML end
30.666667
65
0.771739
796a2cce3b6ab3db3a46b3a23238d8c420ffb3d1
4,723
ex
Elixir
lib/types/datetime.ex
kianmeng/timex_ecto
6a6ab4f44270ae73f3b126367110d159a0aa613b
[ "MIT" ]
171
2015-06-26T08:16:42.000Z
2022-02-09T08:58:10.000Z
lib/types/datetime.ex
kianmeng/timex_ecto
6a6ab4f44270ae73f3b126367110d159a0aa613b
[ "MIT" ]
79
2015-07-03T15:17:21.000Z
2022-02-05T20:09:25.000Z
lib/types/datetime.ex
kianmeng/timex_ecto
6a6ab4f44270ae73f3b126367110d159a0aa613b
[ "MIT" ]
97
2015-07-03T11:39:52.000Z
2022-01-03T09:11:54.000Z
defmodule Timex.Ecto.DateTime do @moduledoc """ Support for using Timex with :datetime fields """ use Timex @behaviour Ecto.Type def type, do: :datetime @doc """ Handle casting to Timex.Ecto.DateTime """ def cast(%DateTime{} = datetime), do: {:ok, datetime} # Support embeds_one/embeds_many def cast(%{"calendar" => _cal, "year" => y, "month" => m, "day" => d, "hour" => h, "minute" => mm, "second" => s, "ms" => ms, "timezone" => %{"full_name" => tzname, "abbreviation" => abbr, "offset_std" => offset_std, "offset_utc" => offset_utc}}) do dt = %DateTime{ :year => y, :month => m, :day => d, :hour => h, :minute => mm, :second => s, :microsecond => Timex.Ecto.Helpers.millisecond_to_microsecond(ms), :time_zone => tzname, :zone_abbr => abbr, :utc_offset => offset_utc, :std_offset => offset_std } {:ok, dt} end def cast(%{"calendar" => _cal, "year" => y, "month" => m, "day" => d, "hour" => h, "minute" => mm, "second" => s, "millisecond" => ms, "timezone" => %{"full_name" => tzname, "abbreviation" => abbr, "offset_std" => offset_std, "offset_utc" => offset_utc}}) do dt = %DateTime{ :year => y, :month => m, :day => d, :hour => h, :minute => mm, :second => s, :microsecond => Timex.Ecto.Helpers.millisecond_to_microsecond(ms), :time_zone => tzname, :zone_abbr => abbr, :utc_offset => offset_utc, :std_offset => offset_std } {:ok, dt} end def cast(%{"calendar" => _cal, "year" => y, "month" => m, "day" => d, "hour" => h, "minute" => mm, "second" => s, "microsecond" => us, "time_zone" => tzname, "zone_abbr" => abbr, "utc_offset" => offset_utc, "std_offset" => offset_std}) do us = case us do us when is_integer(us) -> Timex.DateTime.Helpers.construct_microseconds({us, -1}) {_,_} -> us end dt = %DateTime{ :year => y, :month => m, :day => d, :hour => h, :minute => mm, :second => s, :microsecond => us, :time_zone => tzname, :zone_abbr => abbr, :utc_offset => offset_utc, :std_offset => offset_std } {:ok, dt} end def cast(input) when is_binary(input) do case Timex.parse(input, "{ISO:Extended}") do {:ok, d} -> {:ok, Timex.to_datetime(d)} {:error, _} -> :error end end def cast(input) do case Timex.to_datetime(input) do {:error, _} -> case Ecto.DateTime.cast(input) do {:ok, d} -> load({{d.year, d.month, d.day}, {d.hour, d.min, d.sec, d.usec}}) :error -> :error end %DateTime{} = d -> {:ok, d} end end @doc """ Handle casting to Timex.Ecto.DateTime without returning a tuple """ def cast!(input) do case cast(input) do {:ok, datetime} -> datetime :error -> :error end end @doc """ Load from the native Ecto representation """ def load({{y, m, d}, {h, mm, s, usec}}) do dt = %DateTime{ :year => y, :month => m, :day => d, :hour => h, :minute => mm, :second => s, :microsecond => Timex.DateTime.Helpers.construct_microseconds({usec, -1}), :time_zone => "Etc/UTC", :zone_abbr => "UTC", :utc_offset => 0, :std_offset => 0 } {:ok, dt} end def load(_), do: :error @doc """ Convert to native Ecto representation """ def dump(%DateTime{} = datetime) do case Timex.Timezone.convert(datetime, "Etc/UTC") do %DateTime{} = dt -> case Timex.to_naive_datetime(dt) do %NaiveDateTime{} = n -> {us, _} = n.microsecond {:ok, {{n.year, n.month, n.day}, {n.hour, n.minute, n.second, us}}} {:error, _} -> :error end {:error, _} -> :error end end def dump(datetime) do case Timex.to_naive_datetime(datetime) do {:error, _} -> :error %NaiveDateTime{} = n -> {us, _} = n.microsecond {:ok, {{n.year, n.month, n.day}, {n.hour, n.minute, n.second, us}}} end end def autogenerate(precision \\ :sec) def autogenerate(:sec) do {date, {h, m, s}} = :erlang.universaltime load({date,{h, m, s, 0}}) |> elem(1) end def autogenerate(:usec) do timestamp = {_,_, usec} = :os.timestamp {date, {h, m, s}} = :calendar.now_to_datetime(timestamp) load({date, {h, m, s, usec}}) |> elem(1) end end
28.113095
116
0.504552
796a41f38652dce4d67e244b3072d39d419e0cf8
3,650
ex
Elixir
lib/copeiro.ex
polvalente/copeiro
95a92ac377c3e6ff56177a195c8e67adb4e749d9
[ "MIT" ]
null
null
null
lib/copeiro.ex
polvalente/copeiro
95a92ac377c3e6ff56177a195c8e67adb4e749d9
[ "MIT" ]
null
null
null
lib/copeiro.ex
polvalente/copeiro
95a92ac377c3e6ff56177a195c8e67adb4e749d9
[ "MIT" ]
null
null
null
defmodule Copeiro do @moduledoc """ The Copeiro package provides assertion functions that will enhance your testing experience in Elixir """ @doc false def __assert_lists__(:==, left, right, any_order: true) do left |> Copeiro.Comparator.match_lists_in_any_order(right) |> case do {:error, _, _} -> ExUnit.Assertions.flunk(""" assertion failed, lists does not match left: #{inspect(left)} right: #{inspect(right)} """) :ok -> true end end def __assert_lists__(:==, left, right, _opts) do case left == right do false -> ExUnit.Assertions.flunk(""" Comparison (using ==) failed in: left: #{inspect(left)} right: #{inspect(right)} """) _ -> true end end def __assert_lists__(:in, left, right, _opts) do left |> Enum.reduce_while(true, fn l, _ -> case l in right do true -> {:cont, true} false -> {:halt, {:error, l}} end end) |> case do {:error, value} -> ExUnit.Assertions.flunk(""" assertion failed, value not found value: #{inspect(value)} left: #{inspect(left)} right: #{inspect(right)} """) _ -> true end end def __assert_lists__(:not_in, left, right, _opts) do left |> Enum.reduce_while(true, fn l, _ -> case l not in right do true -> {:cont, true} false -> {:halt, {:error, l}} end end) |> case do {:error, value} -> ExUnit.Assertions.flunk(""" match succeeded, but should have failed value: #{inspect(value)} left: #{inspect(left)} right: #{inspect(right)} """) _ -> true end end @doc """ Asserts that two lists matches ## Examples For the following examples`LEFT` and `RIGHT` will be used to describe the expression `assert_lists LEFT OPERATOR RIGHT` ### All elements of `LEFT` are also elements of `RIGHT` ``` iex> assert_lists [1, 2] in [0, 2, 1, 3] true iex> assert_lists [{:a, 1}, {:c, 3}] in [{:a, 1}, {:b, 2}, {:c, 3}] true ``` ### `LEFT` and `RIGHT` has no element in common ``` iex> assert_lists [1, 2] not in [3, 4] true iex> assert_lists [%{c: 3}, %{d: 4}] not in [%{a: 1}, %{b: 2}] true ``` ### Asserts that two lists match in any order ``` iex> assert_lists [1, 2, 3] == [2, 1, 3], any_order: true true iex> assert_lists [{:a, 0}, {:b, 1}, {:c, 3}] == [{:a, 0}, {:c, 3}, {:b, 1}], any_order: true true ``` ### Asserting lists of maps/structs ``` iex> assert_lists [%{a: 1}, %{a: 2}] in [%{a: 1, b: 1}, %{a: 2, b: 2}, %{a: 3, b: 3}], keys: [:a] true iex> assert_lists [%{a: 1}, %{a: 2}] == [%{a: 2, b: 2}, %{a: 1, b: 1}], keys: [:a], any_order: true true ``` """ defmacro assert_lists(expr, opts \\ []) do {op, left, right} = case expr do {:not, _, [{:in, _, [left, right]}]} -> {:not_in, left, right} {op, _, [left, right]} -> {op, left, right} end quote bind_quoted: [op: op, left: left, right: right, opts: opts] do [left, right, opts] = (fn left, right, opts -> keys = Keyword.get(opts, :keys, []) if keys == [] do [left, right, opts] else t = fn lst -> Enum.map(lst, &Map.take(&1, keys)) end [t.(left), t.(right), Keyword.delete(opts, :keys)] end end).(left, right, opts) Copeiro.__assert_lists__(op, left, right, opts) end end end
24.013158
121
0.512329
796a4294ecd81e2d85ea52f9f5cbb690c8d96bb2
4,690
exs
Elixir
test/appsignal/error_handler_test.exs
lukerandall/appsignal-elixir
eac4a7e44354bfa2de69ea8a9b0e27157db2e4c8
[ "MIT" ]
null
null
null
test/appsignal/error_handler_test.exs
lukerandall/appsignal-elixir
eac4a7e44354bfa2de69ea8a9b0e27157db2e4c8
[ "MIT" ]
null
null
null
test/appsignal/error_handler_test.exs
lukerandall/appsignal-elixir
eac4a7e44354bfa2de69ea8a9b0e27157db2e4c8
[ "MIT" ]
null
null
null
defmodule Appsignal.ErrorHandlerTest do @moduledoc """ Test the actual Appsignal.ErrorHandler """ use ExUnit.Case, async: true alias Appsignal.{Transaction, ErrorHandler, FakeTransaction} setup do {:ok, fake_transaction} = FakeTransaction.start_link() [fake_transaction: fake_transaction] end test "whether we can send error reports without current transaction" do :proc_lib.spawn(fn -> :erlang.error(:error_task) end) :timer.sleep(100) end test "whether we can send error reports with a current transaction", %{ fake_transaction: fake_transaction } do pid = :proc_lib.spawn(fn -> self() |> inspect |> FakeTransaction.start(:http_request) |> FakeTransaction.set_action("AppsignalErrorHandlerTest#test") :erlang.error(:error_http_request) end) :timer.sleep(20) [{transaction, reason, _message, _stack}] = FakeTransaction.errors(fake_transaction) assert transaction.id == inspect(pid) assert reason == ":error_http_request" end test "does not send error reports for ignored processes", %{fake_transaction: fake_transaction} do :proc_lib.spawn(fn -> Appsignal.TransactionRegistry.ignore(self()) :timer.sleep(50) :erlang.error(:error_ignored) end) :timer.sleep(100) refute fake_transaction |> FakeTransaction.errors() |> Enum.any?(fn error -> match?({%Transaction{}, ":error_ignored", _, _}, error) end) end test "submitting the transaction", %{fake_transaction: fake_transaction} do transaction = Transaction.start("id", :http_request) reason = "ArithmeticError" message = "bad argument in arithmetic expression" metadata = %{foo: "bar"} transaction = ErrorHandler.submit_transaction(transaction, reason, message, [], metadata) assert [{%Appsignal.Transaction{}, ^reason, ^message, _stack}] = FakeTransaction.errors(fake_transaction) assert ^metadata = FakeTransaction.metadata(fake_transaction) assert [^transaction] = FakeTransaction.finished_transactions(fake_transaction) assert [^transaction] = FakeTransaction.completed_transactions(fake_transaction) end test "does not cause warnings for noise on handle_info" do :error_logger.add_report_handler(ErrorLoggerForwarder, self()) :error_logger |> Process.whereis() |> send(:noise) refute_receive({:warning_msg, _, _}) end describe "handle_error/2" do test "adds an exception to the transaction and completes it", %{ fake_transaction: fake_transaction } do transaction = FakeTransaction.create("123", :http_request) exception = %RuntimeError{} :ok = ErrorHandler.handle_error(transaction, exception, [], %{}) assert [{^transaction, "RuntimeError", "runtime error", []}] = FakeTransaction.errors(fake_transaction) [^transaction] = FakeTransaction.completed_transactions(fake_transaction) end test "normalizes errors before adding them to the transaction", %{ fake_transaction: fake_transaction } do transaction = FakeTransaction.create("123", :http_request) :ok = ErrorHandler.handle_error(transaction, :undef, [], %{}) assert [{^transaction, "UndefinedFunctionError", "undefined function", []}] = FakeTransaction.errors(fake_transaction) end test "adds request metadata to the transaction", %{fake_transaction: fake_transaction} do transaction = FakeTransaction.create("123", :http_request) exception = %RuntimeError{} conn = %Plug.Conn{} :ok = ErrorHandler.handle_error(transaction, exception, [], conn) assert conn == FakeTransaction.request_metadata(fake_transaction) end test "does not add request metadata for an unsampled transaction", %{ fake_transaction: fake_transaction } do FakeTransaction.update(fake_transaction, :finish, :no_sample) transaction = FakeTransaction.create("123", :http_request) exception = %RuntimeError{} conn = %Plug.Conn{} :ok = ErrorHandler.handle_error(transaction, exception, [], conn) refute FakeTransaction.request_metadata(fake_transaction) end test "ignores errors with a plug_status lower than 500", %{fake_transaction: fake_transaction} do transaction = FakeTransaction.create("123", :http_request) exception = %Plug.BadRequestError{} :ok = ErrorHandler.handle_error(transaction, exception, [], %{}) assert [] = FakeTransaction.errors(fake_transaction) refute FakeTransaction.completed_transactions(fake_transaction) end end end
31.904762
101
0.691684
796a4fc8493c553ece205fc8f9e04b54626a1dd9
115
ex
Elixir
lib/sanbase_web/admin/short_url/short_url.ex
santiment/sanbase2
9ef6e2dd1e377744a6d2bba570ea6bd477a1db31
[ "MIT" ]
81
2017-11-20T01:20:22.000Z
2022-03-05T12:04:25.000Z
lib/sanbase_web/admin/short_url/short_url.ex
rmoorman/sanbase2
226784ab43a24219e7332c49156b198d09a6dd85
[ "MIT" ]
359
2017-10-15T14:40:53.000Z
2022-01-25T13:34:20.000Z
lib/sanbase_web/admin/short_url/short_url.ex
rmoorman/sanbase2
226784ab43a24219e7332c49156b198d09a6dd85
[ "MIT" ]
16
2017-11-19T13:57:40.000Z
2022-02-07T08:13:02.000Z
defmodule SanbaseWeb.ExAdmin.ShortUrl do use ExAdmin.Register register_resource Sanbase.ShortUrl do end end
16.428571
40
0.817391
796a61f5a49dff0f64a3bf7c2d0127489d31ae6d
2,867
ex
Elixir
lib/bolt_sips/response_encoder.ex
cheerfulstoic/bolt_sips
e86d6443f69d59f6cc41ecae5d0718ed05ea4904
[ "Apache-2.0" ]
242
2016-09-09T22:32:00.000Z
2022-02-20T18:50:29.000Z
lib/bolt_sips/response_encoder.ex
cheerfulstoic/bolt_sips
e86d6443f69d59f6cc41ecae5d0718ed05ea4904
[ "Apache-2.0" ]
100
2016-10-18T04:19:09.000Z
2021-11-15T19:14:47.000Z
lib/bolt_sips/response_encoder.ex
cheerfulstoic/bolt_sips
e86d6443f69d59f6cc41ecae5d0718ed05ea4904
[ "Apache-2.0" ]
51
2016-10-31T20:05:52.000Z
2022-01-20T11:45:49.000Z
defmodule Bolt.Sips.ResponseEncoder do @moduledoc """ This module provides functions to encode a query result or data containing Bolt.Sips.Types into various format. For now, only JSON is supported. Encoding is handled by protocols to allow override if a specific implemention is required. See targeted protocol documentation for more information """ @doc """ Encode the data in json format. This is done is 2 steps: - first, the data is converted into a jsonable format - the result is encoded in json via Jason Both of these steps are overridable, see: - for step 1: `Bolt.Sips.ResponseEncoder.Json` - for step 2 (depending of your preferred library): - `Bolt.Sips.ResponseEncoder.Json.Jason` - `Bolt.Sips.ResponseEncoder.Json.Poison` ## Example iex> data = %{"t1" => %Bolt.Sips.Types.Node{ ...> id: 69, ...> labels: ["Test"], ...> properties: %{ ...> "created" => %Bolt.Sips.Types.DateTimeWithTZOffset{ ...> naive_datetime: ~N[2016-05-24 13:26:08.543], ...> timezone_offset: 7200 ...> }, ...> "uuid" => 12345 ...> } ...> } ...> } iex> Bolt.Sips.ResponseEncoder.encode(data, :json) {:ok, ~S|{"t1":{"id":69,"labels":["Test"],"properties":{"created":"2016-05-24T13:26:08.543+02:00","uuid":12345}}}|} iex> Bolt.Sips.ResponseEncoder.encode("\\xFF", :json) {:error, %Jason.EncodeError{message: "invalid byte 0xFF in <<255>>"}} """ @spec encode(any(), :json) :: {:ok, String.t()} | {:error, Jason.EncodeError.t() | Exception.t()} def encode(response, :json) do response |> jsonable_response() |> Jason.encode() end @doc """ Encode the data in json format. Similar to `encode/1` except it will unwrap the error tuple and raise in case of errors. ## Example iex> data = %{"t1" => %Bolt.Sips.Types.Node{ ...> id: 69, ...> labels: ["Test"], ...> properties: %{ ...> "created" => %Bolt.Sips.Types.DateTimeWithTZOffset{ ...> naive_datetime: ~N[2016-05-24 13:26:08.543], ...> timezone_offset: 7200 ...> }, ...> "uuid" => 12345 ...> } ...> } ...> } iex> Bolt.Sips.ResponseEncoder.encode!(data, :json) ~S|{"t1":{"id":69,"labels":["Test"],"properties":{"created":"2016-05-24T13:26:08.543+02:00","uuid":12345}}}| iex> Bolt.Sips.ResponseEncoder.encode!("\\xFF", :json) ** (Jason.EncodeError) invalid byte 0xFF in <<255>> """ @spec encode!(any(), :json) :: String.t() | no_return() def encode!(response, :json) do response |> jsonable_response() |> Jason.encode!() end defp jsonable_response(response) do response |> Bolt.Sips.ResponseEncoder.Json.encode() end end
31.505495
121
0.577956
796aa0682a718fac50d8da4294c36b6ac5503f4b
3,042
exs
Elixir
test/raxx/server_test.exs
wayann/raxx
4a192c9b5a9a483e93e2194f5039b9fa9ff92cc8
[ "Apache-2.0" ]
null
null
null
test/raxx/server_test.exs
wayann/raxx
4a192c9b5a9a483e93e2194f5039b9fa9ff92cc8
[ "Apache-2.0" ]
null
null
null
test/raxx/server_test.exs
wayann/raxx
4a192c9b5a9a483e93e2194f5039b9fa9ff92cc8
[ "Apache-2.0" ]
1
2021-01-12T09:57:58.000Z
2021-01-12T09:57:58.000Z
defmodule Raxx.ServerTest do use ExUnit.Case doctest Raxx.Server import ExUnit.CaptureLog defmodule EchoServer do use Raxx.SimpleServer def handle_request(%{body: body}, _) do response(:ok) |> set_body(inspect(body)) end end test "body is concatenated to single string" do request = Raxx.request(:POST, "/") |> Raxx.set_body(true) state = %{} assert {[], state} = EchoServer.handle_head(request, state) assert {[], state} = EchoServer.handle_data("a", state) assert {[], state} = EchoServer.handle_data("b", state) assert {[], state} = EchoServer.handle_data("c", state) assert %{body: body} = EchoServer.handle_tail([], state) assert "\"abc\"" == body end defmodule DefaultServer do use Raxx.SimpleServer end test "default response is returned for the root page" do request = Raxx.request(:GET, "/") response = DefaultServer.handle_request(request, :state) assert String.contains?("#{response.body}", "DefaultServer") assert String.contains?("#{response.body}", "@impl Raxx.SimpleServer") assert 404 = response.status end test "default response is returned for a streamed request" do request = Raxx.request(:POST, "/") |> Raxx.set_body(true) {[], state} = DefaultServer.handle_head(request, :state) {[], state} = DefaultServer.handle_data("Hello, World!", state) response = DefaultServer.handle_tail([], state) assert String.contains?("#{response.body}", "DefaultServer") assert String.contains?("#{response.body}", "@impl Raxx.SimpleServer") assert 404 = response.status end test "handle_info logs error" do logs = capture_log(fn -> DefaultServer.handle_info(:foo, :state) end) assert String.contains?(logs, "unexpected message") assert String.contains?(logs, ":foo") end test "default server will not butter more than 8MB into one request" do request = Raxx.request(:POST, "/") |> Raxx.set_body(true) state = %{} assert {[], state} = DefaultServer.handle_head(request, state) four_Mb = String.duplicate("1234", round(:math.pow(2, 20))) assert {[], state} = DefaultServer.handle_data(four_Mb, state) assert {[], state} = DefaultServer.handle_data(four_Mb, state) assert response = %{status: 413} = DefaultServer.handle_data("straw", state) end defmodule BigServer do use Raxx.SimpleServer, maximum_body_length: 12 * 1024 * 1024 end test "Server max body size can be configured" do request = Raxx.request(:POST, "/") |> Raxx.set_body(true) state = %{} assert {[], state} = BigServer.handle_head(request, state) four_Mb = String.duplicate("1234", round(:math.pow(2, 20))) assert {[], state} = BigServer.handle_data(four_Mb, state) assert {[], state} = BigServer.handle_data(four_Mb, state) assert {[], state} = BigServer.handle_data(four_Mb, state) assert response = %{status: 413} = BigServer.handle_data("straw", state) end end
31.040816
80
0.659106
796aeaa6b91f4cad7a6e7d38fc301d9d401d21ea
1,236
ex
Elixir
lib/blockchain/application.ex
poanetwork/blockchain
408287adeab1b7dbb7d55fd7398dd9320e37b30f
[ "MIT" ]
null
null
null
lib/blockchain/application.ex
poanetwork/blockchain
408287adeab1b7dbb7d55fd7398dd9320e37b30f
[ "MIT" ]
null
null
null
lib/blockchain/application.ex
poanetwork/blockchain
408287adeab1b7dbb7d55fd7398dd9320e37b30f
[ "MIT" ]
null
null
null
defmodule Blockchain.Application do # See http://elixir-lang.org/docs/stable/elixir/Application.html # for more information on OTP Applications @moduledoc false use Application require Logger def start(_type, _args) do import Supervisor.Spec, warn: false if breakpoint_address_hex = System.get_env("BREAKPOINT") do case Base.decode16(breakpoint_address_hex, case: :mixed) do {:ok, breakpoint_address} -> EVM.Debugger.enable() id = EVM.Debugger.break_on(address: breakpoint_address) Logger.warn("Debugger has been enabled. Set breakpoint ##{id} on contract address 0x#{breakpoint_address_hex}.") :error -> Logger.error("Invalid breakpoint address: #{breakpoint_address_hex}") end end # Define workers and child supervisors to be supervised children = [ # Starts a worker by calling: Blockchain.Worker.start_link(arg1, arg2, arg3) # worker(Blockchain.Worker, [arg1, arg2, arg3]), ] # See http://elixir-lang.org/docs/stable/elixir/Supervisor.html # for other strategies and supported options opts = [strategy: :one_for_one, name: Blockchain.Supervisor] Supervisor.start_link(children, opts) end end
34.333333
122
0.699838
796aff6e29609819c75043570c5c4746af01eb23
108
exs
Elixir
test/is/validators/map_keys_test.exs
bydooweedoo/is
2d6acf61b397f7297d42a83b09c1181e22cb5230
[ "MIT" ]
17
2018-06-23T11:16:17.000Z
2021-11-17T18:28:37.000Z
test/is/validators/map_keys_test.exs
bydooweedoo/is
2d6acf61b397f7297d42a83b09c1181e22cb5230
[ "MIT" ]
null
null
null
test/is/validators/map_keys_test.exs
bydooweedoo/is
2d6acf61b397f7297d42a83b09c1181e22cb5230
[ "MIT" ]
2
2018-10-24T20:12:54.000Z
2019-12-25T17:45:41.000Z
defmodule Is.Validators.MapKeysTest do use ExUnit.Case doctest Is.Validators.MapKeys, import: true end
18
45
0.796296
796b01032153465aa1414840eaee0be7d4c4b9ee
248
ex
Elixir
lib/distcount_web/router.ex
cabol/distcount
b0b42f66dcc130ec6e349ab8b915cfb6f5b77c7b
[ "MIT" ]
null
null
null
lib/distcount_web/router.ex
cabol/distcount
b0b42f66dcc130ec6e349ab8b915cfb6f5b77c7b
[ "MIT" ]
null
null
null
lib/distcount_web/router.ex
cabol/distcount
b0b42f66dcc130ec6e349ab8b915cfb6f5b77c7b
[ "MIT" ]
null
null
null
defmodule DistcountWeb.Router do @moduledoc false use DistcountWeb, :router pipeline :api do plug :accepts, ["json"] end scope "/", DistcountWeb do pipe_through :api post "/increment", CounterLogController, :incr end end
16.533333
50
0.693548
796b13628d5de37451f28a53a30466f86f4340e8
5,499
exs
Elixir
test/plug_rest/conn_test.exs
christopheradams/plug_rest
8cd5b8a7a5622bab6b72a146c09a1343fdeb4fad
[ "Apache-2.0" ]
54
2016-07-20T16:40:00.000Z
2022-03-16T06:59:54.000Z
test/plug_rest/conn_test.exs
dragonwasrobot/plug_rest
8cd5b8a7a5622bab6b72a146c09a1343fdeb4fad
[ "Apache-2.0" ]
4
2016-09-28T11:31:17.000Z
2020-01-27T05:45:00.000Z
test/plug_rest/conn_test.exs
dragonwasrobot/plug_rest
8cd5b8a7a5622bab6b72a146c09a1343fdeb4fad
[ "Apache-2.0" ]
6
2017-03-17T17:35:33.000Z
2020-01-23T11:26:59.000Z
defmodule PlugRest.ConnTest do use ExUnit.Case use Plug.Test import PlugRest.Conn test "parse content type header" do content_type = "application/json" actual_header = conn(:post, "/") |> put_req_header("content-type", content_type) |> parse_media_type_header("content-type") expected_header = {"application", "json", %{}} assert actual_header == expected_header end test "parse bad content type header" do content_type = "application" parsed = conn(:post, "/") |> put_req_header("content-type", content_type) |> parse_media_type_header("content-type") assert parsed == :error end test "parsing charset in content-type should return lower case" do content_type = "text/plain;charset=UTF-8" actual_header = conn(:post, "/") |> put_req_header("content-type", content_type) |> parse_media_type_header("content-type") expected_header = {"text", "plain", %{"charset" => "utf-8"}} assert actual_header == expected_header end test "parse content type accept header" do accept = "text/html,text/html;level=1;q=0.9,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8;text/html;err" {:ok, actual_media_types} = conn(:get, "/") |> put_req_header("accept", accept) |> parse_media_range_header("accept") expected_media_types = [ {{"text", "html", %{}}, 1.0, %{}}, {{"text", "html", %{"level" => "1"}}, 0.9, %{}}, {{"application", "xhtml+xml", %{}}, 1.0, %{}}, {{"application", "xml", %{}}, 0.9, %{}}, {{"*", "*", %{}}, 0.8, %{}} ] assert actual_media_types == expected_media_types end test "parse malformed accept header as media range" do accept = "1" media_range = conn(:get, "/") |> put_req_header("accept", accept) |> parse_media_range_header("accept") assert media_range == :error end test "parse language accept header" do accept = "da, en-gb;q=0.8, en;q=0.7" actual_headers = conn(:get, "/") |> put_req_header("accept-language", accept) |> parse_quality_header("accept-language") expected_headers = [{"da", 1.0}, {"en-gb", 0.8}, {"en", 0.7}] assert actual_headers == expected_headers end test "parse charset accept header" do accept = "iso-8859-5, unicode-1-1;q=0.8" actual_headers = conn(:get, "/") |> put_req_header("accept-charset", accept) |> parse_quality_header("accept-charset") expected_headers = [{"iso-8859-5", 1.0}, {"unicode-1-1", 0.8}] assert actual_headers == expected_headers end test "parse if-match header" do if_match = "\"xyzzy\"" actual_headers = conn(:get, "/") |> put_req_header("if-match", if_match) |> parse_entity_tag_header("if-match") expected_headers = [{:strong, "xyzzy"}] assert actual_headers == expected_headers end test "parse multiple if-match values" do if_match = "\"xyzzy\", \"r2d2xxxx\", \"c3piozzzz\"" actual_headers = conn(:get, "/") |> put_req_header("if-match", if_match) |> parse_entity_tag_header("if-match") expected_headers = [{:strong, "xyzzy"}, {:strong, "r2d2xxxx"}, {:strong, "c3piozzzz"}] assert actual_headers == expected_headers end test "parse wildcard if-match" do if_match = "*" actual_headers = conn(:get, "/") |> put_req_header("if-match", if_match) |> parse_entity_tag_header("if-match") expected_headers = :* assert actual_headers == expected_headers end test "parse strong if-none-match" do if_none_match = "\"xyzzy\"" actual_headers = conn(:get, "/") |> put_req_header("if-none-match", if_none_match) |> parse_entity_tag_header("if-none-match") expected_headers = [{:strong, "xyzzy"}] assert actual_headers == expected_headers end test "parse weak if-none-match" do if_none_match = "W/\"xyzzy\"" actual_headers = conn(:get, "/") |> put_req_header("if-none-match", if_none_match) |> parse_entity_tag_header("if-none-match") expected_headers = [{:weak, "xyzzy"}] assert actual_headers == expected_headers end test "match invalid etags" do bad_etags = ["", ~s("), "W", "W/"] Enum.each(bad_etags, fn etag -> assert entity_tag_match(etag) == {:error, :badarg} end) end test "parse if-modified-since header" do if_modified_since = "Sun, 17 Jul 2016 19:54:31 GMT" actual_headers = conn(:get, "/") |> put_req_header("if-modified-since", if_modified_since) |> parse_date_header("if-modified-since") expected_headers = {{2016, 7, 17}, {19, 54, 31}} assert actual_headers == expected_headers end test "parse if-unmodified-since header" do if_unmodified_since = "Sun, 17 Jul 2016 19:54:31 GMT" actual_headers = conn(:get, "/") |> put_req_header("if-unmodified-since", if_unmodified_since) |> parse_date_header("if-unmodified-since") expected_headers = {{2016, 7, 17}, {19, 54, 31}} assert actual_headers == expected_headers end test "parse bad date header" do if_unmodified_since = "bad" conn = conn(:get, "/") |> put_req_header("if-unmodified-since", if_unmodified_since) assert parse_date_header(conn, "if-unmodified-since") == [] end test "generate datetime" do assert generate_datetime({{2012, 9, 21}, {22, 36, 14}}) == "Fri, 21 Sep 2012 22:36:14 GMT" end end
25.696262
109
0.621931
796b176dcc980218211736e9bcb21381aa8411f1
1,922
exs
Elixir
sample_application/rel/config.exs
sevenmind/KaufmannEx
44225125946921850316c272db53175bb1658fb7
[ "MIT" ]
84
2018-03-20T08:19:10.000Z
2022-01-30T07:40:56.000Z
sample_application/rel/config.exs
sevenmind/KaufmannEx
44225125946921850316c272db53175bb1658fb7
[ "MIT" ]
23
2018-03-29T15:15:56.000Z
2019-12-04T14:53:57.000Z
sample_application/rel/config.exs
sevenmind/KaufmannEx
44225125946921850316c272db53175bb1658fb7
[ "MIT" ]
8
2018-07-03T18:18:27.000Z
2022-03-08T14:04:09.000Z
# Import all plugins from `rel/plugins` # They can then be used by adding `plugin MyPlugin` to # either an environment, or release definition, where # `MyPlugin` is the name of the plugin module. Path.join(["rel", "plugins", "*.exs"]) |> Path.wildcard() |> Enum.map(&Code.eval_file(&1)) use Mix.Releases.Config, # This sets the default release built by `mix release` default_release: :default, # This sets the default environment used by `mix release` default_environment: Mix.env() # For a full list of config options for both releases # and environments, visit https://hexdocs.pm/distillery/configuration.html # You may define one or more environments in this file, # an environment's settings will override those of a release # when building in that environment, this combination of release # and environment configuration is called a profile environment :dev do # If you are running Phoenix, you should make sure that # server: true is set and the code reloader is disabled, # even in dev mode. # It is recommended that you build with MIX_ENV=prod and pass # the --env flag to Distillery explicitly if you want to use # dev mode. set(dev_mode: true) set(include_erts: false) set(cookie: :"6S_Ux4=y/nl[7wodOX&>Ra92^rj!u4|>H~[YtPk4S8v!FjE.=ZciF2}g(!Do;F6q") end environment :prod do set(include_erts: true) set(include_src: false) set(cookie: :"m/bp%`2fP*VSlB;LLun4WU.8>yR[x=(|yI,f%Tv8$j1;c2HDgY^z:;F(bLM5rvx`") end # You may define one or more releases in this file. # If you have not set a default release, or selected one # when running `mix release`, the first release in the file # will be used by default release :sample do set(version: current_version(:sample)) set( applications: [ :runtime_tools ] ) set( commands: [ migrate_schemas: "rel/commands/migrate_schemas.sh", reinit_service: "rel/commands/reinit_service.sh" ] ) end
31
82
0.721124
796b178880322d9ced991d7238dab576b8f13261
2,176
ex
Elixir
clients/content/lib/google_api/content/v2/model/order_cancellation.ex
leandrocp/elixir-google-api
a86e46907f396d40aeff8668c3bd81662f44c71e
[ "Apache-2.0" ]
null
null
null
clients/content/lib/google_api/content/v2/model/order_cancellation.ex
leandrocp/elixir-google-api
a86e46907f396d40aeff8668c3bd81662f44c71e
[ "Apache-2.0" ]
null
null
null
clients/content/lib/google_api/content/v2/model/order_cancellation.ex
leandrocp/elixir-google-api
a86e46907f396d40aeff8668c3bd81662f44c71e
[ "Apache-2.0" ]
1
2020-11-10T16:58:27.000Z
2020-11-10T16:58:27.000Z
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); # 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 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an &quot;AS IS&quot; BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This class is auto generated by the swagger code generator program. # https://github.com/swagger-api/swagger-codegen.git # Do not edit the class manually. defmodule GoogleApi.Content.V2.Model.OrderCancellation do @moduledoc """ ## Attributes - actor (String.t): The actor that created the cancellation. Defaults to: `null`. - creationDate (String.t): Date on which the cancellation has been created, in ISO 8601 format. Defaults to: `null`. - quantity (integer()): The quantity that was canceled. Defaults to: `null`. - reason (String.t): The reason for the cancellation. Orders that are cancelled with a noInventory reason will lead to the removal of the product from Shopping Actions until you make an update to that product. This will not affect your Shopping ads. Defaults to: `null`. - reasonText (String.t): The explanation of the reason. Defaults to: `null`. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :actor => any(), :creationDate => any(), :quantity => any(), :reason => any(), :reasonText => any() } field(:actor) field(:creationDate) field(:quantity) field(:reason) field(:reasonText) end defimpl Poison.Decoder, for: GoogleApi.Content.V2.Model.OrderCancellation do def decode(value, options) do GoogleApi.Content.V2.Model.OrderCancellation.decode(value, options) end end defimpl Poison.Encoder, for: GoogleApi.Content.V2.Model.OrderCancellation do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) end end
36.266667
272
0.722426
796b3648514633e8f21ab45fae43446ca9329abb
1,111
ex
Elixir
ola_api/lib/ola_api_web/controllers/user_controller.ex
diogobaracho/lab_exunit
2fc4445a50c7faa95d057dcb69d9bb9c6833c9f0
[ "Apache-2.0" ]
1
2020-03-04T20:42:23.000Z
2020-03-04T20:42:23.000Z
ola_api/lib/ola_api_web/controllers/user_controller.ex
diogobaracho/lab_exunit
2fc4445a50c7faa95d057dcb69d9bb9c6833c9f0
[ "Apache-2.0" ]
null
null
null
ola_api/lib/ola_api_web/controllers/user_controller.ex
diogobaracho/lab_exunit
2fc4445a50c7faa95d057dcb69d9bb9c6833c9f0
[ "Apache-2.0" ]
null
null
null
defmodule OlaApiWeb.UserController do use OlaApiWeb, :controller alias OlaApi.Accounts alias OlaApi.Accounts.User action_fallback OlaApiWeb.FallbackController def index(conn, _params) do users = Accounts.list_users() render(conn, "index.json", users: users) end def create(conn, %{"user" => user_params}) do with {:ok, %User{} = user} <- Accounts.create_user(user_params) do conn |> put_status(:created) |> put_resp_header("location", Routes.user_path(conn, :show, user)) |> render("show.json", user: user) end end def show(conn, %{"id" => id}) do user = Accounts.get_user!(id) render(conn, "show.json", user: user) end def update(conn, %{"id" => id, "user" => user_params}) do user = Accounts.get_user!(id) with {:ok, %User{} = user} <- Accounts.update_user(user, user_params) do render(conn, "show.json", user: user) end end def delete(conn, %{"id" => id}) do user = Accounts.get_user!(id) with {:ok, %User{}} <- Accounts.delete_user(user) do send_resp(conn, :no_content, "") end end end
25.25
76
0.634563
796b423d7d364a653b31a0b7e049e19a451d2712
1,972
ex
Elixir
clients/jobs/lib/google_api/jobs/v3/model/processing_options.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
1
2021-12-20T03:40:53.000Z
2021-12-20T03:40:53.000Z
clients/jobs/lib/google_api/jobs/v3/model/processing_options.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
1
2020-08-18T00:11:23.000Z
2020-08-18T00:44:16.000Z
clients/jobs/lib/google_api/jobs/v3/model/processing_options.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed 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 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This file is auto generated by the elixir code generator program. # Do not edit this file manually. defmodule GoogleApi.Jobs.V3.Model.ProcessingOptions do @moduledoc """ Input only. Options for job processing. ## Attributes * `disableStreetAddressResolution` (*type:* `boolean()`, *default:* `nil`) - Optional. If set to `true`, the service does not attempt to resolve a more precise address for the job. * `htmlSanitization` (*type:* `String.t`, *default:* `nil`) - Optional. Option for job HTML content sanitization. Applied fields are: * description * applicationInfo.instruction * incentives * qualifications * responsibilities HTML tags in these fields may be stripped if sanitiazation is not disabled. Defaults to HtmlSanitization.SIMPLE_FORMATTING_ONLY. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :disableStreetAddressResolution => boolean() | nil, :htmlSanitization => String.t() | nil } field(:disableStreetAddressResolution) field(:htmlSanitization) end defimpl Poison.Decoder, for: GoogleApi.Jobs.V3.Model.ProcessingOptions do def decode(value, options) do GoogleApi.Jobs.V3.Model.ProcessingOptions.decode(value, options) end end defimpl Poison.Encoder, for: GoogleApi.Jobs.V3.Model.ProcessingOptions do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) end end
39.44
359
0.747465
796b5321a0ca3f65c11af8377d52f196afe18d7d
809
ex
Elixir
clients/elixir/generated/lib/swaggy_jenkins/model/pipeline_step_impllinks.ex
cliffano/jenkins-api-clients-generator
522d02b3a130a29471df5ec1d3d22c822b3d0813
[ "MIT" ]
null
null
null
clients/elixir/generated/lib/swaggy_jenkins/model/pipeline_step_impllinks.ex
cliffano/jenkins-api-clients-generator
522d02b3a130a29471df5ec1d3d22c822b3d0813
[ "MIT" ]
null
null
null
clients/elixir/generated/lib/swaggy_jenkins/model/pipeline_step_impllinks.ex
cliffano/jenkins-api-clients-generator
522d02b3a130a29471df5ec1d3d22c822b3d0813
[ "MIT" ]
null
null
null
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). # https://openapi-generator.tech # Do not edit the class manually. defmodule SwaggyJenkins.Model.PipelineStepImpllinks do @moduledoc """ """ @derive [Poison.Encoder] defstruct [ :"self", :"actions", :"_class" ] @type t :: %__MODULE__{ :"self" => SwaggyJenkins.Model.Link.t | nil, :"actions" => SwaggyJenkins.Model.Link.t | nil, :"_class" => String.t | nil } end defimpl Poison.Decoder, for: SwaggyJenkins.Model.PipelineStepImpllinks do import SwaggyJenkins.Deserializer def decode(value, options) do value |> deserialize(:"self", :struct, SwaggyJenkins.Model.Link, options) |> deserialize(:"actions", :struct, SwaggyJenkins.Model.Link, options) end end
24.515152
91
0.684796
796b563d1ed4ac440cea832129c1479df779db75
23,699
ex
Elixir
clients/compute/lib/google_api/compute/v1/api/forwarding_rules.ex
matehat/elixir-google-api
c1b2523c2c4cdc9e6ca4653ac078c94796b393c3
[ "Apache-2.0" ]
1
2018-12-03T23:43:10.000Z
2018-12-03T23:43:10.000Z
clients/compute/lib/google_api/compute/v1/api/forwarding_rules.ex
matehat/elixir-google-api
c1b2523c2c4cdc9e6ca4653ac078c94796b393c3
[ "Apache-2.0" ]
null
null
null
clients/compute/lib/google_api/compute/v1/api/forwarding_rules.ex
matehat/elixir-google-api
c1b2523c2c4cdc9e6ca4653ac078c94796b393c3
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); # 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 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an &quot;AS IS&quot; BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This class is auto generated by the elixir code generator program. # Do not edit the class manually. defmodule GoogleApi.Compute.V1.Api.ForwardingRules do @moduledoc """ API calls for all endpoints tagged `ForwardingRules`. """ alias GoogleApi.Compute.V1.Connection alias GoogleApi.Gax.{Request, Response} @doc """ Retrieves an aggregated list of forwarding rules. ## Parameters * `connection` (*type:* `GoogleApi.Compute.V1.Connection.t`) - Connection to server * `project` (*type:* `String.t`) - Project ID for this request. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:alt` (*type:* `String.t`) - Data format for the response. * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters. * `:userIp` (*type:* `String.t`) - Deprecated. Please use quotaUser instead. * `:filter` (*type:* `String.t`) - A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true). * `:maxResults` (*type:* `integer()`) - The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) * `:orderBy` (*type:* `String.t`) - Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by name or creationTimestamp desc is supported. * `:pageToken` (*type:* `String.t`) - Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Compute.V1.Model.ForwardingRuleAggregatedList{}}` on success * `{:error, info}` on failure """ @spec compute_forwarding_rules_aggregated_list( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Compute.V1.Model.ForwardingRuleAggregatedList.t()} | {:error, Tesla.Env.t()} def compute_forwarding_rules_aggregated_list( connection, project, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :alt => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :userIp => :query, :filter => :query, :maxResults => :query, :orderBy => :query, :pageToken => :query } request = Request.new() |> Request.method(:get) |> Request.url("/{project}/aggregated/forwardingRules", %{ "project" => URI.encode(project, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Compute.V1.Model.ForwardingRuleAggregatedList{}] ) end @doc """ Deletes the specified ForwardingRule resource. ## Parameters * `connection` (*type:* `GoogleApi.Compute.V1.Connection.t`) - Connection to server * `project` (*type:* `String.t`) - Project ID for this request. * `region` (*type:* `String.t`) - Name of the region scoping this request. * `forwarding_rule` (*type:* `String.t`) - Name of the ForwardingRule resource to delete. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:alt` (*type:* `String.t`) - Data format for the response. * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters. * `:userIp` (*type:* `String.t`) - Deprecated. Please use quotaUser instead. * `:requestId` (*type:* `String.t`) - An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Compute.V1.Model.Operation{}}` on success * `{:error, info}` on failure """ @spec compute_forwarding_rules_delete( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Compute.V1.Model.Operation.t()} | {:error, Tesla.Env.t()} def compute_forwarding_rules_delete( connection, project, region, forwarding_rule, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :alt => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :userIp => :query, :requestId => :query } request = Request.new() |> Request.method(:delete) |> Request.url("/{project}/regions/{region}/forwardingRules/{forwardingRule}", %{ "project" => URI.encode(project, &URI.char_unreserved?/1), "region" => URI.encode(region, &URI.char_unreserved?/1), "forwardingRule" => URI.encode(forwarding_rule, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.Operation{}]) end @doc """ Returns the specified ForwardingRule resource. ## Parameters * `connection` (*type:* `GoogleApi.Compute.V1.Connection.t`) - Connection to server * `project` (*type:* `String.t`) - Project ID for this request. * `region` (*type:* `String.t`) - Name of the region scoping this request. * `forwarding_rule` (*type:* `String.t`) - Name of the ForwardingRule resource to return. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:alt` (*type:* `String.t`) - Data format for the response. * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters. * `:userIp` (*type:* `String.t`) - Deprecated. Please use quotaUser instead. * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Compute.V1.Model.ForwardingRule{}}` on success * `{:error, info}` on failure """ @spec compute_forwarding_rules_get( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Compute.V1.Model.ForwardingRule.t()} | {:error, Tesla.Env.t()} def compute_forwarding_rules_get( connection, project, region, forwarding_rule, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :alt => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :userIp => :query } request = Request.new() |> Request.method(:get) |> Request.url("/{project}/regions/{region}/forwardingRules/{forwardingRule}", %{ "project" => URI.encode(project, &URI.char_unreserved?/1), "region" => URI.encode(region, &URI.char_unreserved?/1), "forwardingRule" => URI.encode(forwarding_rule, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.ForwardingRule{}]) end @doc """ Creates a ForwardingRule resource in the specified project and region using the data included in the request. ## Parameters * `connection` (*type:* `GoogleApi.Compute.V1.Connection.t`) - Connection to server * `project` (*type:* `String.t`) - Project ID for this request. * `region` (*type:* `String.t`) - Name of the region scoping this request. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:alt` (*type:* `String.t`) - Data format for the response. * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters. * `:userIp` (*type:* `String.t`) - Deprecated. Please use quotaUser instead. * `:requestId` (*type:* `String.t`) - An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * `:body` (*type:* `GoogleApi.Compute.V1.Model.ForwardingRule.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Compute.V1.Model.Operation{}}` on success * `{:error, info}` on failure """ @spec compute_forwarding_rules_insert( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Compute.V1.Model.Operation.t()} | {:error, Tesla.Env.t()} def compute_forwarding_rules_insert( connection, project, region, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :alt => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :userIp => :query, :requestId => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/{project}/regions/{region}/forwardingRules", %{ "project" => URI.encode(project, &URI.char_unreserved?/1), "region" => URI.encode(region, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.Operation{}]) end @doc """ Retrieves a list of ForwardingRule resources available to the specified project and region. ## Parameters * `connection` (*type:* `GoogleApi.Compute.V1.Connection.t`) - Connection to server * `project` (*type:* `String.t`) - Project ID for this request. * `region` (*type:* `String.t`) - Name of the region scoping this request. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:alt` (*type:* `String.t`) - Data format for the response. * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters. * `:userIp` (*type:* `String.t`) - Deprecated. Please use quotaUser instead. * `:filter` (*type:* `String.t`) - A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true). * `:maxResults` (*type:* `integer()`) - The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) * `:orderBy` (*type:* `String.t`) - Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by name or creationTimestamp desc is supported. * `:pageToken` (*type:* `String.t`) - Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Compute.V1.Model.ForwardingRuleList{}}` on success * `{:error, info}` on failure """ @spec compute_forwarding_rules_list( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Compute.V1.Model.ForwardingRuleList.t()} | {:error, Tesla.Env.t()} def compute_forwarding_rules_list( connection, project, region, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :alt => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :userIp => :query, :filter => :query, :maxResults => :query, :orderBy => :query, :pageToken => :query } request = Request.new() |> Request.method(:get) |> Request.url("/{project}/regions/{region}/forwardingRules", %{ "project" => URI.encode(project, &URI.char_unreserved?/1), "region" => URI.encode(region, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.ForwardingRuleList{}]) end @doc """ Changes target URL for forwarding rule. The new target should be of the same type as the old target. ## Parameters * `connection` (*type:* `GoogleApi.Compute.V1.Connection.t`) - Connection to server * `project` (*type:* `String.t`) - Project ID for this request. * `region` (*type:* `String.t`) - Name of the region scoping this request. * `forwarding_rule` (*type:* `String.t`) - Name of the ForwardingRule resource in which target is to be set. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:alt` (*type:* `String.t`) - Data format for the response. * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters. * `:userIp` (*type:* `String.t`) - Deprecated. Please use quotaUser instead. * `:requestId` (*type:* `String.t`) - An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * `:body` (*type:* `GoogleApi.Compute.V1.Model.TargetReference.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Compute.V1.Model.Operation{}}` on success * `{:error, info}` on failure """ @spec compute_forwarding_rules_set_target( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Compute.V1.Model.Operation.t()} | {:error, Tesla.Env.t()} def compute_forwarding_rules_set_target( connection, project, region, forwarding_rule, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :alt => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :userIp => :query, :requestId => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", %{ "project" => URI.encode(project, &URI.char_unreserved?/1), "region" => URI.encode(region, &URI.char_unreserved?/1), "forwardingRule" => URI.encode(forwarding_rule, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.Operation{}]) end end
51.296537
414
0.657454
796b658aa265b248ba937a0da58e5b83db4a5267
1,920
ex
Elixir
clients/document_ai/lib/google_api/document_ai/v1beta3/model/google_cloud_documentai_uiv1beta3_batch_delete_documents_metadata.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
1
2021-12-20T03:40:53.000Z
2021-12-20T03:40:53.000Z
clients/document_ai/lib/google_api/document_ai/v1beta3/model/google_cloud_documentai_uiv1beta3_batch_delete_documents_metadata.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
1
2020-08-18T00:11:23.000Z
2020-08-18T00:44:16.000Z
clients/document_ai/lib/google_api/document_ai/v1beta3/model/google_cloud_documentai_uiv1beta3_batch_delete_documents_metadata.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed 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 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This file is auto generated by the elixir code generator program. # Do not edit this file manually. defmodule GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata do @moduledoc """ ## Attributes * `commonMetadata` (*type:* `GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata.t`, *default:* `nil`) - The basic metadata of the long running operation. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :commonMetadata => GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata.t() | nil } field(:commonMetadata, as: GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata ) end defimpl Poison.Decoder, for: GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata do def decode(value, options) do GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata.decode( value, options ) end end defimpl Poison.Encoder, for: GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) end end
33.103448
195
0.768229
796b79b7cb3f24fc00ef0a3d2c96dca31a59e978
2,028
ex
Elixir
clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3_fulfillment_conditional_cases.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
1
2021-12-20T03:40:53.000Z
2021-12-20T03:40:53.000Z
clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3_fulfillment_conditional_cases.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
1
2020-08-18T00:11:23.000Z
2020-08-18T00:44:16.000Z
clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3_fulfillment_conditional_cases.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed 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 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This file is auto generated by the elixir code generator program. # Do not edit this file manually. defmodule GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3FulfillmentConditionalCases do @moduledoc """ A list of cascading if-else conditions. Cases are mutually exclusive. The first one with a matching condition is selected, all the rest ignored. ## Attributes * `cases` (*type:* `list(GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase.t)`, *default:* `nil`) - A list of cascading if-else conditions. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :cases => list( GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase.t() ) | nil } field(:cases, as: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase, type: :list ) end defimpl Poison.Decoder, for: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3FulfillmentConditionalCases do def decode(value, options) do GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3FulfillmentConditionalCases.decode( value, options ) end end defimpl Poison.Encoder, for: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3FulfillmentConditionalCases do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) end end
34.372881
180
0.750493
796b9fdd0c870657b714bc4170524a88da1817c2
2,028
ex
Elixir
clients/compute/lib/google_api/compute/v1/model/http_health_check_list_warning_data.ex
matehat/elixir-google-api
c1b2523c2c4cdc9e6ca4653ac078c94796b393c3
[ "Apache-2.0" ]
1
2018-12-03T23:43:10.000Z
2018-12-03T23:43:10.000Z
clients/compute/lib/google_api/compute/v1/model/http_health_check_list_warning_data.ex
matehat/elixir-google-api
c1b2523c2c4cdc9e6ca4653ac078c94796b393c3
[ "Apache-2.0" ]
null
null
null
clients/compute/lib/google_api/compute/v1/model/http_health_check_list_warning_data.ex
matehat/elixir-google-api
c1b2523c2c4cdc9e6ca4653ac078c94796b393c3
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); # 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 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an &quot;AS IS&quot; BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This class is auto generated by the elixir code generator program. # Do not edit the class manually. defmodule GoogleApi.Compute.V1.Model.HttpHealthCheckListWarningData do @moduledoc """ ## Attributes * `key` (*type:* `String.t`, *default:* `nil`) - [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). * `value` (*type:* `String.t`, *default:* `nil`) - [Output Only] A warning data value corresponding to the key. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :key => String.t(), :value => String.t() } field(:key) field(:value) end defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.HttpHealthCheckListWarningData do def decode(value, options) do GoogleApi.Compute.V1.Model.HttpHealthCheckListWarningData.decode(value, options) end end defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.HttpHealthCheckListWarningData do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) end end
40.56
527
0.743097
796c0471a2eaf5a35d583c5ee2bad6e694a3ec9a
449
exs
Elixir
tests/dummy/priv/repo/migrations/2016041605594810_create_salsa_histories.exs
autoxjs/autox-phoenix
6446f4487e3af28955f6560973cff6add34be4d4
[ "MIT" ]
null
null
null
tests/dummy/priv/repo/migrations/2016041605594810_create_salsa_histories.exs
autoxjs/autox-phoenix
6446f4487e3af28955f6560973cff6add34be4d4
[ "MIT" ]
20
2016-04-05T06:28:58.000Z
2016-05-12T15:45:37.000Z
tests/dummy/priv/repo/migrations/2016041605594810_create_salsa_histories.exs
foxnewsnetwork/autox
66ea3f0f7ba8b3f9e910984a2ed3cdf0ef5ef29a
[ "MIT" ]
null
null
null
defmodule Dummy.Repo.Migrations.CreateSalsaHistories do use Ecto.Migration def change do create table(:salsa_histories) do add :recordable_id, :integer add :permalink, :string add :type, :string add :name, :string add :message, :string add :scheduled_at, :datetime add :happened_at, :datetime add :mentioned_type, :string add :mentioned_id, :integer timestamps end end end
22.45
55
0.66147
796c16ca6aca4b4dbec8ae82fefc97ebeb298cb4
59
ex
Elixir
web/views/layout_view.ex
mallond/elixir-mix
dfdec1faace5e4457cecf4a34c83ca3c9c0f0f5f
[ "MIT" ]
1
2017-10-05T08:53:03.000Z
2017-10-05T08:53:03.000Z
web/views/layout_view.ex
mallond/elixir-mix
dfdec1faace5e4457cecf4a34c83ca3c9c0f0f5f
[ "MIT" ]
null
null
null
web/views/layout_view.ex
mallond/elixir-mix
dfdec1faace5e4457cecf4a34c83ca3c9c0f0f5f
[ "MIT" ]
1
2019-04-06T02:33:19.000Z
2019-04-06T02:33:19.000Z
defmodule ElixirMix.LayoutView do use ElixirMix.View end
14.75
33
0.830508
796c1821612742b7626fc1ee82fd7855dbea7d48
1,868
ex
Elixir
lib/scentenced_web/controllers/perfume_controller.ex
cNille/scentenced
ca6cc97bec1122047be928bb62b5ab0021cb88e8
[ "MIT" ]
null
null
null
lib/scentenced_web/controllers/perfume_controller.ex
cNille/scentenced
ca6cc97bec1122047be928bb62b5ab0021cb88e8
[ "MIT" ]
1
2020-07-17T08:20:59.000Z
2020-07-17T08:20:59.000Z
lib/scentenced_web/controllers/perfume_controller.ex
cNille/scentenced
ca6cc97bec1122047be928bb62b5ab0021cb88e8
[ "MIT" ]
null
null
null
defmodule ScentencedWeb.PerfumeController do use ScentencedWeb, :controller alias Scentenced.Perfumes alias Scentenced.Perfumes.Perfume def index(conn, _params) do perfumes = Perfumes.list_perfumes() render(conn, "index.html", perfumes: perfumes) end def new(conn, _params) do changeset = Perfumes.change_perfume(%Perfume{}) render(conn, "new.html", changeset: changeset) end def create(conn, %{"perfume" => perfume_params}) do case Perfumes.create_perfume(perfume_params) do {:ok, perfume} -> conn |> put_flash(:info, "Perfume created successfully.") |> redirect(to: Routes.perfume_path(conn, :show, perfume)) {:error, %Ecto.Changeset{} = changeset} -> render(conn, "new.html", changeset: changeset) end end def show(conn, %{"id" => id}) do perfume = Perfumes.get_perfume!(id) render(conn, "show.html", perfume: perfume) end def edit(conn, %{"id" => id}) do perfume = Perfumes.get_perfume!(id) changeset = Perfumes.change_perfume(perfume) render(conn, "edit.html", perfume: perfume, changeset: changeset) end def update(conn, %{"id" => id, "perfume" => perfume_params}) do perfume = Perfumes.get_perfume!(id) case Perfumes.update_perfume(perfume, perfume_params) do {:ok, perfume} -> conn |> put_flash(:info, "Perfume updated successfully.") |> redirect(to: Routes.perfume_path(conn, :show, perfume)) {:error, %Ecto.Changeset{} = changeset} -> render(conn, "edit.html", perfume: perfume, changeset: changeset) end end def delete(conn, %{"id" => id}) do perfume = Perfumes.get_perfume!(id) {:ok, _perfume} = Perfumes.delete_perfume(perfume) conn |> put_flash(:info, "Perfume deleted successfully.") |> redirect(to: Routes.perfume_path(conn, :index)) end end
29.650794
73
0.656852
796c1b0f1168ac0d7af37e55eded65b2fd0efe8b
308
ex
Elixir
lib/flashfeed_web/controllers/utilities_controller.ex
alexiob/flashfeed-elixir
72e83c47f556072d26f4a3f195026c2e5b4cd442
[ "MIT" ]
4
2020-02-27T14:29:20.000Z
2021-04-03T19:08:50.000Z
lib/flashfeed_web/controllers/utilities_controller.ex
alexiob/flashfeed-elixir
72e83c47f556072d26f4a3f195026c2e5b4cd442
[ "MIT" ]
6
2020-02-17T21:35:04.000Z
2021-09-02T06:46:46.000Z
lib/flashfeed_web/controllers/utilities_controller.ex
alexiob/flashfeed-elixir
72e83c47f556072d26f4a3f195026c2e5b4cd442
[ "MIT" ]
null
null
null
defmodule FlashfeedWeb.UtilitiesController do use FlashfeedWeb, :controller action_fallback(FlashfeedWeb.FallbackController) def version(conn, _params) do render(conn, "version.txt", name: "flashfeed-elixir", version: Application.spec(:flashfeed, :vsn) |> to_string() ) end end
23.692308
64
0.724026
796c1cf88f5cee2bbac38a9800bbc6e2e21b2d55
6,486
ex
Elixir
web/controllers/recipe_controller.ex
blacksph3re/alastair3
d6064e322b8ef5c6eb8da59a080852179a71b9d5
[ "Apache-2.0" ]
null
null
null
web/controllers/recipe_controller.ex
blacksph3re/alastair3
d6064e322b8ef5c6eb8da59a080852179a71b9d5
[ "Apache-2.0" ]
null
null
null
web/controllers/recipe_controller.ex
blacksph3re/alastair3
d6064e322b8ef5c6eb8da59a080852179a71b9d5
[ "Apache-2.0" ]
null
null
null
defmodule Alastair.RecipeController do use Alastair.Web, :controller import Alastair.Helper alias Alastair.Recipe def index(conn, params) do recipes = from(p in Recipe, where: p.published == true, order_by: :name) |> paginate(params) |> search(params) |> Repo.all render(conn, "index.json", recipes: recipes) end def index_mine(conn, params) do recipes = from(p in Recipe, where: p.created_by == ^conn.assigns.user.id, order_by: :name) |> paginate(params) |> search(params) |> Repo.all render(conn, "index.json", recipes: recipes) end def create(conn, %{"recipe" => recipe_params}) do changeset = Recipe.changeset(%Recipe{created_by: conn.assigns.user.id}, recipe_params) case Repo.insert(changeset) do {:ok, recipe} -> # Store the id as root_version_id, as we are the root ourselves recipe = recipe |> Recipe.changeset |> Ecto.Changeset.force_change(:root_version_id, recipe.id) |> Repo.update! recipe = Repo.preload(recipe, [{:recipes_ingredients, [{:ingredient, [:default_measurement]}]}], force: true) conn |> put_status(:created) |> put_resp_header("location", recipe_path(conn, :show, recipe)) |> render("show.json", recipe: recipe) {:error, changeset} -> conn |> put_status(:unprocessable_entity) |> render(Alastair.ChangesetView, "error.json", changeset: changeset) end end defp determine_permissions(recipe, user) do own = recipe.created_by == user.id %{edit_recipe: user.superadmin || (!recipe.published && own), delete_recipe: user.superadmin || (!recipe.published && own) } end def show(conn, %{"id" => id}) do recipe = Repo.get!(Recipe, id) |> Repo.preload([{:recipes_ingredients, [{:ingredient, [:default_measurement]}]}, :reviews]) # Preload nested recipe_ingredient and ingredient and measurement permissions = determine_permissions(recipe, conn.assigns.user) render(conn, "show.json", recipe: recipe, permissions: permissions) end # An unpublished recipe can be edited directly defp update_unpublished(conn, recipe, recipe_params) do changeset = Recipe.changeset(recipe, recipe_params) # Check if this is the newest version, otherwise refuse the request max_version = from(p in Recipe, where: p.root_version_id == ^recipe.root_version_id) |> Repo.all |> Enum.map(fn(x) -> x.version end) |> Enum.max(fn -> 0 end) if max_version <= recipe.version do case Repo.update(changeset) do {:ok, recipe} -> recipe = Repo.preload(recipe, [{:recipes_ingredients, [{:ingredient, [:default_measurement]}]}], force: true) render(conn, "show.json", recipe: recipe) {:error, changeset} -> conn |> put_status(:unprocessable_entity) |> render(Alastair.ChangesetView, "error.json", changeset: changeset) end else conn |> put_status(:method_not_allowed) |> render(Alastair.ErrorView, "error.json", message: "You can only edit the most recent version of a recipe") end end # An update to a published recipe creates a new version defp update_published(conn, old_recipe, recipe_params) do changeset = old_recipe |> Recipe.duplicate |> Recipe.changeset(recipe_params) # Set the published state of the old version to "unpublished" so it doesn't appear in listings anymore old_recipe |> Recipe.changeset |> Ecto.Changeset.force_change(:published, false) |> Repo.update! case Repo.insert(changeset) do {:ok, recipe} -> recipe = Repo.preload(recipe, [{:recipes_ingredients, [{:ingredient, [:default_measurement]}]}], force: true) render(conn, "show.json", recipe: recipe) {:error, changeset} -> conn |> put_status(:unprocessable_entity) |> render(Alastair.ChangesetView, "error.json", changeset: changeset) end end def update(conn, %{"id" => id, "recipe" => recipe_params}) do # Transaction is needed because old recipe and new recipe should be updated atomically case Repo.transaction(fn -> recipe = from(p in Recipe, where: p.id == ^id, preload: [:recipes_ingredients]) |> Repo.one! # Only the user who created the recipe can still edit it if recipe.created_by != conn.assigns.user.id && !conn.assigns.user.superadmin do conn |> put_status(:method_not_allowed) |> render(Alastair.ErrorView, "error.json", message: "Only the original author of a recipe can edit it") else if recipe.published do update_published(conn, recipe, recipe_params) else update_unpublished(conn, recipe, recipe_params) end end end) do {:ok, conn} -> conn _ -> conn |> put_status(:internal_server_error) |> render(Alastair.ErrorView, "error.json", message: "Something went wrong inside the transaction") end end def delete(conn, %{"id" => id}) do recipe = Repo.get!(Recipe, id) if recipe.published && !conn.assigns.user.superadmin do conn |> put_status(:method_not_allowed) |> render(Alastair.ErrorView, "error.json", message: "You can not delete a published recipe") else if recipe.created_by != conn.assigns.user.id && !conn.assigns.user.superadmin do conn |> put_status(:method_not_allowed) |> render(Alastair.ErrorView, "error.json", message: "You can not delete a recipe which is not yours") else from(p in Alastair.RecipeIngredient, where: p.recipe_id == ^id) |> Repo.delete_all from(p in Alastair.Review, where: p.recipe_id == ^id) |> Repo.delete_all from(p in Alastair.MealRecipe, where: p.recipe_id == ^id) |> Repo.delete_all # Should not exist yet, just to make sure recipe |> Repo.delete! send_resp(conn, :no_content, "") end end end defp calc_avg_review(id) do tmp = from(p in Alastair.Review, where: p.recipe_id == ^id) |> Repo.all |> Enum.reduce({0, 0}, fn(x, acc) -> {elem(acc, 0) + x.rating, elem(acc, 1) + 1} end) case elem(tmp, 1) do 0 -> nil _ -> elem(tmp, 0) / elem(tmp, 1) end end def update_avg_review(id) do review = calc_avg_review(id) Repo.get!(Recipe, id) |> Ecto.Changeset.change(avg_review: review) |> Repo.update! end end
33.78125
164
0.641844
796c267c84875762ddc7c4f94c085b394f0cf60c
2,265
ex
Elixir
apps/ewallet_config/test/support/config_test_helper.ex
amadeobrands/ewallet
505b7822721940a7b892a9b35c225e80cc8ac0b4
[ "Apache-2.0" ]
1
2018-12-07T06:21:21.000Z
2018-12-07T06:21:21.000Z
apps/ewallet_config/test/support/config_test_helper.ex
amadeobrands/ewallet
505b7822721940a7b892a9b35c225e80cc8ac0b4
[ "Apache-2.0" ]
null
null
null
apps/ewallet_config/test/support/config_test_helper.ex
amadeobrands/ewallet
505b7822721940a7b892a9b35c225e80cc8ac0b4
[ "Apache-2.0" ]
null
null
null
defmodule EWalletConfig.ConfigTestHelper do @moduledoc """ Contains helper methods to make testing configuration """ alias EWalletConfig.Config alias Ecto.Adapters.SQL.Sandbox def restart_config_genserver(parent, repo, apps, attrs) do {:ok, pid} = Config.start_link() Sandbox.allow(repo, parent, pid) Config.insert_all_defaults(attrs, pid) Enum.each(apps, fn app -> settings = Application.get_env(app, :settings) Config.register_and_load(app, settings, pid) end) pid end def spawn(nodes \\ []) do # Turn node into a distributed node with the given long name :net_kernel.start([:"[email protected]"]) # Allow spawned nodes to fetch all code from this node :erl_boot_server.start([]) allow_boot(to_charlist("127.0.0.1")) nodes |> Enum.map(&Task.async(fn -> spawn_node(&1) end)) |> Enum.map(&Task.await(&1, 30_000)) end defp spawn_node(node_host) do {:ok, node} = :slave.start(to_charlist("127.0.0.1"), node_name(node_host), inet_loader_args()) add_code_paths(node) transfer_configuration(node) ensure_applications_started(node) {:ok, node} end defp rpc(node, module, function, args) do :rpc.block_call(node, module, function, args) end defp inet_loader_args do to_charlist("-loader inet -hosts 127.0.0.1 -setcookie #{:erlang.get_cookie()}") end defp allow_boot(host) do {:ok, ipv4} = :inet.parse_ipv4_address(host) :erl_boot_server.add_slave(ipv4) end defp add_code_paths(node) do rpc(node, :code, :add_paths, [:code.get_path()]) end defp transfer_configuration(node) do for {app_name, _, _} <- Application.loaded_applications() do for {key, val} <- Application.get_all_env(app_name) do rpc(node, Application, :put_env, [app_name, key, val]) end end end defp ensure_applications_started(node) do rpc(node, Application, :ensure_all_started, [:mix]) rpc(node, Mix, :env, [Mix.env()]) for {app_name, _, _} <- Application.loaded_applications() do rpc(node, Application, :ensure_all_started, [app_name]) end end defp node_name(node_host) do node_host |> to_string |> String.split("@") |> Enum.at(0) |> String.to_atom() end end
26.337209
98
0.671965
796c35b9d95be688fe4cdf0993724f04935115db
86
exs
Elixir
test/libralyweb_web/views/page_view_test.exs
acmfi/ACM-libraly-web
0e41135aa8becdbe722a64098982d96e71fcc527
[ "MIT" ]
null
null
null
test/libralyweb_web/views/page_view_test.exs
acmfi/ACM-libraly-web
0e41135aa8becdbe722a64098982d96e71fcc527
[ "MIT" ]
5
2020-09-01T22:13:47.000Z
2021-06-21T18:10:29.000Z
test/libralyweb_web/views/page_view_test.exs
acmfi/ACM-libraly-web
0e41135aa8becdbe722a64098982d96e71fcc527
[ "MIT" ]
null
null
null
defmodule LibralywebWeb.PageViewTest do use LibralywebWeb.ConnCase, async: true end
21.5
41
0.837209
796c3d95f344b5f3a139bb3d1c26bd64f72ba344
1,190
exs
Elixir
test/level_web/graphql/subscriptions/notifications_dismissed_test.exs
mindriot101/level
0a2cbae151869c2d9b79b3bfb388f5d00739ae12
[ "Apache-2.0" ]
928
2018-04-03T16:18:11.000Z
2019-09-09T17:59:55.000Z
test/level_web/graphql/subscriptions/notifications_dismissed_test.exs
mindriot101/level
0a2cbae151869c2d9b79b3bfb388f5d00739ae12
[ "Apache-2.0" ]
74
2018-04-03T00:46:50.000Z
2019-03-10T18:57:27.000Z
test/level_web/graphql/subscriptions/notifications_dismissed_test.exs
mindriot101/level
0a2cbae151869c2d9b79b3bfb388f5d00739ae12
[ "Apache-2.0" ]
89
2018-04-03T17:33:20.000Z
2019-08-19T03:40:20.000Z
defmodule LevelWeb.GraphQL.NotificationsDismissedTest do use LevelWeb.ChannelCase alias Level.Notifications alias Level.Schemas.Post @operation """ subscription UserSubscription { userSubscription { __typename ... on NotificationsDismissedPayload { topic } } } """ setup do {:ok, result} = create_user_and_space() {:ok, Map.put(result, :socket, build_socket(result.user))} end test "receives an event when notifications are dismissed", %{ socket: socket, user: user, space_user: space_user } do post = %Post{id: "abc"} {:ok, _} = Notifications.record_post_created(space_user, post) ref = push_subscription(socket, @operation, %{}) assert_reply(ref, :ok, %{subscriptionId: subscription_id}, 1000) {:ok, _} = Notifications.dismiss_topic(user, "post:abc") push_data = %{ result: %{ data: %{ "userSubscription" => %{ "__typename" => "NotificationsDismissedPayload", "topic" => "post:abc" } } }, subscriptionId: subscription_id } assert_push("subscription:data", ^push_data) end end
23.333333
68
0.615126
796c42f5565a57464d64734784d8525e634ff896
10,550
exs
Elixir
lib/elixir/test/elixir/path_test.exs
namjae/elixir
6d1561a5939d68fb61f422b83271fbc824847395
[ "Apache-2.0" ]
1
2021-05-20T13:08:37.000Z
2021-05-20T13:08:37.000Z
lib/elixir/test/elixir/path_test.exs
namjae/elixir
6d1561a5939d68fb61f422b83271fbc824847395
[ "Apache-2.0" ]
null
null
null
lib/elixir/test/elixir/path_test.exs
namjae/elixir
6d1561a5939d68fb61f422b83271fbc824847395
[ "Apache-2.0" ]
8
2018-02-20T18:30:53.000Z
2019-06-18T14:23:31.000Z
Code.require_file("test_helper.exs", __DIR__) defmodule PathTest do use ExUnit.Case, async: true doctest Path import PathHelpers if :file.native_name_encoding() == :utf8 do test "wildcard with UTF-8" do File.mkdir_p(tmp_path("héllò")) assert Path.wildcard(tmp_path("héllò")) == [tmp_path("héllò")] after File.rm_rf(tmp_path("héllò")) end end test "wildcard/2" do hello = tmp_path("wildcard/.hello") world = tmp_path("wildcard/.hello/world") File.mkdir_p(world) assert Path.wildcard(tmp_path("wildcard/*/*")) == [] assert Path.wildcard(tmp_path("wildcard/**/*")) == [] assert Path.wildcard(tmp_path("wildcard/?hello/world")) == [] assert Path.wildcard(tmp_path("wildcard/*/*"), match_dot: true) == [world] assert Path.wildcard(tmp_path("wildcard/**/*"), match_dot: true) == [hello, world] assert Path.wildcard(tmp_path("wildcard/?hello/world"), match_dot: true) == [world] after File.rm_rf(tmp_path("wildcard")) end test "wildcard/2 raises on null byte" do assert_raise ArgumentError, ~r/null byte/, fn -> Path.wildcard("foo\0bar") end end if windows?() do describe "Windows" do test "relative/1" do assert Path.relative("C:/usr/local/bin") == "usr/local/bin" assert Path.relative("C:\\usr\\local\\bin") == "usr\\local\\bin" assert Path.relative("C:usr\\local\\bin") == "usr\\local\\bin" assert Path.relative("/usr/local/bin") == "usr/local/bin" assert Path.relative("usr/local/bin") == "usr/local/bin" assert Path.relative("../usr/local/bin") == "../usr/local/bin" end test "relative_to/2" do assert Path.relative_to("D:/usr/local/foo", "D:/usr/") == "local/foo" assert Path.relative_to("D:/usr/local/foo", "d:/usr/") == "local/foo" assert Path.relative_to("d:/usr/local/foo", "D:/usr/") == "local/foo" assert Path.relative_to("D:/usr/local/foo", "d:/") == "usr/local/foo" assert Path.relative_to("D:/usr/local/foo", "D:/") == "usr/local/foo" assert Path.relative_to("D:/usr/local/foo", "d:") == "D:/usr/local/foo" assert Path.relative_to("D:/usr/local/foo", "D:") == "D:/usr/local/foo" end test "type/1" do assert Path.type("C:/usr/local/bin") == :absolute assert Path.type('C:\\usr\\local\\bin') == :absolute assert Path.type("C:usr\\local\\bin") == :volumerelative assert Path.type("/usr/local/bin") == :volumerelative assert Path.type('usr/local/bin') == :relative assert Path.type("../usr/local/bin") == :relative end test "split/1" do assert Path.split("C:\\foo\\bar") == ["c:/", "foo", "bar"] assert Path.split("C:/foo/bar") == ["c:/", "foo", "bar"] end end else describe "Unix" do test "relative/1" do assert Path.relative("/usr/local/bin") == "usr/local/bin" assert Path.relative("usr/local/bin") == "usr/local/bin" assert Path.relative("../usr/local/bin") == "../usr/local/bin" assert Path.relative("/") == "." assert Path.relative('/') == "." assert Path.relative(['/usr', ?/, "local/bin"]) == "usr/local/bin" end test "type/1" do assert Path.type("/usr/local/bin") == :absolute assert Path.type("usr/local/bin") == :relative assert Path.type("../usr/local/bin") == :relative assert Path.type('/usr/local/bin') == :absolute assert Path.type('usr/local/bin') == :relative assert Path.type('../usr/local/bin') == :relative assert Path.type(['/usr/', 'local/bin']) == :absolute assert Path.type(['usr/', 'local/bin']) == :relative assert Path.type(['../usr', '/local/bin']) == :relative end end end test "relative_to_cwd/1" do assert Path.relative_to_cwd(__ENV__.file) == Path.relative_to(__ENV__.file, System.cwd!()) assert Path.relative_to_cwd(to_charlist(__ENV__.file)) == Path.relative_to(to_charlist(__ENV__.file), to_charlist(System.cwd!())) end test "absname/1,2" do assert Path.absname("/") |> strip_drive_letter_if_windows == "/" assert Path.absname("/foo") |> strip_drive_letter_if_windows == "/foo" assert Path.absname("/./foo") |> strip_drive_letter_if_windows == "/foo" assert Path.absname("/foo/bar") |> strip_drive_letter_if_windows == "/foo/bar" assert Path.absname("/foo/bar/") |> strip_drive_letter_if_windows == "/foo/bar" assert Path.absname("/foo/bar/../bar") |> strip_drive_letter_if_windows == "/foo/bar/../bar" assert Path.absname("bar", "/foo") == "/foo/bar" assert Path.absname("bar/", "/foo") == "/foo/bar" assert Path.absname("bar/.", "/foo") == "/foo/bar/." assert Path.absname("bar/../bar", "/foo") == "/foo/bar/../bar" assert Path.absname("bar/../bar", "foo") == "foo/bar/../bar" assert Path.absname(["bar/", ?., ?., ["/bar"]], "/foo") == "/foo/bar/../bar" end test "expand/1,2 with user home" do home = System.user_home!() |> Path.absname() assert home == Path.expand("~") assert home == Path.expand('~') assert is_binary(Path.expand("~/foo")) assert is_binary(Path.expand('~/foo')) assert Path.expand("~/file") == Path.join(home, "file") assert Path.expand("~/file", "whatever") == Path.join(home, "file") assert Path.expand("file", Path.expand("~")) == Path.expand("~/file") assert Path.expand("file", "~") == Path.join(home, "file") assert Path.expand("~file") == Path.join(System.cwd!(), "file") end test "expand/1,2" do assert Path.expand("/") |> strip_drive_letter_if_windows == "/" assert Path.expand("/foo/../..") |> strip_drive_letter_if_windows == "/" assert Path.expand("/foo") |> strip_drive_letter_if_windows == "/foo" assert Path.expand("/./foo") |> strip_drive_letter_if_windows == "/foo" assert Path.expand("/../foo") |> strip_drive_letter_if_windows == "/foo" assert Path.expand("/foo/bar") |> strip_drive_letter_if_windows == "/foo/bar" assert Path.expand("/foo/bar/") |> strip_drive_letter_if_windows == "/foo/bar" assert Path.expand("/foo/bar/.") |> strip_drive_letter_if_windows == "/foo/bar" assert Path.expand("/foo/bar/../bar") |> strip_drive_letter_if_windows == "/foo/bar" assert Path.expand("bar", "/foo") |> strip_drive_letter_if_windows == "/foo/bar" assert Path.expand("bar/", "/foo") |> strip_drive_letter_if_windows == "/foo/bar" assert Path.expand("bar/.", "/foo") |> strip_drive_letter_if_windows == "/foo/bar" assert Path.expand("bar/../bar", "/foo") |> strip_drive_letter_if_windows == "/foo/bar" drive_letter = Path.expand("../bar/../bar", "/foo/../foo/../foo") |> strip_drive_letter_if_windows assert drive_letter == "/bar" drive_letter = Path.expand(['..', ?/, "bar/../bar"], '/foo/../foo/../foo') |> strip_drive_letter_if_windows assert "/bar" == drive_letter assert Path.expand("/..") |> strip_drive_letter_if_windows == "/" assert Path.expand("bar/../bar", "foo") == Path.expand("foo/bar") end test "relative_to/2" do assert Path.relative_to("/usr/local/foo", "/usr/local") == "foo" assert Path.relative_to("/usr/local/foo", "/") == "usr/local/foo" assert Path.relative_to("/usr/local/foo", "/etc") == "/usr/local/foo" assert Path.relative_to("/usr/local/foo", "/usr/local/foo") == "/usr/local/foo" assert Path.relative_to("usr/local/foo", "usr/local") == "foo" assert Path.relative_to("usr/local/foo", "etc") == "usr/local/foo" assert Path.relative_to('usr/local/foo', "etc") == "usr/local/foo" assert Path.relative_to("usr/local/foo", "usr/local") == "foo" assert Path.relative_to(["usr", ?/, 'local/foo'], 'usr/local') == "foo" end test "rootname/2" do assert Path.rootname("~/foo/bar.ex", ".ex") == "~/foo/bar" assert Path.rootname("~/foo/bar.exs", ".ex") == "~/foo/bar.exs" assert Path.rootname("~/foo/bar.old.ex", ".ex") == "~/foo/bar.old" assert Path.rootname([?~, '/foo/bar', ".old.ex"], '.ex') == "~/foo/bar.old" end test "extname/1" do assert Path.extname("foo.erl") == ".erl" assert Path.extname("~/foo/bar") == "" assert Path.extname('foo.erl') == ".erl" assert Path.extname('~/foo/bar') == "" end test "dirname/1" do assert Path.dirname("/foo/bar.ex") == "/foo" assert Path.dirname("foo/bar.ex") == "foo" assert Path.dirname("~/foo/bar.ex") == "~/foo" assert Path.dirname("/foo/bar/baz/") == "/foo/bar/baz" assert Path.dirname([?~, "/foo", '/bar.ex']) == "~/foo" end test "basename/1,2" do assert Path.basename("foo") == "foo" assert Path.basename("/foo/bar") == "bar" assert Path.basename("/") == "" assert Path.basename("~/foo/bar.ex", ".ex") == "bar" assert Path.basename("~/foo/bar.exs", ".ex") == "bar.exs" assert Path.basename("~/for/bar.old.ex", ".ex") == "bar.old" assert Path.basename([?~, "/for/bar", '.old.ex'], ".ex") == "bar.old" end test "join/1" do assert Path.join([""]) == "" assert Path.join(["foo"]) == "foo" assert Path.join(["/", "foo", "bar"]) == "/foo/bar" assert Path.join(["~", "foo", "bar"]) == "~/foo/bar" assert Path.join(['/foo/', "/bar/"]) == "/foo/bar" assert Path.join(["/", ""]) == "/" assert Path.join(["/", "", "bar"]) == "/bar" assert Path.join(['foo', [?b, "a", ?r]]) == "foo/bar" assert Path.join([[?f, 'o', "o"]]) == "foo" end test "join/2" do assert Path.join("/foo", "bar") == "/foo/bar" assert Path.join("~", "foo") == "~/foo" assert Path.join("", "bar") == "bar" assert Path.join("bar", "") == "bar" assert Path.join("", "/bar") == "bar" assert Path.join("/bar", "") == "/bar" assert Path.join("foo", "/bar") == "foo/bar" assert Path.join("/foo", "/bar") == "/foo/bar" assert Path.join("/foo", "/bar") == "/foo/bar" assert Path.join("/foo", "./bar") == "/foo/./bar" assert Path.join([?/, "foo"], "./bar") == "/foo/./bar" assert Path.join(["/foo", "bar"], ["fiz", "buz"]) == "/foobar/fizbuz" end test "split/1" do assert Path.split("") == [] assert Path.split("foo") == ["foo"] assert Path.split("/foo/bar") == ["/", "foo", "bar"] assert Path.split([?/, "foo/bar"]) == ["/", "foo", "bar"] end if windows?() do defp strip_drive_letter_if_windows([_d, ?: | rest]), do: rest defp strip_drive_letter_if_windows(<<_d, ?:, rest::binary>>), do: rest else defp strip_drive_letter_if_windows(path), do: path end end
39.513109
98
0.587773
796c5907f443d20281c747bbc2b69f83190d2361
1,919
ex
Elixir
clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3_delete_document_operation_metadata.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
1
2021-12-20T03:40:53.000Z
2021-12-20T03:40:53.000Z
clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3_delete_document_operation_metadata.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
1
2020-08-18T00:11:23.000Z
2020-08-18T00:44:16.000Z
clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3_delete_document_operation_metadata.ex
pojiro/elixir-google-api
928496a017d3875a1929c6809d9221d79404b910
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed 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 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This file is auto generated by the elixir code generator program. # Do not edit this file manually. defmodule GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata do @moduledoc """ Metadata for DeleteDocument operation. ## Attributes * `genericMetadata` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata.t`, *default:* `nil`) - The generic information of the operation. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :genericMetadata => GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata.t() | nil } field(:genericMetadata, as: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata ) end defimpl Poison.Decoder, for: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata do def decode(value, options) do GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata.decode( value, options ) end end defimpl Poison.Encoder, for: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) end end
34.267857
188
0.770193
796c6431331fb915540c7814eb4da13b1af763ac
1,075
ex
Elixir
clients/compute/lib/google_api/compute/v1/model/router_interface.ex
GoNZooo/elixir-google-api
cf3ad7392921177f68091f3d9001f1b01b92f1cc
[ "Apache-2.0" ]
null
null
null
clients/compute/lib/google_api/compute/v1/model/router_interface.ex
GoNZooo/elixir-google-api
cf3ad7392921177f68091f3d9001f1b01b92f1cc
[ "Apache-2.0" ]
null
null
null
clients/compute/lib/google_api/compute/v1/model/router_interface.ex
GoNZooo/elixir-google-api
cf3ad7392921177f68091f3d9001f1b01b92f1cc
[ "Apache-2.0" ]
1
2018-07-28T20:50:50.000Z
2018-07-28T20:50:50.000Z
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); # 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 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an &quot;AS IS&quot; BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This class is auto generated by the swagger code generator program. # https://github.com/swagger-api/swagger-codegen.git # Do not edit the class manually. defmodule GoogleApi.Compute.V1.Model.RouterInterface do @moduledoc """ """ @derive [Poison.Encoder] defstruct [ :"ipRange", :"linkedVpnTunnel", :"name" ] end defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.RouterInterface do def decode(value, _options) do value end end
27.564103
77
0.737674
796c65728ae07d5d50af677cb2550095d0124ab1
13,016
exs
Elixir
test/absinthe/introspection_test.exs
hauptbenutzer/absinthe
f1d76e5c249ca337187971b0c96b1870f53716ed
[ "MIT" ]
null
null
null
test/absinthe/introspection_test.exs
hauptbenutzer/absinthe
f1d76e5c249ca337187971b0c96b1870f53716ed
[ "MIT" ]
null
null
null
test/absinthe/introspection_test.exs
hauptbenutzer/absinthe
f1d76e5c249ca337187971b0c96b1870f53716ed
[ "MIT" ]
1
2018-11-16T02:34:40.000Z
2018-11-16T02:34:40.000Z
defmodule Absinthe.IntrospectionTest do use Absinthe.Case, async: true alias Absinthe.Schema describe "introspection of an enum type" do test "can use __type and value information with deprecations" do result = """ { __type(name: "Channel") { kind name description enumValues(includeDeprecated: true) { name description isDeprecated deprecationReason } } } """ |> run(Absinthe.Fixtures.ColorSchema) assert {:ok, %{ data: %{ "__type" => %{ "name" => "Channel", "description" => "A color channel", "kind" => "ENUM", "enumValues" => values } } }} = result assert [ %{ "name" => "BLUE", "description" => "The color blue", "isDeprecated" => false, "deprecationReason" => nil }, %{ "name" => "GREEN", "description" => "The color green", "isDeprecated" => false, "deprecationReason" => nil }, %{ "name" => "PUCE", "description" => "The color puce", "isDeprecated" => true, "deprecationReason" => "it's ugly" }, %{ "name" => "RED", "description" => "The color red", "isDeprecated" => false, "deprecationReason" => nil } ] == values |> Enum.sort_by(& &1["name"]) end test "can use __type and value information without deprecations" do result = """ { __type(name: "Channel") { kind name description enumValues { name description } } } """ |> run(Absinthe.Fixtures.ColorSchema) assert {:ok, %{ data: %{ "__type" => %{ "name" => "Channel", "description" => "A color channel", "kind" => "ENUM", "enumValues" => values } } }} = result assert [ %{"name" => "BLUE", "description" => "The color blue"}, %{"name" => "GREEN", "description" => "The color green"}, %{"name" => "RED", "description" => "The color red"} ] == values |> Enum.sort_by(& &1["name"]) end test "when used as the defaultValue of an argument" do result = """ { __schema { queryType { fields { name type { name } args { name defaultValue } } } } } """ |> run(Absinthe.Fixtures.ColorSchema) assert {:ok, %{data: %{"__schema" => %{"queryType" => %{"fields" => fields}}}}} = result assert [ %{"name" => "info", "args" => [%{"name" => "channel", "defaultValue" => "RED"}]} ] = fields end end describe "introspection of an input object type" do test "can use __type and ignore deprecated fields" do result = """ { __type(name: "ProfileInput") { kind name description inputFields { name description type { kind name ofType { kind name } } defaultValue } } } """ |> run(Absinthe.Fixtures.ContactSchema) assert_result( {:ok, %{ data: %{ "__type" => %{ "description" => "The basic details for a person", "inputFields" => [ %{ "defaultValue" => "43", "description" => "The person's age", "name" => "age", "type" => %{"kind" => "SCALAR", "name" => "Int", "ofType" => nil} }, %{ "defaultValue" => nil, "description" => nil, "name" => "code", "type" => %{ "kind" => "NON_NULL", "name" => nil, "ofType" => %{"kind" => "SCALAR", "name" => "String"} } }, %{ "defaultValue" => "\"Janet\"", "description" => "The person's name", "name" => "name", "type" => %{"kind" => "SCALAR", "name" => "String", "ofType" => nil} } ], "kind" => "INPUT_OBJECT", "name" => "ProfileInput" } } }}, result ) assert !match?({:ok, %{data: %{"__type" => %{"fields" => _}}}}, result) end defmodule ComplexDefaultSchema do use Absinthe.Schema query do field :complex_default, :string do arg :input, :complex_input, default_value: %{ fancy_value: "qwerty", fancy_nested: %{fancy_bool: false}, fancy_enum: :foo, fancy_list: [:foo, :bar] } end end enum :an_enum do value :foo value :bar end input_object :complex_input do field :fancy_value, :string field :fancy_enum, non_null(:an_enum) field :fancy_list, list_of(:an_enum) field :fancy_nested, :nested_complex_input end input_object :nested_complex_input do field :fancy_bool, :boolean end end test "can introspect complex default_value" do result = """ { __schema { queryType { fields { args { defaultValue } } } } } """ |> run(ComplexDefaultSchema) assert_result( {:ok, %{ data: %{ "__schema" => %{ "queryType" => %{ "fields" => [ %{ "args" => [ %{ "defaultValue" => "{fancyEnum: FOO, fancyList: [FOO, BAR], fancyNested: {fancyBool: false}, fancyValue: \"qwerty\"}" } ] } ] } } } }}, result ) end end describe "introspection of an object type" do test "can use __type and ignore deprecated fields" do result = """ { __type(name: "Person") { kind name description fields { name } } } """ |> run(Absinthe.Fixtures.ContactSchema) assert_result( {:ok, %{ data: %{ "__type" => %{ "name" => "Person", "description" => "A person", "kind" => "OBJECT", "fields" => [%{"name" => "age"}, %{"name" => "name"}, %{"name" => "others"}] } } }}, result ) end test "can use __type and include deprecated fields" do result = """ { __type(name: "Person") { kind name description fields(includeDeprecated: true) { name isDeprecated deprecationReason } } } """ |> run(Absinthe.Fixtures.ContactSchema) assert_result( {:ok, %{ data: %{ "__type" => %{ "description" => "A person", "fields" => [ %{ "deprecationReason" => "change of privacy policy", "isDeprecated" => true, "name" => "address" }, %{"deprecationReason" => nil, "isDeprecated" => false, "name" => "age"}, %{"deprecationReason" => nil, "isDeprecated" => false, "name" => "name"}, %{"deprecationReason" => nil, "isDeprecated" => false, "name" => "others"} ], "kind" => "OBJECT", "name" => "Person" } } }}, result ) end test "can use __type to view interfaces" do result = """ { __type(name: "Person") { interfaces { name } } } """ |> run(Absinthe.Fixtures.ContactSchema) assert_result( {:ok, %{data: %{"__type" => %{"interfaces" => [%{"name" => "NamedEntity"}]}}}}, result ) end defmodule KindSchema do use Absinthe.Schema query do field :foo, :foo end object :foo do field :name, :string field :kind, :string end end test "can use __type with a field named 'kind'" do result = """ { __type(name: "Foo") { name fields { name type { name kind } } } } """ |> run(KindSchema) assert {:ok, %{ data: %{ "__type" => %{ "fields" => [ %{"name" => "kind", "type" => %{"kind" => "SCALAR", "name" => "String"}}, %{"name" => "name", "type" => %{"kind" => "SCALAR", "name" => "String"}} ], "name" => "Foo" } } }} = result end test "can use __schema with a field named 'kind'" do result = """ { __schema { queryType { fields { name type { name kind } } } } } """ |> run(KindSchema) assert {:ok, %{ data: %{ "__schema" => %{ "queryType" => %{ "fields" => [ %{"name" => "foo", "type" => %{"name" => "Foo", "kind" => "OBJECT"}} ] } } } }} = result end end defmodule MySchema do use Absinthe.Schema query do field :greeting, type: :string, description: "A traditional greeting", resolve: fn _, _ -> {:ok, "Hah!"} end end end describe "introspection of a scalar type" do test "can use __type" do result = """ { __type(name: "String") { kind name description, fields { name } } } """ |> run(MySchema) string = Schema.lookup_type(MySchema, :string) assert_result( {:ok, %{ data: %{ "__type" => %{ "name" => string.name, "description" => string.description, "kind" => "SCALAR", "fields" => nil } } }}, result ) end end describe "introspection of a union type" do test "can use __type and get possible types" do result = """ { __type(name: "SearchResult") { kind name description possibleTypes { name } } } """ |> run(Absinthe.Fixtures.ContactSchema) assert_result( {:ok, %{ data: %{ "__type" => %{ "description" => "A search result", "kind" => "UNION", "name" => "SearchResult", "possibleTypes" => [%{"name" => "Business"}, %{"name" => "Person"}] } } }}, result ) end end end
24.604915
125
0.355639
796c7c526d46245832ee6708de229374c0c268c8
346
exs
Elixir
config/dev.exs
dmccown/kanban
bf955b2b1f30176c3380b2ee7e1c5ba1174b8d72
[ "MIT" ]
1
2020-06-30T11:42:09.000Z
2020-06-30T11:42:09.000Z
config/dev.exs
dmccown/kanban
bf955b2b1f30176c3380b2ee7e1c5ba1174b8d72
[ "MIT" ]
null
null
null
config/dev.exs
dmccown/kanban
bf955b2b1f30176c3380b2ee7e1c5ba1174b8d72
[ "MIT" ]
null
null
null
use Mix.Config config :kanban, Kanban.Endpoint, http: [port: System.get_env("PORT") || 4000], debug_errors: true, cache_static_lookup: false # Enables code reloading for development config :phoenix, :code_reloader, true # Do not include metadata nor timestamps in development logs config :logger, :console, format: "[$level] $message\n"
26.615385
60
0.748555
796c7d1743693e23201e828335a9872dbdc0ad64
411
ex
Elixir
lib/gossip/test_callback.ex
adamkittelson/gossip-elixir
bf131fc0dd225d2e89a221571b27bad5d60db308
[ "MIT" ]
null
null
null
lib/gossip/test_callback.ex
adamkittelson/gossip-elixir
bf131fc0dd225d2e89a221571b27bad5d60db308
[ "MIT" ]
null
null
null
lib/gossip/test_callback.ex
adamkittelson/gossip-elixir
bf131fc0dd225d2e89a221571b27bad5d60db308
[ "MIT" ]
null
null
null
defmodule Gossip.TestCallback do @moduledoc false @behaviour Gossip.Client @impl true def user_agent(), do: "Test Client" @impl true def channels(), do: [] @impl true def players(), do: [] @impl true def message_broadcast(_message), do: :ok @impl true def player_sign_in(_game_name, _player_name), do: :ok @impl true def player_sign_out(_game_name, _player_name), do: :ok end
17.125
56
0.690998
796c80d717f7741d4239bb93cb843eba07738ab1
331
exs
Elixir
test/e2e/test/test_helper.exs
gregjohnsonsaltaire/hologram
aa8e9ea0d599def864c263cc37cc8ee31f02ac4a
[ "MIT" ]
40
2022-01-19T20:27:36.000Z
2022-03-31T18:17:41.000Z
test/e2e/test/test_helper.exs
gregjohnsonsaltaire/hologram
aa8e9ea0d599def864c263cc37cc8ee31f02ac4a
[ "MIT" ]
42
2022-02-03T22:52:43.000Z
2022-03-26T20:57:32.000Z
test/e2e/test/test_helper.exs
gregjohnsonsaltaire/hologram
aa8e9ea0d599def864c263cc37cc8ee31f02ac4a
[ "MIT" ]
3
2022-02-10T04:00:37.000Z
2022-03-08T22:07:45.000Z
alias Hologram.Compiler.Reflection alias HologramE2EWeb.Endpoint ExUnit.start() (Reflection.release_static_path() <> "/hologram/runtime*") |> Path.wildcard() |> Enum.each(&File.rm!/1) Mix.Task.run("holo.assets.build") {:ok, _} = Application.ensure_all_started(:wallaby) Application.put_env(:wallaby, :base_url, Endpoint.url())
23.642857
58
0.749245
796c96e84e821d8399e61f2efd5b734324aa8f63
2,012
ex
Elixir
clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_longrunning__list_operations_response.ex
medikent/elixir-google-api
98a83d4f7bfaeac15b67b04548711bb7e49f9490
[ "Apache-2.0" ]
null
null
null
clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_longrunning__list_operations_response.ex
medikent/elixir-google-api
98a83d4f7bfaeac15b67b04548711bb7e49f9490
[ "Apache-2.0" ]
1
2020-12-18T09:25:12.000Z
2020-12-18T09:25:12.000Z
clients/video_intelligence/lib/google_api/video_intelligence/v1/model/google_longrunning__list_operations_response.ex
medikent/elixir-google-api
98a83d4f7bfaeac15b67b04548711bb7e49f9490
[ "Apache-2.0" ]
1
2020-10-04T10:12:44.000Z
2020-10-04T10:12:44.000Z
# Copyright 2019 Google LLC # # Licensed 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 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This file is auto generated by the elixir code generator program. # Do not edit this file manually. defmodule GoogleApi.VideoIntelligence.V1.Model.GoogleLongrunning_ListOperationsResponse do @moduledoc """ The response message for Operations.ListOperations. ## Attributes * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The standard List next-page token. * `operations` (*type:* `list(GoogleApi.VideoIntelligence.V1.Model.GoogleLongrunning_Operation.t)`, *default:* `nil`) - A list of operations that matches the specified filter in the request. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :nextPageToken => String.t(), :operations => list(GoogleApi.VideoIntelligence.V1.Model.GoogleLongrunning_Operation.t()) } field(:nextPageToken) field(:operations, as: GoogleApi.VideoIntelligence.V1.Model.GoogleLongrunning_Operation, type: :list ) end defimpl Poison.Decoder, for: GoogleApi.VideoIntelligence.V1.Model.GoogleLongrunning_ListOperationsResponse do def decode(value, options) do GoogleApi.VideoIntelligence.V1.Model.GoogleLongrunning_ListOperationsResponse.decode( value, options ) end end defimpl Poison.Encoder, for: GoogleApi.VideoIntelligence.V1.Model.GoogleLongrunning_ListOperationsResponse do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) end end
33.533333
194
0.746521
796cac1ef5615ce71e55052394d4ea0f0bb26878
853
ex
Elixir
lib/supervisor.ex
pringlized/Elber
81394ad29b7a67ac9b8d3e249cde252ec5c44697
[ "MIT" ]
1
2019-06-20T07:06:16.000Z
2019-06-20T07:06:16.000Z
lib/supervisor.ex
pringlized/Elber
81394ad29b7a67ac9b8d3e249cde252ec5c44697
[ "MIT" ]
null
null
null
lib/supervisor.ex
pringlized/Elber
81394ad29b7a67ac9b8d3e249cde252ec5c44697
[ "MIT" ]
null
null
null
defmodule Elber.Supervisor do use Supervisor def start_link(config) do IO.inspect config Supervisor.start_link(__MODULE__, config, name: __MODULE__) end # ------------------------------------ # PRIVATE # ------------------------------------ defp via_tuple(name) do {:via, Registry, {:registry, name}} end # ------------------------------------ # CALLBACKS # ------------------------------------ def init(config) do children = [ supervisor(Registry, [:unique, :zone_registry], [id: :zone_registry]), worker(Elber.Server, [self(), config], name: :city_server) ] opts = [strategy: :one_for_all, max_restart: 1, max_time: 3600 ] supervise(children, opts) end end
25.848485
82
0.445487
796cf339213738767195f506e7839e0c1ea9e042
3,007
ex
Elixir
lib/asciinema_web/controllers/asciicast_controller.ex
potherca-contrib/asciinema-server
c5ac6e45e8f117d4d59c9c33da6b59b448e40f0e
[ "Apache-2.0" ]
null
null
null
lib/asciinema_web/controllers/asciicast_controller.ex
potherca-contrib/asciinema-server
c5ac6e45e8f117d4d59c9c33da6b59b448e40f0e
[ "Apache-2.0" ]
null
null
null
lib/asciinema_web/controllers/asciicast_controller.ex
potherca-contrib/asciinema-server
c5ac6e45e8f117d4d59c9c33da6b59b448e40f0e
[ "Apache-2.0" ]
null
null
null
defmodule AsciinemaWeb.AsciicastController do use AsciinemaWeb, :controller alias Asciinema.{Asciicasts, PngGenerator} alias Asciinema.Asciicasts.Asciicast plug :put_layout, "app2.html" plug :clear_main_class def index(conn, _params) do redirect(conn, to: asciicast_path(conn, :category, :featured)) end def category(conn, %{"category" => c} = params) when c in ["featured", "public"] do category = String.to_existing_atom(c) order = if params["order"] == "popularity", do: :popularity, else: :date assigns = [ page_title: String.capitalize("#{category} asciicasts"), category: category, page: Asciicasts.paginate_asciicasts(category, order, params["page"]), order: order ] render(conn, "category.html", assigns) end def category(conn, _params) do redirect(conn, to: asciicast_path(conn, :category, :featured)) end def show(conn, %{"id" => id} = _params) do asciicast = Asciicasts.get_asciicast!(id) do_show(conn, get_format(conn), asciicast) end def do_show(conn, format, asciicast) when format in ["json", "cast"] do path = Asciicast.json_store_path(asciicast) filename = download_filename(asciicast, conn.params) file_store().serve_file(conn, path, filename) end @js_max_age 60 def do_show(conn, "js", _asciicast) do path = Application.app_dir(:asciinema, "priv/static/js/embed.js") conn |> put_resp_content_type("application/javascript") |> put_resp_header("cache-control", "public, max-age=#{@js_max_age}") |> send_file(200, path) end @png_max_age 604_800 # 7 days def do_show(conn, "png", asciicast) do user = Repo.preload(asciicast, :user).user png_params = Asciicast.png_params(asciicast, user) case PngGenerator.generate(asciicast, png_params) do {:ok, png_path} -> conn |> put_resp_header("content-type", MIME.from_path(png_path)) |> put_resp_header("cache-control", "public, max-age=#{@png_max_age}") |> send_file(200, png_path) |> halt {:error, :busy} -> conn |> put_resp_header("retry-after", "5") |> send_resp(503, "") end end def do_show(conn, "gif", asciicast) do conn |> put_layout("simple.html") |> render("gif.html", file_url: asciicast_file_url(conn, asciicast)) end def iframe(conn, %{"id" => id}) do asciicast = Asciicasts.get_asciicast!(id) conn |> put_layout("iframe.html") |> delete_resp_header("x-frame-options") |> render("iframe.html", file_url: asciicast_file_url(conn, asciicast)) end defp download_filename(%Asciicast{version: version, id: id}, %{"dl" => _}) do case version do 0 -> "#{id}.json" 1 -> "#{id}.json" 2 -> "#{id}.cast" end end defp download_filename(_asciicast, _params) do nil end defp file_store do Application.get_env(:asciinema, :file_store) end defp clear_main_class(conn, _) do assign(conn, :main_class, "") end end
27.842593
85
0.656801
796d12d17b684462e0dbfff0b6fb50c9dcece054
47,112
exs
Elixir
test/unit/vocabulary_namespace_test.exs
marcelotto/rdf-ex
12adce69eb2dbff027cbc83aaaf912067aea1b02
[ "MIT" ]
53
2017-06-25T22:20:44.000Z
2020-04-27T17:27:51.000Z
test/unit/vocabulary_namespace_test.exs
marcelotto/rdf-ex
12adce69eb2dbff027cbc83aaaf912067aea1b02
[ "MIT" ]
7
2017-06-25T00:29:11.000Z
2020-03-11T00:23:47.000Z
test/unit/vocabulary_namespace_test.exs
marcelotto/rdf-ex
12adce69eb2dbff027cbc83aaaf912067aea1b02
[ "MIT" ]
2
2018-01-19T15:48:27.000Z
2020-03-01T00:29:35.000Z
defmodule RDF.Vocabulary.NamespaceTest do use ExUnit.Case doctest RDF.Vocabulary.Namespace import RDF.Sigils alias RDF.Description @compile {:no_warn_undefined, RDF.Vocabulary.NamespaceTest.TestNS.EX} @compile {:no_warn_undefined, RDF.Vocabulary.NamespaceTest.TestNS.ExampleFromGraph} @compile {:no_warn_undefined, RDF.Vocabulary.NamespaceTest.TestNS.ExampleFromNTriplesFile} @compile {:no_warn_undefined, RDF.Vocabulary.NamespaceTest.TestNS.NonStrictExampleFromTerms} @compile {:no_warn_undefined, RDF.Vocabulary.NamespaceTest.TestNS.NonStrictExampleFromAliasedTerms} @compile {:no_warn_undefined, RDF.Vocabulary.NamespaceTest.TestNS.StrictExampleFromTerms} @compile {:no_warn_undefined, RDF.Vocabulary.NamespaceTest.NSofEdgeCases.Example} @compile {:no_warn_undefined, RDF.Vocabulary.NamespaceTest.NSwithKernelConflicts.Example} @compile {:no_warn_undefined, RDF.Vocabulary.NamespaceTest.NSWithAliasesForElixirTerms.Example} @compile {:no_warn_undefined, RDF.Vocabulary.NamespaceTest.NSwithUnderscoreTerms.Example} @compile {:no_warn_undefined, RDF.Vocabulary.NamespaceTest.NSWithIgnoredTerms.ExampleIgnoredLowercasedTerm} @compile {:no_warn_undefined, RDF.Vocabulary.NamespaceTest.NSWithIgnoredTerms.ExampleIgnoredNonStrictLowercasedTerm} @compile {:no_warn_undefined, RDF.Vocabulary.NamespaceTest.NSWithIgnoredTerms.ExampleIgnoredLowercasedTermWithAlias} @compile {:no_warn_undefined, RDF.Vocabulary.NamespaceTest.NSWithIgnoredTerms.ExampleIgnoredLowercasedAlias} defmodule TestNS do use RDF.Vocabulary.Namespace defvocab EX, base_iri: "http://example.com/", terms: ~w[], strict: false defvocab EXS, base_iri: "http://example.com/strict#", terms: ~w[foo bar] defvocab ExampleFromGraph, base_iri: "http://example.com/from_graph#", data: RDF.Graph.new([ {~I<http://example.com/from_graph#foo>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property>}, {~I<http://example.com/from_graph#Bar>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, ~I<http://www.w3.org/2000/01/rdf-schema#Resource>} ]) defvocab ExampleFromDataset, base_iri: "http://example.com/from_dataset#", data: RDF.Dataset.new([ {~I<http://example.com/from_dataset#foo>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property>}, {~I<http://example.com/from_dataset#Bar>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, ~I<http://www.w3.org/2000/01/rdf-schema#Resource>, ~I<http://example.com/from_dataset#Graph>} ]) defvocab ExampleFromNTriplesFile, base_iri: "http://example.com/from_ntriples/", file: "test/data/vocab_ns_example.nt" defvocab ExampleFromNQuadsFile, base_iri: "http://example.com/from_nquads/", file: "test/data/vocab_ns_example.nq" defvocab ExampleFromTurtleFile, base_iri: "http://example.com/from_turtle/", file: "test/data/vocab_ns_example.ttl" defvocab StrictExampleFromTerms, base_iri: "http://example.com/strict_from_terms#", terms: ~w[foo Bar] defvocab NonStrictExampleFromTerms, base_iri: "http://example.com/non_strict_from_terms#", terms: ~w[foo Bar], strict: false defvocab StrictExampleFromAliasedTerms, base_iri: "http://example.com/strict_from_aliased_terms#", terms: ~w[term1 Term2 Term-3 term-4], alias: [ Term1: "term1", term2: "Term2", Term3: "Term-3", term4: "term-4" ] defvocab NonStrictExampleFromAliasedTerms, base_iri: "http://example.com/non_strict_from_aliased_terms#", terms: ~w[], alias: [ Term1: "term1", term2: "Term2", Term3: "Term-3", term4: "term-4" ], strict: false defvocab ExampleWithSynonymAliases, base_iri: "http://example.com/ex#", terms: ~w[bar Bar], alias: [foo: "bar", baz: "bar", Foo: "Bar", Baz: "Bar"] end describe "defvocab with bad base iri" do test "without a base_iri, an error is raised" do assert_raise KeyError, fn -> defmodule NSWithoutBaseIRI do use RDF.Vocabulary.Namespace defvocab Example, terms: [] end end end test "when the base_iri doesn't end with '/' or '#', an error is raised" do assert_raise RDF.Namespace.InvalidVocabBaseIRIError, fn -> defmodule NSWithInvalidBaseIRI1 do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/base_iri4", terms: [] end end end test "when the base_iri isn't a valid IRI, an error is raised" do assert_raise RDF.Namespace.InvalidVocabBaseIRIError, fn -> defmodule NSWithInvalidBaseIRI2 do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "invalid", terms: [] end end assert_raise RDF.Namespace.InvalidVocabBaseIRIError, fn -> defmodule NSWithInvalidBaseIRI3 do use RDF.Vocabulary.Namespace defvocab Example, base_iri: :foo, terms: [] end end end end describe "defvocab with bad terms" do test "when the given file not found, an error is raised" do assert_raise File.Error, fn -> defmodule NSWithMissingVocabFile do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/ex#", file: "something.nt" end end end end describe "defvocab with bad aliases" do test "when an alias contains invalid characters, an error is raised" do assert_raise RDF.Namespace.InvalidAliasError, fn -> defmodule NSWithInvalidTerms do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/ex#", terms: ~w[foo], alias: ["foo-bar": "foo"] end end end test "when trying to map an already existing term, an error is raised" do assert_raise RDF.Namespace.InvalidAliasError, fn -> defmodule NSWithInvalidAliases1 do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/ex#", terms: ~w[foo bar], alias: [foo: "bar"] end end end test "when strict and trying to map to a term not in the vocabulary, an error is raised" do assert_raise RDF.Namespace.InvalidAliasError, fn -> defmodule NSWithInvalidAliases2 do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/ex#", terms: ~w[], alias: [foo: "bar"] end end end test "when defining an alias for an alias, an error is raised" do assert_raise RDF.Namespace.InvalidAliasError, fn -> defmodule NSWithInvalidAliases3 do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/ex#", terms: ~w[bar], alias: [foo: "bar", baz: "foo"] end end end end test "defvocab with special terms" do defmodule NSofEdgeCases do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/ex#", terms: ~w[ nil true false do end else try rescue catch after not cond inbits inlist receive __info__ __MODULE__ __FILE__ __DIR__ __ENV__ __CALLER__ ] # This one also passes the tests, but causes some warnings: # __block__ end alias NSofEdgeCases.Example alias TestNS.EX assert Example.nil() == ~I<http://example.com/ex#nil> assert Example.true() == ~I<http://example.com/ex#true> assert Example.false() == ~I<http://example.com/ex#false> assert Example.do() == ~I<http://example.com/ex#do> assert Example.end() == ~I<http://example.com/ex#end> assert Example.else() == ~I<http://example.com/ex#else> assert Example.try() == ~I<http://example.com/ex#try> assert Example.rescue() == ~I<http://example.com/ex#rescue> assert Example.catch() == ~I<http://example.com/ex#catch> assert Example.after() == ~I<http://example.com/ex#after> assert Example.not() == ~I<http://example.com/ex#not> assert Example.cond() == ~I<http://example.com/ex#cond> assert Example.inbits() == ~I<http://example.com/ex#inbits> assert Example.inlist() == ~I<http://example.com/ex#inlist> assert Example.receive() == ~I<http://example.com/ex#receive> # assert Example.__block__ == ~I<http://example.com/ex#__block__> assert Example.__info__() == ~I<http://example.com/ex#__info__> assert Example.__MODULE__() == ~I<http://example.com/ex#__MODULE__> assert Example.__FILE__() == ~I<http://example.com/ex#__FILE__> assert Example.__DIR__() == ~I<http://example.com/ex#__DIR__> assert Example.__ENV__() == ~I<http://example.com/ex#__ENV__> assert Example.__CALLER__() == ~I<http://example.com/ex#__CALLER__> assert Example.nil(EX.S, 1) == RDF.description(EX.S, init: {EX.S, Example.nil(), 1}) assert Example.true(EX.S, 1) == RDF.description(EX.S, init: {EX.S, Example.true(), 1}) assert Example.false(EX.S, 1) == RDF.description(EX.S, init: {EX.S, Example.false(), 1}) assert Example.do(EX.S, 1) == RDF.description(EX.S, init: {EX.S, Example.do(), 1}) assert Example.end(EX.S, 1) == RDF.description(EX.S, init: {EX.S, Example.end(), 1}) assert Example.else(EX.S, 1) == RDF.description(EX.S, init: {EX.S, Example.else(), 1}) assert Example.try(EX.S, 1) == RDF.description(EX.S, init: {EX.S, Example.try(), 1}) assert Example.rescue(EX.S, 1) == RDF.description(EX.S, init: {EX.S, Example.rescue(), 1}) assert Example.catch(EX.S, 1) == RDF.description(EX.S, init: {EX.S, Example.catch(), 1}) assert Example.after(EX.S, 1) == RDF.description(EX.S, init: {EX.S, Example.after(), 1}) assert Example.not(EX.S, 1) == RDF.description(EX.S, init: {EX.S, Example.not(), 1}) assert Example.cond(EX.S, 1) == RDF.description(EX.S, init: {EX.S, Example.cond(), 1}) assert Example.inbits(EX.S, 1) == RDF.description(EX.S, init: {EX.S, Example.inbits(), 1}) assert Example.inlist(EX.S, 1) == RDF.description(EX.S, init: {EX.S, Example.inlist(), 1}) assert Example.receive(EX.S, 1) == RDF.description(EX.S, init: {EX.S, Example.receive(), 1}) end test "defvocab with terms in conflict with Kernel functions" do defmodule NSwithKernelConflicts do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/ex#", terms: ~w[ abs apply binary_part binding bit_size byte_size ceil destructure div elem exit floor get_and_update_in get_in hd inspect is_atom is_tuple length make_ref map_size max min node not pop_in put_elem put_in raise rem reraise round self send spawn spawn_link spawn_monitor struct throw tl to_charlist to_string trunc tuple_size update_in use ] end alias NSwithKernelConflicts.Example alias TestNS.EX assert Example.abs() == ~I<http://example.com/ex#abs> assert Example.apply() == ~I<http://example.com/ex#apply> assert Example.binary_part() == ~I<http://example.com/ex#binary_part> assert Example.binding() == ~I<http://example.com/ex#binding> assert Example.bit_size() == ~I<http://example.com/ex#bit_size> assert Example.byte_size() == ~I<http://example.com/ex#byte_size> assert Example.ceil() == ~I<http://example.com/ex#ceil> assert Example.destructure() == ~I<http://example.com/ex#destructure> assert Example.div() == ~I<http://example.com/ex#div> assert Example.elem() == ~I<http://example.com/ex#elem> assert Example.exit() == ~I<http://example.com/ex#exit> assert Example.floor() == ~I<http://example.com/ex#floor> assert Example.get_and_update_in() == ~I<http://example.com/ex#get_and_update_in> assert Example.get_in() == ~I<http://example.com/ex#get_in> assert Example.hd() == ~I<http://example.com/ex#hd> assert Example.inspect() == ~I<http://example.com/ex#inspect> assert Example.is_atom() == ~I<http://example.com/ex#is_atom> assert Example.is_tuple() == ~I<http://example.com/ex#is_tuple> assert Example.length() == ~I<http://example.com/ex#length> assert Example.make_ref() == ~I<http://example.com/ex#make_ref> assert Example.map_size() == ~I<http://example.com/ex#map_size> assert Example.max() == ~I<http://example.com/ex#max> assert Example.min() == ~I<http://example.com/ex#min> assert Example.node() == ~I<http://example.com/ex#node> assert Example.not() == ~I<http://example.com/ex#not> assert Example.pop_in() == ~I<http://example.com/ex#pop_in> assert Example.put_elem() == ~I<http://example.com/ex#put_elem> assert Example.put_in() == ~I<http://example.com/ex#put_in> assert Example.raise() == ~I<http://example.com/ex#raise> assert Example.rem() == ~I<http://example.com/ex#rem> assert Example.reraise() == ~I<http://example.com/ex#reraise> assert Example.round() == ~I<http://example.com/ex#round> assert Example.self() == ~I<http://example.com/ex#self> assert Example.send() == ~I<http://example.com/ex#send> assert Example.spawn() == ~I<http://example.com/ex#spawn> assert Example.spawn_link() == ~I<http://example.com/ex#spawn_link> assert Example.spawn_monitor() == ~I<http://example.com/ex#spawn_monitor> assert Example.struct() == ~I<http://example.com/ex#struct> assert Example.throw() == ~I<http://example.com/ex#throw> assert Example.tl() == ~I<http://example.com/ex#tl> assert Example.to_charlist() == ~I<http://example.com/ex#to_charlist> assert Example.to_string() == ~I<http://example.com/ex#to_string> assert Example.trunc() == ~I<http://example.com/ex#trunc> assert Example.tuple_size() == ~I<http://example.com/ex#tuple_size> assert Example.update_in() == ~I<http://example.com/ex#update_in> assert Example.use() == ~I<http://example.com/ex#use> assert %Description{} = EX.S |> Example.update_in(EX.O1, EX.O2) end describe "defvocab with invalid terms" do test "terms with a special meaning for Elixir cause a failure" do assert_raise RDF.Namespace.InvalidTermError, ~r/unquote_splicing/s, fn -> defmodule NSWithElixirTerms do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/example#", terms: RDF.Vocabulary.Namespace.invalid_terms() end end end test "alias terms with a special meaning for Elixir cause a failure" do assert_raise RDF.Namespace.InvalidTermError, ~r/unquote_splicing/s, fn -> defmodule NSWithElixirAliasTerms do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/example#", terms: ~w[foo], alias: [ and: "foo", or: "foo", xor: "foo", in: "foo", fn: "foo", def: "foo", when: "foo", if: "foo", for: "foo", case: "foo", with: "foo", quote: "foo", unquote: "foo", unquote_splicing: "foo", alias: "foo", import: "foo", require: "foo", super: "foo", __aliases__: "foo" ] end end end test "terms with a special meaning for Elixir don't cause a failure when they are ignored" do defmodule NSWithIgnoredElixirTerms do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/example#", terms: RDF.Vocabulary.Namespace.invalid_terms(), ignore: RDF.Vocabulary.Namespace.invalid_terms() end end test "terms with a special meaning for Elixir don't cause a failure when an alias is defined" do defmodule NSWithAliasesForElixirTerms do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/example#", terms: RDF.Vocabulary.Namespace.invalid_terms(), alias: [ and_: "and", or_: "or", xor_: "xor", in_: "in", fn_: "fn", when_: "when", if_: "if", unless_: "unless", for_: "for", case_: "case", with_: "with", quote_: "quote", unquote_: "unquote", unquote_splicing_: "unquote_splicing", alias_: "alias", import_: "import", require_: "require", super_: "super", _aliases_: "__aliases__", def_: "def", defp_: "defp", defoverridable_: "defoverridable", defguardp_: "defguardp", defimpl_: "defimpl", defstruct_: "defstruct", defmodule_: "defmodule", defguard_: "defguard", defmacro_: "defmacro", defprotocol_: "defprotocol", defdelegate_: "defdelegate", defexception_: "defexception", defmacrop_: "defmacrop", function_exported: "function_exported?", macro_exported: "macro_exported?" ] end alias NSWithAliasesForElixirTerms.Example assert Example.and_() == ~I<http://example.com/example#and> assert Example.or_() == ~I<http://example.com/example#or> assert Example.xor_() == ~I<http://example.com/example#xor> assert Example.in_() == ~I<http://example.com/example#in> assert Example.fn_() == ~I<http://example.com/example#fn> assert Example.when_() == ~I<http://example.com/example#when> assert Example.if_() == ~I<http://example.com/example#if> assert Example.unless_() == ~I<http://example.com/example#unless> assert Example.for_() == ~I<http://example.com/example#for> assert Example.case_() == ~I<http://example.com/example#case> assert Example.with_() == ~I<http://example.com/example#with> assert Example.quote_() == ~I<http://example.com/example#quote> assert Example.unquote_() == ~I<http://example.com/example#unquote> assert Example.unquote_splicing_() == ~I<http://example.com/example#unquote_splicing> assert Example.alias_() == ~I<http://example.com/example#alias> assert Example.import_() == ~I<http://example.com/example#import> assert Example.require_() == ~I<http://example.com/example#require> assert Example.super_() == ~I<http://example.com/example#super> assert Example._aliases_() == ~I<http://example.com/example#__aliases__> assert Example.def_() == ~I<http://example.com/example#def> assert Example.defp_() == ~I<http://example.com/example#defp> assert Example.defoverridable_() == ~I<http://example.com/example#defoverridable> assert Example.defguardp_() == ~I<http://example.com/example#defguardp> assert Example.defimpl_() == ~I<http://example.com/example#defimpl> assert Example.defstruct_() == ~I<http://example.com/example#defstruct> assert Example.defmodule_() == ~I<http://example.com/example#defmodule> assert Example.defguard_() == ~I<http://example.com/example#defguard> assert Example.defmacro_() == ~I<http://example.com/example#defmacro> assert Example.defprotocol_() == ~I<http://example.com/example#defprotocol> assert Example.defdelegate_() == ~I<http://example.com/example#defdelegate> assert Example.defexception_() == ~I<http://example.com/example#defexception> assert Example.defmacrop_() == ~I<http://example.com/example#defmacrop> assert Example.function_exported() == ~I<http://example.com/example#function_exported?> assert Example.macro_exported() == ~I<http://example.com/example#macro_exported?> end end describe "defvocab invalid character handling" do test "when a term contains unallowed characters and no alias defined, it fails when invalid_characters = :fail" do assert_raise RDF.Namespace.InvalidTermError, ~r/Foo-bar.*foo-bar/s, fn -> defmodule NSWithInvalidTerms1 do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/example#", terms: ~w[Foo-bar foo-bar] end end end test "when a term contains unallowed characters it does not fail when invalid_characters = :ignore" do defmodule NSWithInvalidTerms2 do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/example#", terms: ~w[Foo-bar foo-bar], invalid_characters: :ignore end end end describe "defvocab case violation handling" do test "aliases can fix case violations" do defmodule NSWithBadCasedTerms1 do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/ex#", case_violations: :fail, data: RDF.Graph.new([ {~I<http://example.com/ex#Foo>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property>}, {~I<http://example.com/ex#bar>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, ~I<http://www.w3.org/2000/01/rdf-schema#Resource>} ]), alias: [ foo: "Foo", Bar: "bar" ] end end test "when case_violations == :ignore is set, case violations are ignored" do defmodule NSWithBadCasedTerms2 do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/ex#", case_violations: :ignore, data: RDF.Graph.new([ {~I<http://example.com/ex#Foo>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property>}, {~I<http://example.com/ex#bar>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, ~I<http://www.w3.org/2000/01/rdf-schema#Resource>} ]), alias: [ foo: "Foo", Bar: "bar" ] end end test "a capitalized property without an alias and :case_violations == :fail, raises an error" do assert_raise RDF.Namespace.InvalidTermError, ~r<http://example\.com/ex#Foo>s, fn -> defmodule NSWithBadCasedTerms3 do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/ex#", case_violations: :fail, data: RDF.Graph.new([ {~I<http://example.com/ex#Foo>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property>} ]) end end end test "a lowercased non-property without an alias and :case_violations == :fail, raises an error" do assert_raise RDF.Namespace.InvalidTermError, ~r<http://example\.com/ex#bar>s, fn -> defmodule NSWithBadCasedTerms4 do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/ex#", case_violations: :fail, data: RDF.Graph.new([ {~I<http://example.com/ex#bar>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, ~I<http://www.w3.org/2000/01/rdf-schema#Resource>} ]) end end end test "a capitalized alias for a property and :case_violations == :fail, raises an error" do assert_raise RDF.Namespace.InvalidTermError, fn -> defmodule NSWithBadCasedTerms5 do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/ex#", case_violations: :fail, data: RDF.Graph.new([ {~I<http://example.com/ex#foo>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property>} ]), alias: [Foo: "foo"] end end end test "a lowercased alias for a non-property and :case_violations == :fail, raises an error" do assert_raise RDF.Namespace.InvalidTermError, fn -> defmodule NSWithBadCasedTerms6 do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/ex#", case_violations: :fail, data: RDF.Graph.new([ {~I<http://example.com/ex#Bar>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, ~I<http://www.w3.org/2000/01/rdf-schema#Resource>} ]), alias: [bar: "Bar"] end end end test "terms starting with an underscore are not checked" do defmodule NSWithUnderscoreTerms do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/ex#", case_violations: :fail, data: RDF.Graph.new([ {~I<http://example.com/ex#_Foo>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property>}, {~I<http://example.com/ex#_bar>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, ~I<http://www.w3.org/2000/01/rdf-schema#Resource>} ]) end end end describe "defvocab ignore terms" do defmodule NSWithIgnoredTerms do use RDF.Vocabulary.Namespace defvocab ExampleIgnoredLowercasedTerm, base_iri: "http://example.com/", data: RDF.Graph.new([ {~I<http://example.com/foo>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property>}, {~I<http://example.com/Bar>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, ~I<http://www.w3.org/2000/01/rdf-schema#Resource>} ]), ignore: ["foo"] defvocab ExampleIgnoredCapitalizedTerm, base_iri: "http://example.com/", data: RDF.Dataset.new([ {~I<http://example.com/foo>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property>}, {~I<http://example.com/Bar>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, ~I<http://www.w3.org/2000/01/rdf-schema#Resource>, ~I<http://example.com/from_dataset#Graph>} ]), ignore: ~w[Bar] defvocab ExampleIgnoredLowercasedTermWithAlias, base_iri: "http://example.com/", terms: ~w[foo Bar], alias: [Foo: "foo"], ignore: ~w[foo]a defvocab ExampleIgnoredCapitalizedTermWithAlias, base_iri: "http://example.com/", terms: ~w[foo Bar], alias: [bar: "Bar"], ignore: ~w[Bar]a defvocab ExampleIgnoredLowercasedAlias, base_iri: "http://example.com/", terms: ~w[foo Bar], alias: [bar: "Bar"], ignore: ~w[bar]a defvocab ExampleIgnoredCapitalizedAlias, base_iri: "http://example.com/", terms: ~w[foo Bar], alias: [Foo: "foo"], ignore: ~w[Foo]a defvocab ExampleIgnoredNonStrictLowercasedTerm, base_iri: "http://example.com/", terms: ~w[], strict: false, ignore: ~w[foo]a defvocab ExampleIgnoredNonStrictCapitalizedTerm, base_iri: "http://example.com/", terms: ~w[], strict: false, ignore: ~w[Bar]a end test "resolution of ignored lowercased term on a strict vocab fails" do alias NSWithIgnoredTerms.ExampleIgnoredLowercasedTerm assert ExampleIgnoredLowercasedTerm.__terms__() == [:Bar] assert_raise UndefinedFunctionError, fn -> ExampleIgnoredLowercasedTerm.foo() end end test "resolution of ignored capitalized term on a strict vocab fails" do alias NSWithIgnoredTerms.ExampleIgnoredCapitalizedTerm assert ExampleIgnoredCapitalizedTerm.__terms__() == [:foo] assert_raise RDF.Namespace.UndefinedTermError, fn -> RDF.iri(ExampleIgnoredCapitalizedTerm.Bar) end end test "resolution of ignored lowercased term with alias on a strict vocab fails" do alias NSWithIgnoredTerms.ExampleIgnoredLowercasedTermWithAlias assert ExampleIgnoredLowercasedTermWithAlias.__terms__() == [:Bar, :Foo] assert_raise UndefinedFunctionError, fn -> ExampleIgnoredLowercasedTermWithAlias.foo() end assert RDF.iri(ExampleIgnoredLowercasedTermWithAlias.Foo) == ~I<http://example.com/foo> end test "resolution of ignored capitalized term with alias on a strict vocab fails" do alias NSWithIgnoredTerms.ExampleIgnoredCapitalizedTermWithAlias assert ExampleIgnoredCapitalizedTermWithAlias.__terms__() == [:bar, :foo] assert_raise RDF.Namespace.UndefinedTermError, fn -> RDF.iri(ExampleIgnoredCapitalizedTermWithAlias.Bar) end assert RDF.iri(ExampleIgnoredCapitalizedTermWithAlias.bar()) == ~I<http://example.com/Bar> end test "resolution of ignored lowercased alias on a strict vocab fails" do alias NSWithIgnoredTerms.ExampleIgnoredLowercasedAlias assert ExampleIgnoredLowercasedAlias.__terms__() == [:Bar, :foo] assert RDF.iri(ExampleIgnoredLowercasedAlias.Bar) == ~I<http://example.com/Bar> assert_raise UndefinedFunctionError, fn -> RDF.iri(ExampleIgnoredLowercasedAlias.bar()) end end test "resolution of ignored capitalized alias on a strict vocab fails" do alias NSWithIgnoredTerms.ExampleIgnoredCapitalizedAlias assert ExampleIgnoredCapitalizedAlias.__terms__() == [:Bar, :foo] assert RDF.iri(ExampleIgnoredCapitalizedAlias.foo()) == ~I<http://example.com/foo> assert_raise RDF.Namespace.UndefinedTermError, fn -> RDF.iri(ExampleIgnoredCapitalizedAlias.Foo) end end test "resolution of ignored lowercased term on a non-strict vocab fails" do alias NSWithIgnoredTerms.ExampleIgnoredNonStrictLowercasedTerm assert_raise UndefinedFunctionError, fn -> ExampleIgnoredNonStrictLowercasedTerm.foo() end end test "resolution of ignored capitalized term on a non-strict vocab fails" do alias NSWithIgnoredTerms.ExampleIgnoredNonStrictCapitalizedTerm assert_raise RDF.Namespace.UndefinedTermError, fn -> RDF.iri(ExampleIgnoredNonStrictCapitalizedTerm.Bar) end end test "ignored terms with invalid characters do not raise anything" do defmodule IgnoredTermWithInvalidCharacters do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/", terms: ~w[foo-bar], ignore: ~w[foo-bar]a end end test "ignored terms with case violations do not raise anything" do defmodule IgnoredTermWithCaseViolations do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/", data: RDF.Dataset.new([ {~I<http://example.com/Foo>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property>}, {~I<http://example.com/bar>, ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, ~I<http://www.w3.org/2000/01/rdf-schema#Resource>, ~I<http://example.com/from_dataset#Graph>} ]), case_violations: :fail, ignore: ~w[Foo bar]a end end end test "__base_iri__ returns the base_iri" do alias TestNS.ExampleFromGraph, as: HashVocab alias TestNS.ExampleFromNTriplesFile, as: SlashVocab assert HashVocab.__base_iri__() == "http://example.com/from_graph#" assert SlashVocab.__base_iri__() == "http://example.com/from_ntriples/" end test "__iris__ returns all IRIs of the vocabulary" do alias TestNS.ExampleFromGraph, as: Example1 assert length(Example1.__iris__()) == 2 assert RDF.iri(Example1.foo()) in Example1.__iris__() assert RDF.iri(Example1.Bar) in Example1.__iris__() alias TestNS.ExampleFromNTriplesFile, as: Example2 assert length(Example2.__iris__()) == 2 assert RDF.iri(Example2.foo()) in Example2.__iris__() assert RDF.iri(Example2.Bar) in Example2.__iris__() alias TestNS.ExampleFromNQuadsFile, as: Example3 assert length(Example3.__iris__()) == 2 assert RDF.iri(Example3.foo()) in Example3.__iris__() assert RDF.iri(Example3.Bar) in Example3.__iris__() alias TestNS.ExampleFromTurtleFile, as: Example4 assert length(Example4.__iris__()) == 2 assert RDF.iri(Example4.foo()) in Example4.__iris__() assert RDF.iri(Example4.Bar) in Example4.__iris__() alias TestNS.StrictExampleFromAliasedTerms, as: Example4 assert length(Example4.__iris__()) == 4 assert RDF.iri(Example4.Term1) in Example4.__iris__() assert RDF.iri(Example4.term2()) in Example4.__iris__() assert RDF.iri(Example4.Term3) in Example4.__iris__() assert RDF.iri(Example4.term4()) in Example4.__iris__() end describe "__terms__" do alias TestNS.{ExampleFromGraph, ExampleFromDataset, StrictExampleFromAliasedTerms} test "includes all defined terms" do assert length(ExampleFromGraph.__terms__()) == 2 for term <- ~w[foo Bar]a do assert term in ExampleFromGraph.__terms__() end assert length(ExampleFromDataset.__terms__()) == 2 for term <- ~w[foo Bar]a do assert term in ExampleFromDataset.__terms__() end end test "includes aliases" do assert length(StrictExampleFromAliasedTerms.__terms__()) == 8 for term <- ~w[term1 Term1 term2 Term2 Term3 term4 Term-3 term-4]a do assert term in StrictExampleFromAliasedTerms.__terms__() end end end test "resolving an unqualified term raises an error" do assert_raise RDF.Namespace.UndefinedTermError, fn -> RDF.iri(:foo) end end test "resolving an non-RDF.Namespace module" do assert_raise RDF.Namespace.UndefinedTermError, fn -> RDF.iri(ExUnit.Test) end end test "resolving an top-level module" do assert_raise RDF.Namespace.UndefinedTermError, "ExUnit is not a RDF.Namespace; top-level modules can't be RDF.Namespaces", fn -> RDF.iri(ExUnit) end end test "resolving an non-existing RDF.Namespace module" do assert_raise RDF.Namespace.UndefinedTermError, fn -> RDF.iri(NonExisting.Test) end end describe "term resolution in a strict vocab namespace" do alias TestNS.{ExampleFromGraph, ExampleFromNTriplesFile, StrictExampleFromTerms} test "undefined terms" do assert_raise UndefinedFunctionError, fn -> ExampleFromGraph.undefined() end assert_raise UndefinedFunctionError, fn -> ExampleFromNTriplesFile.undefined() end assert_raise UndefinedFunctionError, fn -> StrictExampleFromTerms.undefined() end assert {:error, %RDF.Namespace.UndefinedTermError{}} = RDF.Namespace.resolve_term(TestNS.ExampleFromGraph.Undefined) assert {:error, %RDF.Namespace.UndefinedTermError{}} = RDF.Namespace.resolve_term(ExampleFromNTriplesFile.Undefined) assert {:error, %RDF.Namespace.UndefinedTermError{}} = RDF.Namespace.resolve_term(StrictExampleFromTerms.Undefined) assert_raise RDF.Namespace.UndefinedTermError, fn -> RDF.Namespace.resolve_term!(TestNS.ExampleFromGraph.Undefined) end assert_raise RDF.Namespace.UndefinedTermError, fn -> RDF.Namespace.resolve_term!(ExampleFromNTriplesFile.Undefined) end assert_raise RDF.Namespace.UndefinedTermError, fn -> RDF.Namespace.resolve_term!(StrictExampleFromTerms.Undefined) end end test "lowercased terms" do assert ExampleFromGraph.foo() == ~I<http://example.com/from_graph#foo> assert RDF.iri(ExampleFromGraph.foo()) == ~I<http://example.com/from_graph#foo> assert ExampleFromNTriplesFile.foo() == ~I<http://example.com/from_ntriples/foo> assert RDF.iri(ExampleFromNTriplesFile.foo()) == ~I<http://example.com/from_ntriples/foo> assert StrictExampleFromTerms.foo() == ~I<http://example.com/strict_from_terms#foo> assert RDF.iri(StrictExampleFromTerms.foo()) == ~I<http://example.com/strict_from_terms#foo> end test "capitalized terms" do assert RDF.iri(ExampleFromGraph.Bar) == ~I<http://example.com/from_graph#Bar> assert RDF.iri(ExampleFromNTriplesFile.Bar) == ~I<http://example.com/from_ntriples/Bar> assert RDF.iri(StrictExampleFromTerms.Bar) == ~I<http://example.com/strict_from_terms#Bar> end test "terms starting with an underscore" do defmodule NSwithUnderscoreTerms do use RDF.Vocabulary.Namespace defvocab Example, base_iri: "http://example.com/ex#", terms: ~w[_foo] end alias NSwithUnderscoreTerms.Example alias TestNS.EX assert Example._foo() == ~I<http://example.com/ex#_foo> assert Example._foo(EX.S, 1) == RDF.description(EX.S, init: {EX.S, Example._foo(), 1}) end end describe "term resolution in a non-strict vocab namespace" do alias TestNS.NonStrictExampleFromTerms test "undefined lowercased terms" do assert NonStrictExampleFromTerms.random() == ~I<http://example.com/non_strict_from_terms#random> end test "undefined capitalized terms" do assert RDF.iri(NonStrictExampleFromTerms.Random) == ~I<http://example.com/non_strict_from_terms#Random> end test "undefined terms starting with an underscore" do assert NonStrictExampleFromTerms._random() == ~I<http://example.com/non_strict_from_terms#_random> end test "defined lowercase terms" do assert NonStrictExampleFromTerms.foo() == ~I<http://example.com/non_strict_from_terms#foo> end test "defined capitalized terms" do assert RDF.iri(NonStrictExampleFromTerms.Bar) == ~I<http://example.com/non_strict_from_terms#Bar> end end describe "term resolution of aliases on a strict vocabulary" do alias TestNS.StrictExampleFromAliasedTerms, as: Example test "the alias resolves to the correct IRI" do assert RDF.iri(Example.Term1) == ~I<http://example.com/strict_from_aliased_terms#term1> assert RDF.iri(Example.term2()) == ~I<http://example.com/strict_from_aliased_terms#Term2> assert RDF.iri(Example.Term3) == ~I<http://example.com/strict_from_aliased_terms#Term-3> assert RDF.iri(Example.term4()) == ~I<http://example.com/strict_from_aliased_terms#term-4> end test "the old term remains resolvable" do assert RDF.iri(Example.term1()) == ~I<http://example.com/strict_from_aliased_terms#term1> assert RDF.iri(Example.Term2) == ~I<http://example.com/strict_from_aliased_terms#Term2> end test "defining multiple aliases for a term" do alias TestNS.ExampleWithSynonymAliases, as: Example assert Example.foo() == Example.baz() assert RDF.iri(Example.foo()) == RDF.iri(Example.baz()) end end describe "term resolution of aliases on a non-strict vocabulary" do alias TestNS.NonStrictExampleFromAliasedTerms, as: Example test "the alias resolves to the correct IRI" do assert RDF.iri(Example.Term1) == ~I<http://example.com/non_strict_from_aliased_terms#term1> assert RDF.iri(Example.term2()) == ~I<http://example.com/non_strict_from_aliased_terms#Term2> assert RDF.iri(Example.Term3) == ~I<http://example.com/non_strict_from_aliased_terms#Term-3> assert RDF.iri(Example.term4()) == ~I<http://example.com/non_strict_from_aliased_terms#term-4> end test "the old term remains resolvable" do assert RDF.iri(Example.term1()) == ~I<http://example.com/non_strict_from_aliased_terms#term1> assert RDF.iri(Example.Term2) == ~I<http://example.com/non_strict_from_aliased_terms#Term2> end end describe "description DSL" do alias TestNS.{EX, EXS} test "one statement with a strict property term" do assert EXS.foo(EX.S, EX.O) == Description.new(EX.S, init: {EXS.foo(), EX.O}) end test "multiple statements with strict property terms and one object" do description = EX.S |> EXS.foo(EX.O1) |> EXS.bar(EX.O2) assert description == Description.new(EX.S, init: [{EXS.foo(), EX.O1}, {EXS.bar(), EX.O2}]) end test "multiple statements with strict property terms and multiple objects in a list" do description = EX.S |> EXS.foo([EX.O1, EX.O2]) |> EXS.bar([EX.O3, EX.O4]) assert description == Description.new(EX.S, init: [ {EXS.foo(), EX.O1}, {EXS.foo(), EX.O2}, {EXS.bar(), EX.O3}, {EXS.bar(), EX.O4} ] ) end test "multiple statements with strict property terms and multiple objects as arguments" do description = EX.S |> EXS.foo(EX.O1, EX.O2) |> EXS.bar(EX.O3, EX.O4, EX.O5) assert description == Description.new(EX.S, init: [ {EXS.foo(), EX.O1}, {EXS.foo(), EX.O2}, {EXS.bar(), EX.O3}, {EXS.bar(), EX.O4}, {EXS.bar(), EX.O5} ] ) end test "one statement with a non-strict property term" do assert EX.p(EX.S, EX.O) == Description.new(EX.S, init: {EX.p(), EX.O}) end test "multiple statements with non-strict property terms and one object" do description = EX.S |> EX.p1(EX.O1) |> EX.p2(EX.O2) assert description == Description.new(EX.S, init: [{EX.p1(), EX.O1}, {EX.p2(), EX.O2}]) end test "multiple statements with non-strict property terms and multiple objects in a list" do description = EX.S |> EX.p1([EX.O1, EX.O2]) |> EX.p2([EX.O3, EX.O4]) assert description == Description.new(EX.S, init: [ {EX.p1(), EX.O1}, {EX.p1(), EX.O2}, {EX.p2(), EX.O3}, {EX.p2(), EX.O4} ] ) end test "multiple statements with non-strict property terms and multiple objects as arguments" do description = EX.S |> EX.p1(EX.O1, EX.O2) |> EX.p2(EX.O3, EX.O4) assert description == Description.new(EX.S, init: [ {EX.p1(), EX.O1}, {EX.p1(), EX.O2}, {EX.p2(), EX.O3}, {EX.p2(), EX.O4} ] ) end test "empty object list" do assert EX.S |> EX.p1([]) == Description.new(EX.S) end end describe "term resolution on the top-level RDF module" do test "capitalized terms" do assert RDF.iri(RDF.Property) == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> assert RDF.iri(RDF.Statement) == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> assert RDF.iri(RDF.List) == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#List> assert RDF.iri(RDF.Nil) == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> assert RDF.iri(RDF.Seq) == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> assert RDF.iri(RDF.Bag) == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> assert RDF.iri(RDF.Alt) == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> assert RDF.iri(RDF.LangString) == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString> assert RDF.iri(RDF.PlainLiteral) == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral> assert RDF.iri(RDF.XMLLiteral) == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> assert RDF.iri(RDF.HTML) == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML> assert RDF.iri(RDF.Property) == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> end test "lowercase terms" do assert RDF.type() == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> assert RDF.subject() == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> assert RDF.predicate() == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> assert RDF.object() == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#object> assert RDF.first() == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#first> assert RDF.rest() == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> assert RDF.value() == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#value> assert RDF.langString() == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString> assert RDF.nil() == ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> end test "description DSL" do alias TestNS.EX assert RDF.type(EX.S, 1) == RDF.NS.RDF.type(EX.S, 1) assert RDF.subject(EX.S, 1, 2) == RDF.NS.RDF.subject(EX.S, 1, 2) assert RDF.predicate(EX.S, 1, 2, 3) == RDF.NS.RDF.predicate(EX.S, 1, 2, 3) assert RDF.object(EX.S, 1, 2, 3, 4) == RDF.NS.RDF.object(EX.S, 1, 2, 3, 4) assert RDF.first(EX.S, 1, 2, 3, 4, 5) == RDF.NS.RDF.first(EX.S, 1, 2, 3, 4, 5) assert RDF.rest(EX.S, [1, 2, 3, 4, 5, 6]) == RDF.NS.RDF.rest(EX.S, [1, 2, 3, 4, 5, 6]) assert RDF.value(EX.S, [1, 2, 3, 4, 5, 6, 7]) == RDF.NS.RDF.value(EX.S, [1, 2, 3, 4, 5, 6, 7]) end end end
37.509554
118
0.618017
796d3519869ebef14a51460fef65008cbf7508f1
2,059
exs
Elixir
template/$PROJECT_NAME$/config/dev.exs
zhulinpinyu/gen_template_phx_live_view
09e89555c4bde7ffd0e9192149b403f5a9d8e61f
[ "MIT" ]
null
null
null
template/$PROJECT_NAME$/config/dev.exs
zhulinpinyu/gen_template_phx_live_view
09e89555c4bde7ffd0e9192149b403f5a9d8e61f
[ "MIT" ]
null
null
null
template/$PROJECT_NAME$/config/dev.exs
zhulinpinyu/gen_template_phx_live_view
09e89555c4bde7ffd0e9192149b403f5a9d8e61f
[ "MIT" ]
null
null
null
use Mix.Config # For development, we disable any cache and enable # debugging and code reloading. # # The watchers configuration can be used to run external # watchers to your application. For example, we use it # with webpack to recompile .js and .css sources. config :<%= @project_name %>, <%= @project_name_camel_case %>Web.Endpoint, http: [port: 4000], debug_errors: true, code_reloader: true, check_origin: false, watchers: [ node: [ "node_modules/webpack/bin/webpack.js", "--mode", "development", "--watch-stdin", cd: Path.expand("../assets", __DIR__) ] ] # ## SSL Support # # In order to use HTTPS in development, a self-signed # certificate can be generated by running the following # Mix task: # # mix phx.gen.cert # # Note that this task requires Erlang/OTP 20 or later. # Run `mix help phx.gen.cert` for more information. # # The `http:` config above can be replaced with: # # https: [ # port: 4001, # cipher_suite: :strong, # keyfile: "priv/cert/selfsigned_key.pem", # certfile: "priv/cert/selfsigned.pem" # ], # # If desired, both `http:` and `https:` keys can be # configured to run both http and https servers on # different ports. # Watch static and templates for browser reloading. config :<%= @project_name %>, <%= @project_name_camel_case %>Web.Endpoint, live_reload: [ patterns: [ ~r{priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$}, ~r{priv/gettext/.*(po)$}, ~r{lib/<%= @project_name %>_web/views/.*(ex)$}, ~r{lib/<%= @project_name %>_web/templates/.*(eex)$}, ~r{lib/<%= @project_name %>_web/live/.*(ex)$} ] ] # Do not include metadata nor timestamps in development logs config :logger, :console, format: "[$level] $message\n" # Set a higher stacktrace during development. Avoid configuring such # in production as building large stacktraces may be expensive. config :phoenix, :stacktrace_depth, 20 # Initialize plugs at runtime for faster development compilation config :phoenix, :plug_init_mode, :runtime
29.84058
74
0.6712
796d3b9ea1de31c58402211cbffa87126559424e
858
ex
Elixir
lib/flagr/model/evaluation_batch_request.ex
brexhq/exflagr
9d4794aaf678831187c26341f5a2767d5535e2d6
[ "MIT" ]
null
null
null
lib/flagr/model/evaluation_batch_request.ex
brexhq/exflagr
9d4794aaf678831187c26341f5a2767d5535e2d6
[ "MIT" ]
null
null
null
lib/flagr/model/evaluation_batch_request.ex
brexhq/exflagr
9d4794aaf678831187c26341f5a2767d5535e2d6
[ "MIT" ]
null
null
null
# NOTE: This class is auto generated by the swagger code generator program. # https://github.com/swagger-api/swagger-codegen.git # Do not edit the class manually. defmodule Flagr.Model.EvaluationBatchRequest do @moduledoc """ """ @derive [Poison.Encoder] defstruct [ :"entities", :"enableDebug", :"flagIDs", :"flagKeys", :"flagTags", :"flagTagsOperator" ] @type t :: %__MODULE__{ :"entities" => [EvaluationEntity], :"enableDebug" => boolean(), :"flagIDs" => [integer()], :"flagKeys" => [String.t], :"flagTags" => [String.t], :"flagTagsOperator" => String.t } end defimpl Poison.Decoder, for: Flagr.Model.EvaluationBatchRequest do import Flagr.Deserializer def decode(value, options) do value |> deserialize(:"entities", :list, Flagr.Model.EvaluationEntity, options) end end
22.578947
77
0.653846
796d4cd6439259a2e138d418fc80c947f871357d
260
exs
Elixir
test/support/ecto/priv/migrations/2_add_username_to_users.exs
patrickbiermann/pow
ebc2ac7d6e15961dac4be38091ff75dae0d26554
[ "MIT" ]
4
2018-05-07T16:37:15.000Z
2018-07-14T00:44:12.000Z
test/support/ecto/priv/migrations/2_add_username_to_users.exs
patrickbiermann/pow
ebc2ac7d6e15961dac4be38091ff75dae0d26554
[ "MIT" ]
null
null
null
test/support/ecto/priv/migrations/2_add_username_to_users.exs
patrickbiermann/pow
ebc2ac7d6e15961dac4be38091ff75dae0d26554
[ "MIT" ]
1
2020-07-13T01:11:17.000Z
2020-07-13T01:11:17.000Z
defmodule Pow.Test.Ecto.Repo.Migrations.AddUsernameToUsers do use Ecto.Migration def change do alter table(:users) do add :username, :string modify :email, :string, null: true end create unique_index(:users, [:username]) end end
21.666667
61
0.692308
796d853e4da7f684c725fa5355725994ee9e74d2
420
ex
Elixir
web/models/user.ex
slaily/discuss
6f0eacd0f2c03d197f2cf9b6c27a03752c90e969
[ "MIT" ]
null
null
null
web/models/user.ex
slaily/discuss
6f0eacd0f2c03d197f2cf9b6c27a03752c90e969
[ "MIT" ]
null
null
null
web/models/user.ex
slaily/discuss
6f0eacd0f2c03d197f2cf9b6c27a03752c90e969
[ "MIT" ]
null
null
null
defmodule Discuss.User do use Discuss.Web, :model schema "users" do field :email, :string field :provider, :string field :token, :string has_many :topics, Discuss.Topic has_many :comments, Discuss.Comment timestamps() end def changeset(struct, params \\ %{}) do struct |> cast(params, [:email, :provider, :token]) |> validate_required([:email, :provider, :token]) end end
22.105263
53
0.652381
796dbbee8cec82376011865ee9af30c899204343
513
ex
Elixir
lib/discuss/blog/post.ex
frunox/discuss
d19367eceb8c68ebef4e565981ceef256b5cb04e
[ "MIT" ]
null
null
null
lib/discuss/blog/post.ex
frunox/discuss
d19367eceb8c68ebef4e565981ceef256b5cb04e
[ "MIT" ]
null
null
null
lib/discuss/blog/post.ex
frunox/discuss
d19367eceb8c68ebef4e565981ceef256b5cb04e
[ "MIT" ]
null
null
null
defmodule Discuss.Blog.Post do @enforce_keys [:id, :author, :title, :body, :description, :tags, :date] defstruct [:id, :author, :title, :body, :description, :tags, :date] def build(filename, attrs, body) do [year, month_day_id] = filename |> Path.rootname() |> Path.split() |> Enum.take(-2) [month, day, id] = String.split(month_day_id, "-", parts: 3) date = Date.from_iso8601!("#{year}-#{month}-#{day}") struct!(__MODULE__, [id: id, date: date, body: body] ++ Map.to_list(attrs)) end end
46.636364
87
0.639376
796dbe01f6e99d3a20c415086555feaebe2f7074
891
ex
Elixir
lib/mango_web/controllers/session_controller.ex
nittin-shankar/mango
3d988a494f57b26bddaad9a25e63eb4e7f6f9c12
[ "MIT" ]
121
2017-06-24T10:33:38.000Z
2022-03-17T16:02:16.000Z
lib/mango_web/controllers/session_controller.ex
nittin-shankar/mango
3d988a494f57b26bddaad9a25e63eb4e7f6f9c12
[ "MIT" ]
6
2017-06-24T22:48:21.000Z
2018-03-17T01:20:32.000Z
lib/mango_web/controllers/session_controller.ex
nittin-shankar/mango
3d988a494f57b26bddaad9a25e63eb4e7f6f9c12
[ "MIT" ]
29
2017-07-03T04:09:15.000Z
2022-03-02T15:45:49.000Z
defmodule MangoWeb.SessionController do use MangoWeb, :controller alias Mango.CRM def new(conn, _params) do render(conn, "new.html") end def create(conn, %{"session" => session_params}) do case CRM.get_customer_by_credentials(session_params) do :error -> conn |> put_flash(:error, "Invalid username/password combination") |> render("new.html") customer -> path = get_session(conn, :intending_to_visit) || page_path(conn, :index) conn |> assign(:current_customer, customer) |> put_session(:customer_id, customer.id) |> configure_session(renew: true) |> put_flash(:info, "Login successful") |> redirect(to: path) end end def delete(conn, _) do clear_session(conn) |> put_flash(:info, "You have been logged out") |> redirect(to: page_path(conn, :index)) end end
27.84375
80
0.637486
796de764335b890a32698ff79be2289ae88eb979
243
exs
Elixir
apps/core/priv/repo/migrations/20191031024027_add_values_template.exs
michaeljguarino/forge
50ee583ecb4aad5dee4ef08fce29a8eaed1a0824
[ "Apache-2.0" ]
59
2021-09-16T19:29:39.000Z
2022-03-31T20:44:24.000Z
apps/core/priv/repo/migrations/20191031024027_add_values_template.exs
svilenkov/plural
ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026
[ "Apache-2.0" ]
111
2021-08-15T09:56:37.000Z
2022-03-31T23:59:32.000Z
apps/core/priv/repo/migrations/20191031024027_add_values_template.exs
svilenkov/plural
ac6c6cc15ac4b66a3b5e32ed4a7bee4d46d1f026
[ "Apache-2.0" ]
4
2021-12-13T09:43:01.000Z
2022-03-29T18:08:44.000Z
defmodule Core.Repo.Migrations.AddValuesTemplate do use Ecto.Migration def change do alter table(:versions) do add :values_template, :binary end alter table(:installations) do add :context, :map end end end
17.357143
51
0.687243
796e0c740605f9022854161bcddd37aa5da2ddab
95
exs
Elixir
config/config.exs
iwatakeshi/square-elixir-sdk
011b4575b0723a16942b87b6fb98fab558e8d847
[ "Apache-2.0" ]
null
null
null
config/config.exs
iwatakeshi/square-elixir-sdk
011b4575b0723a16942b87b6fb98fab558e8d847
[ "Apache-2.0" ]
null
null
null
config/config.exs
iwatakeshi/square-elixir-sdk
011b4575b0723a16942b87b6fb98fab558e8d847
[ "Apache-2.0" ]
null
null
null
import Config config :tesla, adapter: Tesla.Adapter.Hackney import_config "#{Mix.env()}.exs"
15.833333
45
0.747368
796e2b7706151f1e8f1dd1e240baaaef9970f6f8
12,578
exs
Elixir
apps/state/test/state/shape_test.exs
pacebus/mbta-api-fork
6bf1d3a16e8917c9cfac0001b184c443be1f3abd
[ "MIT" ]
null
null
null
apps/state/test/state/shape_test.exs
pacebus/mbta-api-fork
6bf1d3a16e8917c9cfac0001b184c443be1f3abd
[ "MIT" ]
null
null
null
apps/state/test/state/shape_test.exs
pacebus/mbta-api-fork
6bf1d3a16e8917c9cfac0001b184c443be1f3abd
[ "MIT" ]
1
2019-09-09T20:40:13.000Z
2019-09-09T20:40:13.000Z
defmodule State.ShapeTest do use ExUnit.Case alias Model.{Route, RoutePattern, Schedule, Shape, Stop, Trip} alias Parse.Polyline import State.Shape test "init" do assert {:ok, %{data: _, last_updated: nil}} = State.Shape.init([]) end describe "new_state/1" do setup do State.StopsOnRoute.empty!() State.RoutePattern.new_state([]) end test "assigns values based on route patterns" do polylines = [ %Polyline{id: "shape"}, %Polyline{id: "not_a_variant"}, %Polyline{id: "no_matching_trip"} ] patterns = [ %RoutePattern{ id: "pattern", name: "origin - variant", typicality: 1 } ] trips = [ %Trip{ id: "1", route_id: "1", headsign: "headsign", shape_id: "shape", route_pattern_id: "pattern" }, %Trip{ id: "2", route_id: "2", headsign: "headsign 2", shape_id: "not_a_variant", route_pattern_id: nil } ] State.Trip.new_state(trips) State.RoutePattern.new_state(patterns) State.Shape.new_state(polylines) assert by_id("shape") == [ %Model.Shape{ id: "shape", route_id: "1", name: "origin - variant", priority: 3 } ] assert by_id("not_a_variant") == [ %Model.Shape{ id: "not_a_variant", route_id: "2", name: "headsign 2", priority: 2 } ] assert Enum.empty?(by_id("no_matching_trip")) end test "uses full pattern name if a hyphen isn't present" do polylines = [ %Polyline{id: "shape"} ] patterns = [ %RoutePattern{ id: "pattern", name: "variant", typicality: 1 } ] trips = [ %Trip{ id: "1", route_id: "1", headsign: "headsign", shape_id: "shape", route_pattern_id: "pattern" } ] State.Trip.new_state(trips) State.RoutePattern.new_state(patterns) State.Shape.new_state(polylines) assert by_id("shape") == [ %Model.Shape{ id: "shape", route_id: "1", name: "variant", priority: 3 } ] end test "shapes on atypical patterns have negative priority" do polylines = [ %Polyline{id: "shape"}, %Polyline{id: "shuttle_shape"} ] patterns = [ %RoutePattern{ id: "pattern", name: "", typicality: 1 }, %RoutePattern{ id: "shuttle_pattern", name: "shuttle_name", typicality: 4 } ] trips = [ %Trip{ id: "1", route_id: "1", headsign: "headsign", shape_id: "shape", route_pattern_id: "pattern" }, %Trip{ id: "2", route_id: "1", headsign: "shuttle headsign", shape_id: "shuttle_shape", route_pattern_id: "shuttle_pattern" } ] State.Trip.new_state(trips) State.RoutePattern.new_state(patterns) State.Shape.new_state(polylines) assert by_id("shuttle_shape") == [ %Model.Shape{ id: "shuttle_shape", route_id: "1", name: "shuttle_name", priority: -1 } ] end test "only keeps one shape if they have the same stops (including parent stations)" do polylines = [ %Polyline{id: "one"}, %Polyline{id: "one_with_same_parent"}, %Polyline{id: "two"} ] trips = [ %Trip{ id: "1", shape_id: "one" }, %Trip{ id: "1a", shape_id: "one_with_same_parent" }, %Trip{ id: "2", shape_id: "two" } ] stops = [ %Stop{id: "parent"}, %Stop{id: "child", parent_station: "parent"}, %Stop{id: "other"} ] schedules = [ %Schedule{ trip_id: "1", stop_id: "child" }, %Schedule{ trip_id: "1a", stop_id: "parent" }, %Schedule{ trip_id: "2", stop_id: "other" } ] State.Stop.new_state(stops) State.Schedule.new_state(schedules) State.Trip.new_state(trips) State.Route.new_state([%Route{}]) State.StopsOnRoute.update!() State.Shape.new_state(polylines) shapes = State.Shape.select_routes([nil], nil) assert Enum.map(shapes, &{&1.id, &1.priority}) == [ {"one", 2}, {"two", 1}, {"one_with_same_parent", -1} ] end test "prefers shapes with more stops" do polylines = [ %Polyline{id: "one"}, %Polyline{id: "two"} ] trips = [ %Trip{ id: "1", shape_id: "one" }, %Trip{ id: "2", shape_id: "two" } ] stops = [ %Stop{id: "stop 1"}, %Stop{id: "stop 2"}, %Stop{id: "stop 3"} ] schedules = [ %Schedule{ trip_id: "1", stop_id: "stop 1" }, %Schedule{ trip_id: "2", stop_id: "stop 2", stop_sequence: 1 }, %Schedule{ trip_id: "2", stop_id: "stop 3", stop_sequence: 2 } ] State.Stop.new_state(stops) State.Schedule.new_state(schedules) State.Trip.new_state(trips) State.Route.new_state([%Route{}]) State.StopsOnRoute.update!() State.Shape.new_state(polylines) shapes = State.Shape.select_routes([nil], nil) assert Enum.map(shapes, &{&1.id, &1.priority}) == [{"two", 2}, {"one", 1}] end test "prefers shapes with longer polylines" do polylines = [ %Polyline{id: "one", polyline: "123456"}, %Polyline{id: "two", polyline: "1234567"} ] trips = [ %Trip{ id: "1", shape_id: "one" }, %Trip{ id: "2", shape_id: "two" } ] stops = [] schedules = [] State.Stop.new_state(stops) State.Schedule.new_state(schedules) State.Trip.new_state(trips) State.Route.new_state([%Route{}]) State.StopsOnRoute.update!() State.Shape.new_state(polylines) shapes = State.Shape.select_routes([nil], nil) assert Enum.map(shapes, &{&1.id, &1.priority}) == [{"two", 2}, {"one", 1}] end test "keeps both shapes if they have shared, but not the same, stops" do polylines = [ %Polyline{id: "one"}, %Polyline{id: "two"} ] trips = [ %Trip{ id: "1", shape_id: "one" }, %Trip{ id: "2", shape_id: "two" } ] stops = [ %Stop{id: "one"}, %Stop{id: "two"}, %Stop{id: "shared"} ] schedules = [ %Schedule{ trip_id: "1", stop_id: "one" }, %Schedule{ trip_id: "1", stop_id: "shared" }, %Schedule{ trip_id: "2", stop_id: "two" }, %Schedule{ trip_id: "2", stop_id: "shared" } ] State.Stop.new_state(stops) State.Schedule.new_state(schedules) State.Trip.new_state(trips) State.Route.new_state([%Route{}]) State.StopsOnRoute.update!() State.Shape.new_state(polylines) shapes = State.Shape.select_routes([nil], nil) assert Enum.map(shapes, &{&1.id, &1.priority}) == [{"one", 2}, {"two", 1}] end test "only keeps shape for primary routes" do polylines = [%Polyline{id: "one"}, %Polyline{id: "two"}, %Polyline{id: "three"}] trips = [ %Trip{ id: "1", shape_id: "one", route_id: "route 1", alternate_route: false }, %Trip{ id: "2", shape_id: "two", route_id: "route 2", alternate_route: nil }, %Trip{ id: "2", shape_id: "one", route_id: "route 3", alternate_route: true } ] State.Trip.new_state(trips) State.StopsOnRoute.update!() State.Shape.new_state(polylines) assert [ %{id: "one", route_id: "route 1"}, %{id: "two", route_id: "route 2"} ] = State.Shape.select_routes(["route 1", "route 2", "route 3"], nil) assert [%{id: "one"}] = State.Shape.select_routes(["route 1"], nil) assert [%{id: "two"}] = State.Shape.select_routes(["route 2"], nil) end test "keeps the trip with the more common headsign" do polylines = [%Polyline{id: "one"}] trips = [ %Trip{ id: "1", shape_id: "one", route_id: "route", headsign: "popular" }, %Trip{ id: "2", shape_id: "one", route_id: "route", headsign: "popular" }, %Trip{ id: "3", shape_id: "one", route_id: "route", headsign: "not popular" } ] State.Trip.new_state(trips) State.StopsOnRoute.update!() State.Shape.new_state(polylines) shape = State.Shape.by_primary_id("one") assert shape.name == "popular" end end describe "arrange_by_priority/1" do test "can override priorities from the configuration" do shapes = [ %Model.Shape{id: "931_0010", priority: 0}, %Model.Shape{id: "9890008", priority: 0}, %Model.Shape{id: "FakeShuttle-S", priority: 0} ] [red_ashmont, providence, shuttle] = State.Shape.arrange_by_priority(shapes) assert %{name: "Ashmont", priority: 2} = red_ashmont assert %{name: "Wickford Junction - South Station", priority: 0} = providence assert %{name: nil, priority: -1} = shuttle end end describe "select_routes/1" do @shapes [ %Shape{id: "1", route_id: "1", direction_id: 0, priority: 0}, %Shape{id: "2", route_id: "2", direction_id: 0, priority: 0}, %Shape{id: "3", route_id: "3", direction_id: 1, priority: 0} ] @trips [ %Trip{id: "1", route_id: "1", direction_id: 0, shape_id: "1"}, %Trip{id: "2", route_id: "2", direction_id: 0, shape_id: "2"}, %Trip{id: "3", route_id: "3", direction_id: 1, shape_id: "3"} ] setup _ do State.Shape.new_state(@shapes) State.Trip.new_state(@trips) :ok end test "can return shapes for multiple routes without a direction" do assert select_routes(["1", "2"], nil) == Enum.take(@shapes, 2) assert select_routes(["2", "3"], nil) == Enum.drop(@shapes, 1) end test "can return shapes for multiple routes given a direction" do assert select_routes(["1", "2", "3"], 0) == Enum.take(@shapes, 2) assert select_routes(["1", "2", "3"], 1) == Enum.drop(@shapes, 2) end test "can return multiple shapes with same id" do shapes = [ %Shape{ id: "s1", route_id: "1", direction_id: 1, priority: 0 }, %Shape{ id: "s1", route_id: "2", direction_id: 1, priority: 0 } ] trips = [ %Trip{ id: "t1", route_id: "1", direction_id: 1, shape_id: "s1" }, %Trip{ id: "t2", route_id: "2", direction_id: 1, shape_id: "s2" } ] State.Shape.new_state(shapes) State.Trip.new_state(trips) assert select_routes(["1", "2"], 1) == shapes end end describe "by_primary_id/1" do test "returns the shape with the highest priority" do shapes = for priority <- Enum.shuffle(1..4) do %Shape{ id: "s1", route_id: "route", direction_id: 1, priority: priority } end State.Shape.new_state(shapes) assert State.Shape.by_primary_id("s1").priority == 4 end end end
24.049713
90
0.480442
796e5114957d7aea454fd0c8836614e8451dde22
104
ex
Elixir
web/views/account_relationship_view.ex
simwms/apiv4
c3da7407eaf3580b759f49726028439b4b8ea9d0
[ "MIT" ]
2
2016-02-25T20:12:35.000Z
2018-01-03T00:03:12.000Z
web/views/account_relationship_view.ex
simwms/apiv4
c3da7407eaf3580b759f49726028439b4b8ea9d0
[ "MIT" ]
1
2016-01-11T04:50:39.000Z
2016-01-12T05:00:08.000Z
web/views/account_relationship_view.ex
simwms/apiv4
c3da7407eaf3580b759f49726028439b4b8ea9d0
[ "MIT" ]
null
null
null
defmodule Apiv4.AccountRelationshipView do use Apiv4.Web, :view use Autox.RelationshipView end
17.333333
42
0.778846
796e8ac2d383a4041c95012ed8a3d4d4c752c7d9
570
ex
Elixir
lib/wolfgang_api_web/views/changeset_view.ex
davidenglishmusic/wolfgang_api
828df91ddf46dcce4dee86c0f416cf292fc261be
[ "MIT" ]
null
null
null
lib/wolfgang_api_web/views/changeset_view.ex
davidenglishmusic/wolfgang_api
828df91ddf46dcce4dee86c0f416cf292fc261be
[ "MIT" ]
null
null
null
lib/wolfgang_api_web/views/changeset_view.ex
davidenglishmusic/wolfgang_api
828df91ddf46dcce4dee86c0f416cf292fc261be
[ "MIT" ]
null
null
null
defmodule WolfgangApiWeb.ChangesetView do use WolfgangApiWeb, :view @doc """ Traverses and translates changeset errors. See `Ecto.Changeset.traverse_errors/2` and `WolfgangApiWeb.ErrorHelpers.translate_error/1` for more details. """ def translate_errors(changeset) do Ecto.Changeset.traverse_errors(changeset, &translate_error/1) end def render("error.json", %{changeset: changeset}) do # When encoded, the changeset returns its errors # as a JSON object. So we just pass it forward. %{errors: translate_errors(changeset)} end end
28.5
67
0.74386
796e956994603796e5ae160a1f63f9bb3dd624d2
170
ex
Elixir
lib/cryppo/serialization.ex
Meeco/cryppo_ex
fd9b6f4f84c6668797b1e31f6e59bb5f42630a2a
[ "Apache-2.0" ]
null
null
null
lib/cryppo/serialization.ex
Meeco/cryppo_ex
fd9b6f4f84c6668797b1e31f6e59bb5f42630a2a
[ "Apache-2.0" ]
null
null
null
lib/cryppo/serialization.ex
Meeco/cryppo_ex
fd9b6f4f84c6668797b1e31f6e59bb5f42630a2a
[ "Apache-2.0" ]
1
2021-06-01T07:46:14.000Z
2021-06-01T07:46:14.000Z
defprotocol Cryppo.Serialization do @moduledoc false # Cryppo serialization protocol @spec serialize(t) :: String.t() | {:error, atom} def serialize(value) end
18.888889
51
0.723529
796e9a2e3f775e0964ad498359e5ae33428ab8ae
144
ex
Elixir
in.ex
ucarion/llvm-rust-getting-started
8d7cf8ebb093afe6a93f98f98a532ac8df70742b
[ "MIT", "Unlicense" ]
61
2016-07-05T02:37:49.000Z
2022-02-22T12:58:55.000Z
in.ex
ucarion/llvm-rust-getting-started
8d7cf8ebb093afe6a93f98f98a532ac8df70742b
[ "MIT", "Unlicense" ]
null
null
null
in.ex
ucarion/llvm-rust-getting-started
8d7cf8ebb093afe6a93f98f98a532ac8df70742b
[ "MIT", "Unlicense" ]
7
2018-03-09T23:11:27.000Z
2021-09-29T13:38:58.000Z
a = 1 b = 0 c = if a { if b { 11 } else { 40 } } else { if b { 10 } else { 20 } } c + 2
8.470588
12
0.25
796eb351f2505590745ec5e588a5194e19ad3202
1,256
exs
Elixir
.check.exs
kimlindholm/plug_session_db_store
898cc1a3d4d43751aebb2495587841ad9136ffde
[ "MIT" ]
3
2021-02-15T13:03:15.000Z
2022-01-25T11:07:47.000Z
.check.exs
kimlindholm/plug_session_db_store
898cc1a3d4d43751aebb2495587841ad9136ffde
[ "MIT" ]
null
null
null
.check.exs
kimlindholm/plug_session_db_store
898cc1a3d4d43751aebb2495587841ad9136ffde
[ "MIT" ]
null
null
null
[ ## don't run tools concurrently # parallel: false, ## don't print info about skipped tools # skipped: false, ## always run tools in fix mode (put it in ~/.check.exs locally, not in project config) # fix: true, ## don't retry automatically even if last run resulted in failures # retry: false, ## list of tools (see `mix check` docs for a list of default curated tools) tools: [ ## curated tools may be disabled (e.g. the check for compilation warnings) # {:compiler, false}, ## ...or have command & args adjusted (e.g. enable skip comments for sobelow) # {:sobelow, "mix sobelow --exit --skip"}, ## ...or reordered (e.g. to see output from dialyzer before others) # {:dialyzer, order: -1}, ## ...or reconfigured (e.g. disable parallel execution of ex_unit in umbrella) # {:ex_unit, umbrella: [parallel: false]}, ## custom new tools may be added (Mix tasks or arbitrary commands) # {:my_task, "mix my_task", env: %{"MIX_ENV" => "prod"}}, # {:my_tool, ["my_tool", "arg with spaces"]} {:compiler, env: %{"MIX_ENV" => "test"}}, {:formatter, env: %{"MIX_ENV" => "test"}}, {:ex_doc, env: %{"MIX_ENV" => "test"}}, {:inch_ex, "mix inch", env: %{"MIX_ENV" => "test"}} ] ]
33.052632
89
0.615446
796ec92c98cebe8c2a3027fa5020024858d6c2c9
4,435
ex
Elixir
lib/sanbase/user_lists/settings.ex
santiment/sanbase2
9ef6e2dd1e377744a6d2bba570ea6bd477a1db31
[ "MIT" ]
81
2017-11-20T01:20:22.000Z
2022-03-05T12:04:25.000Z
lib/sanbase/user_lists/settings.ex
rmoorman/sanbase2
226784ab43a24219e7332c49156b198d09a6dd85
[ "MIT" ]
359
2017-10-15T14:40:53.000Z
2022-01-25T13:34:20.000Z
lib/sanbase/user_lists/settings.ex
rmoorman/sanbase2
226784ab43a24219e7332c49156b198d09a6dd85
[ "MIT" ]
16
2017-11-19T13:57:40.000Z
2022-02-07T08:13:02.000Z
defmodule Sanbase.UserList.Settings do @moduledoc ~s""" Store and work with settings specific for a watchlist. The settings are stored per user. One watchlist can have many settings for many users. When a user requires the settings for a watchlist the resolution process is the first one that matches: 1. If the requesting user has defined settings - return them. 2. If the watchlist craetor has defined settings - return them. 3. Return the default settings """ defmodule WatchlistSettings do @moduledoc ~s""" Embeded schema that defines how the settings look like """ use Ecto.Schema import Ecto.Changeset @type t :: %{ page_size: non_neg_integer(), table_columns: map(), time_window: String.t() } @default_page_size 20 @default_time_window "180d" @default_table_columns %{} embedded_schema do field(:page_size, :integer, default: @default_page_size) field(:time_window, :string, default: @default_time_window) field(:table_columns, :map, default: @default_table_columns) end def changeset(%__MODULE__{} = settings, attrs \\ %{}) do settings |> cast(attrs, [:page_size, :time_window, :table_columns]) |> validate_number(:page_size, greater_than: 0) |> validate_change(:time_window, &valid_time_window?/2) end def default_settings() do %{ page_size: @default_page_size, time_window: @default_time_window, table_columns: @default_table_columns } end # Private functions defp valid_time_window?(:time_window, time_window) do case Sanbase.Validation.valid_time_window?(time_window) do :ok -> [] {:error, error} -> [time_window: error] end end end use Ecto.Schema import Ecto.Query import Ecto.Changeset alias Sanbase.Repo alias Sanbase.Accounts.User alias Sanbase.UserList alias __MODULE__.WatchlistSettings @type t :: %__MODULE__{ user_id: non_neg_integer(), watchlist_id: non_neg_integer(), settings: WatchlistSettings.t() } @primary_key false schema "watchlist_settings" do belongs_to(:user, User, foreign_key: :user_id, primary_key: true) belongs_to(:watchlist, UserList, foreign_key: :watchlist_id, primary_key: true) embeds_one(:settings, WatchlistSettings, on_replace: :update) end def changeset(%__MODULE__{} = settings, attrs \\ %{}) do settings |> cast(attrs, [:user_id, :watchlist_id]) |> cast_embed(:settings, required: true, with: &WatchlistSettings.changeset/2 ) end @doc ~s""" Return the settings for a watchlist and a given user. Returns the first one that exists: 1. User's settings for that watchlist 2. The watchlist's creator's settings for that watchlist 3. Default settings """ @spec settings_for(%UserList{}, %User{} | nil) :: {:ok, WatchlistSettings.t()} def settings_for(%UserList{} = ul, %User{} = user) do settings = get_settings(ul.id, user.id) || get_settings(ul.id, ul.user_id) || WatchlistSettings.default_settings() {:ok, settings} end def settings_for(%UserList{} = ul, _) do settings = get_settings(ul.id, ul.user_id) || WatchlistSettings.default_settings() {:ok, settings} end @doc ~s""" Create or update settings for a given watchlist and user """ @spec update_or_create_settings(watchlist_id, user_id, settings) :: {:ok, t()} | {:error, Ecto.Changeset.t()} when watchlist_id: non_neg_integer, user_id: non_neg_integer, settings: WatchlistSettings.t() def update_or_create_settings(watchlist_id, user_id, settings) do case Repo.one(settings_query(watchlist_id, user_id)) do nil -> changeset(%__MODULE__{}, %{ user_id: user_id, watchlist_id: watchlist_id, settings: settings }) |> Repo.insert() %__MODULE__{} = ws -> changeset(ws, %{settings: settings}) |> Repo.update() end end # Private functions defp get_settings(watchlist_id, user_id) do from(s in settings_query(watchlist_id, user_id), select: s.settings) |> Repo.one() end defp settings_query(watchlist_id, user_id) do from(s in __MODULE__, where: s.watchlist_id == ^watchlist_id and s.user_id == ^user_id ) end end
28.429487
83
0.659301
796ef08e4b2b5d29732092065d79e3f75dcd61de
462
ex
Elixir
lib/linalg.ex
BradLyman/nergle
7de7a8ea73b3f5aa038409d0eb0c29cbd06a8876
[ "MIT" ]
null
null
null
lib/linalg.ex
BradLyman/nergle
7de7a8ea73b3f5aa038409d0eb0c29cbd06a8876
[ "MIT" ]
null
null
null
lib/linalg.ex
BradLyman/nergle
7de7a8ea73b3f5aa038409d0eb0c29cbd06a8876
[ "MIT" ]
null
null
null
defmodule Linalg do def dot(x, y) when is_list(x) and is_list(y) and length(x) == length(y) do Enum.zip(x, y) |> Enum.map(fn {a, b} -> a * b end) |> Enum.reduce(0, fn x, acc -> x + acc end) end def pretty(vec) when is_list(vec) do vec |> Enum.map(&Linalg.pretty/1) |> Enum.join(", ") |> (fn str -> "[" <> str <> "]" end).() end def pretty(num) when is_number(num) do Float.round(num, 3) |> Float.to_string() end end
24.315789
76
0.554113
796f26e5bc85d005ecf2600149eb308b9a3c331f
1,378
exs
Elixir
mix.exs
c4710n/waffle
42b0784397d779c31c4bee3652c7174f2516dbbd
[ "Apache-2.0" ]
null
null
null
mix.exs
c4710n/waffle
42b0784397d779c31c4bee3652c7174f2516dbbd
[ "Apache-2.0" ]
null
null
null
mix.exs
c4710n/waffle
42b0784397d779c31c4bee3652c7174f2516dbbd
[ "Apache-2.0" ]
null
null
null
defmodule Waffle.Mixfile do use Mix.Project @version "1.1.3" def project do [app: :waffle, version: @version, elixir: "~> 1.4", deps: deps(), docs: docs(), # Hex description: description(), package: package()] end defp description do """ Flexible file upload and attachment library for Elixir. """ end defp package do [maintainers: ["Boris Kuznetsov"], licenses: ["Apache 2.0"], links: %{"GitHub" => "https://github.com/elixir-waffle/waffle"}, files: ~w(mix.exs README.md CHANGELOG.md lib)] end defp docs do [ main: "Waffle", extras: [ "documentation/examples/local.md", "documentation/examples/s3.md" ] ] end def application do [ applications: [ :logger, :hackney, ] ++ applications(Mix.env) ] end def applications(:test), do: [:ex_aws, :ex_aws_s3] def applications(_), do: [] defp deps do [ {:hackney, "~> 1.9"}, # If using Amazon S3 {:ex_aws, "~> 2.1.2", optional: true}, {:ex_aws_s3, "~> 2.0", optional: true}, {:sweet_xml, "~> 0.6", optional: true}, # Test {:mock, "~> 0.3", only: :test}, # Dev {:ex_doc, "~> 0.21", only: :dev}, # Dev, Test {:credo, "~> 1.4", only: [:dev, :test], runtime: false} ] end end
18.876712
69
0.528302
796f5cf4cd3d8c46fd14e8d5b9177d9c4efaa1d6
241
ex
Elixir
lib/parse_logs/base_64_image.ex
losvedir/ephemeral2-logs
05dadbd514493f8509457bcb411bbdd9b92f4f3a
[ "MIT" ]
2
2015-08-04T17:35:50.000Z
2015-08-12T18:37:48.000Z
lib/parse_logs/base_64_image.ex
losvedir/ephemeral2-logs
05dadbd514493f8509457bcb411bbdd9b92f4f3a
[ "MIT" ]
null
null
null
lib/parse_logs/base_64_image.ex
losvedir/ephemeral2-logs
05dadbd514493f8509457bcb411bbdd9b92f4f3a
[ "MIT" ]
null
null
null
defmodule ParseLogs.Base64Image do def header do "timestamp" end def parse_line(line) do [ts|_] = Regex.run(~r/198 <190>1 (.*) app web.1.*/, line, capture: :all_but_first) "#{ParseLogs.Utils.heroku_to_unix(ts)}" end end
21.909091
86
0.659751
796f6dc4bdec6c2664573f709be8ba7de4ab0a23
43,258
ex
Elixir
lib/ecto/type.ex
yordis/ecto
6e7bc3f4d757b7c09ced10135e0c5c4ce1f4ea2f
[ "Apache-2.0" ]
null
null
null
lib/ecto/type.ex
yordis/ecto
6e7bc3f4d757b7c09ced10135e0c5c4ce1f4ea2f
[ "Apache-2.0" ]
null
null
null
lib/ecto/type.ex
yordis/ecto
6e7bc3f4d757b7c09ced10135e0c5c4ce1f4ea2f
[ "Apache-2.0" ]
null
null
null
defmodule Ecto.Type do @moduledoc """ Defines functions and the `Ecto.Type` behaviour for implementing basic custom types. Ecto provides two types of custom types: basic types and parameterized types. Basic types are simple, requiring only four callbacks to be implemented, and are enough for most occasions. Parameterized types can be customized on the field definition and provide a wide variety of callbacks. The definition of basic custom types and all of their callbacks are available in this module. You can learn more about parameterized types in `Ecto.ParameterizedType`. If in doubt, prefer to use basic custom types and rely on parameterized types if you need the extra functionality. ## Example Imagine you want to store a URI struct as part of a schema in a url-shortening service. There isn't an Ecto field type to support that value at runtime therefore a custom one is needed. You also want to query not only by the full url, but for example by specific ports used. This is possible by putting the URI data into a map field instead of just storing the plain string representation. from s in ShortUrl, where: fragment("?->>? ILIKE ?", s.original_url, "port", "443") So the custom type does need to handle the conversion from external data to runtime data (`c:cast/1`) as well as transforming that runtime data into the `:map` Ecto native type and back (`c:dump/1` and `c:load/1`). defmodule EctoURI do use Ecto.Type def type, do: :map # Provide custom casting rules. # Cast strings into the URI struct to be used at runtime def cast(uri) when is_binary(uri) do {:ok, URI.parse(uri)} end # Accept casting of URI structs as well def cast(%URI{} = uri), do: {:ok, uri} # Everything else is a failure though def cast(_), do: :error # When loading data from the database, as long as it's a map, # we just put the data back into a URI struct to be stored in # the loaded schema struct. def load(data) when is_map(data) do data = for {key, val} <- data do {String.to_existing_atom(key), val} end {:ok, struct!(URI, data)} end # When dumping data to the database, we *expect* a URI struct # but any value could be inserted into the schema struct at runtime, # so we need to guard against them. def dump(%URI{} = uri), do: {:ok, Map.from_struct(uri)} def dump(_), do: :error end Now we can use our new field type above in our schemas: defmodule ShortUrl do use Ecto.Schema schema "posts" do field :original_url, EctoURI end end Note: `nil` values are always bypassed and cannot be handled by custom types. ## Custom types and primary keys Remember that, if you change the type of your primary keys, you will also need to change the type of all associations that point to said primary key. Imagine you want to encode the ID so they cannot enumerate the content in your application. An Ecto type could handle the conversion between the encoded version of the id and its representation in the database. For the sake of simplicity, we'll use base64 encoding in this example: defmodule EncodedId do use Ecto.Type def type, do: :id def cast(id) when is_integer(id) do {:ok, encode_id(id)} end def cast(_), do: :error def dump(id) when is_binary(id) do Base.decode64(id) end def load(id) when is_integer(id) do {:ok, encode_id(id)} end defp encode_id(id) do id |> Integer.to_string() |> Base.encode64 end end To use it as the type for the id in our schema, we can use the `@primary_key` module attribute: defmodule BlogPost do use Ecto.Schema @primary_key {:id, EncodedId, autogenerate: true} schema "posts" do belongs_to :author, Author, type: EncodedId field :content, :string end end defmodule Author do use Ecto.Schema @primary_key {:id, EncodedId, autogenerate: true} schema "authors" do field :name, :string has_many :posts, BlogPost end end The `@primary_key` attribute will tell ecto which type to use for the id. Note the `type: EncodedId` option given to `belongs_to` in the `BlogPost` schema. By default, Ecto will treat associations as if their keys were `:integer`s. Our primary keys are a custom type, so when Ecto tries to cast those ids, it will fail. Alternatively, you can set `@foreign_key_type EncodedId` after `@primary_key` to automatically configure the type of all `belongs_to` fields. """ import Kernel, except: [match?: 2] @doc false defmacro __using__(_opts) do quote location: :keep do @behaviour Ecto.Type def embed_as(_), do: :self def equal?(term1, term2), do: term1 == term2 defoverridable [embed_as: 1, equal?: 2] end end @typedoc "An Ecto type, primitive or custom." @type t :: primitive | custom @typedoc "Primitive Ecto types (handled by Ecto)." @type primitive :: base | composite @typedoc "Custom types are represented by user-defined modules." @type custom :: module | {:parameterized, module, term} @type base :: :integer | :float | :boolean | :string | :map | :binary | :decimal | :id | :binary_id | :utc_datetime | :naive_datetime | :date | :time | :any | :utc_datetime_usec | :naive_datetime_usec | :time_usec @type composite :: {:array, t} | {:map, t} | private_composite @typep private_composite :: {:maybe, t} | {:in, t} | {:param, :any_datetime} @base ~w( integer float decimal boolean string map binary id binary_id any utc_datetime naive_datetime date time utc_datetime_usec naive_datetime_usec time_usec )a @composite ~w(array map maybe in param)a @doc """ Returns the underlying schema type for the custom type. For example, if you want to provide your own date structures, the type function should return `:date`. Note this function is not required to return Ecto primitive types, the type is only required to be known by the adapter. """ @callback type :: t @doc """ Casts the given input to the custom type. This callback is called on external input and can return any type, as long as the `dump/1` function is able to convert the returned value into an Ecto native type. There are two situations where this callback is called: 1. When casting values by `Ecto.Changeset` 2. When passing arguments to `Ecto.Query` You can return `:error` if the given term cannot be cast. A default error message of "is invalid" will be added to the changeset. You may also return `{:error, keyword()}` to customize the changeset error message and its metadata. Passing a `:message` key, will override the default message. It is not possible to override the `:type` key. For `{:array, CustomType}` or `{:map, CustomType}` the returned keyword list will be erased and the default error will be shown. """ @callback cast(term) :: {:ok, term} | :error | {:error, keyword()} @doc """ Loads the given term into a custom type. This callback is called when loading data from the database and receives an Ecto native type. It can return any type, as long as the `dump/1` function is able to convert the returned value back into an Ecto native type. """ @callback load(term) :: {:ok, term} | :error @doc """ Dumps the given term into an Ecto native type. This callback is called with any term that was stored in the struct and it needs to validate them and convert it to an Ecto native type. """ @callback dump(term) :: {:ok, term} | :error @doc """ Checks if two terms are semantically equal. """ @callback equal?(term, term) :: boolean @doc """ Dictates how the type should be treated inside embeds. By default, the type is sent as itself, without calling dumping to keep the higher level representation. But it can be set to `:dump` so that it is dumped before being encoded. """ @callback embed_as(format :: atom) :: :self | :dump @doc """ Generates a loaded version of the data. This is callback is invoked when a custom type is given to `field` with the `:autogenerate` flag. """ @callback autogenerate() :: term() @optional_callbacks autogenerate: 0 ## Functions @doc """ Checks if we have a primitive type. iex> primitive?(:string) true iex> primitive?(Another) false iex> primitive?({:array, :string}) true iex> primitive?({:array, Another}) true """ @spec primitive?(t) :: boolean def primitive?({:parameterized, _, _}), do: true def primitive?({composite, _}) when composite in @composite, do: true def primitive?(base) when base in @base, do: true def primitive?(_), do: false @doc """ Checks if the given atom can be used as composite type. iex> composite?(:array) true iex> composite?(:string) false """ @spec composite?(atom) :: boolean def composite?(atom), do: atom in @composite @doc """ Checks if the given atom can be used as base type. iex> base?(:string) true iex> base?(:array) false iex> base?(Custom) false """ @spec base?(atom) :: boolean def base?(atom), do: atom in @base @doc """ Gets how the type is treated inside embeds for the given format. See `c:embed_as/1`. """ def embed_as({:parameterized, module, params}, format), do: module.embed_as(format, params) def embed_as({composite, type}, format) when composite in @composite, do: embed_as(type, format) def embed_as(base, _format) when base in @base, do: :self def embed_as(mod, format), do: mod.embed_as(format) @doc """ Dumps the `value` for `type` considering it will be embedded in `format`. ## Examples iex> Ecto.Type.embedded_dump(:decimal, Decimal.new("1"), :json) {:ok, Decimal.new("1")} """ def embedded_dump(type, value, format) do case embed_as(type, format) do :self -> {:ok, value} :dump -> dump(type, value, &embedded_dump(&1, &2, format)) end end @doc """ Loads the `value` for `type` considering it was embedded in `format`. ## Examples iex> Ecto.Type.embedded_load(:decimal, "1", :json) {:ok, Decimal.new("1")} """ def embedded_load(type, value, format) do case embed_as(type, format) do :self -> case cast(type, value) do {:ok, _} = ok -> ok _ -> :error end :dump -> load(type, value, &embedded_load(&1, &2, format)) end end @doc """ Retrieves the underlying schema type for the given, possibly custom, type. iex> type(:string) :string iex> type(Ecto.UUID) :uuid iex> type({:array, :string}) {:array, :string} iex> type({:array, Ecto.UUID}) {:array, :uuid} iex> type({:map, Ecto.UUID}) {:map, :uuid} """ @spec type(t) :: t def type(type) def type({:parameterized, type, params}), do: type.type(params) def type({:array, type}), do: {:array, type(type)} def type({:map, type}), do: {:map, type(type)} def type(type) when type in @base, do: type def type(type) when is_atom(type), do: type.type() def type(type), do: type @doc """ Checks if a given type matches with a primitive type that can be found in queries. iex> match?(:string, :any) true iex> match?(:any, :string) true iex> match?(:string, :string) true iex> match?({:array, :string}, {:array, :any}) true iex> match?(Ecto.UUID, :uuid) true iex> match?(Ecto.UUID, :string) false """ @spec match?(t, primitive) :: boolean def match?(schema_type, query_type) do if primitive?(schema_type) do do_match?(schema_type, query_type) else do_match?(schema_type.type, query_type) end end defp do_match?(_left, :any), do: true defp do_match?(:any, _right), do: true defp do_match?({outer, left}, {outer, right}), do: match?(left, right) defp do_match?(:decimal, type) when type in [:float, :integer], do: true defp do_match?(:binary_id, :binary), do: true defp do_match?(:id, :integer), do: true defp do_match?(type, type), do: true defp do_match?(:naive_datetime, {:param, :any_datetime}), do: true defp do_match?(:naive_datetime_usec, {:param, :any_datetime}), do: true defp do_match?(:utc_datetime, {:param, :any_datetime}), do: true defp do_match?(:utc_datetime_usec, {:param, :any_datetime}), do: true defp do_match?(_, _), do: false @doc """ Dumps a value to the given type. Opposite to casting, dumping requires the returned value to be a valid Ecto type, as it will be sent to the underlying data store. iex> dump(:string, nil) {:ok, nil} iex> dump(:string, "foo") {:ok, "foo"} iex> dump(:integer, 1) {:ok, 1} iex> dump(:integer, "10") :error iex> dump(:binary, "foo") {:ok, "foo"} iex> dump(:binary, 1) :error iex> dump({:array, :integer}, [1, 2, 3]) {:ok, [1, 2, 3]} iex> dump({:array, :integer}, [1, "2", 3]) :error iex> dump({:array, :binary}, ["1", "2", "3"]) {:ok, ["1", "2", "3"]} """ @spec dump(t, term) :: {:ok, term} | :error @spec dump(t, term, (t, term -> {:ok, term} | :error)) :: {:ok, term} | :error def dump(type, value, dumper \\ &dump/2) def dump({:parameterized, module, params}, value, dumper) do module.dump(value, dumper, params) end def dump(_type, nil, _dumper) do {:ok, nil} end def dump({:maybe, type}, value, dumper) do case dump(type, value, dumper) do {:ok, _} = ok -> ok :error -> {:ok, value} end end def dump({:in, type}, value, dumper) do case dump({:array, type}, value, dumper) do {:ok, value} -> {:ok, {:in, value}} :error -> :error end end def dump({:array, {_, _, _} = type}, value, dumper), do: array(value, type, dumper, false, []) def dump({:array, type}, value, dumper), do: array(value, type, dumper, true, []) def dump({:map, type}, value, dumper), do: map(value, type, dumper, false, %{}) def dump(:any, value, _dumper), do: {:ok, value} def dump(:integer, value, _dumper), do: same_integer(value) def dump(:float, value, _dumper), do: dump_float(value) def dump(:boolean, value, _dumper), do: same_boolean(value) def dump(:map, value, _dumper), do: same_map(value) def dump(:string, value, _dumper), do: same_binary(value) def dump(:binary, value, _dumper), do: same_binary(value) def dump(:id, value, _dumper), do: same_integer(value) def dump(:binary_id, value, _dumper), do: same_binary(value) def dump(:decimal, value, _dumper), do: same_decimal(value) def dump(:date, value, _dumper), do: same_date(value) def dump(:time, value, _dumper), do: dump_time(value) def dump(:time_usec, value, _dumper), do: dump_time_usec(value) def dump(:naive_datetime, value, _dumper), do: dump_naive_datetime(value) def dump(:naive_datetime_usec, value, _dumper), do: dump_naive_datetime_usec(value) def dump(:utc_datetime, value, _dumper), do: dump_utc_datetime(value) def dump(:utc_datetime_usec, value, _dumper), do: dump_utc_datetime_usec(value) def dump({:param, :any_datetime}, value, _dumper), do: dump_any_datetime(value) def dump(mod, value, _dumper) when is_atom(mod), do: mod.dump(value) defp dump_float(term) when is_float(term), do: {:ok, term} defp dump_float(_), do: :error defp dump_time(%Time{} = term), do: {:ok, check_no_usec!(term, :time)} defp dump_time(_), do: :error defp dump_time_usec(%Time{} = term), do: {:ok, check_usec!(term, :time_usec)} defp dump_time_usec(_), do: :error defp dump_any_datetime(%NaiveDateTime{} = term), do: {:ok, term} defp dump_any_datetime(%DateTime{} = term), do: {:ok, term} defp dump_any_datetime(_), do: :error defp dump_naive_datetime(%NaiveDateTime{} = term), do: {:ok, check_no_usec!(term, :naive_datetime)} defp dump_naive_datetime(_), do: :error defp dump_naive_datetime_usec(%NaiveDateTime{} = term), do: {:ok, check_usec!(term, :naive_datetime_usec)} defp dump_naive_datetime_usec(_), do: :error defp dump_utc_datetime(%DateTime{} = datetime) do kind = :utc_datetime {:ok, datetime |> check_utc_timezone!(kind) |> check_no_usec!(kind)} end defp dump_utc_datetime(_), do: :error defp dump_utc_datetime_usec(%DateTime{} = datetime) do kind = :utc_datetime_usec {:ok, datetime |> check_utc_timezone!(kind) |> check_usec!(kind)} end defp dump_utc_datetime_usec(_), do: :error @doc """ Loads a value with the given type. iex> load(:string, nil) {:ok, nil} iex> load(:string, "foo") {:ok, "foo"} iex> load(:integer, 1) {:ok, 1} iex> load(:integer, "10") :error """ @spec load(t, term) :: {:ok, term} | :error @spec load(t, term, (t, term -> {:ok, term} | :error)) :: {:ok, term} | :error def load(type, value, loader \\ &load/2) def load({:parameterized, module, params}, value, loader) do module.load(value, loader, params) end def load(_type, nil, _loader) do {:ok, nil} end def load({:maybe, type}, value, loader) do case load(type, value, loader) do {:ok, _} = ok -> ok :error -> {:ok, value} end end def load({:array, {_, _, _} = type}, value, loader), do: array(value, type, loader, false, []) def load({:array, type}, value, loader), do: array(value, type, loader, true, []) def load({:map, type}, value, loader), do: map(value, type, loader, false, %{}) def load(:any, value, _loader), do: {:ok, value} def load(:integer, value, _loader), do: same_integer(value) def load(:float, value, _loader), do: load_float(value) def load(:boolean, value, _loader), do: same_boolean(value) def load(:map, value, _loader), do: same_map(value) def load(:string, value, _loader), do: same_binary(value) def load(:binary, value, _loader), do: same_binary(value) def load(:id, value, _loader), do: same_integer(value) def load(:binary_id, value, _loader), do: same_binary(value) def load(:decimal, value, _loader), do: same_decimal(value) def load(:date, value, _loader), do: same_date(value) def load(:time, value, _loader), do: load_time(value) def load(:time_usec, value, _loader), do: load_time_usec(value) def load(:naive_datetime, value, _loader), do: load_naive_datetime(value) def load(:naive_datetime_usec, value, _loader), do: load_naive_datetime_usec(value) def load(:utc_datetime, value, _loader), do: load_utc_datetime(value) def load(:utc_datetime_usec, value, _loader), do: load_utc_datetime_usec(value) def load(mod, value, _loader), do: mod.load(value) defp load_float(term) when is_float(term), do: {:ok, term} defp load_float(term) when is_integer(term), do: {:ok, :erlang.float(term)} defp load_float(_), do: :error defp load_time(%Time{} = time), do: {:ok, truncate_usec(time)} defp load_time(_), do: :error defp load_time_usec(%Time{} = time), do: {:ok, pad_usec(time)} defp load_time_usec(_), do: :error # This is a downcast, which is always fine, and in case # we try to send a naive datetime where a datetime is expected, # the adapter will either explicitly error (Postgres) or it will # accept the data (MySQL), which is fine as we always assume UTC defp load_naive_datetime(%DateTime{} = datetime), do: {:ok, datetime |> check_utc_timezone!(:naive_datetime) |> DateTime.to_naive() |> truncate_usec()} defp load_naive_datetime(%NaiveDateTime{} = naive_datetime), do: {:ok, truncate_usec(naive_datetime)} defp load_naive_datetime(_), do: :error defp load_naive_datetime_usec(%DateTime{} = datetime), do: {:ok, datetime |> check_utc_timezone!(:naive_datetime_usec) |> DateTime.to_naive() |> pad_usec()} defp load_naive_datetime_usec(%NaiveDateTime{} = naive_datetime), do: {:ok, pad_usec(naive_datetime)} defp load_naive_datetime_usec(_), do: :error # This is an upcast but because we assume the database # is always in UTC, we can perform it. defp load_utc_datetime(%NaiveDateTime{} = naive_datetime), do: {:ok, naive_datetime |> truncate_usec() |> DateTime.from_naive!("Etc/UTC")} defp load_utc_datetime(%DateTime{} = datetime), do: {:ok, datetime |> check_utc_timezone!(:utc_datetime) |> truncate_usec()} defp load_utc_datetime(_), do: :error defp load_utc_datetime_usec(%NaiveDateTime{} = naive_datetime), do: {:ok, naive_datetime |> pad_usec() |> DateTime.from_naive!("Etc/UTC")} defp load_utc_datetime_usec(%DateTime{} = datetime), do: {:ok, datetime |> check_utc_timezone!(:utc_datetime_usec) |> pad_usec()} defp load_utc_datetime_usec(_), do: :error @doc """ Casts a value to the given type. `cast/2` is used by the finder queries and changesets to cast outside values to specific types. Note that nil can be cast to all primitive types as data stores allow nil to be set on any column. NaN and infinite decimals are not supported, use custom types instead. iex> cast(:any, "whatever") {:ok, "whatever"} iex> cast(:any, nil) {:ok, nil} iex> cast(:string, nil) {:ok, nil} iex> cast(:integer, 1) {:ok, 1} iex> cast(:integer, "1") {:ok, 1} iex> cast(:integer, "1.0") :error iex> cast(:id, 1) {:ok, 1} iex> cast(:id, "1") {:ok, 1} iex> cast(:id, "1.0") :error iex> cast(:float, 1.0) {:ok, 1.0} iex> cast(:float, 1) {:ok, 1.0} iex> cast(:float, "1") {:ok, 1.0} iex> cast(:float, "1.0") {:ok, 1.0} iex> cast(:float, "1-foo") :error iex> cast(:boolean, true) {:ok, true} iex> cast(:boolean, false) {:ok, false} iex> cast(:boolean, "1") {:ok, true} iex> cast(:boolean, "0") {:ok, false} iex> cast(:boolean, "whatever") :error iex> cast(:string, "beef") {:ok, "beef"} iex> cast(:binary, "beef") {:ok, "beef"} iex> cast(:decimal, Decimal.new("1.0")) {:ok, Decimal.new("1.0")} iex> cast(:decimal, "1.0bad") :error iex> cast({:array, :integer}, [1, 2, 3]) {:ok, [1, 2, 3]} iex> cast({:array, :integer}, ["1", "2", "3"]) {:ok, [1, 2, 3]} iex> cast({:array, :string}, [1, 2, 3]) :error iex> cast(:string, [1, 2, 3]) :error """ @spec cast(t, term) :: {:ok, term} | {:error, keyword()} | :error def cast({:parameterized, type, params}, value), do: type.cast(value, params) def cast({:in, _type}, nil), do: :error def cast(_type, nil), do: {:ok, nil} def cast({:maybe, type}, value) do case cast(type, value) do {:ok, _} = ok -> ok _ -> {:ok, value} end end def cast(type, value) do cast_fun(type).(value) end defp cast_fun(:integer), do: &cast_integer/1 defp cast_fun(:float), do: &cast_float/1 defp cast_fun(:boolean), do: &cast_boolean/1 defp cast_fun(:map), do: &cast_map/1 defp cast_fun(:string), do: &cast_binary/1 defp cast_fun(:binary), do: &cast_binary/1 defp cast_fun(:id), do: &cast_integer/1 defp cast_fun(:binary_id), do: &cast_binary/1 defp cast_fun(:any), do: &{:ok, &1} defp cast_fun(:decimal), do: &cast_decimal/1 defp cast_fun(:date), do: &cast_date/1 defp cast_fun(:time), do: &maybe_truncate_usec(cast_time(&1)) defp cast_fun(:time_usec), do: &maybe_pad_usec(cast_time(&1)) defp cast_fun(:naive_datetime), do: &maybe_truncate_usec(cast_naive_datetime(&1)) defp cast_fun(:naive_datetime_usec), do: &maybe_pad_usec(cast_naive_datetime(&1)) defp cast_fun(:utc_datetime), do: &maybe_truncate_usec(cast_utc_datetime(&1)) defp cast_fun(:utc_datetime_usec), do: &maybe_pad_usec(cast_utc_datetime(&1)) defp cast_fun({:param, :any_datetime}), do: &cast_any_datetime(&1) defp cast_fun({:parameterized, mod, params}), do: &mod.cast(&1, params) defp cast_fun({:in, type}), do: cast_fun({:array, type}) defp cast_fun({:array, {:parameterized, _, _} = type}) do fun = cast_fun(type) &array(&1, fun, false, []) end defp cast_fun({:array, type}) do fun = cast_fun(type) &array(&1, fun, true, []) end defp cast_fun({:map, {:parameterized, _, _} = type}) do fun = cast_fun(type) &map(&1, fun, false, %{}) end defp cast_fun({:map, type}) do fun = cast_fun(type) &map(&1, fun, true, %{}) end defp cast_fun(mod) when is_atom(mod) do fn nil -> {:ok, nil} value -> mod.cast(value) end end defp cast_integer(term) when is_binary(term) do case Integer.parse(term) do {integer, ""} -> {:ok, integer} _ -> :error end end defp cast_integer(term) when is_integer(term), do: {:ok, term} defp cast_integer(_), do: :error defp cast_float(term) when is_binary(term) do case Float.parse(term) do {float, ""} -> {:ok, float} _ -> :error end end defp cast_float(term) when is_float(term), do: {:ok, term} defp cast_float(term) when is_integer(term), do: {:ok, :erlang.float(term)} defp cast_float(_), do: :error defp cast_decimal(term) when is_binary(term) do case Decimal.parse(term) do {:ok, decimal} -> check_decimal(decimal, false) # The following two clauses exist to support earlier versions of Decimal. {decimal, ""} -> check_decimal(decimal, false) {_, remainder} when is_binary(remainder) and byte_size(remainder) > 0 -> :error :error -> :error end end defp cast_decimal(term), do: same_decimal(term) defp cast_boolean(term) when term in ~w(true 1), do: {:ok, true} defp cast_boolean(term) when term in ~w(false 0), do: {:ok, false} defp cast_boolean(term) when is_boolean(term), do: {:ok, term} defp cast_boolean(_), do: :error defp cast_binary(term) when is_binary(term), do: {:ok, term} defp cast_binary(_), do: :error defp cast_map(term) when is_map(term), do: {:ok, term} defp cast_map(_), do: :error ## Shared helpers @compile {:inline, same_integer: 1, same_boolean: 1, same_map: 1, same_decimal: 1, same_date: 1} defp same_integer(term) when is_integer(term), do: {:ok, term} defp same_integer(_), do: :error defp same_boolean(term) when is_boolean(term), do: {:ok, term} defp same_boolean(_), do: :error defp same_binary(term) when is_binary(term), do: {:ok, term} defp same_binary(_), do: :error defp same_map(term) when is_map(term), do: {:ok, term} defp same_map(_), do: :error defp same_decimal(term) when is_integer(term), do: {:ok, Decimal.new(term)} defp same_decimal(term) when is_float(term), do: {:ok, Decimal.from_float(term)} defp same_decimal(%Decimal{} = term), do: check_decimal(term, true) defp same_decimal(_), do: :error defp same_date(%Date{} = term), do: {:ok, term} defp same_date(_), do: :error @doc false @spec filter_empty_values(t, any, [any]) :: {:ok, any} | :empty def filter_empty_values({:array, type}, value, empty_values) when is_list(value) do value = for elem <- value, {:ok, elem} <- [filter_empty_values(type, elem, empty_values)], do: elem if value in empty_values do :empty else {:ok, value} end end def filter_empty_values(_type, value, empty_values) do if value in empty_values do :empty else {:ok, value} end end ## Adapter related @doc false def adapter_autogenerate(adapter, type) do type |> type() |> adapter.autogenerate() end @doc false def adapter_load(adapter, {:parameterized, module, params} = type, value) do process_loaders(adapter.loaders(module.type(params), type), {:ok, value}, adapter) end def adapter_load(_adapter, _type, nil) do {:ok, nil} end def adapter_load(adapter, type, value) do if of_base_type?(type, value) do {:ok, value} else process_loaders(adapter.loaders(type(type), type), {:ok, value}, adapter) end end defp process_loaders(_, :error, _adapter), do: :error defp process_loaders([fun|t], {:ok, value}, adapter) when is_function(fun), do: process_loaders(t, fun.(value), adapter) defp process_loaders([type|t], {:ok, value}, adapter), do: process_loaders(t, load(type, value, &adapter_load(adapter, &1, &2)), adapter) defp process_loaders([], {:ok, _} = acc, _adapter), do: acc @doc false def adapter_dump(adapter, {:parameterized, module, params} = type, value) do process_dumpers(adapter.dumpers(module.type(params), type), {:ok, value}, adapter) end def adapter_dump(_adapter, type, nil) do dump(type, nil) end def adapter_dump(adapter, type, value) do process_dumpers(adapter.dumpers(type(type), type), {:ok, value}, adapter) end defp process_dumpers(_, :error, _adapter), do: :error defp process_dumpers([fun|t], {:ok, value}, adapter) when is_function(fun), do: process_dumpers(t, fun.(value), adapter) defp process_dumpers([type|t], {:ok, value}, adapter), do: process_dumpers(t, dump(type, value, &adapter_dump(adapter, &1, &2)), adapter) defp process_dumpers([], {:ok, _} = acc, _adapter), do: acc ## Date defp cast_date(binary) when is_binary(binary) do case Date.from_iso8601(binary) do {:ok, _} = ok -> ok {:error, _} -> case NaiveDateTime.from_iso8601(binary) do {:ok, naive_datetime} -> {:ok, NaiveDateTime.to_date(naive_datetime)} {:error, _} -> :error end end end defp cast_date(%{"year" => empty, "month" => empty, "day" => empty}) when empty in ["", nil], do: {:ok, nil} defp cast_date(%{year: empty, month: empty, day: empty}) when empty in ["", nil], do: {:ok, nil} defp cast_date(%{"year" => year, "month" => month, "day" => day}), do: cast_date(to_i(year), to_i(month), to_i(day)) defp cast_date(%{year: year, month: month, day: day}), do: cast_date(to_i(year), to_i(month), to_i(day)) defp cast_date(_), do: :error defp cast_date(year, month, day) when is_integer(year) and is_integer(month) and is_integer(day) do case Date.new(year, month, day) do {:ok, _} = ok -> ok {:error, _} -> :error end end defp cast_date(_, _, _), do: :error ## Time defp cast_time(<<hour::2-bytes, ?:, minute::2-bytes>>), do: cast_time(to_i(hour), to_i(minute), 0, nil) defp cast_time(binary) when is_binary(binary) do case Time.from_iso8601(binary) do {:ok, _} = ok -> ok {:error, _} -> :error end end defp cast_time(%{"hour" => empty, "minute" => empty}) when empty in ["", nil], do: {:ok, nil} defp cast_time(%{hour: empty, minute: empty}) when empty in ["", nil], do: {:ok, nil} defp cast_time(%{"hour" => hour, "minute" => minute} = map), do: cast_time(to_i(hour), to_i(minute), to_i(Map.get(map, "second")), to_i(Map.get(map, "microsecond"))) defp cast_time(%{hour: hour, minute: minute, second: second, microsecond: {microsecond, precision}}), do: cast_time(to_i(hour), to_i(minute), to_i(second), {to_i(microsecond), to_i(precision)}) defp cast_time(%{hour: hour, minute: minute} = map), do: cast_time(to_i(hour), to_i(minute), to_i(Map.get(map, :second)), to_i(Map.get(map, :microsecond))) defp cast_time(_), do: :error defp cast_time(hour, minute, sec, usec) when is_integer(usec) do cast_time(hour, minute, sec, {usec, 6}) end defp cast_time(hour, minute, sec, nil) do cast_time(hour, minute, sec, {0, 0}) end defp cast_time(hour, minute, sec, {usec, precision}) when is_integer(hour) and is_integer(minute) and (is_integer(sec) or is_nil(sec)) and is_integer(usec) and is_integer(precision) do case Time.new(hour, minute, sec || 0, {usec, precision}) do {:ok, _} = ok -> ok {:error, _} -> :error end end defp cast_time(_, _, _, _) do :error end defp cast_any_datetime(%DateTime{} = datetime), do: cast_utc_datetime(datetime) defp cast_any_datetime(other), do: cast_naive_datetime(other) ## Naive datetime defp cast_naive_datetime("-" <> rest) do with {:ok, naive_datetime} <- cast_naive_datetime(rest) do {:ok, %{naive_datetime | year: naive_datetime.year * -1}} end end defp cast_naive_datetime(<<year::4-bytes, ?-, month::2-bytes, ?-, day::2-bytes, sep, hour::2-bytes, ?:, minute::2-bytes>>) when sep in [?\s, ?T] do case NaiveDateTime.new(to_i(year), to_i(month), to_i(day), to_i(hour), to_i(minute), 0) do {:ok, _} = ok -> ok _ -> :error end end defp cast_naive_datetime(binary) when is_binary(binary) do case NaiveDateTime.from_iso8601(binary) do {:ok, _} = ok -> ok {:error, _} -> :error end end defp cast_naive_datetime(%{"year" => empty, "month" => empty, "day" => empty, "hour" => empty, "minute" => empty}) when empty in ["", nil], do: {:ok, nil} defp cast_naive_datetime(%{year: empty, month: empty, day: empty, hour: empty, minute: empty}) when empty in ["", nil], do: {:ok, nil} defp cast_naive_datetime(%{} = map) do with {:ok, %Date{} = date} <- cast_date(map), {:ok, %Time{} = time} <- cast_time(map) do NaiveDateTime.new(date, time) else _ -> :error end end defp cast_naive_datetime(_) do :error end ## UTC datetime defp cast_utc_datetime("-" <> rest) do with {:ok, utc_datetime} <- cast_utc_datetime(rest) do {:ok, %{utc_datetime | year: utc_datetime.year * -1}} end end defp cast_utc_datetime(<<year::4-bytes, ?-, month::2-bytes, ?-, day::2-bytes, sep, hour::2-bytes, ?:, minute::2-bytes>>) when sep in [?\s, ?T] do case NaiveDateTime.new(to_i(year), to_i(month), to_i(day), to_i(hour), to_i(minute), 0) do {:ok, naive_datetime} -> {:ok, DateTime.from_naive!(naive_datetime, "Etc/UTC")} _ -> :error end end defp cast_utc_datetime(binary) when is_binary(binary) do case DateTime.from_iso8601(binary) do {:ok, datetime, _offset} -> {:ok, datetime} {:error, :missing_offset} -> case NaiveDateTime.from_iso8601(binary) do {:ok, naive_datetime} -> {:ok, DateTime.from_naive!(naive_datetime, "Etc/UTC")} {:error, _} -> :error end {:error, _} -> :error end end defp cast_utc_datetime(%DateTime{time_zone: "Etc/UTC"} = datetime), do: {:ok, datetime} defp cast_utc_datetime(%DateTime{} = datetime) do case (datetime |> DateTime.to_unix(:microsecond) |> DateTime.from_unix(:microsecond)) do {:ok, _} = ok -> ok {:error, _} -> :error end end defp cast_utc_datetime(value) do case cast_naive_datetime(value) do {:ok, %NaiveDateTime{} = naive_datetime} -> {:ok, DateTime.from_naive!(naive_datetime, "Etc/UTC")} {:ok, _} = ok -> ok :error -> :error end end @doc """ Checks if two terms are equal. Depending on the given `type` performs a structural or semantical comparison. ## Examples iex> equal?(:integer, 1, 1) true iex> equal?(:decimal, Decimal.new("1"), Decimal.new("1.00")) true """ @spec equal?(t, term, term) :: boolean def equal?(_, nil, nil), do: true def equal?(type, term1, term2) do if fun = equal_fun(type) do fun.(term1, term2) else term1 == term2 end end @doc """ Checks if `collection` includes a `term`. Depending on the given `type` performs a structural or semantical comparison. ## Examples iex> include?(:integer, 1, 1..3) true iex> include?(:decimal, Decimal.new("1"), [Decimal.new("1.00"), Decimal.new("2.00")]) true """ @spec include?(t, term, Enum.t()) :: boolean def include?(type, term, collection) do if fun = equal_fun(type) do Enum.any?(collection, &fun.(term, &1)) else term in collection end end defp equal_fun(:decimal), do: &equal_decimal?/2 defp equal_fun(t) when t in [:time, :time_usec], do: &equal_time?/2 defp equal_fun(t) when t in [:utc_datetime, :utc_datetime_usec], do: &equal_utc_datetime?/2 defp equal_fun(t) when t in [:naive_datetime, :naive_datetime_usec], do: &equal_naive_datetime?/2 defp equal_fun(t) when t in @base, do: nil defp equal_fun({:array, type}) do if fun = equal_fun(type) do &equal_list?(fun, &1, &2) end end defp equal_fun({:map, type}) do if fun = equal_fun(type) do &equal_map?(fun, &1, &2) end end defp equal_fun({:parameterized, mod, params}) do &mod.equal?(&1, &2, params) end defp equal_fun(mod) when is_atom(mod), do: &mod.equal?/2 defp equal_decimal?(%Decimal{} = a, %Decimal{} = b), do: Decimal.equal?(a, b) defp equal_decimal?(_, _), do: false defp equal_time?(%Time{} = a, %Time{} = b), do: Time.compare(a, b) == :eq defp equal_time?(_, _), do: false defp equal_utc_datetime?(%DateTime{} = a, %DateTime{} = b), do: DateTime.compare(a, b) == :eq defp equal_utc_datetime?(_, _), do: false defp equal_naive_datetime?(%NaiveDateTime{} = a, %NaiveDateTime{} = b), do: NaiveDateTime.compare(a, b) == :eq defp equal_naive_datetime?(_, _), do: false defp equal_list?(fun, [nil | xs], [nil | ys]), do: equal_list?(fun, xs, ys) defp equal_list?(fun, [x | xs], [y | ys]), do: fun.(x, y) and equal_list?(fun, xs, ys) defp equal_list?(_fun, [], []), do: true defp equal_list?(_fun, _, _), do: false defp equal_map?(_fun, map1, map2) when map_size(map1) != map_size(map2) do false end defp equal_map?(fun, %{} = map1, %{} = map2) do equal_map?(fun, Map.to_list(map1), map2) end defp equal_map?(fun, [{key, nil} | tail], other_map) do case other_map do %{^key => nil} -> equal_map?(fun, tail, other_map) _ -> false end end defp equal_map?(fun, [{key, val} | tail], other_map) do case other_map do %{^key => other_val} -> fun.(val, other_val) and equal_map?(fun, tail, other_map) _ -> false end end defp equal_map?(_fun, [], _) do true end defp equal_map?(_fun, _, _) do false end ## Helpers # Checks if a value is of the given primitive type. defp of_base_type?(:any, _), do: true defp of_base_type?(:id, term), do: is_integer(term) defp of_base_type?(:float, term), do: is_float(term) defp of_base_type?(:integer, term), do: is_integer(term) defp of_base_type?(:boolean, term), do: is_boolean(term) defp of_base_type?(:binary, term), do: is_binary(term) defp of_base_type?(:string, term), do: is_binary(term) defp of_base_type?(:map, term), do: is_map(term) and not Map.has_key?(term, :__struct__) defp of_base_type?(:decimal, value), do: Kernel.match?(%Decimal{}, value) defp of_base_type?(:date, value), do: Kernel.match?(%Date{}, value) defp of_base_type?(_, _), do: false defp array([nil | t], fun, true, acc) do array(t, fun, true, [nil | acc]) end defp array([h | t], fun, skip_nil?, acc) do case fun.(h) do {:ok, h} -> array(t, fun, skip_nil?, [h | acc]) :error -> :error {:error, _custom_errors} -> :error end end defp array([], _fun, _skip_nil?,acc) do {:ok, Enum.reverse(acc)} end defp array(_, _, _, _) do :error end defp map(map, fun, skip_nil?, acc) when is_map(map) do map_each(Map.to_list(map), fun, skip_nil?, acc) end defp map(_, _, _, _) do :error end defp map_each([{key, nil} | t], fun, true, acc) do map_each(t, fun, true, Map.put(acc, key, nil)) end defp map_each([{key, value} | t], fun, skip_nil?, acc) do case fun.(value) do {:ok, value} -> map_each(t, fun, skip_nil?, Map.put(acc, key, value)) :error -> :error {:error, _custom_errors} -> :error end end defp map_each([], _fun, _skip_nil?, acc) do {:ok, acc} end defp array([nil | t], type, fun, true, acc) do array(t, type, fun, true, [nil | acc]) end defp array([h | t], type, fun, skip_nil?, acc) do case fun.(type, h) do {:ok, h} -> array(t, type, fun, skip_nil?, [h | acc]) :error -> :error end end defp array([], _type, _fun, _skip_nil?, acc) do {:ok, Enum.reverse(acc)} end defp array(_, _, _, _, _) do :error end defp map(map, type, fun, skip_nil?, acc) when is_map(map) do map_each(Map.to_list(map), type, fun, skip_nil?, acc) end defp map(_, _, _, _, _) do :error end defp map_each([{key, value} | t], type, fun, skip_nil?, acc) do case fun.(type, value) do {:ok, value} -> map_each(t, type, fun, skip_nil?, Map.put(acc, key, value)) :error -> :error end end defp map_each([], _type, _fun, _skip_nil?, acc) do {:ok, acc} end defp to_i(nil), do: nil defp to_i(int) when is_integer(int), do: int defp to_i(bin) when is_binary(bin) do case Integer.parse(bin) do {int, ""} -> int _ -> nil end end defp maybe_truncate_usec({:ok, struct}), do: {:ok, truncate_usec(struct)} defp maybe_truncate_usec(:error), do: :error defp maybe_pad_usec({:ok, struct}), do: {:ok, pad_usec(struct)} defp maybe_pad_usec(:error), do: :error defp truncate_usec(nil), do: nil defp truncate_usec(%{microsecond: {0, 0}} = struct), do: struct defp truncate_usec(struct), do: %{struct | microsecond: {0, 0}} defp pad_usec(nil), do: nil defp pad_usec(%{microsecond: {_, 6}} = struct), do: struct defp pad_usec(%{microsecond: {microsecond, _}} = struct), do: %{struct | microsecond: {microsecond, 6}} defp check_utc_timezone!(%{time_zone: "Etc/UTC"} = datetime, _kind), do: datetime defp check_utc_timezone!(datetime, kind) do raise ArgumentError, "#{inspect kind} expects the time zone to be \"Etc/UTC\", got `#{inspect(datetime)}`" end defp check_usec!(%{microsecond: {_, 6}} = datetime, _kind), do: datetime defp check_usec!(datetime, kind) do raise ArgumentError, "#{inspect(kind)} expects microsecond precision, got: #{inspect(datetime)}" end defp check_no_usec!(%{microsecond: {0, 0}} = datetime, _kind), do: datetime defp check_no_usec!(%struct{} = datetime, kind) do raise ArgumentError, """ #{inspect(kind)} expects microseconds to be empty, got: #{inspect(datetime)} Use `#{inspect(struct)}.truncate(#{kind}, :second)` (available in Elixir v1.6+) to remove microseconds. """ end defp check_decimal(%Decimal{coef: coef} = decimal, _) when is_integer(coef), do: {:ok, decimal} defp check_decimal(_decimal, false), do: :error defp check_decimal(decimal, true) do raise ArgumentError, """ #{inspect(decimal)} is not allowed for type :decimal `+Infinity`, `-Infinity`, and `NaN` values are not supported, even though the `Decimal` library handles them. \ To support them, you can create a custom type. """ end end
31.25578
124
0.633178
796fa7dfb91e181191e19cbb01c774443777abc9
1,876
ex
Elixir
clients/blogger/lib/google_api/blogger/v3/model/page_author.ex
medikent/elixir-google-api
98a83d4f7bfaeac15b67b04548711bb7e49f9490
[ "Apache-2.0" ]
null
null
null
clients/blogger/lib/google_api/blogger/v3/model/page_author.ex
medikent/elixir-google-api
98a83d4f7bfaeac15b67b04548711bb7e49f9490
[ "Apache-2.0" ]
null
null
null
clients/blogger/lib/google_api/blogger/v3/model/page_author.ex
medikent/elixir-google-api
98a83d4f7bfaeac15b67b04548711bb7e49f9490
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed 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 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This file is auto generated by the elixir code generator program. # Do not edit this file manually. defmodule GoogleApi.Blogger.V3.Model.PageAuthor do @moduledoc """ The author of this Page. ## Attributes * `displayName` (*type:* `String.t`, *default:* `nil`) - The display name. * `id` (*type:* `String.t`, *default:* `nil`) - The identifier of the Page creator. * `image` (*type:* `GoogleApi.Blogger.V3.Model.PageAuthorImage.t`, *default:* `nil`) - The page author's avatar. * `url` (*type:* `String.t`, *default:* `nil`) - The URL of the Page creator's Profile page. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :displayName => String.t(), :id => String.t(), :image => GoogleApi.Blogger.V3.Model.PageAuthorImage.t(), :url => String.t() } field(:displayName) field(:id) field(:image, as: GoogleApi.Blogger.V3.Model.PageAuthorImage) field(:url) end defimpl Poison.Decoder, for: GoogleApi.Blogger.V3.Model.PageAuthor do def decode(value, options) do GoogleApi.Blogger.V3.Model.PageAuthor.decode(value, options) end end defimpl Poison.Encoder, for: GoogleApi.Blogger.V3.Model.PageAuthor do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) end end
33.5
116
0.695629
796fa7f6e26b7ab9a6e418da5af52417fd95835f
11,693
ex
Elixir
clients/you_tube/lib/google_api/you_tube/v3/api/comment_threads.ex
kyleVsteger/elixir-google-api
3a0dd498af066a4361b5b0fd66ffc04a57539488
[ "Apache-2.0" ]
null
null
null
clients/you_tube/lib/google_api/you_tube/v3/api/comment_threads.ex
kyleVsteger/elixir-google-api
3a0dd498af066a4361b5b0fd66ffc04a57539488
[ "Apache-2.0" ]
null
null
null
clients/you_tube/lib/google_api/you_tube/v3/api/comment_threads.ex
kyleVsteger/elixir-google-api
3a0dd498af066a4361b5b0fd66ffc04a57539488
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed 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 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This file is auto generated by the elixir code generator program. # Do not edit this file manually. defmodule GoogleApi.YouTube.V3.Api.CommentThreads do @moduledoc """ API calls for all endpoints tagged `CommentThreads`. """ alias GoogleApi.YouTube.V3.Connection alias GoogleApi.Gax.{Request, Response} @library_version Mix.Project.config() |> Keyword.get(:version, "") @doc """ Inserts a new resource into this collection. ## Parameters * `connection` (*type:* `GoogleApi.YouTube.V3.Connection.t`) - Connection to server * `part` (*type:* `list(String.t)`) - The *part* parameter identifies the properties that the API response will include. Set the parameter value to snippet. The snippet part has a quota cost of 2 units. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:body` (*type:* `GoogleApi.YouTube.V3.Model.CommentThread.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.YouTube.V3.Model.CommentThread{}}` on success * `{:error, info}` on failure """ @spec youtube_comment_threads_insert(Tesla.Env.client(), list(String.t()), keyword(), keyword()) :: {:ok, GoogleApi.YouTube.V3.Model.CommentThread.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} def youtube_comment_threads_insert(connection, part, optional_params \\ [], opts \\ []) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/youtube/v3/commentThreads", %{}) |> Request.add_param(:query, :part, part) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) |> Response.decode(opts ++ [struct: %GoogleApi.YouTube.V3.Model.CommentThread{}]) end @doc """ Retrieves a list of resources, possibly filtered. ## Parameters * `connection` (*type:* `GoogleApi.YouTube.V3.Connection.t`) - Connection to server * `part` (*type:* `list(String.t)`) - The *part* parameter specifies a comma-separated list of one or more commentThread resource properties that the API response will include. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:allThreadsRelatedToChannelId` (*type:* `String.t`) - Returns the comment threads of all videos of the channel and the channel comments as well. * `:channelId` (*type:* `String.t`) - Returns the comment threads for all the channel comments (ie does not include comments left on videos). * `:id` (*type:* `list(String.t)`) - Returns the comment threads with the given IDs for Stubby or Apiary. * `:maxResults` (*type:* `integer()`) - The *maxResults* parameter specifies the maximum number of items that should be returned in the result set. * `:moderationStatus` (*type:* `String.t`) - Limits the returned comment threads to those with the specified moderation status. Not compatible with the 'id' filter. Valid values: published, heldForReview, likelySpam. * `:order` (*type:* `String.t`) - * `:pageToken` (*type:* `String.t`) - The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved. * `:searchTerms` (*type:* `String.t`) - Limits the returned comment threads to those matching the specified key words. Not compatible with the 'id' filter. * `:textFormat` (*type:* `String.t`) - The requested text format for the returned comments. * `:videoId` (*type:* `String.t`) - Returns the comment threads of the specified video. * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.YouTube.V3.Model.CommentThreadListResponse{}}` on success * `{:error, info}` on failure """ @spec youtube_comment_threads_list(Tesla.Env.client(), list(String.t()), keyword(), keyword()) :: {:ok, GoogleApi.YouTube.V3.Model.CommentThreadListResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} def youtube_comment_threads_list(connection, part, optional_params \\ [], opts \\ []) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :allThreadsRelatedToChannelId => :query, :channelId => :query, :id => :query, :maxResults => :query, :moderationStatus => :query, :order => :query, :pageToken => :query, :searchTerms => :query, :textFormat => :query, :videoId => :query } request = Request.new() |> Request.method(:get) |> Request.url("/youtube/v3/commentThreads", %{}) |> Request.add_param(:query, :part, part) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) |> Response.decode(opts ++ [struct: %GoogleApi.YouTube.V3.Model.CommentThreadListResponse{}]) end @doc """ Updates an existing resource. ## Parameters * `connection` (*type:* `GoogleApi.YouTube.V3.Connection.t`) - Connection to server * `part` (*type:* `list(String.t)`) - The *part* parameter specifies a comma-separated list of commentThread resource properties that the API response will include. You must at least include the snippet part in the parameter value since that part contains all of the properties that the API request can update. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:body` (*type:* `GoogleApi.YouTube.V3.Model.CommentThread.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.YouTube.V3.Model.CommentThread{}}` on success * `{:error, info}` on failure """ @spec youtube_comment_threads_update(Tesla.Env.client(), list(String.t()), keyword(), keyword()) :: {:ok, GoogleApi.YouTube.V3.Model.CommentThread.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} def youtube_comment_threads_update(connection, part, optional_params \\ [], opts \\ []) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :body => :body } request = Request.new() |> Request.method(:put) |> Request.url("/youtube/v3/commentThreads", %{}) |> Request.add_param(:query, :part, part) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) |> Response.decode(opts ++ [struct: %GoogleApi.YouTube.V3.Model.CommentThread{}]) end end
51.061135
314
0.640041
796fe738273fe3bc6c073cf873d71e6d61805fd3
3,883
ex
Elixir
clients/accelerated_mobile_page_url/lib/google_api/accelerated_mobile_page_url/v1/api/amp_urls.ex
ukrbublik/elixir-google-api
364cec36bc76f60bec94cbcad34844367a29d174
[ "Apache-2.0" ]
null
null
null
clients/accelerated_mobile_page_url/lib/google_api/accelerated_mobile_page_url/v1/api/amp_urls.ex
ukrbublik/elixir-google-api
364cec36bc76f60bec94cbcad34844367a29d174
[ "Apache-2.0" ]
null
null
null
clients/accelerated_mobile_page_url/lib/google_api/accelerated_mobile_page_url/v1/api/amp_urls.ex
ukrbublik/elixir-google-api
364cec36bc76f60bec94cbcad34844367a29d174
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed 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 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This file is auto generated by the elixir code generator program. # Do not edit this file manually. defmodule GoogleApi.AcceleratedMobilePageUrl.V1.Api.AmpUrls do @moduledoc """ API calls for all endpoints tagged `AmpUrls`. """ alias GoogleApi.AcceleratedMobilePageUrl.V1.Connection alias GoogleApi.Gax.{Request, Response} @library_version Mix.Project.config() |> Keyword.get(:version, "") @doc """ Returns AMP URL(s) and equivalent [AMP Cache URL(s)](/amp/cache/overview#amp-cache-url-format). ## Parameters * `connection` (*type:* `GoogleApi.AcceleratedMobilePageUrl.V1.Connection.t`) - Connection to server * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:body` (*type:* `GoogleApi.AcceleratedMobilePageUrl.V1.Model.BatchGetAmpUrlsRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.AcceleratedMobilePageUrl.V1.Model.BatchGetAmpUrlsResponse{}}` on success * `{:error, info}` on failure """ @spec acceleratedmobilepageurl_amp_urls_batch_get(Tesla.Env.client(), keyword(), keyword()) :: {:ok, GoogleApi.AcceleratedMobilePageUrl.V1.Model.BatchGetAmpUrlsResponse.t()} | {:ok, Tesla.Env.t()} | {:error, any()} def acceleratedmobilepageurl_amp_urls_batch_get(connection, optional_params \\ [], opts \\ []) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v1/ampUrls:batchGet", %{}) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.AcceleratedMobilePageUrl.V1.Model.BatchGetAmpUrlsResponse{}] ) end end
43.629213
196
0.663405
796ffc25f2e8c7665391e5dbc3ba1433db2c33b5
1,703
ex
Elixir
examples/basic_phoenix_ecto/lib/demo_web/router.ex
RudolfMan/opentelemetry-erlang-contrib
44fd2a6871742380dd6adc112f9776cda501ff1f
[ "Apache-2.0" ]
null
null
null
examples/basic_phoenix_ecto/lib/demo_web/router.ex
RudolfMan/opentelemetry-erlang-contrib
44fd2a6871742380dd6adc112f9776cda501ff1f
[ "Apache-2.0" ]
null
null
null
examples/basic_phoenix_ecto/lib/demo_web/router.ex
RudolfMan/opentelemetry-erlang-contrib
44fd2a6871742380dd6adc112f9776cda501ff1f
[ "Apache-2.0" ]
1
2022-02-07T20:48:50.000Z
2022-02-07T20:48:50.000Z
defmodule DemoWeb.Router do use DemoWeb, :router pipeline :browser do plug :accepts, ["html"] plug :fetch_session plug :fetch_live_flash plug :put_root_layout, {DemoWeb.LayoutView, :root} plug :protect_from_forgery plug :put_secure_browser_headers end pipeline :api do plug :accepts, ["json"] end scope "/", DemoWeb do pipe_through :browser get "/", PageController, :index resources "/posts", PostController live "/users", UserLive.Index, :index live "/users/new", UserLive.Index, :new live "/users/:id/edit", UserLive.Index, :edit live "/users/:id", UserLive.Show, :show live "/users/:id/show/edit", UserLive.Show, :edit end # Other scopes may use custom stacks. # scope "/api", DemoWeb do # pipe_through :api # end # Enables LiveDashboard only for development # # If you want to use the LiveDashboard in production, you should put # it behind authentication and allow only admins to access it. # If your application does not have an admins-only section yet, # you can use Plug.BasicAuth to set up some basic authentication # as long as you are also using SSL (which you should anyway). if Mix.env() in [:dev, :test] do import Phoenix.LiveDashboard.Router scope "/" do pipe_through :browser live_dashboard "/dashboard", metrics: DemoWeb.Telemetry end end # Enables the Swoosh mailbox preview in development. # # Note that preview only shows emails that were sent by the same # node running the Phoenix server. if Mix.env() == :dev do scope "/dev" do pipe_through :browser forward "/mailbox", Plug.Swoosh.MailboxPreview end end end
25.80303
70
0.684087
797005c75ffc5000a7bd13f0ef98ce07e652e63a
1,074
ex
Elixir
lib/ex_polygon/rest/stock_dividends.ex
aai/ex_polygon
3bd6d8d0f1fbe4cd3fa939751c5ff00813eeeba3
[ "MIT" ]
null
null
null
lib/ex_polygon/rest/stock_dividends.ex
aai/ex_polygon
3bd6d8d0f1fbe4cd3fa939751c5ff00813eeeba3
[ "MIT" ]
null
null
null
lib/ex_polygon/rest/stock_dividends.ex
aai/ex_polygon
3bd6d8d0f1fbe4cd3fa939751c5ff00813eeeba3
[ "MIT" ]
null
null
null
defmodule ExPolygon.Rest.StockDividends do @moduledoc """ Returns a call to "Stock Dividends" Polygon.io """ @type dividend :: ExPolygon.Dividend.t() @type api_key :: ExPolygon.Rest.HTTPClient.api_key() @type shared_error_reasons :: ExPolygon.Rest.HTTPClient.shared_error_reasons() @path "/v2/reference/dividends/:symbol" @spec query(String.t(), api_key) :: {:ok, [dividend]} | {:error, shared_error_reasons} def query(symbol, api_key) do with {:ok, data} <- @path |> String.replace(":symbol", symbol) |> ExPolygon.Rest.HTTPClient.get(%{}, api_key) do parse_response(data) end end defp parse_response(%{"status" => "OK", "results" => results}) do dividends = results |> Enum.map(&Mapail.map_to_struct(&1, ExPolygon.Dividend, transformations: [:snake_case])) |> Enum.map(fn {:ok, t} -> t end) {:ok, dividends} end defp parse_response(%{"status" => "NOT_FOUND"} = _data) do {:error, :not_found} end defp parse_response(_) do {:error, :bad_request} end end
27.538462
96
0.640596
797013a515f506c45ec8d371a8b758dada929afd
1,249
ex
Elixir
lib/msgpax/plug_parser.ex
kanmo/msgpax
38304c277d923e2abfce33ef402fc69228583414
[ "ISC" ]
null
null
null
lib/msgpax/plug_parser.ex
kanmo/msgpax
38304c277d923e2abfce33ef402fc69228583414
[ "ISC" ]
null
null
null
lib/msgpax/plug_parser.ex
kanmo/msgpax
38304c277d923e2abfce33ef402fc69228583414
[ "ISC" ]
null
null
null
if Code.ensure_compiled?(Plug) do defmodule Msgpax.PlugParser do @moduledoc """ A `Plug.Parsers` plug for parsing a MessagePack-encoded body. Look at the [documentation for `Plug.Parsers`](http://hexdocs.pm/plug/Plug.Parsers.html) for more information on how to use `Plug.Parsers`. ## Examples defmodule MyPlugPipeline do use Plug.Builder plug Plug.Parsers, parsers: [Msgpax.PlugParser], pass: ["application/msgpack"] # rest of the pipeline end """ @behaviour Plug.Parsers import Plug.Conn def parse(%Plug.Conn{} = conn, "application", "msgpack", _headers, opts) do case read_body(conn, opts) do {:ok, body, conn} -> {:ok, unpack_body(body), conn} {:more, _partial_body, conn} -> {:error, :too_large, conn} end end def parse(%Plug.Conn{} = conn, _type, _subtype, _headers, _opts) do {:next, conn} end defp unpack_body(body) do case Msgpax.unpack!(body) do data when is_map(data) -> data data -> %{"_msgpack" => data} end rescue exception in [Msgpax.UnpackError] -> raise Plug.Parsers.ParseError, exception: exception end end end
25.489796
88
0.609287
79703cb90c6d0a3a83060739936972aba2dd7562
212
ex
Elixir
lib/trento/application/integration/prometheus/adapter/gen.ex
trento-project/web
3260b30c781bffbbb0e5205cd650966c4026b9ac
[ "Apache-2.0" ]
1
2022-03-22T16:59:34.000Z
2022-03-22T16:59:34.000Z
lib/trento/application/integration/prometheus/adapter/gen.ex
trento-project/web
3260b30c781bffbbb0e5205cd650966c4026b9ac
[ "Apache-2.0" ]
24
2022-03-22T16:45:25.000Z
2022-03-31T13:00:02.000Z
lib/trento/application/integration/prometheus/adapter/gen.ex
trento-project/web
3260b30c781bffbbb0e5205cd650966c4026b9ac
[ "Apache-2.0" ]
1
2022-03-30T14:16:16.000Z
2022-03-30T14:16:16.000Z
defmodule Trento.Integration.Prometheus.Gen do @moduledoc """ Behaviour of a prometheus adapter. """ @callback get_exporters_status(host_id :: String.t()) :: {:ok, map} | {:error, any} end
23.555556
58
0.646226
7970569480d9cf9aa35b569191e31d68201247cd
170
exs
Elixir
www/priv/repo/migrations/20160721085732_add_authors_field.exs
Nagasaki45/krihelinator
243bfe476b8128dc2f0fcd913bebd8cf20b7deb6
[ "MIT" ]
47
2016-07-17T08:49:36.000Z
2020-11-06T14:12:15.000Z
www/priv/repo/migrations/20160721085732_add_authors_field.exs
Nagasaki45/krihelinator
243bfe476b8128dc2f0fcd913bebd8cf20b7deb6
[ "MIT" ]
181
2016-07-11T13:20:40.000Z
2019-10-22T14:43:40.000Z
www/priv/repo/migrations/20160721085732_add_authors_field.exs
Nagasaki45/krihelinator
243bfe476b8128dc2f0fcd913bebd8cf20b7deb6
[ "MIT" ]
2
2017-02-25T16:19:09.000Z
2017-12-24T20:22:32.000Z
defmodule Krihelinator.Repo.Migrations.AddAuthorsField do use Ecto.Migration def change do alter table(:repos) do add :authors, :integer end end end
17
57
0.717647
79707e112b0f5ead284b7e16669662dee9361671
200
exs
Elixir
projects/standup/test/standup_web/controllers/page_controller_test.exs
erik/sketches
0a454ada58dee6db576e93cb2216dd750290329e
[ "MIT" ]
1
2020-02-11T06:00:11.000Z
2020-02-11T06:00:11.000Z
projects/standup/test/standup_web/controllers/page_controller_test.exs
erik/sketches
0a454ada58dee6db576e93cb2216dd750290329e
[ "MIT" ]
1
2017-09-23T19:41:29.000Z
2017-09-25T05:12:38.000Z
projects/standup/test/standup_web/controllers/page_controller_test.exs
erik/sketches
0a454ada58dee6db576e93cb2216dd750290329e
[ "MIT" ]
null
null
null
defmodule StandupWeb.PageControllerTest do use StandupWeb.ConnCase test "GET /", %{conn: conn} do conn = get(conn, "/") assert html_response(conn, 200) =~ "Welcome to Phoenix!" end end
22.222222
60
0.68
7970839aa0f692fccd85d2580ef783ec751b1958
2,619
exs
Elixir
test/sparsebitfield_test.exs
davebryson/hyperex
e95923600419c4701e2d0d86adb509cf1839a36d
[ "Apache-2.0" ]
null
null
null
test/sparsebitfield_test.exs
davebryson/hyperex
e95923600419c4701e2d0d86adb509cf1839a36d
[ "Apache-2.0" ]
null
null
null
test/sparsebitfield_test.exs
davebryson/hyperex
e95923600419c4701e2d0d86adb509cf1839a36d
[ "Apache-2.0" ]
null
null
null
defmodule Hyperex.SparsebitfieldTest do use ExUnit.Case, async: true alias Hyperex.SparseBitfield test "bit functions work as expected" do assert {:ok, 0b10000000} = SparseBitfield.set_bit(0, <<0b00000000>>, true) assert {:ok, 0b01000000} = SparseBitfield.set_bit(17, <<0b00000000>>, true) assert {:ok, 0b00100000} = SparseBitfield.set_bit(18, <<0b00000000>>, true) assert {:ok, 0b00010000} = SparseBitfield.set_bit(19, <<0b00000000>>, true) assert {:ok, 0b00001000} = SparseBitfield.set_bit(20, <<0b00000000>>, true) assert {:ok, 0b00000100} = SparseBitfield.set_bit(21, <<0b00000000>>, true) assert {:ok, 0b00000010} = SparseBitfield.set_bit(22, <<0b00000000>>, true) assert {:ok, 0b00000001} = SparseBitfield.set_bit(23, <<0b00000000>>, true) assert {:ok, 0b10000000} = SparseBitfield.set_bit(1024, <<0b00000000>>, true) assert {:ok, 0b11111111} = SparseBitfield.set_bit(1029, <<0b11111011>>, true) # set false assert {:ok, 0b01111111} = SparseBitfield.set_bit(32, <<0b11111111>>, false) assert {:ok, 0b10111111} = SparseBitfield.set_bit(33, <<0b11111111>>, false) assert {:ok, 0b11011111} = SparseBitfield.set_bit(34, <<0b11111111>>, false) assert {:ok, 0b11101111} = SparseBitfield.set_bit(35, <<0b11111111>>, false) assert {:ok, 0b11110111} = SparseBitfield.set_bit(36, <<0b11111111>>, false) assert {:ok, 0b11111011} = SparseBitfield.set_bit(37, <<0b11111111>>, false) assert {:ok, 0b11111101} = SparseBitfield.set_bit(38, <<0b11111111>>, false) assert {:ok, 0b11111110} = SparseBitfield.set_bit(39, <<0b11111111>>, false) assert {:ok, 0b00000011} = SparseBitfield.set_bit(17, <<0b01000011>>, false) assert SparseBitfield.is_set?(2, <<0b00100000>>) assert SparseBitfield.is_set?(39, <<0b00100001>>) assert SparseBitfield.is_set?(1024, <<0b10100000>>) end test "can set and check bits at different locations" do sb = SparseBitfield.new() false = SparseBitfield.get(sb, 15) {sb1, true} = SparseBitfield.set(sb, 15, true) {sb2, false} = SparseBitfield.set(sb1, 15, true) {sb3, true} = SparseBitfield.set(sb2, 2056, true) {sb4, true} = SparseBitfield.set(sb3, 0, true) {sb5, true} = SparseBitfield.set(sb4, 10001, true) true = SparseBitfield.get(sb5, 0) true = SparseBitfield.get(sb5, 2056) true = SparseBitfield.get(sb5, 10001) # check is shows 'not changed' {sb6, false} = SparseBitfield.set(sb5, 10001, true) # change it {sb6, true} = SparseBitfield.set(sb6, 10001, false) # check it again false = SparseBitfield.get(sb6, 10001) end end
46.767857
81
0.683849
7970c2b5f4b19095ccc1190cbd570a968182160f
378
ex
Elixir
lib/ambry/media/chapters.ex
doughsay/ambry
c04e855bf06a6b00b8053c6eacb2eac14a56a37c
[ "MIT" ]
12
2021-09-30T20:51:49.000Z
2022-01-27T04:09:32.000Z
lib/ambry/media/chapters.ex
doughsay/ambry
c04e855bf06a6b00b8053c6eacb2eac14a56a37c
[ "MIT" ]
76
2021-10-01T05:45:11.000Z
2022-03-28T04:12:39.000Z
lib/ambry/media/chapters.ex
doughsay/ambry
c04e855bf06a6b00b8053c6eacb2eac14a56a37c
[ "MIT" ]
2
2021-10-04T19:27:28.000Z
2022-01-13T22:36:38.000Z
defmodule Ambry.Media.Chapters do @moduledoc """ Tries to determine chapters from various kinds of media. """ alias Ambry.Media.Chapters.{ChapteredMP3, ChapteredMP4, MP4, OverdriveMP3} @strategies [ ChapteredMP3, ChapteredMP4, MP4, OverdriveMP3 ] def available_strategies(media) do Enum.filter(@strategies, & &1.available?(media)) end end
19.894737
76
0.706349
7970e6a9b02d570f2c611d0ced883345ea534121
229
ex
Elixir
lib/mix/tasks/slack.ex
PsOverflow/changelog.com
53f4ecfc39b021c6b8cfcc0fa11f29aff8038a7f
[ "MIT" ]
1
2021-03-14T21:12:49.000Z
2021-03-14T21:12:49.000Z
lib/mix/tasks/slack.ex
type1fool/changelog.com
fbec3528cc3f5adfdc75b008bb92b17efc4f248f
[ "MIT" ]
null
null
null
lib/mix/tasks/slack.ex
type1fool/changelog.com
fbec3528cc3f5adfdc75b008bb92b17efc4f248f
[ "MIT" ]
1
2018-10-03T20:55:52.000Z
2018-10-03T20:55:52.000Z
defmodule Mix.Tasks.Changelog.Slack do use Mix.Task @shortdoc "Retrieves list of Slack users and updates local Slack IDs" def run(_) do Mix.Task.run "app.start" Changelog.Slack.Tasks.import_member_ids() end end
20.818182
71
0.733624