working on it ...

Filters

Explore Public Snippets

Sort by

Found 1,532 snippets

    public by snip2code  638  3  4  0

    First Snippet: How to play with Snip2Code

    This is the first example of a snippet: - the title represents in few words which is the exact issue the snippet resolves; it can be something like the name of a method; - the description (this field) is an optional field where you can add interesting information regarding the snippet; something like the comment on the head of a method; - the c
    /* place here the actual content of your snippet. 
       It should be code or pseudo-code. 
       The less dependencies from external stuff, the better! */

    public by simonwalker  1103  0  6  0

    Magento GeoIP Store Switcher Extension | FME

    Magento GeoIP Store Switcher by FME is a geo-targeting extension which detects the visitor’s real-time location and redirects them to a region customized store view. Using this Magento GeoIP store switcher extension, you can create multiple store views, customize their theme, and display relevant products on the front. Allow the visitors to manuall
    // https://www.fmeextensions.com/magento-geo-ip-default-store-view.html        

    public by simonwalker  815  7  5  0

    Magento Customer Registration Attributes Extension by FME

    Magento Customer Registration attributes extension by FME allows you to add customer attribute to user registration form & account pages. You can hide the custom attributes and restrict them by creating different customer attributes. Using this Magento add customer attribute extension, you can make the custom registration form attributes mandatory
    // https://www.fmeextensions.com/magento-additional-registration-attributes-fields.html            

    external by Aleksei Matiushkin  1  0  1  0

    `MapAccess.filter/1` → the same as `Access.filter/1`, but works with maps.

    `MapAccess.filter/1` → the same as `Access.filter/1`, but works with maps.: map_access.ex
    defmodule MapAccess do
      @spec filter((term -> boolean)) :: Access.access_fun(data :: map, get_value :: map)
      def filter(func) when is_function(func, 1) do
        fn op, data, next -> filter(op, data, func, next) end
      end
    
      defp filter(:get, %{} = data, func, next) do
        data |> Enum.filter(func) |> Enum.map(next) |> Map.new()
      end
    
      defp filter(:get_and_update, %{} = data, func, next) do
        get_and_update_filter(Map.to_list(data), func, next, [], [])
      end
    
      defp filter(_op, data, _func, _next) do
        raise "MapAccess.filter/1 expected a map, got: #{inspect(data)}"
      end
    
      defp get_and_update_filter([{k, v} = head | rest], func, next, updates, gets) do
        if func.(head) do
          case next.(v) do
            {get, update} ->
              get_and_update_filter(rest, func, next, [{k, update} | updates], [head | gets])
    
            :pop ->
              get_and_update_filter(rest, func, next, updates, [head | gets])
          end
        else
          get_and_update_filter(rest, func, next, [head | updates], gets)
        end
      end
    
      defp get_and_update_filter([], _func, _next, updates, gets) do
        {Map.new(gets), Map.new(updates)}
      end
    end
    
    input = %{
      payload: %{
        "foo" => 42,
        "bar" => 5,
        "baz" => 10
      }
    }
    
    filter_fun = MapAccess.filter(&match?({"b" <> _, _}, &1))
    update_fun = &(&1 * 2)
    get_and_update_in_fun = &{&1, &1 * 2}
    
    get_in(input, [:payload, filter_fun])
    # ⇒ %{"bar" => 5, "baz" => 10}
    put_in(input, [:payload, filter_fun], 42)
    # ⇒ %{payload: %{"bar" => 42, "baz" => 42, "foo" => 42}}
    update_in(input, [:payload, filter_fun], update_fun)
    # ⇒ %{payload: %{"bar" => 10, "baz" => 20, "foo" => 42}}
    get_and_update_in(input, [:payload, filter_fun], get_and_update_in_fun)
    # ⇒ {%{"bar" => 5, "baz" => 10},
    #   %{payload: %{"bar" => 10, "baz" => 20, "foo" => 42}}}
    pop_in(input, [:payload, filter_fun])
    # ⇒ {%{"bar" => 5, "baz" => 10}, %{payload: %{"foo" => 42}}}
    
    
    

    external by YazzyYaz  3  0  1  0

    Prod.exs for Blockscout

    Prod.exs for Blockscout: prod.exs
    use Mix.Config
    
    # Configures the database
    config :explorer, Explorer.Repo,
      url: System.get_env("DATABASE_URL"),
      pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
      ssl: String.equivalent?(System.get_env("ECTO_USE_SSL") || "true", "true"),
      prepare: :unnamed,
      timeout: :timer.seconds(60),
      queue_target: 5000,
      queue_interval: 100
    
    config :explorer, Explorer.Tracer, env: "production", disabled?: true
    
    config :logger, :explorer,
      level: :info,
      path: Path.absname("logs/prod/explorer.log"),
      rotate: %{max_bytes: 52_428_800, keep: 19}
    
    config :logger, :reading_token_functions,
      level: :debug,
      path: Path.absname("logs/prod/explorer/tokens/reading_functions.log"),
      metadata_filter: [fetcher: :token_functions],
      rotate: %{max_bytes: 52_428_800, keep: 19}
    
    config :logger, :token_instances,
      level: :debug,
      path: Path.absname("logs/prod/explorer/tokens/token_instances.log"),
      metadata_filter: [fetcher: :token_instances],
      rotate: %{max_bytes: 52_428_800, keep: 19}
    
    variant =
      if is_nil(System.get_env("ETHEREUM_JSONRPC_VARIANT")) do
        "parity"
      else
        System.get_env("ETHEREUM_JSONRPC_VARIANT")
        |> String.split(".")
        |> List.last()
        |> String.downcase()
      end
    
    # Import variant specific config. This must remain at the bottom
    # of this file so it overrides the configuration defined above.
    import_config "prod/#{variant}.exs"
    
    

    external by Nathan Cruz  5  0  1  0

    Equivalent to python's zip_longest function for elixir.

    Equivalent to python's zip_longest function for elixir.: zip.ex
    defmodule Zip do
      @doc """
      Zips corresponding elements from a finite collection of enumerables into one list of tuples.
    
      The zipping finishes when the longest enumerable is finished. Default padding value is `nil`.
      
      Usage:
    
          iex> Bla.zip_longest([1, 2, 3], [1, 2])         
          [{1, 1}, {2, 2}, {3, nil}]
    
          iex> Bla.zip_longest([1, 2], [1, 2, 3])
          [{1, 1}, {2, 2}, {nil, 3}]
      """
      def zip_longest([h1 | next1], [h2 | next2]) do
        [{h1, h2} | zip_longest(next1, next2)]
      end
    
      def zip_longest([h1 | next1], []), do: [{h1, nil} | zip_longest(next1, [])]
      def zip_longest([], [h2 | next2]), do: [{nil, h2} | zip_longest([], next2)]
      def zip_longest([], []), do: []
    end
    
    

    external by noahzweben  5  0  1  0

    Label Ordering

    Label Ordering: order.ex
      %{"code" => "5:A1:1b", "encoded" => "POSITION:1384"},
      %{"code" => "5:A1:1a", "encoded" => "POSITION:1385"},
      %{"code" => "5:A2:1b", "encoded" => "POSITION:1704"},
      %{"code" => "5:A2:1a", "encoded" => "POSITION:1705"},
      %{"code" => "5:A3:1b", "encoded" => "POSITION:2024"},
      %{"code" => "5:A3:1a", "encoded" => "POSITION:2025"},
      %{"code" => "5:A1:2b", "encoded" => "POSITION:1382"}, 
      %{"code" => "5:A1:2a", "encoded" => "POSITION:1383"},
      %{"code" => "5:A2:2b", "encoded" => "POSITION:1702"},
      %{"code" => "5:A2:2a", "encoded" => "POSITION:1703"},
      %{"code" => "5:A3:2b", "encoded" => "POSITION:2022"},
      %{"code" => "5:A3:2a", "encoded" => "POSITION:2023"},
      %{"code" => "5:A1:3b", "encoded" => "POSITION:1380"},
      %{"code" => "5:A1:3a", "encoded" => "POSITION:1381"},
      %{"code" => "5:A2:3b", "encoded" => "POSITION:1700"},
      %{"code" => "5:A2:3a", "encoded" => "POSITION:1701"},
      %{"code" => "5:A3:3b", "encoded" => "POSITION:2020"},
      %{"code" => "5:A3:3a", "encoded" => "POSITION:2021"},
      %{"code" => "5:A1:4b", "encoded" => "POSITION:1378"},
      %{"code" => "5:A1:4a", "encoded" => "POSITION:1379"},
      %{"code" => "5:A2:4b", "encoded" => "POSITION:1698"},
      %{"code" => "5:A2:4a", "encoded" => "POSITION:1699"},
      %{"code" => "5:A3:4b", "encoded" => "POSITION:2018"},
      %{"code" => "5:A3:4a", "encoded" => "POSITION:2019"},
      %{"code" => "5:A1:5b", "encoded" => "POSITION:1376"},
      %{"code" => "5:A1:5a", "encoded" => "POSITION:1377"},
      %{"code" => "5:A2:5b", "encoded" => "POSITION:1696"},
      %{"code" => "5:A2:5a", "encoded" => "POSITION:1697"},
      %{"code" => "5:A3:5b", "encoded" => "POSITION:2016"},
      %{"code" => "5:A3:5a", "encoded" => "POSITION:2017"},
      %{"code" => "5:A1:6b", "encoded" => "POSITION:1374"},
      %{"code" => "5:A1:6a", "encoded" => "POSITION:1375"},
      %{"code" => "5:A2:6b", "encoded" => "POSITION:1694"},
      %{"code" => "5:A2:6a", "encoded" => "POSITION:1695"},
      %{"code" => "5:A3:6b", "encoded" => "POSITION:2014"},
      %{"code" => "5:A3:6a", "encoded" => "POSITION:2015"},
      %{"code" => "5:A1:7b", "encoded" => "POSITION:1372"},
      %{"code" => "5:A1:7a", "encoded" => "POSITION:1373"},
      %{"code" => "5:A2:7b", "encoded" => "POSITION:1692"},
      %{"code" => "5:A2:7a", "encoded" => "POSITION:1693"},
      %{"code" => "5:A3:7b", "encoded" => "POSITION:2012"},
      %{"code" => "5:A3:7a", "encoded" => "POSITION:2013"},
      %{"code" => "5:A1:8b", "encoded" => "POSITION:1370"},
      %{"code" => "5:A1:8a", "encoded" => "POSITION:1371"},
      %{"code" => "5:A2:8b", "encoded" => "POSITION:1690"},
      %{"code" => "5:A2:8a", "encoded" => "POSITION:1691"},
      %{"code" => "5:A3:8b", "encoded" => "POSITION:2010"},
      %{"code" => "5:A3:8a", "encoded" => "POSITION:2011"},
      %{"code" => "5:B1:1b", "encoded" => "POSITION:1403"},
      %{"code" => "5:B1:1a", "encoded" => "POSITION:1402"},
      %{"code" => "5:B2:1b", "encoded" => "POSITION:1723"},
      %{"code" => "5:B2:1a", "encoded" => "POSITION:1722"},
      %{"code" => "5:B3:1b", "encoded" => "POSITION:2043"},
      %{"code" => "5:B3:1a", "encoded" => "POSITION:2042"},
      %{"code" => "5:B1:2b", "encoded" => "POSITION:1401"},
      %{"code" => "5:B1:2a", "encoded" => "POSITION:1400"},
      %{"code" => "5:B2:2b", "encoded" => "POSITION:1721"},
      %{"code" => "5:B2:2a", "encoded" => "POSITION:1720"},
      %{"code" => "5:B3:2b", "encoded" => "POSITION:2041"},
      %{"code" => "5:B3:2a", "encoded" => "POSITION:2040"},
      %{"code" => "5:B1:3b", "encoded" => "POSITION:1399"},
      %{"code" => "5:B1:3a", "encoded" => "POSITION:1398"},
      %{"code" => "5:B2:3b", "encoded" => "POSITION:1719"},
      %{"code" => "5:B2:3a", "encoded" => "POSITION:1718"},
      %{"code" => "5:B3:3b", "encoded" => "POSITION:2039"},
      %{"code" => "5:B3:3a", "encoded" => "POSITION:2038"},
      %{"code" => "5:B1:4b", "encoded" => "POSITION:1397"},
      %{"code" => "5:B1:4a", "encoded" => "POSITION:1396"},
      %{"code" => "5:B2:4b", "encoded" => "POSITION:1717"},
      %{"code" => "5:B2:4a", "encoded" => "POSITION:1716"},
      %{"code" => "5:B3:4b", "encoded" => "POSITION:2037"},
      %{"code" => "5:B3:4a", "encoded" => "POSITION:2036"},
      %{"code" => "5:B1:5b", "encoded" => "POSITION:1395"},
      %{"code" => "5:B1:5a", "encoded" => "POSITION:1394"},
      %{"code" => "5:B2:5b", "encoded" => "POSITION:1715"},
      %{"code" => "5:B2:5a", "encoded" => "POSITION:1714"},
      %{"code" => "5:B3:5b", "encoded" => "POSITION:2035"},
      %{"code" => "5:B3:5a", "encoded" => "POSITION:2034"},
      %{"code" => "5:B1:6b", "encoded" => "POSITION:1393"},
      %{"code" => "5:B1:6a", "encoded" => "POSITION:1392"}, 
      %{"code" => "5:B2:6b", "encoded" => "POSITION:1713"},
      %{"code" => "5:B2:6a", "encoded" => "POSITION:1712"},
      %{"code" => "5:B3:6b", "encoded" => "POSITION:2033"},
      %{"code" => "5:B3:6a", "encoded" => "POSITION:2032"},
      %{"code" => "5:B1:7b", "encoded" => "POSITION:1391"},
      %{"code" => "5:B1:7a", "encoded" => "POSITION:1390"},
      %{"code" => "5:B2:7b", "encoded" => "POSITION:1711"},
      %{"code" => "5:B2:7a", "encoded" => "POSITION:1710"},
      %{"code" => "5:B3:7b", "encoded" => "POSITION:2031"},
      %{"code" => "5:B3:7a", "encoded" => "POSITION:2030"},
      %{"code" => "5:B1:8b", "encoded" => "POSITION:1389"},
      %{"code" => "5:B1:8a", "encoded" => "POSITION:1388"},
      %{"code" => "5:B2:8b", "encoded" => "POSITION:1709"},
      %{"code" => "5:B2:8a", "encoded" => "POSITION:1708"},
      %{"code" => "5:B3:8b", "encoded" => "POSITION:2029"},
      %{"code" => "5:B3:8a", "encoded" => "POSITION:2028"},
      %{"code" => "5:C1:1b", "encoded" => "POSITION:1418"},
      %{"code" => "5:C1:1a", "encoded" => "POSITION:1419"},
      %{"code" => "5:C2:1b", "encoded" => "POSITION:1738"},
      %{"code" => "5:C2:1a", "encoded" => "POSITION:1739"},
      %{"code" => "5:C3:1b", "encoded" => "POSITION:2058"},
      %{"code" => "5:C3:1a", "encoded" => "POSITION:2059"},
      %{"code" => "5:C1:2b", "encoded" => "POSITION:1416"},
      %{"code" => "5:C1:2a", "encoded" => "POSITION:1417"},
      %{"code" => "5:C2:2b", "encoded" => "POSITION:1736"},
      %{"code" => "5:C2:2a", "encoded" => "POSITION:1737"},
      %{"code" => "5:C3:2b", "encoded" => "POSITION:2056"},
      %{"code" => "5:C3:2a", "encoded" => "POSITION:2057"},
      %{"code" => "5:C1:3b", "encoded" => "POSITION:1414"},
      %{"code" => "5:C1:3a", "encoded" => "POSITION:1415"},
      %{"code" => "5:C2:3b", "encoded" => "POSITION:1734"},
      %{"code" => "5:C2:3a", "encoded" => "POSITION:1735"},
      %{"code" => "5:C3:3b", "encoded" => "POSITION:2054"},
      %{"code" => "5:C3:3a", "encoded" => "POSITION:2055"},
      %{"code" => "5:C1:4b", "encoded" => "POSITION:1412"},
      %{"code" => "5:C1:4a", "encoded" => "POSITION:1413"},
      %{"code" => "5:C2:4b", "encoded" => "POSITION:1732"},
      %{"code" => "5:C2:4a", "encoded" => "POSITION:1733"},
      %{"code" => "5:C3:4b", "encoded" => "POSITION:2052"},
      %{"code" => "5:C3:4a", "encoded" => "POSITION:2053"},
      %{"code" => "5:C1:5b", "encoded" => "POSITION:1410"},
      %{"code" => "5:C1:5a", "encoded" => "POSITION:1411"},
      %{"code" => "5:C2:5b", "encoded" => "POSITION:1730"},
      %{"code" => "5:C2:5a", "encoded" => "POSITION:1731"},
      %{"code" => "5:C3:5b", "encoded" => "POSITION:2050"},
      %{"code" => "5:C3:5a", "encoded" => "POSITION:2051"},
      %{"code" => "5:C1:6b", "encoded" => "POSITION:1408"},
      %{"code" => "5:C1:6a", "encoded" => "POSITION:1409"},
      %{"code" => "5:C2:6b", "encoded" => "POSITION:1728"},
      %{"code" => "5:C2:6a", "encoded" => "POSITION:1729"},
      %{"code" => "5:C3:6b", "encoded" => "POSITION:2048"},
      %{"code" => "5:C3:6a", "encoded" => "POSITION:2049"},
      %{"code" => "5:C1:7b", "encoded" => "POSITION:1406"},
      %{"code" => "5:C1:7a", "encoded" => "POSITION:1407"},
      %{"code" => "5:C2:7b", "encoded" => "POSITION:1726"},
      %{"code" => "5:C2:7a", "encoded" => "POSITION:1727"},
      %{"code" => "5:C3:7b", "encoded" => "POSITION:2046"},
      %{"code" => "5:C3:7a", "encoded" => "POSITION:2047"},
      %{"code" => "5:C1:8b", "encoded" => "POSITION:1404"},
      %{"code" => "5:C1:8a", "encoded" => "POSITION:1405"},
      %{"code" => "5:C2:8b", "encoded" => "POSITION:1724"},
      %{"code" => "5:C2:8a", "encoded" => "POSITION:1725"},
      %{"code" => "5:C3:8b", "encoded" => "POSITION:2044"},
      %{"code" => "5:C3:8a", "encoded" => "POSITION:2045"},
      %{"code" => "5:D1:1b", "encoded" => "POSITION:1433"},
      %{"code" => "5:D1:1a", "encoded" => "POSITION:1432"},
      %{"code" => "5:D2:1b", "encoded" => "POSITION:1753"},
      %{"code" => "5:D2:1a", "encoded" => "POSITION:1752"},
      %{"code" => "5:D3:1b", "encoded" => "POSITION:2073"},
      %{"code" => "5:D3:1a", "encoded" => "POSITION:2072"},
      %{"code" => "5:D1:2b", "encoded" => "POSITION:1431"},
      %{"code" => "5:D1:2a", "encoded" => "POSITION:1430"},
      %{"code" => "5:D2:2b", "encoded" => "POSITION:1751"},
      %{"code" => "5:D2:2a", "encoded" => "POSITION:1750"},
      %{"code" => "5:D3:2b", "encoded" => "POSITION:2071"},
      %{"code" => "5:D3:2a", "encoded" => "POSITION:2070"},
      %{"code" => "5:D1:3b", "encoded" => "POSITION:1429"},
      %{"code" => "5:D1:3a", "encoded" => "POSITION:1428"},
      %{"code" => "5:D2:3b", "encoded" => "POSITION:1749"},
      %{"code" => "5:D2:3a", "encoded" => "POSITION:1748"},
      %{"code" => "5:D3:3b", "encoded" => "POSITION:2069"},
      %{"code" => "5:D3:3a", "encoded" => "POSITION:2068"},
      %{"code" => "5:D1:5b", "encoded" => "POSITION:1427"},
      %{"code" => "5:D1:5a", "encoded" => "POSITION:1426"},
      %{"code" => "5:D2:5b", "encoded" => "POSITION:1747"},
      %{"code" => "5:D2:5a", "encoded" => "POSITION:1746"},
      %{"code" => "5:D3:5b", "encoded" => "POSITION:2067"},
      %{"code" => "5:D3:5a", "encoded" => "POSITION:2066"},
      %{"code" => "5:D1:6b", "encoded" => "POSITION:1425"},
      %{"code" => "5:D1:6a", "encoded" => "POSITION:1424"},
      %{"code" => "5:D2:6b", "encoded" => "POSITION:1745"},
      %{"code" => "5:D2:6a", "encoded" => "POSITION:1744"},
      %{"code" => "5:D3:6b", "encoded" => "POSITION:2065"},
      %{"code" => "5:D3:6a", "encoded" => "POSITION:2064"},
      %{"code" => "5:D1:7b", "encoded" => "POSITION:1423"},
      %{"code" => "5:D1:7a", "encoded" => "POSITION:1422"},
      %{"code" => "5:D2:7b", "encoded" => "POSITION:1743"},
      %{"code" => "5:D2:7a", "encoded" => "POSITION:1742"},
      %{"code" => "5:D3:7b", "encoded" => "POSITION:2063"},
      %{"code" => "5:D3:7a", "encoded" => "POSITION:2062"},
      %{"code" => "5:D1:8b", "encoded" => "POSITION:1421"},
      %{"code" => "5:D1:8a", "encoded" => "POSITION:1420"},
      %{"code" => "5:D2:8b", "encoded" => "POSITION:1741"},
      %{"code" => "5:D2:8a", "encoded" => "POSITION:1740"},
      %{"code" => "5:D3:8b", "encoded" => "POSITION:2061"},
      %{"code" => "5:D3:8a", "encoded" => "POSITION:2060"},
      %{"code" => "5:A4:1b", "encoded" => "POSITION:2344"},
      %{"code" => "5:A4:1a", "encoded" => "POSITION:2345"},
      %{"code" => "5:A5:1b", "encoded" => "POSITION:2664"},
      %{"code" => "5:A5:1a", "encoded" => "POSITION:2665"},
      %{"code" => "5:A6:1b", "encoded" => "POSITION:2984"},
      %{"code" => "5:A6:1a", "encoded" => "POSITION:2985"},
      %{"code" => "5:A4:2b", "encoded" => "POSITION:2342"},
      %{"code" => "5:A4:2a", "encoded" => "POSITION:2343"},
      %{"code" => "5:A5:2b", "encoded" => "POSITION:2662"},
      %{"code" => "5:A5:2a", "encoded" => "POSITION:2663"},
      %{"code" => "5:A6:2b", "encoded" => "POSITION:2982"},
      %{"code" => "5:A6:2a", "encoded" => "POSITION:2983"},
      %{"code" => "5:A4:3b", "encoded" => "POSITION:2340"},
      %{"code" => "5:A4:3a", "encoded" => "POSITION:2341"},
      %{"code" => "5:A5:3b", "encoded" => "POSITION:2660"},
      %{"code" => "5:A5:3a", "encoded" => "POSITION:2661"},
      %{"code" => "5:A6:3b", "encoded" => "POSITION:2980"},
      %{"code" => "5:A6:3a", "encoded" => "POSITION:2981"},
      %{"code" => "5:A4:4b", "encoded" => "POSITION:2338"},
      %{"code" => "5:A4:4a", "encoded" => "POSITION:2339"},
      %{"code" => "5:A5:4b", "encoded" => "POSITION:2658"},
      %{"code" => "5:A5:4a", "encoded" => "POSITION:2659"},
      %{"code" => "5:A6:4b", "encoded" => "POSITION:2978"},
      %{"code" => "5:A6:4a", "encoded" => "POSITION:2979"},
      %{"code" => "5:A4:5b", "encoded" => "POSITION:2336"},
      %{"code" => "5:A4:5a", "encoded" => "POSITION:2337"},
      %{"code" => "5:A5:5b", "encoded" => "POSITION:2656"},
      %{"code" => "5:A5:5a", "encoded" => "POSITION:2657"},
      %{"code" => "5:A6:5b", "encoded" => "POSITION:2976"},
      %{"code" => "5:A6:5a", "encoded" => "POSITION:2977"},
      %{"code" => "5:A4:6b", "encoded" => "POSITION:2334"},
      %{"code" => "5:A4:6a", "encoded" => "POSITION:2335"},
      %{"code" => "5:A5:6b", "encoded" => "POSITION:2654"},
      %{"code" => "5:A5:6a", "encoded" => "POSITION:2655"}, 
      %{"code" => "5:A6:6b", "encoded" => "POSITION:2974"},
      %{"code" => "5:A6:6a", "encoded" => "POSITION:2975"},
      %{"code" => "5:A4:7b", "encoded" => "POSITION:2332"},
      %{"code" => "5:A4:7a", "encoded" => "POSITION:2333"},
      %{"code" => "5:A5:7b", "encoded" => "POSITION:2652"},
      %{"code" => "5:A5:7a", "encoded" => "POSITION:2653"},
      %{"code" => "5:A6:7b", "encoded" => "POSITION:2972"},
      %{"code" => "5:A6:7a", "encoded" => "POSITION:2973"},
      %{"code" => "5:A4:8b", "encoded" => "POSITION:2330"},
      %{"code" => "5:A4:8a", "encoded" => "POSITION:2331"},
      %{"code" => "5:A5:8b", "encoded" => "POSITION:2650"},
      %{"code" => "5:A5:8a", "encoded" => "POSITION:2651"},
      %{"code" => "5:A6:8b", "encoded" => "POSITION:2970"},
      %{"code" => "5:A6:8a", "encoded" => "POSITION:2971"},
      %{"code" => "5:B4:1b", "encoded" => "POSITION:2363"},
      %{"code" => "5:B4:1a", "encoded" => "POSITION:2362"},
      %{"code" => "5:B5:1b", "encoded" => "POSITION:2683"},
      %{"code" => "5:B5:1a", "encoded" => "POSITION:2682"},
      %{"code" => "5:B6:1b", "encoded" => "POSITION:3003"},
      %{"code" => "5:B6:1a", "encoded" => "POSITION:3002"},
      %{"code" => "5:B4:2b", "encoded" => "POSITION:2361"},
      %{"code" => "5:B4:2a", "encoded" => "POSITION:2360"},
      %{"code" => "5:B5:2b", "encoded" => "POSITION:2681"},
      %{"code" => "5:B5:2a", "encoded" => "POSITION:2680"},
      %{"code" => "5:B6:2b", "encoded" => "POSITION:3001"},
      %{"code" => "5:B6:2a", "encoded" => "POSITION:3000"},
      %{"code" => "5:B4:3b", "encoded" => "POSITION:2359"},
      %{"code" => "5:B4:3a", "encoded" => "POSITION:2358"},
      %{"code" => "5:B5:3b", "encoded" => "POSITION:2679"},
      %{"code" => "5:B5:3a", "encoded" => "POSITION:2678"},
      %{"code" => "5:B6:3b", "encoded" => "POSITION:2999"},
      %{"code" => "5:B6:3a", "encoded" => "POSITION:2998"},
      %{"code" => "5:B4:4b", "encoded" => "POSITION:2357"},
      %{"code" => "5:B4:4a", "encoded" => "POSITION:2356"},
      %{"code" => "5:B5:4b", "encoded" => "POSITION:2677"},
      %{"code" => "5:B5:4a", "encoded" => "POSITION:2676"},
      %{"code" => "5:B6:4b", "encoded" => "POSITION:2997"},
      %{"code" => "5:B6:4a", "encoded" => "POSITION:2996"},
      %{"code" => "5:B4:5b", "encoded" => "POSITION:2355"},
      %{"code" => "5:B4:5a", "encoded" => "POSITION:2354"},
      %{"code" => "5:B5:5b", "encoded" => "POSITION:2675"},
      %{"code" => "5:B5:5a", "encoded" => "POSITION:2674"},
      %{"code" => "5:B6:5b", "encoded" => "POSITION:2995"},
      %{"code" => "5:B6:5a", "encoded" => "POSITION:2994"},
      %{"code" => "5:B4:6b", "encoded" => "POSITION:2353"},
      %{"code" => "5:B4:6a", "encoded" => "POSITION:2352"},
      %{"code" => "5:B5:6b", "encoded" => "POSITION:2673"},
      %{"code" => "5:B5:6a", "encoded" => "POSITION:2672"},
      %{"code" => "5:B6:6b", "encoded" => "POSITION:2993"},
      %{"code" => "5:B6:6a", "encoded" => "POSITION:2992"},
      %{"code" => "5:B4:7b", "encoded" => "POSITION:2351"},
      %{"code" => "5:B4:7a", "encoded" => "POSITION:2350"},
      %{"code" => "5:B5:7b", "encoded" => "POSITION:2671"},
      %{"code" => "5:B5:7a", "encoded" => "POSITION:2670"},
      %{"code" => "5:B6:7b", "encoded" => "POSITION:2991"},
      %{"code" => "5:B6:7a", "encoded" => "POSITION:2990"},
      %{"code" => "5:B4:8b", "encoded" => "POSITION:2349"},
      %{"code" => "5:B4:8a", "encoded" => "POSITION:2348"},
      %{"code" => "5:B5:8b", "encoded" => "POSITION:2669"},
      %{"code" => "5:B5:8a", "encoded" => "POSITION:2668"},
      %{"code" => "5:B6:8b", "encoded" => "POSITION:2989"},
      %{"code" => "5:B6:8a", "encoded" => "POSITION:2988"},
      %{"code" => "5:C4:1b", "encoded" => "POSITION:2378"},
      %{"code" => "5:C4:1a", "encoded" => "POSITION:2379"},
      %{"code" => "5:C5:1b", "encoded" => "POSITION:2698"},
      %{"code" => "5:C5:1a", "encoded" => "POSITION:2699"},
      %{"code" => "5:C6:1b", "encoded" => "POSITION:3018"},
      %{"code" => "5:C6:1a", "encoded" => "POSITION:3019"},
      %{"code" => "5:C4:2b", "encoded" => "POSITION:2376"},
      %{"code" => "5:C4:2a", "encoded" => "POSITION:2377"},
      %{"code" => "5:C5:2b", "encoded" => "POSITION:2696"},
      %{"code" => "5:C5:2a", "encoded" => "POSITION:2697"},
      %{"code" => "5:C6:2b", "encoded" => "POSITION:3016"}, 
      %{"code" => "5:C6:2a", "encoded" => "POSITION:3017"},
      %{"code" => "5:C4:3b", "encoded" => "POSITION:2374"},
      %{"code" => "5:C4:3a", "encoded" => "POSITION:2375"},
      %{"code" => "5:C5:3b", "encoded" => "POSITION:2694"},
      %{"code" => "5:C5:3a", "encoded" => "POSITION:2695"},
      %{"code" => "5:C6:3b", "encoded" => "POSITION:3014"},
      %{"code" => "5:C6:3a", "encoded" => "POSITION:3015"},
      %{"code" => "5:C4:4b", "encoded" => "POSITION:2372"},
      %{"code" => "5:C4:4a", "encoded" => "POSITION:2373"},
      %{"code" => "5:C5:4b", "encoded" => "POSITION:2692"},
      %{"code" => "5:C5:4a", "encoded" => "POSITION:2693"},
      %{"code" => "5:C6:4b", "encoded" => "POSITION:3012"},
      %{"code" => "5:C6:4a", "encoded" => "POSITION:3013"},
      %{"code" => "5:C4:5b", "encoded" => "POSITION:2370"},
      %{"code" => "5:C4:5a", "encoded" => "POSITION:2371"},
      %{"code" => "5:C5:5b", "encoded" => "POSITION:2690"},
      %{"code" => "5:C5:5a", "encoded" => "POSITION:2691"},
      %{"code" => "5:C6:5b", "encoded" => "POSITION:3010"},
      %{"code" => "5:C6:5a", "encoded" => "POSITION:3011"},
      %{"code" => "5:C4:6b", "encoded" => "POSITION:2368"},
      %{"code" => "5:C4:6a", "encoded" => "POSITION:2369"},
      %{"code" => "5:C5:6b", "encoded" => "POSITION:2688"},
      %{"code" => "5:C5:6a", "encoded" => "POSITION:2689"},
      %{"code" => "5:C6:6b", "encoded" => "POSITION:3008"},
      %{"code" => "5:C6:6a", "encoded" => "POSITION:3009"},
      %{"code" => "5:C4:7b", "encoded" => "POSITION:2366"},
      %{"code" => "5:C4:7a", "encoded" => "POSITION:2367"},
      %{"code" => "5:C5:7b", "encoded" => "POSITION:2686"},
      %{"code" => "5:C5:7a", "encoded" => "POSITION:2687"},
      %{"code" => "5:C6:7b", "encoded" => "POSITION:3006"},
      %{"code" => "5:C6:7a", "encoded" => "POSITION:3007"},
      %{"code" => "5:C4:8b", "encoded" => "POSITION:2364"},
      %{"code" => "5:C4:8a", "encoded" => "POSITION:2365"},
      %{"code" => "5:C5:8b", "encoded" => "POSITION:2684"},
      %{"code" => "5:C5:8a", "encoded" => "POSITION:2685"},
      %{"code" => "5:C6:8b", "encoded" => "POSITION:3004"},
      %{"code" => "5:C6:8a", "encoded" => "POSITION:3005"},
      %{"code" => "5:D4:1b", "encoded" => "POSITION:2393"},
      %{"code" => "5:D4:1a", "encoded" => "POSITION:2392"},
      %{"code" => "5:D5:1b", "encoded" => "POSITION:2713"},
      %{"code" => "5:D5:1a", "encoded" => "POSITION:2712"},
      %{"code" => "5:D6:1b", "encoded" => "POSITION:3033"},
      %{"code" => "5:D6:1a", "encoded" => "POSITION:3032"},
      %{"code" => "5:D4:2b", "encoded" => "POSITION:2391"},
      %{"code" => "5:D4:2a", "encoded" => "POSITION:2390"},
      %{"code" => "5:D5:2b", "encoded" => "POSITION:2711"},
      %{"code" => "5:D5:2a", "encoded" => "POSITION:2710"},
      %{"code" => "5:D6:2b", "encoded" => "POSITION:3031"},
      %{"code" => "5:D6:2a", "encoded" => "POSITION:3030"},
      %{"code" => "5:D4:3b", "encoded" => "POSITION:2389"},
      %{"code" => "5:D4:3a", "encoded" => "POSITION:2388"},
      %{"code" => "5:D5:3b", "encoded" => "POSITION:2709"},
      %{"code" => "5:D5:3a", "encoded" => "POSITION:2708"},
      %{"code" => "5:D6:3b", "encoded" => "POSITION:3029"},
      %{"code" => "5:D6:3a", "encoded" => "POSITION:3028"},
      %{"code" => "5:D4:5b", "encoded" => "POSITION:2387"},
      %{"code" => "5:D4:5a", "encoded" => "POSITION:2386"},
      %{"code" => "5:D5:5b", "encoded" => "POSITION:2707"},
      %{"code" => "5:D5:5a", "encoded" => "POSITION:2706"},
      %{"code" => "5:D6:5b", "encoded" => "POSITION:3027"},
      %{"code" => "5:D6:5a", "encoded" => "POSITION:3026"},
      %{"code" => "5:D4:6b", "encoded" => "POSITION:2385"},
      %{"code" => "5:D4:6a", "encoded" => "POSITION:2384"},
      %{"code" => "5:D5:6b", "encoded" => "POSITION:2705"},
      %{"code" => "5:D5:6a", "encoded" => "POSITION:2704"},
      %{"code" => "5:D6:6b", "encoded" => "POSITION:3025"},
      %{"code" => "5:D6:6a", "encoded" => "POSITION:3024"}, 
      %{"code" => "5:D4:7b", "encoded" => "POSITION:2383"},
      %{"code" => "5:D4:7a", "encoded" => "POSITION:2382"},
      %{"code" => "5:D5:7b", "encoded" => "POSITION:2703"},
      %{"code" => "5:D5:7a", "encoded" => "POSITION:2702"},
      %{"code" => "5:D6:7b", "encoded" => "POSITION:3023"},
      %{"code" => "5:D6:7a", "encoded" => "POSITION:3022"},
      %{"code" => "5:D4:8b", "encoded" => "POSITION:2381"},
      %{"code" => "5:D4:8a", "encoded" => "POSITION:2380"},
      %{"code" => "5:D5:8b", "encoded" => "POSITION:2701"},
      %{"code" => "5:D5:8a", "encoded" => "POSITION:2700"},
      %{"code" => "5:D6:8b", "encoded" => "POSITION:3021"},
      %{"code" => "5:D6:8a", "encoded" => "POSITION:3020"},
      %{"code" => "5:A7:1b", "encoded" => "POSITION:3304"},
      %{"code" => "5:A7:1a", "encoded" => "POSITION:3305"},
      %{"code" => "5:A8:1b", "encoded" => "POSITION:3624"},
      %{"code" => "5:A8:1a", "encoded" => "POSITION:3625"},
      %{"code" => "5:A9:1b", "encoded" => "POSITION:3944"},
      %{"code" => "5:A9:1a", "encoded" => "POSITION:3945"},
      %{"code" => "5:A7:2b", "encoded" => "POSITION:3302"},
      %{"code" => "5:A7:2a", "encoded" => "POSITION:3303"},
      %{"code" => "5:A8:2b", "encoded" => "POSITION:3622"},
      %{"code" => "5:A8:2a", "encoded" => "POSITION:3623"},
      %{"code" => "5:A9:2b", "encoded" => "POSITION:3942"},
      %{"code" => "5:A9:2a", "encoded" => "POSITION:3943"},
      %{"code" => "5:A7:3b", "encoded" => "POSITION:3300"},
      %{"code" => "5:A7:3a", "encoded" => "POSITION:3301"},
      %{"code" => "5:A8:3b", "encoded" => "POSITION:3620"},
      %{"code" => "5:A8:3a", "encoded" => "POSITION:3621"},
      %{"code" => "5:A9:3b", "encoded" => "POSITION:3940"},
      %{"code" => "5:A9:3a", "encoded" => "POSITION:3941"},
      %{"code" => "5:A7:4b", "encoded" => "POSITION:3298"},
      %{"code" => "5:A7:4a", "encoded" => "POSITION:3299"},
      %{"code" => "5:A8:4b", "encoded" => "POSITION:3618"},
      %{"code" => "5:A8:4a", "encoded" => "POSITION:3619"},
      %{"code" => "5:A9:4b", "encoded" => "POSITION:3938"},
      %{"code" => "5:A9:4a", "encoded" => "POSITION:3939"},
      %{"code" => "5:A7:5b", "encoded" => "POSITION:3296"},
      %{"code" => "5:A7:5a", "encoded" => "POSITION:3297"},
      %{"code" => "5:A8:5b", "encoded" => "POSITION:3616"},
      %{"code" => "5:A8:5a", "encoded" => "POSITION:3617"},
      %{"code" => "5:A9:5b", "encoded" => "POSITION:3936"},
      %{"code" => "5:A9:5a", "encoded" => "POSITION:3937"},
      %{"code" => "5:A7:6b", "encoded" => "POSITION:3294"},
      %{"code" => "5:A7:6a", "encoded" => "POSITION:3295"},
      %{"code" => "5:A8:6b", "encoded" => "POSITION:3614"},
      %{"code" => "5:A8:6a", "encoded" => "POSITION:3615"},
      %{"code" => "5:A9:6b", "encoded" => "POSITION:3934"},
      %{"code" => "5:A9:6a", "encoded" => "POSITION:3935"},
      %{"code" => "5:A7:7b", "encoded" => "POSITION:3292"},
      %{"code" => "5:A7:7a", "encoded" => "POSITION:3293"},
      %{"code" => "5:A8:7b", "encoded" => "POSITION:3612"},
      %{"code" => "5:A8:7a", "encoded" => "POSITION:3613"},
      %{"code" => "5:A9:7b", "encoded" => "POSITION:3932"},
      %{"code" => "5:A9:7a", "encoded" => "POSITION:3933"},
      %{"code" => "5:A7:8b", "encoded" => "POSITION:3290"},
      %{"code" => "5:A7:8a", "encoded" => "POSITION:3291"},
      %{"code" => "5:A8:8b", "encoded" => "POSITION:3610"},
      %{"code" => "5:A8:8a", "encoded" => "POSITION:3611"},
      %{"code" => "5:A9:8b", "encoded" => "POSITION:3930"},
      %{"code" => "5:A9:8a", "encoded" => "POSITION:3931"},
      %{"code" => "5:B7:1b", "encoded" => "POSITION:3323"},
      %{"code" => "5:B7:1a", "encoded" => "POSITION:3322"},
      %{"code" => "5:B8:1b", "encoded" => "POSITION:3643"},
      %{"code" => "5:B8:1a", "encoded" => "POSITION:3642"},
      %{"code" => "5:B9:1b", "encoded" => "POSITION:3963"},
      %{"code" => "5:B9:1a", "encoded" => "POSITION:3962"},
      %{"code" => "5:B7:2b", "encoded" => "POSITION:3321"},
      %{"code" => "5:B7:2a", "encoded" => "POSITION:3320"},
      %{"code" => "5:B8:2b", "encoded" => "POSITION:3641"},
      %{"code" => "5:B8:2a", "encoded" => "POSITION:3640"},
      %{"code" => "5:B9:2b", "encoded" => "POSITION:3961"},
      %{"code" => "5:B9:2a", "encoded" => "POSITION:3960"},
      %{"code" => "5:B7:3b", "encoded" => "POSITION:3319"}, 
      %{"code" => "5:B7:3a", "encoded" => "POSITION:3318"},
      %{"code" => "5:B8:3b", "encoded" => "POSITION:3639"},
      %{"code" => "5:B8:3a", "encoded" => "POSITION:3638"},
      %{"code" => "5:B9:3b", "encoded" => "POSITION:3959"},
      %{"code" => "5:B9:3a", "encoded" => "POSITION:3958"},
      %{"code" => "5:B7:4b", "encoded" => "POSITION:3317"},
      %{"code" => "5:B7:4a", "encoded" => "POSITION:3316"},
      %{"code" => "5:B8:4b", "encoded" => "POSITION:3637"},
      %{"code" => "5:B8:4a", "encoded" => "POSITION:3636"},
      %{"code" => "5:B9:4b", "encoded" => "POSITION:3957"},
      %{"code" => "5:B9:4a", "encoded" => "POSITION:3956"},
      %{"code" => "5:B7:5b", "encoded" => "POSITION:3315"},
      %{"code" => "5:B7:5a", "encoded" => "POSITION:3314"},
      %{"code" => "5:B8:5b", "encoded" => "POSITION:3635"},
      %{"code" => "5:B8:5a", "encoded" => "POSITION:3634"},
      %{"code" => "5:B9:5b", "encoded" => "POSITION:3955"},
      %{"code" => "5:B9:5a", "encoded" => "POSITION:3954"},
      %{"code" => "5:B7:6b", "encoded" => "POSITION:3313"},
      %{"code" => "5:B7:6a", "encoded" => "POSITION:3312"},
      %{"code" => "5:B8:6b", "encoded" => "POSITION:3633"},
      %{"code" => "5:B8:6a", "encoded" => "POSITION:3632"},
      %{"code" => "5:B9:6b", "encoded" => "POSITION:3953"},
      %{"code" => "5:B9:6a", "encoded" => "POSITION:3952"},
      %{"code" => "5:B7:7b", "encoded" => "POSITION:3311"},
      %{"code" => "5:B7:7a", "encoded" => "POSITION:3310"},
      %{"code" => "5:B8:7b", "encoded" => "POSITION:3631"},
      %{"code" => "5:B8:7a", "encoded" => "POSITION:3630"},
      %{"code" => "5:B9:7b", "encoded" => "POSITION:3951"},
      %{"code" => "5:B9:7a", "encoded" => "POSITION:3950"},
      %{"code" => "5:B7:8b", "encoded" => "POSITION:3309"},
      %{"code" => "5:B7:8a", "encoded" => "POSITION:3308"},
      %{"code" => "5:B8:8b", "encoded" => "POSITION:3629"},
      %{"code" => "5:B8:8a", "encoded" => "POSITION:3628"},
      %{"code" => "5:B9:8b", "encoded" => "POSITION:3949"},
      %{"code" => "5:B9:8a", "encoded" => "POSITION:3948"},
      %{"code" => "5:C7:1b", "encoded" => "POSITION:3338"},
      %{"code" => "5:C7:1a", "encoded" => "POSITION:3339"},
      %{"code" => "5:C8:1b", "encoded" => "POSITION:3658"},
      %{"code" => "5:C8:1a", "encoded" => "POSITION:3659"},
      %{"code" => "5:C9:1b", "encoded" => "POSITION:3978"},
      %{"code" => "5:C9:1a", "encoded" => "POSITION:3979"},
      %{"code" => "5:C7:2b", "encoded" => "POSITION:3336"},
      %{"code" => "5:C7:2a", "encoded" => "POSITION:3337"},
      %{"code" => "5:C8:2b", "encoded" => "POSITION:3656"},
      %{"code" => "5:C8:2a", "encoded" => "POSITION:3657"},
      %{"code" => "5:C9:2b", "encoded" => "POSITION:3976"},
      %{"code" => "5:C9:2a", "encoded" => "POSITION:3977"},
      %{"code" => "5:C7:3b", "encoded" => "POSITION:3334"},
      %{"code" => "5:C7:3a", "encoded" => "POSITION:3335"},
      %{"code" => "5:C8:3b", "encoded" => "POSITION:3654"},
      %{"code" => "5:C8:3a", "encoded" => "POSITION:3655"},
      %{"code" => "5:C9:3b", "encoded" => "POSITION:3974"},
      %{"code" => "5:C9:3a", "encoded" => "POSITION:3975"},
      %{"code" => "5:C7:4b", "encoded" => "POSITION:3332"},
      %{"code" => "5:C7:4a", "encoded" => "POSITION:3333"},
      %{"code" => "5:C8:4b", "encoded" => "POSITION:3652"},
      %{"code" => "5:C8:4a", "encoded" => "POSITION:3653"},
      %{"code" => "5:C9:4b", "encoded" => "POSITION:3972"},
      %{"code" => "5:C9:4a", "encoded" => "POSITION:3973"},
      %{"code" => "5:C7:5b", "encoded" => "POSITION:3330"},
      %{"code" => "5:C7:5a", "encoded" => "POSITION:3331"},
      %{"code" => "5:C8:5b", "encoded" => "POSITION:3650"},
      %{"code" => "5:C8:5a", "encoded" => "POSITION:3651"},
      %{"code" => "5:C9:5b", "encoded" => "POSITION:3970"},
      %{"code" => "5:C9:5a", "encoded" => "POSITION:3971"},
      %{"code" => "5:C7:6b", "encoded" => "POSITION:3328"},
      %{"code" => "5:C7:6a", "encoded" => "POSITION:3329"},
      %{"code" => "5:C8:6b", "encoded" => "POSITION:3648"},
      %{"code" => "5:C8:6a", "encoded" => "POSITION:3649"},
      %{"code" => "5:C9:6b", "encoded" => "POSITION:3968"},
      %{"code" => "5:C9:6a", "encoded" => "POSITION:3969"},
      %{"code" => "5:C7:7b", "encoded" => "POSITION:3326"},
      %{"code" => "5:C7:7a", "encoded" => "POSITION:3327"}, 
      %{"code" => "5:C8:7b", "encoded" => "POSITION:3646"},
      %{"code" => "5:C8:7a", "encoded" => "POSITION:3647"},
      %{"code" => "5:C9:7b", "encoded" => "POSITION:3966"},
      %{"code" => "5:C9:7a", "encoded" => "POSITION:3967"},
      %{"code" => "5:C7:8b", "encoded" => "POSITION:3324"},
      %{"code" => "5:C7:8a", "encoded" => "POSITION:3325"},
      %{"code" => "5:C8:8b", "encoded" => "POSITION:3644"},
      %{"code" => "5:C8:8a", "encoded" => "POSITION:3645"},
      %{"code" => "5:C9:8b", "encoded" => "POSITION:3964"},
      %{"code" => "5:C9:8a", "encoded" => "POSITION:3965"},
      %{"code" => "5:D7:1b", "encoded" => "POSITION:3353"},
      %{"code" => "5:D7:1a", "encoded" => "POSITION:3352"},
      %{"code" => "5:D8:1b", "encoded" => "POSITION:3673"},
      %{"code" => "5:D8:1a", "encoded" => "POSITION:3672"},
      %{"code" => "5:D9:1b", "encoded" => "POSITION:3993"},
      %{"code" => "5:D9:1a", "encoded" => "POSITION:3992"},
      %{"code" => "5:D7:2b", "encoded" => "POSITION:3351"},
      %{"code" => "5:D7:2a", "encoded" => "POSITION:3350"},
      %{"code" => "5:D8:2b", "encoded" => "POSITION:3671"},
      %{"code" => "5:D8:2a", "encoded" => "POSITION:3670"},
      %{"code" => "5:D9:2b", "encoded" => "POSITION:3991"},
      %{"code" => "5:D9:2a", "encoded" => "POSITION:3990"},
      %{"code" => "5:D7:3b", "encoded" => "POSITION:3349"},
      %{"code" => "5:D7:3a", "encoded" => "POSITION:3348"},
      %{"code" => "5:D8:3b", "encoded" => "POSITION:3669"},
      %{"code" => "5:D8:3a", "encoded" => "POSITION:3668"},
      %{"code" => "5:D9:3b", "encoded" => "POSITION:3989"},
      %{"code" => "5:D9:3a", "encoded" => "POSITION:3988"},
      %{"code" => "5:D7:5b", "encoded" => "POSITION:3347"},
      %{"code" => "5:D7:5a", "encoded" => "POSITION:3346"},
      %{"code" => "5:D8:5b", "encoded" => "POSITION:3667"},
      %{"code" => "5:D8:5a", "encoded" => "POSITION:3666"},
      %{"code" => "5:D9:5b", "encoded" => "POSITION:3987"},
      %{"code" => "5:D9:5a", "encoded" => "POSITION:3986"},
      %{"code" => "5:D7:6b", "encoded" => "POSITION:3345"},
      %{"code" => "5:D7:6a", "encoded" => "POSITION:3344"},
      %{"code" => "5:D8:6b", "encoded" => "POSITION:3665"},
      %{"code" => "5:D8:6a", "encoded" => "POSITION:3664"},
      %{"code" => "5:D9:6b", "encoded" => "POSITION:3985"},
      %{"code" => "5:D9:6a", "encoded" => "POSITION:3984"},
      %{"code" => "5:D7:7b", "encoded" => "POSITION:3343"},
      %{"code" => "5:D7:7a", "encoded" => "POSITION:3342"},
      %{"code" => "5:D8:7b", "encoded" => "POSITION:3663"},
      %{"code" => "5:D8:7a", "encoded" => "POSITION:3662"},
      %{"code" => "5:D9:7b", "encoded" => "POSITION:3983"},
      %{"code" => "5:D9:7a", "encoded" => "POSITION:3982"},
      %{"code" => "5:D7:8b", "encoded" => "POSITION:3341"},
      %{"code" => "5:D7:8a", "encoded" => "POSITION:3340"},
      %{"code" => "5:D8:8b", "encoded" => "POSITION:3661"},
      %{"code" => "5:D8:8a", "encoded" => "POSITION:3660"},
      %{"code" => "5:D9:8b", "encoded" => "POSITION:3981"},
      %{"code" => "5:D9:8a", "encoded" => "POSITION:3980"},
      %{"code" => "5:A10:1b", "encoded" => "POSITION:4264"},
      %{"code" => "5:A10:1a", "encoded" => "POSITION:4265"},
      %{"code" => "5:A11:1b", "encoded" => "POSITION:4584"},
      %{"code" => "5:A11:1a", "encoded" => "POSITION:4585"},
      %{"code" => "5:A10:2b", "encoded" => "POSITION:4262"},
      %{"code" => "5:A10:2a", "encoded" => "POSITION:4263"},
      %{"code" => "5:A11:2b", "encoded" => "POSITION:4582"},
      %{"code" => "5:A11:2a", "encoded" => "POSITION:4583"},
      %{"code" => "5:A10:3b", "encoded" => "POSITION:4260"},
      %{"code" => "5:A10:3a", "encoded" => "POSITION:4261"},
      %{"code" => "5:A11:3b", "encoded" => "POSITION:4580"},
      %{"code" => "5:A11:3a", "encoded" => "POSITION:4581"},
      %{"code" => "5:A10:4b", "encoded" => "POSITION:4258"},
      %{"code" => "5:A10:4a", "encoded" => "POSITION:4259"},
      %{"code" => "5:A11:4b", "encoded" => "POSITION:4578"},
      %{"code" => "5:A11:4a", "encoded" => "POSITION:4579"},
      %{"code" => "5:A10:5b", "encoded" => "POSITION:4256"},
      %{"code" => "5:A10:5a", "encoded" => "POSITION:4257"},
      %{"code" => "5:A11:5b", "encoded" => "POSITION:4576"},
      %{"code" => "5:A11:5a", "encoded" => "POSITION:4577"},
      %{"code" => "5:A10:6b", "encoded" => "POSITION:4254"},
      %{"code" => "5:A10:6a", "encoded" => "POSITION:4255"},
      %{"code" => "5:A11:6b", "encoded" => "POSITION:4574"},
      %{"code" => "5:A11:6a", "encoded" => "POSITION:4575"},
      %{"code" => "5:A10:7b", "encoded" => "POSITION:4252"},
      %{"code" => "5:A10:7a", "encoded" => "POSITION:4253"},
      %{"code" => "5:A11:7b", "encoded" => "POSITION:4572"},
      %{"code" => "5:A11:7a", "encoded" => "POSITION:4573"},
      %{"code" => "5:A10:8b", "encoded" => "POSITION:4250"},
      %{"code" => "5:A10:8a", "encoded" => "POSITION:4251"},
      %{"code" => "5:A11:8b", "encoded" => "POSITION:4570"},
      %{"code" => "5:A11:8a", "encoded" => "POSITION:4571"},
      %{"code" => "5:B10:1b", "encoded" => "POSITION:4283"},
      %{"code" => "5:B10:1a", "encoded" => "POSITION:4282"},
      %{"code" => "5:B11:1b", "encoded" => "POSITION:4603"},
      %{"code" => "5:B11:1a", "encoded" => "POSITION:4602"},
      %{"code" => "5:B10:2b", "encoded" => "POSITION:4281"},
      %{"code" => "5:B10:2a", "encoded" => "POSITION:4280"},
      %{"code" => "5:B11:2b", "encoded" => "POSITION:4601"},
      %{"code" => "5:B11:2a", "encoded" => "POSITION:4600"},
      %{"code" => "5:B10:3b", "encoded" => "POSITION:4279"},
      %{"code" => "5:B10:3a", "encoded" => "POSITION:4278"},
      %{"code" => "5:B11:3b", "encoded" => "POSITION:4599"},
      %{"code" => "5:B11:3a", "encoded" => "POSITION:4598"},
      %{"code" => "5:B10:4b", "encoded" => "POSITION:4277"},
      %{"code" => "5:B10:4a", "encoded" => "POSITION:4276"},
      %{"code" => "5:B11:4b", "encoded" => "POSITION:4597"},
      %{"code" => "5:B11:4a", "encoded" => "POSITION:4596"},
      %{"code" => "5:B10:5b", "encoded" => "POSITION:4275"},
      %{"code" => "5:B10:5a", "encoded" => "POSITION:4274"},
      %{"code" => "5:B11:5b", "encoded" => "POSITION:4595"},
      %{"code" => "5:B11:5a", "encoded" => "POSITION:4594"},
      %{"code" => "5:B10:6b", "encoded" => "POSITION:4273"},
      %{"code" => "5:B10:6a", "encoded" => "POSITION:4272"},
      %{"code" => "5:B11:6b", "encoded" => "POSITION:4593"},
      %{"code" => "5:B11:6a", "encoded" => "POSITION:4592"}, 
      %{"code" => "5:B10:7b", "encoded" => "POSITION:4271"},
      %{"code" => "5:B10:7a", "encoded" => "POSITION:4270"},
      %{"code" => "5:B11:7b", "encoded" => "POSITION:4591"},
      %{"code" => "5:B11:7a", "encoded" => "POSITION:4590"},
      %{"code" => "5:B10:8b", "encoded" => "POSITION:4269"},
      %{"code" => "5:B10:8a", "encoded" => "POSITION:4268"},
      %{"code" => "5:B11:8b", "encoded" => "POSITION:4589"},
      %{"code" => "5:B11:8a", "encoded" => "POSITION:4588"},
      %{"code" => "5:C10:1b", "encoded" => "POSITION:4298"},
      %{"code" => "5:C10:1a", "encoded" => "POSITION:4299"},
      %{"code" => "5:C11:1b", "encoded" => "POSITION:4618"},
      %{"code" => "5:C11:1a", "encoded" => "POSITION:4619"},
      %{"code" => "5:C10:2b", "encoded" => "POSITION:4296"},
      %{"code" => "5:C10:2a", "encoded" => "POSITION:4297"},
      %{"code" => "5:C11:2b", "encoded" => "POSITION:4616"},
      %{"code" => "5:C11:2a", "encoded" => "POSITION:4617"},
      %{"code" => "5:C10:3b", "encoded" => "POSITION:4294"},
      %{"code" => "5:C10:3a", "encoded" => "POSITION:4295"},
      %{"code" => "5:C11:3b", "encoded" => "POSITION:4614"},
      %{"code" => "5:C11:3a", "encoded" => "POSITION:4615"},
      %{"code" => "5:C10:4b", "encoded" => "POSITION:4292"},
      %{"code" => "5:C10:4a", "encoded" => "POSITION:4293"},
      %{"code" => "5:C11:4b", "encoded" => "POSITION:4612"},
      %{"code" => "5:C11:4a", "encoded" => "POSITION:4613"},
      %{"code" => "5:C10:5b", "encoded" => "POSITION:4290"},
      %{"code" => "5:C10:5a", "encoded" => "POSITION:4291"},
      %{"code" => "5:C11:5b", "encoded" => "POSITION:4610"},
      %{"code" => "5:C11:5a", "encoded" => "POSITION:4611"},
      %{"code" => "5:C10:6b", "encoded" => "POSITION:4288"},
      %{"code" => "5:C10:6a", "encoded" => "POSITION:4289"},
      %{"code" => "5:C11:6b", "encoded" => "POSITION:4608"},
      %{"code" => "5:C11:6a", "encoded" => "POSITION:4609"},
      %{"code" => "5:C10:7b", "encoded" => "POSITION:4286"},
      %{"code" => "5:C10:7a", "encoded" => "POSITION:4287"},
      %{"code" => "5:C11:7b", "encoded" => "POSITION:4606"},
      %{"code" => "5:C11:7a", "encoded" => "POSITION:4607"},
      %{"code" => "5:C10:8b", "encoded" => "POSITION:4284"},
      %{"code" => "5:C10:8a", "encoded" => "POSITION:4285"},
      %{"code" => "5:C11:8b", "encoded" => "POSITION:4604"},
      %{"code" => "5:C11:8a", "encoded" => "POSITION:4605"},
      %{"code" => "5:D10:1b", "encoded" => "POSITION:4313"},
      %{"code" => "5:D10:1a", "encoded" => "POSITION:4312"},
      %{"code" => "5:D11:1b", "encoded" => "POSITION:4633"},
      %{"code" => "5:D11:1a", "encoded" => "POSITION:4632"},
      %{"code" => "5:D10:2b", "encoded" => "POSITION:4311"},
      %{"code" => "5:D10:2a", "encoded" => "POSITION:4310"},
      %{"code" => "5:D11:2b", "encoded" => "POSITION:4631"},
      %{"code" => "5:D11:2a", "encoded" => "POSITION:4630"},
      %{"code" => "5:D10:3b", "encoded" => "POSITION:4309"},
      %{"code" => "5:D10:3a", "encoded" => "POSITION:4308"},
      %{"code" => "5:D11:3b", "encoded" => "POSITION:4629"},
      %{"code" => "5:D11:3a", "encoded" => "POSITION:4628"},
      %{"code" => "5:D10:5b", "encoded" => "POSITION:4307"},
      %{"code" => "5:D10:5a", "encoded" => "POSITION:4306"},
      %{"code" => "5:D11:5b", "encoded" => "POSITION:4627"},
      %{"code" => "5:D11:5a", "encoded" => "POSITION:4626"},
      %{"code" => "5:D10:6b", "encoded" => "POSITION:4305"},
      %{"code" => "5:D10:6a", "encoded" => "POSITION:4304"},
      %{"code" => "5:D11:6b", "encoded" => "POSITION:4625"},
      %{"code" => "5:D11:6a", "encoded" => "POSITION:4624"},
      %{"code" => "5:D10:7b", "encoded" => "POSITION:4303"},
      %{"code" => "5:D10:7a", "encoded" => "POSITION:4302"},
      %{"code" => "5:D11:7b", "encoded" => "POSITION:4623"},
      %{"code" => "5:D11:7a", "encoded" => "POSITION:4622"},
      %{"code" => "5:D10:8b", "encoded" => "POSITION:4301"},
      %{"code" => "5:D10:8a", "encoded" => "POSITION:4300"},
      %{"code" => "5:D11:8b", "encoded" => "POSITION:4621"},
      %{"code" => "5:D11:8a", "encoded" => "POSITION:4620"}
    ]
    
    

    external by Peter Marreck  3  0  1  0

    Ecto compressed erlang term binary custom data type

    Ecto compressed erlang term binary custom data type: ecto_compressed_term.ex
    defmodule Mpnetwork.Ecto.CompressedTerm do
      @behaviour Ecto.Type
    
      # The functionality below depends on the lz4_erl module.
      # Note that pack/unpack stores the decompressed data length as the first 4 bytes
      # or assumes those bytes are that value
    
      defp compress(txt) when is_binary(txt) do
        {:ok, comp} = :lz4.pack(txt, [:high])
        comp
      end
    
      defp decompress(bin) when is_binary(bin) do
        {:ok, decomp} = :lz4.unpack(bin)
        decomp
      end
    
      def type, do: :binary
    
      def cast(term), do: {:ok, term}
    
      def load(binary) when is_binary(binary), do: {:ok, :erlang.binary_to_term(decompress(binary))}
    
      def dump(term), do: {:ok, compress(:erlang.term_to_binary(term))}
    end
    
    
    

    external by Gabriel Rufino  3  0  1  0

    Module to give averages based on a list of lists of numbers.

    Module to give averages based on a list of lists of numbers.: missing_data.ex
    defmodule MissingData do
      @doc """
        Example input:
        > MissingData.average_list([[0, 10, 20], [20, 10, 0], [10, 10, 10]])
        Example output:
        > [15, 10, 15]
      """
    
      def average_list(list_of_lists) do
        if have_same_sizes?(list_of_lists) do
          flattened_indexed_list = Enum.flat_map(list_of_lists, &Enum.with_index/1)
    
        #This sums all lists and also how many items were summed in a tuple
          non_zero_averages =
            flattened_indexed_list
            |> prepare_for_averaging
    
         #This replaces the zeroes for average tuples found, then sorts, then finally averages.
          Enum.reduce(flattened_indexed_list, non_zero_averages, fn {value, index}, acc ->
            Map.update(acc, index, value, & &1)
          end)
          |> Enum.sort_by(fn {k, _v} -> k end)
          |> Enum.map(&average/1)
        else
          :error
        end
      end
    
      def prepare_for_averaging(list) when is_list(list) do
        prepare_for_averaging(list, %{})
      end
    
      def prepare_for_averaging([], acc) do
        acc
      end
    
      def prepare_for_averaging([{0, _} | tl], acc) do
        prepare_for_averaging(tl, acc)
      end
    
      def prepare_for_averaging([{value, index} | tl], acc) do
        prepare_for_averaging(
          tl,
          Map.update(acc, index, {value, 1}, fn {existing_value, divisions} ->
            {value + existing_value, divisions + 1}
          end)
        )
      end
    
      def have_same_sizes?(list_of_lists) do
        {min, max} =
          list_of_lists
          |> Enum.map(&length/1)
          |> Enum.min_max()
    
        min == max
      end
    
      def average({_k, 0}), do: 0
    
      def average({_k, {value, divisions}}), do: value / divisions
    end
    
    
    

    external by Vincent Gutierrez  7  0  1  0

    Format bytes to B, KB, MB, GB

    Format bytes to B, KB, MB, GB: format.ex
    defmodule PhoenixObserver.Format do
      def number_to_human_size(size) when is_integer(size) and size < 1024, do: "#{size} B"
      def number_to_human_size(size) when size < 1024 * 1024, do: "#{Float.round(size / 1024, 4)} KB"
    
      def number_to_human_size(size) when size < 1024 * 1024 * 1024,
        do: "#{Float.round(size / (1024 * 1024), 4)} MB"
    
      def number_to_human_size(size) when size < 1024 * 1024 * 1024 * 1024 do
        "#{Float.round(size / (1024 * 1024 * 1024), 4)} GB"
      end
    
      def number_to_human_size(size), do: "#{size} ??"
    
      def to_percentage(num) when num < 0.1, do: "#{Float.round(num * 100, 2)}%"
      def to_percentage(num) when num < 1, do: "#{Float.round(num * 100, 2)}%"
      def to_percentage(_), do: "100%"
    end
    
    
    • Public Snippets
    • Channels Snippets