ptr_opt

Hi,
I'm trying get ptr_opt to work on a simple case and my poor ocaml is beginning to frustrate me - I keep getting the following error for the code snippet below. The ptr type works fine. Would be very grateful for some sort of guidance on this - I've been through your test cases but can't seem to be able to fix this. I'm hoping that a 'Some !@lob_t_opt' will resolve to a 'lob_t'
type lob_t_opt = lob_struct structure ptr_opt
'Error: Unbound type constructor ptr_opt'

type lob_struct
let lob_struct = structure "lob_struct"
let (-:) ty label = field lob_struct label ty
let raw        = ptr uint8_t -: "raw"
let () = seal (lob_struct : lob_struct structure typ)
type lob_t = lob_struct structure ptr
let lob_t = ptr lob_struct
type lob_t_opt = lob_struct structure ptr_opt
let lob_t_opt = ptr_opt lob_struct
let lob_linked    = F.foreign "lob_linked"    (lob_t @-> returning lob_t_opt)

type lob_t_opt = lob_struct structure ptr_opt
let lob_t_opt = ptr_opt lob_struct

The top-level can be a useful tool here.  First, it'll tell you the type of the ptr_opt function:
# ptr_opt;;
- : 'a typ -> 'a Ctypes_static.ptr option typ = <fun>

i.e. ptr_opt takes something of type 'a typ and gives you back something of type 'a ptr option typ.  (In other words, there isn't a type called ptr_opt involved at all, only the ptr and option types.)
You can either use this information to work out what the type of lob_t_opt should be, or just ask the top level again directly:
# let lob_t_opt = ptr_opt lob_struct;;
val lob_t_opt :
  lob_struct Ctypes_static.structure Ctypes_static.ptr option typ =
  (* ... *)

So stripping off the module prefixes, the value lob_t_opt has type lob_struct structure ptr option typ, and so you probably want to define the type lob_t_opt like this
type lob_t_opt = lob_struct structure ptr option

or, equivalently and more succinctly, like this:
type lob_t_opt = lob_t option

Does that help?

Thanks - this makes things a lot clearer - yes, top-level is very useful!
So, now I have lob_t_opt correctly defined, I am trying to set up the correct return type for the foreign bindings:
let lob_linked    =
                 let returned_lob_t = F.foreign "lob_linked"    (lob_t @-> returning lob_t) in
                 if returned_lob_t = null then None else Some returned_lob_t

this is giving an error for the 'if' line:
Error: This expression has type
unit Ctypes.ptr = (unit, [ `C ]) Ctypes_static.pointer
but an expression was expected of type
(Telehash_types.lob_struct Ctypes_static.structure Ctypes_static.ptr ->
Telehash_types.lob_struct Ctypes_static.structure Ctypes_static.ptr)
F.fn
I have been reading through ctypes_std_views.ml and trying to find a solution but there doesn't seem to be a test for a null pointer.

It looks like you need to separate the two stages, first binding the lob_linked function and then calling it.  The binding looks fine, but it would be best to have it at the top level:
let lob_linked = foreign "lob_linked" (lob_t @-> returning lob_t)

If all goes well, this'll give you a function that you can call elsewhere in your program
let returned_lob_t = lob_linked x

At this point returned_lob_t is a pointer, and you can test whether it's null.
However, if you use your lob_t_opt to make the binding then things become a little simpler:
let lob_linked = foreign "lob_linked" (lob_t @-> returning lob_t_opt)

Now calling lob_linked returns a lob_t option, so rather than test for null you can test for None:
match lob_linked x with
  None -> (* lob_linked returned null *)
| Some p -> (* p is a non-null lob_t value *)

Duh! How could I miss that! :) Thanks for taking the time over this. Very grateful. All compiling beautifully.
Just one last thing - I link to an archive 'libtelehash.a' in another directory. The end game is to eventually put all of this in the opam reps. and be able to use the library in mirage. Do you know of another github based project which will pull down c sources, compiles them and generates an archive, compile the ocaml and package everything for opam. I've used ocaml-sodium as a template to build the ocaml and link so far, and this works. However, I can't seem to find anything that will also pull down the c sources, build and package. Perhaps best way is to finally get my hands dirty, read the ocamlbuild docs and write a custom ocamlbuild.ml :)
Again, thanks for all of your help.
Cheers
Nick

All compiling beautifully.

Great!

Do you know of another github based project which will pull down c sources, compiles them and generates an archive, compile the ocaml and package everything for opam.

The usual way to do this, if the C sources belong to another project, is to have an external dependency.  For example, the ocaml-lz4 project has an OPAM file which points to a script that installs the C sources.  When the user runs opam install the script is run automatically before the lz4 OCaml package itself is compiled.

Perfect. Just what I needed. Yet again, thanks for all of your input - believe me, this has saved me weeks of work. Have a great weekend. Very best.


PJS CRUD API for Jobs and Queues

Description
This PR is a first-pass at a CRUD API for jobs and queues. We'll likely need to modify this as we iterate on the implementation.

Closed temporarily while we redesign the protos.


[5.5.x] intermediate upgrades

This PR adds support for intermediate upgrades. The biggest changes are in that the operation plan will contain a sub-root phase for each of the intermediate upgrade steps (and the final step named target):
/5.2.14
  /bootstrap
    /node-1
    ...
/target

hence some of the steps needed to be made local to a specific sub-root.
Also, the intermediate versions generate configuration packages using the binary of the corresponding version - there's a new package that encapsulates this.
Additionally, this assumes that there're no CoreDNS-specific phases in intermediate versions (true for 5.2.x and hence for 5.5.x - this will be addressed when forward-porting to 6.x and master).
Other than that, the implementation should be relatively straight-forward, but it is kind of messy as I did not try to optimize for readability where possible - I'm hoping to refine and optimize when I forward-port the changes to 6.x and master.

No, I haven't and I've had this idea as well. Let me look into enabling this. Maybe it should be the default test for this branch.

@a-palchikov FWIW I think we should test both on each PR cause otherwise one or or the other use-case will inevitably drift and we'll have regressions again.

@r0mant Yes, I just wanted to minmize the churn while I figure out the rough edges - I'll re-enable the 5.2.x as the base once the tests for upgrades from 5.0.x pass.


remove unneeded if-def for threading code and detect false absence of STAN_THREADS

Summary
Get's rid of if-def within threaded code for thread safety of the AD tape. Add furthermore a test which ensures that unintended use in a threaded environment is properly detected and an exception is thrown which tells the user that STAN_THREADS is required.
Tests
Will be added for the STAN_THREADS not defined case.
Side Effects
When STAN_THREADS is not defined, then the C++ must use an Intel TBB arena with maximal concurrency set to 1. This is achieved by calling the stan::math::init_threadpool_tbb() function (or by manually setting up a task_arena).
Release notes
Simplify threaded code and ensure graceful program exit if STAN_THREADS was not defined (but it should have).
Checklist

[X] Math issue #2525

[X] Copyright holder: Sebastian Weber
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

[ ] the basic tests are passing

unit tests pass (to run, use: ./runTests.py test/unit)
header checks pass, (make test-headers)
dependencies checks pass, (make test-math-dependencies)
docs build, (make doxygen)
code passes the built in C++ standards checks (make cpplint)

[ ] the code is written in idiomatic C++ and changes are documented in the doxygen

[ ] the new changes are tested

@SteveBronder I am leaving the test ./test/unit/math/rev/functor/reduce_sum_test.cpp intentionally in a failing state so that you can see yourself that when uncommenting the init call fixes everything.
If you are good with the changes I will

ensure all other tests using threads will get an init call
add a test for the new exception which one can get when not using STAN_THREADS

Anything else?

Nice! Had a look at the test and that makes sense to me!

Grrr... now there is memory leak in test/unit/math/mix/functor/reduce_sum_part1_test which I really don't get why for now.
Maybe there is even a better way to instruct google test to include the tbb init code snippet in all tests. Will check.

Maybe TEST_F with a class that checks if the tbb is initialized?

I found a "proper" google test way to handle setting up the test environment. Let's hope that memory leaks are gone with this.

@serban-nicusor-toptal could you have quick look as to why the Jenkins hangs please? Thanks!

Will monitor it to see what's wrong @wds15

Hey @wds15 I see that the pipeline failed in the Full Unit Tests with:
terminate called after throwing an instance of 'std::system_error'

  what():  Chainablestack: [Thread] STAN_THREADS not defined during compilation: Operation not permitted

Aborted (core dumped)

test/unit/math/mix/functor/reduce_sum_part4_test --gtest_output="xml:test/unit/math/mix/functor/reduce_sum_part4_test.xml" failed

Do I need to do anything about STAN_THREADS or is this just a test that failed ?

@serban-nicusor-toptal Thanks a lot for an eye on this! The problem is on my end now. This exception is thrown as a result of me not handling the initialization accordingly. I will need to fix that.
When I asked nothing was moving past the clang format step...and that state persisted for quite a while.

Glad to hear we're on the good track now, I'll keep monitoring for a while to make sure we're good on Jenkins side. Thanks!

Hmm, I'll try to play around with this today/tmrw. Off hand I'm not really sure, though I agree this is not a real leak


Ignore errors during SMTP client closing

This PR changes the SMTP mailer code to ignore errors that occur during the closing of the SMTP connection. Since we are not reusing the connection, an error should not affect the behaviour for offen in any way. This addresses https://github.com/offen/offen/issues/835

Thanks very much for the swift PR, that's much appreciated 🎩


Adds NUM_TIMES_SAMPLED agent metadata to the submitted profile

Description of changes:
Adds serialization logic to submit total_sample_count as  NUM_TIMES_SAMPLED property of the AgentMetadata.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Hi Max, could you have a numTimesSampled > 0 check before submitting profiles?


return name: yyy_x_preferred?

Hi,
I tried the server. It's working greatly!! I'm impressed with its speed.
How do I get locale names? The following response does not include name:yyy_x_preferred.
And I don't need all the fields. So it would be nice if we could specify which fields were needed.
EDIT: I think it should have region (85672801, Ibaraki), but not.
    curl 'http://localhost:8300?latitude=36.1&longitude=140.08' | python -mjson.tool
     {
         "places": [
             {
                 "mz:is_ceased": -1,
                 "mz:is_current": 1,
                 "mz:is_deprecated": 0,
                 "mz:is_superseded": 0,
                 "mz:is_superseding": 0,
                 "mz:latitude": 36.096175,
                 "mz:longitude": 140.072981,
                 "mz:max_latitude": 36.2361335754395,
                 "mz:max_longitude":<PHONE_NUMBER>9882795,
                 "mz:min_latitude": 35.94746398925778,
                 "mz:min_longitude":<PHONE_NUMBER>8574196,
                 "mz:uri": "https://whosonfirst.mapzen.com/data/890/519/957/890519957.geojson",
                 "wof:country": "JP",
                 "wof:id": 890519957,
                 "wof:lastmodified":<PHONE_NUMBER>,
                 "wof:name": "Tsukuba Shi",
                 "wof:parent_id": 85672801,
                 "wof:path": "890/519/957/890519957.geojson",
                 "wof:placetype": "county",
                 "wof:repo": "whosonfirst-data",
                 "wof:superseded_by": [],
                 "wof:supersedes": []
             },
             {
                 "mz:is_ceased": -1,
                 "mz:is_current": -1,
                 "mz:is_deprecated": 0,
                 "mz:is_superseded": 0,
                 "mz:is_superseding": 0,
                 "mz:latitude": 36.101144,
                 "mz:longitude": 140.087585,
                 "mz:max_latitude": 36.11459552940025,
                 "mz:max_longitude":<PHONE_NUMBER>5397465,
                 "mz:min_latitude": 36.0890603976255,
                 "mz:min_longitude":<PHONE_NUMBER>4000025,
                 "mz:uri": "https://whosonfirst.mapzen.com/data/859/090/39/85909039.geojson",
                 "wof:country": "JP",
                 "wof:id": 85909039,
                 "wof:lastmodified":<PHONE_NUMBER>,
                 "wof:name": "\uff14\u4e01\u76ee",
                 "wof:parent_id": 102031903,
                 "wof:path": "859/090/39/85909039.geojson",
                 "wof:placetype": "neighbourhood",
                 "wof:repo": "whosonfirst-data",
                 "wof:superseded_by": [],
                 "wof:supersedes": []
             },
             {
                 "mz:is_ceased": -1,
                 "mz:is_current": -1,
                 "mz:is_deprecated": 0,
                 "mz:is_superseded": 0,
                 "mz:is_superseding": 0,
                 "mz:latitude": 0,
                 "mz:longitude": 0,
                 "mz:max_latitude": 90,
                 "mz:max_longitude": 180,
                 "mz:min_latitude": -90,
                 "mz:min_longitude": -180,
                 "mz:uri": "https://whosonfirst.mapzen.com/data/0/0.geojson",
                 "wof:country": "",
                 "wof:id": 0,
                 "wof:lastmodified":<PHONE_NUMBER>,
                 "wof:name": "Earth",
                 "wof:parent_id": -1,
                 "wof:path": "0/0.geojson",
                 "wof:placetype": "planet",
                 "wof:repo": "whosonfirst-data",
                 "wof:superseded_by": [],
                 "wof:supersedes": []
             },
             {
                 "mz:is_ceased": -1,
                 "mz:is_current": -1,
                 "mz:is_deprecated": 0,
                 "mz:is_superseded": 0,
                 "mz:is_superseding": 0,
                 "mz:latitude": 36.129991,
                 "mz:longitude": 138.445432,
                 "mz:max_latitude": 45.52314,
                 "mz:max_longitude": 153.985229,
                 "mz:min_latitude": 24.036472,
                 "mz:min_longitude": 122.93853,
                 "mz:uri": "https://whosonfirst.mapzen.com/data/102/047/657/102047657.geojson",
                 "wof:country": "",
                 "wof:id": 102047657,
                 "wof:lastmodified":<PHONE_NUMBER>,
                 "wof:name": "Asia/Tokyo",
                 "wof:parent_id": 85632429,
                 "wof:path": "102/047/657/102047657.geojson",
                 "wof:placetype": "timezone",
                 "wof:repo": "whosonfirst-data",
                 "wof:superseded_by": [],
                 "wof:supersedes": []
             },
             {
                 "mz:is_ceased": -1,
                 "mz:is_current": 1,
                 "mz:is_deprecated": 0,
                 "mz:is_superseded": 0,
                 "mz:is_superseding": 0,
                 "mz:latitude": 36.13793,
                 "mz:longitude": 138.441899,
                 "mz:max_latitude": 45.52288818400007,
                 "mz:max_longitude":<PHONE_NUMBER>4700006,
                 "mz:min_latitude": 20.42288970900006,
                 "mz:min_longitude":<PHONE_NUMBER>7100007,
                 "mz:uri": "https://whosonfirst.mapzen.com/data/856/324/29/85632429.geojson",
                 "wof:country": "JP",
                 "wof:id": 85632429,
                 "wof:lastmodified":<PHONE_NUMBER>,
                 "wof:name": "Japan",
                 "wof:parent_id": 102191569,
                 "wof:path": "856/324/29/85632429.geojson",
                 "wof:placetype": "country",
                 "wof:repo": "whosonfirst-data",
                 "wof:superseded_by": [],
                 "wof:supersedes": []
             }
         ]
     }

It appears that you are using the go-whosonfirst-pip-v2 package, correct?
If that is the case then it is not currently possible to return name_*: properties as part of a standard point-in-polygon (PIP) query. Because the PIP server uses an in-memory index there are a finite number of properties that we store by default. These are defined as the "standard place response" which is defined here:
https://github.com/whosonfirst/go-whosonfirst-spr#interface
In order to collect name:* properties you would either need to query and parse the full record (identified in the mz:uri property):
curl -s https://whosonfirst.mapzen.com/data/856/324/29/85632429.geojson | jq '.properties' | grep -e '_x_preferred' | wc -l
     270

You could also call the mapzen.places.getInfo API method and pass along an extras=name:* parameter. (It is not currently possible to specify name:*_preferred although that's a good idea so we'll add it to the list.) You could also call the mapzen.places.getByLatLon API method, again passing the extras= parameter defined above.

https://mapzen.com/documentation/places/methods/#mapzen.places.getInfo
https://mapzen.com/documentation/places/methods/#mapzen.places.getByLatLon

Going forward, I can the value in teaching the PIP server (again I am assuming that's the context based on the URL you pasted above) in how to access arbitrary properties at response time, either by pre-storing them or by doing a secondary lookup. I have some ideas about this and there is some work in progress that might help but as of this writing none of it is ready for general use.

Oh, also just noticing that this issue was filed in the go-whosonfirst-pip-v2 package.
Apologies, it's Sunday morning here and I am still waking up... :-)

With a few more minutes thought it occurs to me that a reasonable way to deal with this issue is to update the HTTP interface to "decorate" responses with data stored in SQLite databases:

https://whosonfirst.mapzen.com/sqlite/
https://github.com/whosonfirst/go-whosonfirst-sqlite

The simplest thing would be to assume the use of pre-existing SQLite databases and to define them when the PIP server is started, fetching and retrieving additional properties on a per-request basis, starting first with names (stored in the names table) and then with arbitrary properties (stored in the geojson table but which would incur the additional cost of parsing and loading a full GeoJSON record in to memory):
https://github.com/whosonfirst/go-whosonfirst-pip-v2/blob/master/http/intersects.go#L95-L121
Once that's been proven to work the next step should be flags to generate SQLite databases on demand as the PIP server is indexing data at start up, storing only those records (and then eventually properties) that it needs.
I might be able to bang out a proof-of-concept of the first steps shortly. The rest might take a couple of weeks, given all the other things going on...

There is very early and still experimental support for "extras" in the sqlite branch. You can see an example here:
https://github.com/whosonfirst/go-whosonfirst-pip-v2/issues/17#issuecomment-352330361
The requirements are:

passing the -allow-extras parameter
passing at least one -extras-database parameter with the path to a WOF SQLite database (see also: https://whosonfirst.mapzen.com/sqlite/
passing the ?extras= parameter with your HTTP query - the allowed syntax for extras is either a fully qualified property or {PREFIX}:* to retrieve all the properties for that prefix; multiple extras can be defined as a comma-separated string

Generating a database on the fly during indexing is in progress but not complete yet. If you have a chance to try this I would be curious to hear what you think.

Okay, the second cut at this has landed in the sqlite branch:
https://github.com/whosonfirst/go-whosonfirst-pip-v2/issues/17#issuecomment-352588758
If you pass a -allow-extras flag then a temporary SQLite database will be created during indexing, which will be used by the intersects handler to update any responses with data defined in the ?extras= parameter.
The -extras-database parameter is now deprecated and will be removed shortly.

I am going to close this issue for now as support for ?extras= parameters has been merged in to master. For example:
curl -s 'http://localhost:8080/?latitude=37.794906&longitude=-122.395229&extras=name:' | python -mjson.tool | grep name
            "name:eng_x_preferred": [
            "wof:name": "Super Bowl City",

This does not support wildcard properties beyond "everything in this namespace". That still seems like a good idea but introduces an extra layer of complexity that I'd like to have a think about; also it's not a syntax that is supported in the Mapzen Places API.

Good job! But it returns name: of the first place and ignores other places.  In the following example, county and country should be with name: as well.
curl 'http://localhost:8300?latitude=36.1&longitude=140.08&extras=name:' | python -mjson.tool
{
    "places": [
        {
            "mz:is_ceased": -1,
            "mz:is_current": 1,
            "mz:is_deprecated": 0,
            "mz:is_superseded": 0,
            "mz:is_superseding": 0,
            "mz:latitude": 36.158025,
            "mz:longitude": 140.307438,
            "mz:max_latitude": 36.94546508789058,
            "mz:max_longitude":<PHONE_NUMBER>9335895,
            "mz:min_latitude": 35.73959732055664,
            "mz:min_longitude":<PHONE_NUMBER>2851597,
            "mz:uri": "https://whosonfirst.mapzen.com/data/856/728/01/85672801.geojson",
            "name:ace_x_preferred": [
                "Prefektur Ibaraki"
            ],
            "name:ara_x_preferred": [
                "\u0625\u064a\u0628\u0627\u0631\u0627\u0643\u064a"
            ],
            "name:aze_x_preferred": [
                "\u0130baraki"
            ],
            "name:bul_x_preferred": [
                "\u0418\u0431\u0430\u0440\u0430\u043a\u0438"
            ],
            "name:cat_x_preferred": [
                "Prefectura dIbaraki"
            ],
            "name:cdo_x_preferred": [
                "Ibaraki-g\u00e2ing"
            ],
            "name:ces_x_preferred": [
                "Prefektura Ibaraki"
            ],
            "name:ckb_x_preferred": [
                "\u0626\u06cc\u0628\u0627\u0631\u0627\u06a9\u06cc"
            ],
            "name:deu_x_preferred": [
                "Pr\u00e4fektur Ibaraki"
            ],
            "name:eng_x_preferred": [
                "Ibaraki Prefecture"
            ],
            "name:eng_x_variant": [
                "Ibaraki",
                "Ibaraki-ken"
            ],
            "name:epo_x_preferred": [
                "Gubernio Ibaraki"
            ],
            "name:est_x_preferred": [
                "Ibaraki prefektuur"
            ],
            "name:fas_x_preferred": [
                "\u0627\u0633\u062a\u0627\u0646 \u0627\u06cc\u0628\u0627\u0631\u0627\u06a9\u06cc"
            ],
            "name:fin_x_preferred": [
                "Ibarakin Prefektuuri"
            ],
            "name:fin_x_variant": [
                "Ibarakin prefektuuri"
            ],
            "name:fra_x_preferred": [
                "Pr\u00e9fecture dIbaraki"
            ],
            "name:gle_x_preferred": [
                "Maoracht Ibaraki"
            ],
            "name:glg_x_preferred": [
                "Prefectura de Ibaraki"
            ],
            "name:hbs_x_preferred": [
                "Prefektura Ibaraki"
            ],
            "name:heb_x_preferred": [
                "\u05d0\u05d9\u05d1\u05e8\u05d0\u05e7\u05d9"
            ],
            "name:hun_x_preferred": [
                "Ibaraki prefekt\u00fara"
            ],
            "name:ilo_x_preferred": [
                "Prepektura ti Ibaraki"
            ],
            "name:ind_x_preferred": [
                "Prefektur Ibaraki"
            ],
            "name:ita_x_preferred": [
                "Prefettura di Ibaraki"
            ],
            "name:jav_x_preferred": [
                "Pr\u00e9f\u00e8ktur Ibaraki"
            ],
            "name:jpn_x_preferred": [
                "\u8328\u57ce\u770c"
            ],
            "name:jpn_x_variant": [
                "\u3044\u3070\u3089\u304d",
                "\u3044\u3070\u3089\u304d\u3051\u3093",
                "\u3044\u3070\u3089\u304d\u30fb\u3051\u3093",
                "\u8328\u57ce",
                "\u30a4\u30d0\u30e9\u30ad",
                "\u30a4\u30d0\u30e9\u30ad\u30b1\u30f3"
            ],
            "name:kat_x_preferred": [
                "\u10d8\u10d1\u10d0\u10e0\u10d0\u10d9\u10d8\u10e1 \u10de\u10e0\u10d4\u10e4\u10d4\u10e5\u10e2\u10e3\u10e0\u10d0"
            ],
            "name:kor_x_preferred": [
                "\uc774\ubc14\ub77c\ud0a4\ucf04"
            ],
            "name:kor_x_variant": [
                "\uc774\ubc14\ub77c\ud0a4 \ud604"
            ],
            "name:lav_x_preferred": [
                "Ibaraki prefekt\u016bra"
            ],
            "name:lit_x_preferred": [
                "Ibarakio prefekt\u016bra"
            ],
            "name:mar_x_preferred": [
                "\u0907\u092c\u093e\u0930\u093e\u0915\u0940"
            ],
            "name:mkd_x_preferred": [
                "\u0418\u0431\u0430\u0440\u0430\u043a\u0438"
            ],
            "name:mon_x_preferred": [
                "\u0418\u0431\u0430\u0440\u0430\u043a\u0438"
            ],
            "name:msa_x_preferred": [
                "Wilayah Ibaraki"
            ],
            "name:nan_x_preferred": [
                "Ibaraki-ko\u0101n"
            ],
            "name:nno_x_preferred": [
                "Ibaraki prefektur"
            ],
            "name:nor_x_preferred": [
                "Ibaraki Prefektur"
            ],
            "name:pam_x_preferred": [
                "Prepektura ning Ibaraki"
            ],
            "name:pnb_x_preferred": [
                "\u0636\u0644\u0639 \u0627\u0628\u0627\u0631\u0627\u06a9\u06cc"
            ],
            "name:pol_x_preferred": [
                "Prefektura Ibaraki"
            ],
            "name:ron_x_preferred": [
                "Prefectura Ibaraki"
            ],
            "name:rus_x_preferred": [
                "\u0418\u0431\u0430\u0440\u0430\u043a\u0438"
            ],
            "name:sco_x_preferred": [
                "Ibaraki Prefectur"
            ],
            "name:sgs_x_preferred": [
                "Ibaraki prefekt\u016bra"
            ],
            "name:sme_x_preferred": [
                "Ibaraki prefektuvra"
            ],
            "name:spa_x_preferred": [
                "Prefectura de Ibaraki"
            ],
            "name:srp_x_preferred": [
                "\u041f\u0440\u0435\u0444\u0435\u043a\u0442\u0443\u0440\u0430 \u0418\u0431\u0430\u0440\u0430\u043a\u0438"
            ],
            "name:sun_x_preferred": [
                "Ibaraki Prefecture"
            ],
            "name:swa_x_preferred": [
                "Mkoa wa Ibaraki"
            ],
            "name:swe_x_preferred": [
                "Ibaraki Prefektur"
            ],
            "name:swe_x_variant": [
                "Ibaraki prefektur"
            ],
            "name:tgk_x_preferred": [
                "\u041f\u0440\u0435\u0444\u0435\u043a\u0442\u0443\u0440\u0430\u0438 \u0418\u0431\u0430\u0440\u0430\u043a\u0438"
            ],
            "name:tgl_x_preferred": [
                "Prepektura ng Ibaraki"
            ],
            "name:tha_x_preferred": [
                "\u0e08\u0e31\u0e07\u0e2b\u0e27\u0e31\u0e14\u0e2d\u0e34\u0e1a\u0e30\u0e23\u0e30\u0e01\u0e34"
            ],
            "name:uig_x_preferred": [
                "\u0626\u0649\u0628\u0627\u0631\u0627\u0643\u0649 \u0646\u0627\u06be\u0649\u064a\u0649\u0633\u0649"
            ],
            "name:ukr_x_preferred": [
                "\u041f\u0440\u0435\u0444\u0435\u043a\u0442\u0443\u0440\u0430 \u0406\u0431\u0430\u0440\u0430\u043a\u0456"
            ],
            "name:und_x_variant": [
                "\u8328\u57ce\u770c",
                "Ibaraki Ken"
            ],
            "name:unk_x_variant": [
                "Ibaraki-ken"
            ],
            "name:urd_x_preferred": [
                "\u0627\u06cc\u0628\u0627\u0631\u0627\u06a9\u06cc \u067e\u0631\u06cc\u0641\u06cc\u06a9\u0686\u0631"
            ],
            "name:yue_x_preferred": [
                "\u8328\u57ce\u7e23"
            ],
            "name:zho_x_preferred": [
                "\u8328\u57ce\u53bf"
            ],
            "name:zho_x_variant": [
                "\u8328\u57ce\u7e23"
            ],
            "wof:country": "JP",
            "wof:id": 85672801,
            "wof:lastmodified":<PHONE_NUMBER>,
            "wof:name": "Ibaraki",
            "wof:parent_id": 85632429,
            "wof:path": "856/728/01/85672801.geojson",
            "wof:placetype": "region",
            "wof:repo": "whosonfirst-data",
            "wof:superseded_by": [],
            "wof:supersedes": []
        },
        {
            "mz:is_ceased": -1,
            "mz:is_current": 1,
            "mz:is_deprecated": 0,
            "mz:is_superseded": 0,
            "mz:is_superseding": 0,
            "mz:latitude": 36.096175,
            "mz:longitude": 140.072981,
            "mz:max_latitude": 36.2361335754395,
            "mz:max_longitude":<PHONE_NUMBER>9882795,
            "mz:min_latitude": 35.94746398925778,
            "mz:min_longitude":<PHONE_NUMBER>8574196,
            "mz:uri": "https://whosonfirst.mapzen.com/data/890/519/957/890519957.geojson",
            "wof:country": "JP",
            "wof:id": 890519957,
            "wof:lastmodified":<PHONE_NUMBER>,
            "wof:name": "Tsukuba Shi",
            "wof:parent_id": 85672801,
            "wof:path": "890/519/957/890519957.geojson",
            "wof:placetype": "county",
            "wof:repo": "whosonfirst-data",
            "wof:superseded_by": [],
            "wof:supersedes": []
        },
        {
            "mz:is_ceased": -1,
            "mz:is_current": 1,
            "mz:is_deprecated": 0,
            "mz:is_superseded": 0,
            "mz:is_superseding": 0,
            "mz:latitude": 36.13793,
            "mz:longitude": 138.441899,
            "mz:max_latitude": 45.52288818400007,
            "mz:max_longitude":<PHONE_NUMBER>4700006,
            "mz:min_latitude": 20.42288970900006,
            "mz:min_longitude":<PHONE_NUMBER>7100007,
            "mz:uri": "https://whosonfirst.mapzen.com/data/856/324/29/85632429.geojson",
            "wof:country": "JP",
            "wof:id": 85632429,
            "wof:lastmodified":<PHONE_NUMBER>,
            "wof:name": "Japan",
            "wof:parent_id": 102191569,
            "wof:path": "856/324/29/85632429.geojson",
            "wof:placetype": "country",
            "wof:repo": "whosonfirst-data",
            "wof:superseded_by": [],
            "wof:supersedes": []
        }
    ]
}

Thanks for your reply and great work in Sunday morning. Please take care.
I'm not sure but you enjoy too much with golang. How about nim? Actually I'm not familiar with both,   nim seems much easier and faster than go, rust, D....

Huh, okay that looks like a bug. I will take a look shortly.
I am not familiar with nim. Go is not our first choice for all tools but for some things (like this project) is the happy medium between all the different concerns. It also forces us to make sure that the design decisions in Who's On First (WOF) play nicely with both compiled and interpreted languages.
nim looks interesting and the goal of WOF is not to have an opinion about whatever language/infrastructure a person uses and by extension plays nicely with everyone so I will have a look as time permits.

Oh, I think the problem is an errant break statement. Testing now...

This should be fixed as of : https://github.com/whosonfirst/go-whosonfirst-pip-v2/commit/1115646d6e3f53bff91cf1cd77ce87c8a9c39ea4
When you have a moment, would you try it out and confirm?

I tried with the latest pip-server.
% ls ~/whosonfirst-data-sqlite/*-20171212.db
/Users/s-hirano/whosonfirst-data-sqlite/country-20171212.db
/Users/s-hirano/whosonfirst-data-sqlite/county-20171212.db
/Users/s-hirano/whosonfirst-data-sqlite/locality-20171212.db
/Users/s-hirano/whosonfirst-data-sqlite/region-20171212.db

% ./bin/wof-pip-server -port 8300 -allow-extras -cache-all -mode sqlite ~/whosonfirst-data-sqlite/*-20171212.db

Here is a summary.

extras=name:jpn_x_preferred

country and counry have name:jpn_x_preferred
region does not

extras=name:jpn_x_preferred,name:eng_x_preferred

country, region and counry have name:jpn_x_preferred and name:eng_x_preferred

extras=name:

country and county have name:
region does not

Just use gounit.
 curl 'http://localhost:8300?latitude=36.1&longitude=140.08&extras=name:jpn_x_preferred' | python -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1974  100  1974    0     0    228      0  0:00:08  0:00:08 --:--:--   580
{
    "places": [
        {
            "mz:is_ceased": -1,
            "mz:is_current": 1,
            "mz:is_deprecated": 0,
            "mz:is_superseded": 0,
            "mz:is_superseding": 0,
            "mz:latitude": 36.096175,
            "mz:longitude": 140.072981,
            "mz:max_latitude": 36.2361335754395,
            "mz:max_longitude":<PHONE_NUMBER>9882795,
            "mz:min_latitude": 35.94746398925778,
            "mz:min_longitude":<PHONE_NUMBER>8574196,
            "mz:uri": "https://whosonfirst.mapzen.com/data/890/519/957/890519957.geojson",
            "name:jpn_x_preferred": [
                "\u3064\u304f\u3070\u5e02"
            ],
            "wof:country": "JP",
            "wof:id": 890519957,
            "wof:lastmodified":<PHONE_NUMBER>,
            "wof:name": "Tsukuba Shi",
            "wof:parent_id": 85672801,
            "wof:path": "890/519/957/890519957.geojson",
            "wof:placetype": "county",
            "wof:repo": "whosonfirst-data",
            "wof:superseded_by": [],
            "wof:supersedes": []
        },
        {
            "mz:is_ceased": -1,
            "mz:is_current": 1,
            "mz:is_deprecated": 0,
            "mz:is_superseded": 0,
            "mz:is_superseding": 0,
            "mz:latitude": 36.158025,
            "mz:longitude": 140.307438,
            "mz:max_latitude": 36.94546508789058,
            "mz:max_longitude":<PHONE_NUMBER>9335895,
            "mz:min_latitude": 35.73959732055664,
            "mz:min_longitude":<PHONE_NUMBER>2851597,
            "mz:uri": "https://whosonfirst.mapzen.com/data/856/728/01/85672801.geojson",
            "wof:country": "JP",
            "wof:id": 85672801,
            "wof:lastmodified":<PHONE_NUMBER>,
            "wof:name": "Ibaraki",
            "wof:parent_id": 85632429,
            "wof:path": "856/728/01/85672801.geojson",
            "wof:placetype": "region",
            "wof:repo": "whosonfirst-data",
            "wof:superseded_by": [],
            "wof:supersedes": []
        },
        {
            "mz:is_ceased": -1,
            "mz:is_current": 1,
            "mz:is_deprecated": 0,
            "mz:is_superseded": 0,
            "mz:is_superseding": 0,
            "mz:latitude": 36.13793,
            "mz:longitude": 138.441899,
            "mz:max_latitude": 45.52288818400007,
            "mz:max_longitude":<PHONE_NUMBER>4700006,
            "mz:min_latitude": 20.42288970900006,
            "mz:min_longitude":<PHONE_NUMBER>7100007,
            "mz:uri": "https://whosonfirst.mapzen.com/data/856/324/29/85632429.geojson",
            "name:jpn_x_preferred": [
                "\u65e5\u672c"
            ],
            "wof:country": "JP",
            "wof:id": 85632429,
            "wof:lastmodified":<PHONE_NUMBER>,
            "wof:name": "Japan",
            "wof:parent_id": 102191569,
            "wof:path": "856/324/29/85632429.geojson",
            "wof:placetype": "country",
            "wof:repo": "whosonfirst-data",
            "wof:superseded_by": [],
            "wof:supersedes": []
        }
    ]
}

% curl 'http://localhost:8300?latitude=36.1&longitude=140.08&extras=name:jpn_x_preferred,name:eng_x_preferred' | python -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2125    0  2125    0     0   111k      0 --:--:-- --:--:-- --:--:--  115k
{
    "places": [
        {
            "mz:is_ceased": -1,
            "mz:is_current": 1,
            "mz:is_deprecated": 0,
            "mz:is_superseded": 0,
            "mz:is_superseding": 0,
            "mz:latitude": 36.158025,
            "mz:longitude": 140.307438,
            "mz:max_latitude": 36.94546508789058,
            "mz:max_longitude":<PHONE_NUMBER>9335895,
            "mz:min_latitude": 35.73959732055664,
            "mz:min_longitude":<PHONE_NUMBER>2851597,
            "mz:uri": "https://whosonfirst.mapzen.com/data/856/728/01/85672801.geojson",
            "name:eng_x_preferred": [
                "Ibaraki Prefecture"
            ],
            "name:jpn_x_preferred": [
                "\u8328\u57ce\u770c"
            ],
            "wof:country": "JP",
            "wof:id": 85672801,
            "wof:lastmodified":<PHONE_NUMBER>,
            "wof:name": "Ibaraki",
            "wof:parent_id": 85632429,
            "wof:path": "856/728/01/85672801.geojson",
            "wof:placetype": "region",
            "wof:repo": "whosonfirst-data",
            "wof:superseded_by": [],
            "wof:supersedes": []
        },
        {
            "mz:is_ceased": -1,
            "mz:is_current": 1,
            "mz:is_deprecated": 0,
            "mz:is_superseded": 0,
            "mz:is_superseding": 0,
            "mz:latitude": 36.096175,
            "mz:longitude": 140.072981,
            "mz:max_latitude": 36.2361335754395,
            "mz:max_longitude":<PHONE_NUMBER>9882795,
            "mz:min_latitude": 35.94746398925778,
            "mz:min_longitude":<PHONE_NUMBER>8574196,
            "mz:uri": "https://whosonfirst.mapzen.com/data/890/519/957/890519957.geojson",
            "name:eng_x_preferred": [
                "Tsukuba"
            ],
            "name:jpn_x_preferred": [
                "\u3064\u304f\u3070\u5e02"
            ],
            "wof:country": "JP",
            "wof:id": 890519957,
            "wof:lastmodified":<PHONE_NUMBER>,
            "wof:name": "Tsukuba Shi",
            "wof:parent_id": 85672801,
            "wof:path": "890/519/957/890519957.geojson",
            "wof:placetype": "county",
            "wof:repo": "whosonfirst-data",
            "wof:superseded_by": [],
            "wof:supersedes": []
        },
        {
            "mz:is_ceased": -1,
            "mz:is_current": 1,
            "mz:is_deprecated": 0,
            "mz:is_superseded": 0,
            "mz:is_superseding": 0,
            "mz:latitude": 36.13793,
            "mz:longitude": 138.441899,
            "mz:max_latitude": 45.52288818400007,
            "mz:max_longitude":<PHONE_NUMBER>4700006,
            "mz:min_latitude": 20.42288970900006,
            "mz:min_longitude":<PHONE_NUMBER>7100007,
            "mz:uri": "https://whosonfirst.mapzen.com/data/856/324/29/85632429.geojson",
            "name:eng_x_preferred": [
                "Japan"
            ],
            "name:jpn_x_preferred": [
                "\u65e5\u672c"
            ],
            "wof:country": "JP",
            "wof:id": 85632429,
            "wof:lastmodified":<PHONE_NUMBER>,
            "wof:name": "Japan",
            "wof:parent_id": 102191569,
            "wof:path": "856/324/29/85632429.geojson",
            "wof:placetype": "country",
            "wof:repo": "whosonfirst-data",
            "wof:superseded_by": [],
            "wof:supersedes": []
        }
    ]
}

curl 'http://localhost:8300?latitude=36.1&longitude=140.08&extras=name:' | python -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 13641    0 13641    0     0   354k      0 --:--:-- --:--:-- --:--:--  360k
{
    "places": [
        {
            "mz:is_ceased": -1,
            "mz:is_current": 1,
            "mz:is_deprecated": 0,
            "mz:is_superseded": 0,
            "mz:is_superseding": 0,
            "mz:latitude": 36.158025,
            "mz:longitude": 140.307438,
            "mz:max_latitude": 36.94546508789058,
            "mz:max_longitude":<PHONE_NUMBER>9335895,
            "mz:min_latitude": 35.73959732055664,
            "mz:min_longitude":<PHONE_NUMBER>2851597,
            "mz:uri": "https://whosonfirst.mapzen.com/data/856/728/01/85672801.geojson",
            "wof:country": "JP",
            "wof:id": 85672801,
            "wof:lastmodified":<PHONE_NUMBER>,
            "wof:name": "Ibaraki",
            "wof:parent_id": 85632429,
            "wof:path": "856/728/01/85672801.geojson",
            "wof:placetype": "region",
            "wof:repo": "whosonfirst-data",
            "wof:superseded_by": [],
            "wof:supersedes": []
        },
        {
            "mz:is_ceased": -1,
            "mz:is_current": 1,
            "mz:is_deprecated": 0,
            "mz:is_superseded": 0,
            "mz:is_superseding": 0,
            "mz:latitude": 36.096175,
            "mz:longitude": 140.072981,
            "mz:max_latitude": 36.2361335754395,
            "mz:max_longitude":<PHONE_NUMBER>9882795,
            "mz:min_latitude": 35.94746398925778,
            "mz:min_longitude":<PHONE_NUMBER>8574196,
            "mz:uri": "https://whosonfirst.mapzen.com/data/890/519/957/890519957.geojson",
            "name:eng_x_preferred": [
                "Tsukuba"
            ],
            "name:eng_x_variant": [
                "Tukubasi",
                "Tsukuba Shi"
            ],
            "name:jpn_x_preferred": [
                "\u3064\u304f\u3070\u5e02"
            ],
            "name:jpn_x_variant": [
                "\u3064\u304f\u3070\u3057",
                "\u3064\u304f\u3070"
            ],
            "name:unk_x_variant": [
                "Tsukuba-shi"
            ],
            "wof:country": "JP",
            "wof:id": 890519957,
            "wof:lastmodified":<PHONE_NUMBER>,
            "wof:name": "Tsukuba Shi",
            "wof:parent_id": 85672801,
            "wof:path": "890/519/957/890519957.geojson",
            "wof:placetype": "county",
            "wof:repo": "whosonfirst-data",
            "wof:superseded_by": [],
            "wof:supersedes": []
        },
        {
            "mz:is_ceased": -1,
            "mz:is_current": 1,
            "mz:is_deprecated": 0,
            "mz:is_superseded": 0,
            "mz:is_superseding": 0,
            "mz:latitude": 36.13793,
            "mz:longitude": 138.441899,
            "mz:max_latitude": 45.52288818400007,
            "mz:max_longitude":<PHONE_NUMBER>4700006,
            "mz:min_latitude": 20.42288970900006,
            "mz:min_longitude":<PHONE_NUMBER>7100007,
            "mz:uri": "https://whosonfirst.mapzen.com/data/856/324/29/85632429.geojson",
            "name:aar_x_preferred": [
                "Japan"
            ],
            "name:abk_x_preferred": [
                "\u0418\u0430\u043f\u043e\u043d\u0438\u0430"
            ],
            "name:ace_x_preferred": [
                "Jeupun"
            ],
            "name:ady_x_preferred": [
                "\u042f\u043f\u043e\u043d\u0438\u0435"
            ],
            "name:afr_x_preferred": [
                "Japan"
            ],
            "name:aka_x_preferred": [
                "Gyapan"
            ],
            "name:als_x_preferred": [
                "Japan"
            ],
            "name:amh_x_preferred": [
                "\u1303\u1353\u1295"
            ],
            "name:ang_x_preferred": [
                "Iapan"
            ],
            "name:ara_x_preferred": [
                "\u0627\u0644\u064a\u0627\u0628\u0627\u0646"
            ],
            "name:arc_x_preferred": [
                "\u071d\u0726\u0722"
            ],
            "name:arg_x_preferred": [
                "Chap\u00f3n"
            ],
            "name:arz_x_preferred": [
                "\u0627\u0644\u064a\u0627\u0628\u0627\u0646"
            ],
            "name:asm_x_preferred": [
                "\u099c\u09be\u09aa\u09be\u09a8"
            ],
            "name:ast_x_preferred": [
                "Xap\u00f3n"
            ],
            "name:aym_x_preferred": [
                "Nihun"
            ],
            "name:azb_x_preferred": [
                "\u0698\u0627\u067e\u0648\u0646"
            ],
            "name:aze_x_preferred": [
                "Yaponiya"
            ],
            "name:bak_x_preferred": [
                "\u042f\u043f\u043e\u043d\u0438\u044f"
            ],
            "name:bam_x_preferred": [
                "Zap\u0254n"
            ],
            "name:bar_x_preferred": [
                "Japan"
            ],
            "name:bcl_x_preferred": [
                "Hapon"
            ],
            "name:bel_x_preferred": [
                "\u042f\u043f\u043e\u043d\u0456\u044f"
            ],
            "name:bel_x_variant": [
                "\u042f\u043f\u043e\u043d\u0456\u044f"
            ],
            "name:ben_x_preferred": [
                "\u099c\u09be\u09aa\u09be\u09a8"
            ],
            "name:bih_x_preferred": [
                "\u091c\u093e\u092a\u093e\u0928"
            ],
            "name:bjn_x_preferred": [
                "Japang"
            ],
            "name:bod_x_preferred": [
                "\u0f49\u0f72\u0f0b\u0f67\u0f7c\u0f44\u0f0b\u0f0d"
            ],
            "name:bod_x_variant": [
                "\u0f62\u0f72\u0f0b\u0f54\u0f72\u0f53\u0f0b"
            ],
            "name:bos_x_preferred": [
                "Japan"
            ],
            "name:bpy_x_preferred": [
                "\u099c\u09be\u09aa\u09be\u09a8"
            ],
            "name:bre_x_preferred": [
                "Japan"
            ],
            "name:bre_x_variant": [
                "Japon"
            ],
            "name:bug_x_preferred": [
                "\u1a0d\u1a1b\u1a04"
            ],
            "name:bul_x_preferred": [
                "\u042f\u043f\u043e\u043d\u0438\u044f"
            ],
            "name:bxr_x_preferred": [
                "\u042f\u043f\u043e\u043d \u0423\u043b\u0430\u0441"
            ],
            "name:cat_x_preferred": [
                "Jap\u00f3"
            ],
            "name:cbk_zam_x_preferred": [
                "Jap\u00f3n"
            ],
            "name:cdo_x_preferred": [
                "N\u012dk-bu\u014dng"
            ],
            "name:ceb_x_preferred": [
                "Hapon"
            ],
            "name:ces_x_preferred": [
                "Japonsko"
            ],
            "name:cha_x_preferred": [
                "Chapan"
            ],
            "name:che_x_preferred": [
                "\u042f\u043f\u043e\u043d\u0438"
            ],
            "name:cho_x_preferred": [
                "Japan"
            ],
            "name:chr_x_preferred": [
                "\u13e3\u13e9\u13c2\u13cf"
            ],
            "name:chu_x_preferred": [
                "\ua656\u043f\u0461\u043d\u0457\ua657"
            ],
            "name:chv_x_preferred": [
                "\u042f\u043f\u043e\u043d\u0438"
            ],
            "name:chy_x_preferred": [
                "Japan"
            ],
            "name:ckb_x_preferred": [
                "\u0698\u0627\u067e\u06c6\u0646"
            ],
            "name:cor_x_preferred": [
                "Nihon"
            ],
            "name:cor_x_variant": [
                "Japan"
            ],
            "name:crh_x_preferred": [
                "Yaponiya"
            ],
            "name:csb_x_preferred": [
                "Jap\u00f2\u0144sk\u00f4"
            ],
            "name:cym_x_preferred": [
                "Japan"
            ],
            "name:cym_x_variant": [
                "Siapan"
            ],
            "name:cze_x_preferred": [
                "Japonsko"
            ],
            "name:dan_x_preferred": [
                "Japan"
            ],
            "name:deu_x_preferred": [
                "Japan"
            ],
            "name:diq_x_preferred": [
                "Japonya"
            ],
            "name:div_x_preferred": [
                "\u0796\u07a6\u0795\u07a7\u0782\u07aa"
            ],
            "name:dsb_x_preferred": [
                "Japa\u0144ska"
            ],
            "name:dzo_x_preferred": [
                "\u0f47\u0f71\u0f0b\u0f54\u0f71\u0f53\u0f0d"
            ],
            "name:dzo_x_variant": [
                "\u0f47\u0f0b\u0f54\u0f71\u0f53"
            ],
            "name:ell_x_preferred": [
                "\u0399\u03b1\u03c0\u03c9\u03bd\u03af\u03b1"
            ],
            "name:eng_x_preferred": [
                "Japan"
            ],
            "name:eng_x_unknown": [
                "JP",
                "JPN"
            ],
            "name:eng_x_variant": [
                "Ilbon",
                "Japanese",
                "Nihon",
                "Nihon-koku",
                "Nippon",
                "Nippon-koku"
            ],
            "name:epo_x_preferred": [
                "Japanio"
            ],
            "name:epo_x_variant": [
                "Japanujo"
            ],
            "name:est_x_preferred": [
                "Jaapan"
            ],
            "name:eus_x_preferred": [
                "Japonia"
            ],
            "name:ewe_x_preferred": [
                "Japan"
            ],
            "name:ewe_x_variant": [
                "Dzapan nutome"
            ],
            "name:ext_x_preferred": [
                "Jap\u00f3n"
            ],
            "name:fao_x_preferred": [
                "Japan"
            ],
            "name:fas_x_preferred": [
                "\u0698\u0627\u067e\u0646"
            ],
            "name:fin_x_preferred": [
                "Japani"
            ],
            "name:fin_x_variant": [
                "Japanin"
            ],
            "name:fra_x_preferred": [
                "Japon"
            ],
            "name:frp_x_preferred": [
                "J\u00b7apon"
            ],
            "name:frr_x_preferred": [
                "Japan"
            ],
            "name:fry_x_preferred": [
                "Japan"
            ],
            "name:ful_x_preferred": [
                "Sapoo"
            ],
            "name:fur_x_preferred": [
                "Gjapon"
            ],
            "name:gag_x_preferred": [
                "Yaponiya"
            ],
            "name:gan_x_preferred": [
                "\u65e5\u672c"
            ],
            "name:gla_x_preferred": [
                "An Iapan"
            ],
            "name:gle_x_preferred": [
                "An tSeap\u00e1in"
            ],
            "name:glg_x_preferred": [
                "Xap\u00f3n"
            ],
            "name:glg_x_variant": [
                "Xap\u00f3n - \u65e5\u672c"
            ],
            "name:glv_x_preferred": [
                "Yn \u00c7hapaan"
            ],
            "name:gom_x_preferred": [
                "\u091c\u092a\u093e\u0928"
            ],
            "name:grn_x_preferred": [
                "Hap\u00f5"
            ],
            "name:guj_x_preferred": [
                "\u0a9c\u0abe\u0aaa\u0abe\u0aa8"
            ],
            "name:hak_x_preferred": [
                "Ngi\u030dt-p\u00fan"
            ],
            "name:hat_x_preferred": [
                "Japon"
            ],
            "name:hau_x_preferred": [
                "Japan"
            ],
            "name:haw_x_preferred": [
                "I\u0101pana"
            ],
            "name:hbs_x_preferred": [
                "Japan"
            ],
            "name:heb_x_preferred": [
                "\u05d9\u05e4\u05df"
            ],
            "name:hif_x_preferred": [
                "Japan"
            ],
            "name:hin_x_preferred": [
                "\u091c\u093e\u092a\u093e\u0928"
            ],
            "name:hrv_x_preferred": [
                "Japan"
            ],
            "name:hsb_x_preferred": [
                "Japanska"
            ],
            "name:hun_x_preferred": [
                "Jap\u00e1n"
            ],
            "name:hye_x_preferred": [
                "\u0543\u0561\u057a\u0578\u0576\u056b\u0561"
            ],
            "name:ido_x_preferred": [
                "Japonia"
            ],
            "name:iii_x_preferred": [
                "\ua3dd\ua02a"
            ],
            "name:iku_x_preferred": [
                "\u14c3\u1449\u140a\u14d0"
            ],
            "name:ile_x_preferred": [
                "Japan"
            ],
            "name:ilo_x_preferred": [
                "Hapon"
            ],
            "name:ina_x_preferred": [
                "Japon"
            ],
            "name:ind_x_preferred": [
                "Jepang"
            ],
            "name:isl_x_preferred": [
                "Japan"
            ],
            "name:ita_x_preferred": [
                "Giappone"
            ],
            "name:jam_x_preferred": [
                "Japan"
            ],
            "name:jav_x_preferred": [
                "Jepang"
            ],
            "name:jbo_x_preferred": [
                "pongu'e"
            ],
            "name:jbo_x_variant": [
                "pongue"
            ],
            "name:jpn_x_preferred": [
                "\u65e5\u672c"
            ],
            "name:jpn_x_variant": [
                "\u306b\u3063\u307d\u3093",
                "\u306b\u3063\u307d\u3093\u3053\u304f",
                "\u306b\u307b\u3093",
                "\u306b\u307b\u3093\u3053\u304f",
                "\u30cb\u30c3\u30dd\u30f3",
                "\u30cb\u30c3\u30dd\u30f3\u30b3\u30af",
                "\u30cb\u30db\u30f3",
                "\u30cb\u30db\u30f3\u30b3\u30af",
                "\u65e5\u672c\u56fd"
            ],
            "name:kaa_x_preferred": [
                "Yaponiya"
            ],
            "name:kab_x_preferred": [
                "Japun"
            ],
            "name:kal_x_preferred": [
                "Japani"
            ],
            "name:kan_x_preferred": [
                "\u0c9c\u0caa\u0cbe\u0ca8\u0ccd"
            ],
            "name:kat_x_preferred": [
                "\u10d8\u10d0\u10de\u10dd\u10dc\u10d8\u10d0"
            ],
            "name:kaz_x_preferred": [
                "\u0416\u0430\u043f\u043e\u043d\u0438\u044f"
            ],
            "name:kbd_x_preferred": [
                "\u042f\u043f\u043e\u043d"
            ],
            "name:khm_x_preferred": [
                "\u1787\u1794\u17c9\u17bb\u1793"
            ],
            "name:kik_x_preferred": [
                "Japan"
            ],
            "name:kik_x_variant": [
                "Njabani"
            ],
            "name:kin_x_preferred": [
                "Ubuyapani"
            ],
            "name:kir_x_preferred": [
                "\u0416\u0430\u043f\u043e\u043d\u0438\u044f"
            ],
            "name:koi_x_preferred": [
                "\u041d\u0438\u043f\u043f\u043e\u043d"
            ],
            "name:kom_x_preferred": [
                "\u042f\u043f\u043e\u043d\u0438\u044f"
            ],
            "name:kon_x_preferred": [
                "Japan"
            ],
            "name:kor_x_preferred": [
                "\uc77c\ubcf8"
            ],
            "name:krc_x_preferred": [
                "\u042f\u043f\u043e\u043d\u0438\u044f"
            ],
            "name:kua_x_preferred": [
                "Japan"
            ],
            "name:kur_x_preferred": [
                "Japon"
            ],
            "name:kur_x_variant": [
                "Japonya",
                "\u0698\u0627\u067e\u06c6\u0646"
            ],
            "name:lao_x_preferred": [
                "\u0e9b\u0eb0\u0ec0\u0e97\u0e94\u0e8d\u0eb5\u0ec8\u0e9b\u0eb8\u0ec8\u0e99"
            ],
            "name:lao_x_variant": [
                "\u0e8d\u0eb5\u0ec8\u0e9b\u0ec8\u0eb8\u0e99"
            ],
            "name:lat_x_preferred": [
                "Iaponia"
            ],
            "name:lav_x_preferred": [
                "Jap\u0101na"
            ],
            "name:lbe_x_preferred": [
                "Japan"
            ],
            "name:lez_x_preferred": [
                "\u042f\u043f\u043e\u043d\u0438\u044f"
            ],
            "name:lij_x_preferred": [
                "Giappon"
            ],
            "name:lim_x_preferred": [
                "Japan"
            ],
            "name:lin_x_preferred": [
                "Zap\u0254\u0301"
            ],
            "name:lin_x_variant": [
                "Zap\u0254"
            ],
            "name:lit_x_preferred": [
                "Japonija"
            ],
            "name:lmo_x_preferred": [
                "Giapun"
            ],
            "name:lrc_x_preferred": [
                "\u062c\u0627\u067e\u0648\u0646"
            ],
            "name:ltg_x_preferred": [
                "Japoneja"
            ],
            "name:ltz_x_preferred": [
                "Japan"
            ],
            "name:lub_x_preferred": [
                "Japu"
            ],
            "name:lug_x_preferred": [
                "Japani"
            ],
            "name:lzh_x_preferred": [
                "\u65e5\u672c"
            ],
            "name:mah_x_preferred": [
                "Japan"
            ],
            "name:mal_x_preferred": [
                "\u0d1c\u0d2a\u0d4d\u0d2a\u0d3e\u0d7b"
            ],
            "name:mar_x_preferred": [
                "\u091c\u092a\u093e\u0928"
            ],
            "name:mdf_x_preferred": [
                "\u042f\u043f\u043e\u043d\u043c\u0430\u0441\u0442\u043e\u0440"
            ],
            "name:mhr_x_preferred": [
                "\u042f\u043f\u043e\u043d\u0438\u0439"
            ],
            "name:min_x_preferred": [
                "Japang"
            ],
            "name:mkd_x_preferred": [
                "\u0408\u0430\u043f\u043e\u043d\u0438\u0458\u0430"
            ],
            "name:mlg_x_preferred": [
                "Japana"
            ],
            "name:mlt_x_preferred": [
                "\u0120appun"
            ],
            "name:mon_x_preferred": [
                "\u042f\u043f\u043e\u043d"
            ],
            "name:mri_x_preferred": [
                "Nipono"
            ],
            "name:mrj_x_preferred": [
                "\u042f\u043f\u043e\u043d\u0438"
            ],
            "name:msa_x_preferred": [
                "Jepun"
            ],
            "name:mus_x_preferred": [
                "Japan"
            ],
            "name:mwl_x_preferred": [
                "Japon"
            ],
            "name:mya_x_preferred": [
                "\u1002\u103b\u1015\u1014\u103a\u1014\u102d\u102f\u1004\u103a\u1004\u1036"
            ],
            "name:mya_x_variant": [
                "\u1002\u103b\u1015\u1014\u103a"
            ],
            "name:myv_x_preferred": [
                "\u042f\u043f\u043e\u043d\u0438\u044f \u041c\u0430\u0441\u0442\u043e\u0440"
            ],
            "name:mzn_x_preferred": [
                "\u062c\u0627\u067e\u0648\u0646"
            ],
            "name:nah_x_preferred": [
                "Xapon"
            ],
            "name:nan_x_preferred": [
                "Ji\u030dt-p\u00fan"
            ],
            "name:nap_x_preferred": [
                "Giappone"
            ],
            "name:nau_x_preferred": [
                "Djapan"
            ],
            "name:nav_x_preferred": [
                "Bin\u00e1\u00e1\u02bc\u00e1daa\u0142ts\u02bc\u00f3z\u00ed Dine\u02bc\u00e9 Bik\u00e9yah"
            ],
            "name:nav_x_variant": [
                "Bina\u02bcadaa\u0142tz\u00f3z\u00ed Din\u00e9\u02bci\u02bc Bik\u00e9yah"
            ],
            "name:nde_x_preferred": [
                "Japan"
            ],
            "name:ndo_x_preferred": [
                "Japan"
            ],
            "name:nds_nld_x_preferred": [
                "Japan"
            ],
            "name:nds_x_preferred": [
                "Japan"
            ],
            "name:nep_x_preferred": [
                "\u091c\u093e\u092a\u093e\u0928"
            ],
            "name:new_x_preferred": [
                "\u091c\u093e\u092a\u093e\u0928"
            ],
            "name:nld_x_preferred": [
                "Japan"
            ],
            "name:nno_x_preferred": [
                "Japan"
            ],
            "name:nob_x_preferred": [
                "Japan"
            ],
            "name:nor_x_preferred": [
                "Japan"
            ],
            "name:nov_x_preferred": [
                "Japan"
            ],
            "name:nrm_x_preferred": [
                "Japon"
            ],
            "name:nso_x_preferred": [
                "Japane"
            ],
            "name:oci_x_preferred": [
                "Japon"
            ],
            "name:olo_x_preferred": [
                "Japounii"
            ],
            "name:ori_x_preferred": [
                "\u0b1c\u0b3e\u0b2a\u0b3e\u0b28"
            ],
            "name:ori_x_variant": [
                "\u0b1c\u0b3e\u0b2a\u0b3e\u0b28\u0b4d"
            ],
            "name:orm_x_preferred": [
                "Jaappaan"
            ],
            "name:orm_x_variant": [
                "Japan"
            ],
            "name:oss_x_preferred": [
                "\u042f\u043f\u043e\u043d"
            ],
            "name:pam_x_preferred": [
                "Hapon"
            ],
            "name:pan_x_preferred": [
                "\u0a1c\u0a2a\u0a3e\u0a28"
            ],
            "name:pap_x_preferred": [
                "Hapon"
            ],
            "name:pcd_x_preferred": [
                "Japon"
            ],
            "name:pdc_x_preferred": [
                "Japan"
            ],
            "name:pih_x_preferred": [
                "Japan"
            ],
            "name:pli_x_preferred": [
                "\u091c\u093e\u092a\u093e\u0928"
            ],
            "name:pms_x_preferred": [
                "Giapon"
            ],
            "name:pnb_x_preferred": [
                "\u062c\u067e\u0627\u0646"
            ],
            "name:pol_x_preferred": [
                "Japonia"
            ],
            "name:por_x_preferred": [
                "Jap\u00e3o"
            ],
            "name:por_x_variant": [
                "Jap\u00e3o"
            ],
            "name:pus_x_preferred": [
                "\u062c\u0627\u067e\u0627\u0646"
            ],
            "name:que_x_preferred": [
                "Nihun"
            ],
            "name:roh_x_preferred": [
                "Giapun"
            ],
            "name:ron_x_preferred": [
                "Japonia"
            ],
            "name:ron_x_variant": [
                "\u0416\u0430\u043f\u043e\u043d\u0438\u044f"
            ],
            "name:rue_x_preferred": [
                "\u042f\u043f\u043e\u043d\u0456\u044f"
            ],
            "name:rum_x_preferred": [
                "Japonia"
            ],
            "name:run_x_preferred": [
                "Ubuyapani"
            ],
            "name:rus_x_preferred": [
                "\u042f\u043f\u043e\u043d\u0438\u044f"
            ],
            "name:sag_x_preferred": [
                "Zap\u00f6on"
            ],
            "name:sah_x_preferred": [
                "\u0414\u044c\u043e\u043f\u043f\u0443\u043e\u043d"
            ],
            "name:san_x_preferred": [
                "\u091c\u092a\u093e\u0928\u094d"
            ],
            "name:scn_x_preferred": [
                "Giappuni"
            ],
            "name:sco_x_preferred": [
                "Japan"
            ],
            "name:sgs_x_preferred": [
                "Japuon\u0117j\u0117"
            ],
            "name:sin_x_preferred": [
                "\u0da2\u0db4\u0dcf\u0db1\u0dba"
            ],
            "name:slk_x_preferred": [
                "Japonsko"
            ],
            "name:slv_x_preferred": [
                "Japonska"
            ],
            "name:sme_x_preferred": [
                "J\u00e1hpan"
            ],
            "name:sme_x_variant": [
                "Jap\u00e1na"
            ],
            "name:smo_x_preferred": [
                "Iapani"
            ],
            "name:sna_x_preferred": [
                "Japan"
            ],
            "name:snd_x_preferred": [
                "\u062c\u0627\u067e\u0627\u0646"
            ],
            "name:som_x_preferred": [
                "Jabaan"
            ],
            "name:som_x_variant": [
                "Jabbaan"
            ],
            "name:sot_x_preferred": [
                "Japane"
            ],
            "name:spa_x_preferred": [
                "Jap\u00f3n"
            ],
            "name:sqi_x_preferred": [
                "Japonia"
            ],
            "name:sqi_x_variant": [
                "Japoni"
            ],
            "name:srd_x_preferred": [
                "Giappone"
            ],
            "name:srn_x_preferred": [
                "Japan"
            ],
            "name:srp_x_preferred": [
                "\u0408\u0430\u043f\u0430\u043d"
            ],
            "name:ssw_x_preferred": [
                "IJaphani"
            ],
            "name:stq_x_preferred": [
                "Japan"
            ],
            "name:sun_x_preferred": [
                "Jepang"
            ],
            "name:swa_x_preferred": [
                "Japani"
            ],
            "name:swa_x_variant": [
                "Ujapani"
            ],
            "name:swe_x_preferred": [
                "Japan"
            ],
            "name:szl_x_preferred": [
                "Jap\u016f\u0144ijo"
            ],
            "name:tah_x_preferred": [
                "T\u0101p\u014dn\u0113"
            ],
            "name:tam_x_preferred": [
                "\u0b9c\u0baa\u0bcd\u0baa\u0bbe\u0ba9\u0bcd"
            ],
            "name:tat_x_preferred": [
                "\u042f\u043f\u043e\u043d\u0438\u044f"
            ],
            "name:tel_x_preferred": [
                "\u0c1c\u0c2a\u0c3e\u0c28\u0c4d"
            ],
            "name:tet_x_preferred": [
                "Japaun"
            ],
            "name:tgk_x_preferred": [
                "\u0416\u043e\u043f\u0443\u043d"
            ],
            "name:tgl_x_preferred": [
                "Hapon"
            ],
            "name:tha_x_preferred": [
                "\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e0d\u0e35\u0e48\u0e1b\u0e38\u0e48\u0e19"
            ],
            "name:tha_x_variant": [
                "\u0e0d\u0e35\u0e48\u0e1b\u0e38\u0e48\u0e19"
            ],
            "name:tir_x_preferred": [
                "\u1303\u1353\u1295"
            ],
            "name:tir_x_variant": [
                "Japan"
            ],
            "name:ton_x_preferred": [
                "Siapani"
            ],
            "name:tpi_x_preferred": [
                "Siapan"
            ],
            "name:tso_x_preferred": [
                "Japan"
            ],
            "name:tuk_x_preferred": [
                "\u00ddaponi\u00fda"
            ],
            "name:tum_x_preferred": [
                "Japan"
            ],
            "name:tur_x_preferred": [
                "Japonya"
            ],
            "name:twi_x_preferred": [
                "Yapan"
            ],
            "name:udm_x_preferred": [
                "\u042f\u043f\u043e\u043d\u0438\u044f"
            ],
            "name:uig_x_preferred": [
                "\u064a\u0627\u067e\u0648\u0646\u0649\u064a\u06d5"
            ],
            "name:ukr_x_preferred": [
                "\u042f\u043f\u043e\u043d\u0456\u044f"
            ],
            "name:und_x_preferred": [
                "Japonska"
            ],
            "name:unk_x_variant": [
                "Nihon"
            ],
            "name:urd_x_preferred": [
                "\u062c\u0627\u067e\u0627\u0646"
            ],
            "name:urd_x_variant": [
                "\u0646\u06cc\u06c1\u0648\u0646"
            ],
            "name:uzb_x_preferred": [
                "Yaponiya"
            ],
            "name:uzb_x_variant": [
                "\u042f\u043f\u043e\u043d\u0438\u044f"
            ],
            "name:vec_x_preferred": [
                "Giap\u00f2n"
            ],
            "name:ven_x_preferred": [
                "Japan"
            ],
            "name:vep_x_preferred": [
                "Japonii"
            ],
            "name:vie_x_preferred": [
                "Nh\u1eadt B\u1ea3n"
            ],
            "name:vls_x_preferred": [
                "Japan"
            ],
            "name:vol_x_preferred": [
                "Yap\u00e4n"
            ],
            "name:war_x_preferred": [
                "Hapon"
            ],
            "name:wol_x_preferred": [
                "Sapo\u014b"
            ],
            "name:wuu_x_preferred": [
                "\u65e5\u672c"
            ],
            "name:xal_x_preferred": [
                "\u041d\u0438x\u0443\u0443\u0434\u0438\u043d \u041d\u0443\u0442\u0433"
            ],
            "name:xho_x_preferred": [
                "IJapani"
            ],
            "name:xmf_x_preferred": [
                "\u10d8\u10d0\u10de\u10dd\u10dc\u10d8\u10d0"
            ],
            "name:yid_x_preferred": [
                "\u05d9\u05d0\u05e4\u05d0\u05df"
            ],
            "name:yid_x_variant": [
                "\u05d9\u05d0\u05b7\u05e4\u05bc\u05d0\u05b7\u05df"
            ],
            "name:yor_x_preferred": [
                "Japan"
            ],
            "name:yor_x_variant": [
                "Or\u00edl\u1eb9\u0301\u00e8de Japani"
            ],
            "name:yue_x_preferred": [
                "\u65e5\u672c"
            ],
            "name:zea_x_preferred": [
                "Japan"
            ],
            "name:zha_x_preferred": [
                "Nditbonj"
            ],
            "name:zho_min_nan_x_preferred": [
                "Ji\u030dt-p\u00fan"
            ],
            "name:zho_x_preferred": [
                "\u65e5\u672c"
            ],
            "name:zho_x_variant": [
                "\u65e5\u672c",
                "\u65e5\u672c\u570b"
            ],
            "name:zho_yue_x_preferred": [
                "\u65e5\u672c"
            ],
            "name:zul_x_preferred": [
                "IJapani"
            ],
            "name:zul_x_variant": [
                "i-Japan"
            ],
            "wof:country": "JP",
            "wof:id": 85632429,
            "wof:lastmodified":<PHONE_NUMBER>,
            "wof:name": "Japan",
            "wof:parent_id": 102191569,
            "wof:path": "856/324/29/85632429.geojson",
            "wof:placetype": "country",
            "wof:repo": "whosonfirst-data",
            "wof:superseded_by": [],
            "wof:supersedes": []
        }
    ]
}

Sometimes the pip-server shows the following error.
2017/12/21 11:05:34 ERROR sql: no rows in result set

Interesting. That suggests there might be some contention reading from the sqlite databases. I will investigate.
sqlite> SELECT * FROM names WHERE id=85672801 AND language="jpn";
85672801|region|JP|jpn||||||x_preferred|茨城県|1505432325
85672801|region|JP|jpn||||||x_variant|いばらき|1505432325
85672801|region|JP|jpn||||||x_variant|いばらきけん|1505432325
85672801|region|JP|jpn||||||x_variant|いばらき・けん|1505432325
85672801|region|JP|jpn||||||x_variant|茨城|1505432325
85672801|region|JP|jpn||||||x_variant|イバラキ|1505432325
85672801|region|JP|jpn||||||x_variant|イバラキケン|1505432325

Notes to self:
sqlite3 whosonfirst-data-latest.db
SQLite version 3.16.0 2016-11-04 19:09:39
Enter ".help" for usage hints.
sqlite> SELECT json_extract(body, '$.properties."name:jpn_x_preferred"') FROM geojson WHERE id=85672801;
["\u8328\u57ce\u770c"]

To err is human, to test is professional.
You need to write unit tests.

 If you'd like to contribute unit tests they'd be welcome!

I wrote a very simple test and sent a PR. Since I'm not familiar with this pip-server, I couldn't write initialization code for the server and I couldn't compile it. There must be many syntax errors.


tf.keras.layers.Dropout has no 'is_training' argument

Dropout layer is (usually) only used while training. Keras automatically enable dropout layers while training and disable them while predicting.
Thus, tf.keras.layers.Dropout has no 'is_training' argument (but it exists in tf.layers.dropout). That can mislead Keras and tf users when trying to mix Keras with TF layers. Indeed, predicting new data with dropout layers doesn't produce any error but reduces the accuracy ! Maybe a warning note in 'tf.keras.layers.Dropout' documentation can be useful.
With tf.layers
dropout = tf.layers.dropout(inputs=dense, rate=0.2, training=is_training, name="dropout-1")

With tf.Keras.layers
dense = ...
if(is_training):
      dropout = tf.keras.layers.Dropout(0.2, noise_shape=None, seed=None)(dense)
  else :
      dropout = dense

Hi @jcRisch,
I also struggled with this a bit before and I found out that tf.keras.layers.Dropout supports a training argument in its call function. Therefore, you could write:
dropout = tf.keras.layers.Dropout(0.2, noise_shape=None, seed=None)(dense, training=is_training)

That also applies to tf.keras.layers.BatchNormalization (and possibly other layers).
I hope that helps.

The problems seems that the related doc is missing here tf.keras and upstream check https://github.com/keras-team/keras/issues/9412#issuecomment-366487734 /cc @fchollet

Nagging Assignee @jart: It has been 17 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @jart: It has been 33 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @jart: It has been 48 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @jart: It has been 63 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @jart: It has been 78 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @jart: It has been 99 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @jart: It has been 114 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

So we'd better to update Dropout's document, right? This seems like a good beginner issue.

Please remove the assignee, as this issue is inviting external contributions. Otherwise, remove the contributions welcome label. Thank you.

Hi, I would like to contribute to this issue. May I work on it?

This still seems relevant because, as far as I know, the training argument does not exist in the Sequential API.

@carsonDB Hi, could you elaborate more, I am a beginner, and I am trying to create a custom layer by subclassing the tf.keras.layers.Layers class
Could you give an example of using tf.keras.backend.in_train_phase in the call() function of the custom layers class. I currently treat It as a python boolean and this is what I have written, please suggest the necessary changes to make.
def call(self, inputs, training=None):
 if training:          output = tf.keras.layers.Dropout(self.dropout_rate)(inputs, training=training)

@Ashwin-Ramesh2607 Hi, if you use standard Dropout layer, no need to judge if training, it handles already. If write custom dropout like I mentioned, your code can like this:
from tensorflow.python.keras import backend as K

def call(self, inputs, training=None):
    if training is None: # actually I test it in my tensorflow-1.15, `training` is always `None`.
          training = K.learning_phase()

    def dropped_inputs():
      return tf.nn.dropout(
          inputs,
          rate=self.dropout_rate)

    output = K.in_train_phase(dropped_inputs, inputs, training=training)

Since I don't test it, you'd better test it before using it.


Remove Password Validation

How to remove password validations using devise auth token?

Try to disable :validatable module or change password length.
  devise :rememberable, #:validatable

@xishoon Hello. Please close the issue if you solved it.


Adding unit test for navigation actions.

Adding unit test for navigation actions and fixing typo on query_test.go.

Coverage increased (+5.2%) to 64.664% when pulling 1988de618df45436e8323b3dc498ed1e876cf7d6 on ranch:test/navigation into 4c16faa34dc7243f402331c4c39945c12ec61a4f on knq:master.


Update kubectl gs get releases

Change of review date only - no content changes

I'm thinking that by now a note regarding vintage only would make sense here.

Damn - that comment came in seconds before automerge - It would be correct. I'll do a new PR for that.


increase default value for stopAt parameter

Because
The current default for stopAt is 10,000,000 ms.  This is less than 3 hours.  Although it would be unusual, it is possible that an AAPB video could be longer than that.
I'd recommend a default value of 86,400,000 ms, which is 24 hours.
Done when
No response
Additional context
No response

After reading this issue, I was tempted to use the maximum integer value. Then, I found this comment in the code;
https://github.com/clamsproject/app-swt-detection/blob/710f527e0d88074815374cf81de320a1f751cfc6/metadata.py#L42-L43
@marcverhagen is this about python 2 v. 3 compatibility issue of sys.maxint?

@keigh Not sure why I thought 10M is better than maxsize (old habit of mine to use maxint, not about compatibility issues). Maybe I did not want a default that would allow processing to continue for years, but why not?
I have changed this to use sys.maxsize and this will be in version 5.0.

From the v5.0 app directory page:

stopAt: optional, defaults to<PHONE_NUMBER>854775807

Yeah, I think that should be just about high enough.  LOL
(Also, thank you!)


Refactor code quality issues

🗣 Description
Hey :wave:, I'm a Developer Outreach at DeepSource and ran DeepSource analysis on my fork of the repo. It found some interesting code quality improvements to consider.
This PR fixes a few of the issues detected for you to assess if it is right for you.
Happy to provide the tweaks separately otherwise :)
Summary of changes

Fix dangerous default arguments.
Remove unnecessary lambda expressions.
Refactor unnecessary else / elif when if block has a return statement.
Remove unnecessary typecast.
Add .deepsource.toml file for continuous analysis on bug risks/performance/code-quality issues on new changes.

💭 Motivation and context
There are certain Anti-Patterns, bug risks and performance issues detected in some files (linked above), that can improve the general code quality here.
✅ Checklist

[x] This PR has an informative and human-readable title.
[x] Changes are limited to a single goal - eschew scope creep!
[ ] All future TODOs are captured in issues, which are referenced
in code comments.
[ ] All relevant type-of-change labels have been added.
[x] I have read the CONTRIBUTING document.
[x] These code changes follow cisagov code standards.
[ ] All relevant repo and/or project documentation has been updated
to reflect the changes in this PR.
[ ] Tests have been added and/or modified to cover the changes in this PR.
[x] All new and existing tests pass.

@DeemOnSecurity DeepSource cannot be run as a GitHub action, however, it can run as a GitHub check (checks that run on a PR). The configuration file for a GitHub check has to be present in the root of the repository. Several other CI tools like TravisCI, codecov etc. have their configs in the root itself.
Can you let me know your inclination towards having only GitHub actions?

@DeemOnSecurity DeepSource cannot be run as a GitHub action, however, it can run as a GitHub check (checks that run on a PR). The configuration file for a GitHub check has to be present in the root of the repository. Several other CI tools like TravisCI, codecov etc. have their configs in the root itself.
Can you let me know your inclination towards having only GitHub actions?

After extensive conversations internally, we have decided not to merge DeepSource into this repository. Thank you for your submission!


Add safeArea to ConstraintViewDSL

Hi,
Wanted to implement what was discussed in #448. I made it default to the view if prior to iOS 11. This being because I figured if you want to target an iPhone X, you don't really want to wrap every call to safeArea.leading and safeArea.trailing in if #available(iOS 11, *) {.
It does cause some confusion for iOS 10 and below since you'll still have to use topLayoutGuide on the viewController. But I couldn't figure a way to do that in a good way. I'm still thinking of a way to add an extension that makes sense.

One thing I thought about when trying this out in my own project was that it would've been convenient with a equalToSuperviewSafeArea(). A bit like #456. But more for convenience. I feel this achieves basically the same as #456, but a very common use case is:
make.leading.trailing.equalToSuperview().inset(someInset)

or similar.
Compare this:
make.leading.trailing.equalToSuperviewSafeArea()

to this:
make.leading.equalTo(view.snp.safeArea.leading)
make.trailing.equalTo(view.snp.safeArea.trailing)

I was playing a bit more with the safeAreas for UIViewController and came up with this:
extension UIViewController {
    var safeAreaTop: ConstraintItem {
        guard #available(iOS 11, *) else {
            return self.topLayoutGuide.snp.bottom
        }
        return self.view.snp.safeArea.top
    }

    var safeAreaBottom: ConstraintItem {
        guard #available(iOS 11, *) else {
            return self.bottomLayoutGuide.snp.top
        }
        return self.view.snp.safeArea.bottom
    }
}

The following code bothered me enough to make me revisit my implementation:
make.leading.equalTo(view.snp.safeArea.leading)
make.trailing.equalTo(view.snp.safeArea.trailing)

With the latest commit this is possible to do as:
make.leading.trailing.equalTo(view.snp.safeArea)

I'm still not quite sure whether the implementation is the right way to do it, but at least now it's there and can be discussed.

@bjarkehs I think we may have complicated this a lot here in v4.0.0 you have to use this:
make.leading.trailing.equalTo(view.safeAreaLayoutGuide)

Given that the entire SnapKit engine already has robust support for Layout Guide's I don't think we need a whole new DSL chain, all we need to do is add a shortcut on ConstraintViewDSL that provides quick access to a ConstraintLayoutGuideDSL targeting the safeAreaLayoutGuide
I could be wrong but at quick glance we should only have to add this to ConstraintViewDSL to implement the much shortcut API:
    @available(iOS 11.0, *)
    public var safeArea: ConstraintLayoutGuideDSL {
        return ConstraintLayoutGuideDSL(guide: self.view.safeAreaLayoutGuide)
    }

The reason that I don’t find that solution particularly interesting is that then I have to wrap everything in if #available(iOS 11.0, *) like I wrote in my initial post. Meaning adoption will be much more painful. Storyboards and nib files get a new option to simply toggle safe area usage, and I wanted something similar for the programmatic approach.

If you do this in storyboards are the constraints then no-op on iOS 10 or do they fallback to something?

I'm not entirely sure, since I haven't used storyboards in quite a while. But according to this: https://useyourloaf.com/blog/safe-area-layout-guide/ you can simply activate safe area layouts in interface builder and it'll make it backwards compatible. We can't quite do this from code.

@bjarkehs Hmm I see what you're saying here, a lot of users will just want to use "Safe Area" in either situation.
I need to dive into it more.

@bjarkehs I still feel like it's smart to force users to use availability checks. If you read the documentation about the safe area layout guide:

When the view is visible onscreen, this guide reflects the portion of the view that is not covered by navigation bars, tab bars, toolbars, and other ancestor views. (In tvOS, the safe area reflects the area not covered the screen's bezel.) If the view is not currently installed in a view hierarchy, or is not yet visible onscreen, the layout guide edges are equal to the edges of the view.

For the view controller's root view, the layout guide accommodates the status bar, other visible bars, and any additional insets that you specified using the additionalSafeAreaInsets property of your view controller. For other views in the view hierarchy, the layout guide reflects only the portion of the view that is covered by other content. For example, if a view is entirely within the safe area of its superview, the layout guide edges are equal to the edges of the view.
It's actually pretty invalid to assume it's the view bounds on iOS 10 and lower. Because of this I don't want to implement it as a fallback to view because it would be ambiguous and confusing.

I understand your concern. I'll probably end up using the extension described earlier:
@available(iOS, introduced: 8.0, deprecated: 11.0, message: "Please use view.snp.safeArea instead")
extension UIViewController {
    var safeAreaTop: ConstraintItem {
        guard #available(iOS 11, *) else {
            return self.topLayoutGuide.snp.bottom
        }
        return self.view.snp.safeArea.top
    }

    var safeAreaBottom: ConstraintItem {
        guard #available(iOS 11, *) else {
            return self.bottomLayoutGuide.snp.top
        }
        return self.view.snp.safeArea.bottom
    }
}

Maybe adding a safeAreaLeading and safeAreaTrailing. This would be using the simple DSL you provide, but give me some convenience on projects that target lower than iOS 11.

I understand your concern. I'll probably end up using the extension described earlier:
@available(iOS, introduced: 8.0, deprecated: 11.0, message: "Please use view.snp.safeArea instead")
extension UIViewController {
    var safeAreaTop: ConstraintItem {
        guard #available(iOS 11, *) else {
            return self.topLayoutGuide.snp.bottom
        }
        return self.view.snp.safeArea.top
    }

    var safeAreaBottom: ConstraintItem {
        guard #available(iOS 11, *) else {
            return self.bottomLayoutGuide.snp.top
        }
        return self.view.snp.safeArea.bottom
    }
}

Maybe adding a safeAreaLeading and safeAreaTrailing. This would be using the simple DSL you provide, but give me some convenience on projects that target lower than iOS 11.

@bjarkehs for now I'm going to leave this as up to the implementor to create convenience accessors for. I really do appreciate your inputs here but unfortunately I don't feel comfortable pushing an assumption that the safe area is always identical to the view's bounds as per Apples documentation.

That is perfectly fine. Does it make sense to add the safeArea property still? So you can write things like: view.edges.equalTo(superview.safeArea)?


Sdk 518 improve code example node

Codecov Report

Merging #95 (9d95924) into main (8a2f370) will not change coverage.
The diff coverage is n/a.

:exclamation: Current head 9d95924 differs from pull request most recent head 1139379. Consider uploading reports for the commit 1139379 to get more accurate results

@@           Coverage Diff           @@
##             main      #95   +/-   ##
=======================================
  Coverage   82.81%   82.81%
=======================================
  Files          18       18
  Lines         745      745
  Branches      147      147
=======================================
  Hits          617      617
  Misses        128      128


Operator 1.6.2

@brian-armory left this comment on the related ticket:
This Operator release adds support for the Bitbucket username/password feature that is in 2.28: #1126. Since 2.28 is an LTS, there is no Halyard release for support of the feature. Halyard support stopped with 2.26

The title of this Pull Request needs to be changed to match the format:
<type>(<scope>): <subject>

See more details here: https://www.spinnaker.io/community/contributing/submitting/#commit-message-conventions
Some common examples are:
feat(armory.io): add docs.armory.io
fix(parser): grammar and spelling
style(loadingPage): made it super pretty!
refactor(helpMessages): changed order to make more sense

The title of this Pull Request needs to be changed to match the format:
<type>(<scope>): <subject>

See more details here: https://www.spinnaker.io/community/contributing/submitting/#commit-message-conventions
Some common examples are:
feat(armory.io): add docs.armory.io
fix(parser): grammar and spelling
style(loadingPage): made it super pretty!
refactor(helpMessages): changed order to make more sense

We shouldn't merge this yet. We're still working out how to describe future functionality without explicitly committing to it cause you never know 🤷🏼♂


Remove 'onPostInstall' from ViewGlobeLocationTool to resolve navigation errors

'onPostInstall' doing the animation logic on ViewGlobeLocationTool was redundant.  We got away with it before the Tool parseAndRun async change by the convenient luck of the flow of the non-async code.  This removes 'onPostInstall' from ViewGlobeLocationTool.
Bug: https://bentleycs.visualstudio.com/iModelTechnologies/_workitems/edit/709861

Would be better to put onPostInstall back and remove _doLocationView from parseAndRun...shouldn't be changing stuff until after the tool successfully installs...

Would be better to put onPostInstall back and remove _doLocationView from parseAndRun...shouldn't be changing stuff until after the tool successfully installs...
This probably no longer works since it would have used the _doLocationView from onPostInstall?
if (2 === args.length) { // try to parse latitude and longitude
  const latitude = parseFloat(args[0]);
  const longitude = parseFloat(args[1]);
  if (!Number.isNaN(latitude) || !Number.isNaN(longitude)) {
    const center = Cartographic.fromRadians(Angle.degreesToRadians(longitude), Angle.degreesToRadians(latitude));
    this._globalLocation = { center };
  }
}

@bbastings Good catch - thanks.

Would be better to put onPostInstall back and remove _doLocationView from parseAndRun...shouldn't be changing stuff until after the tool successfully installs...
This probably no longer works since it would have used the _doLocationView from onPostInstall?
if (2 === args.length) { // try to parse latitude and longitude
  const latitude = parseFloat(args[0]);
  const longitude = parseFloat(args[1]);
  if (!Number.isNaN(latitude) || !Number.isNaN(longitude)) {
    const center = Cartographic.fromRadians(Angle.degreesToRadians(longitude), Angle.degreesToRadians(latitude));
    this._globalLocation = { center };
  }
}

@bbastings Good catch - thanks.

@bbastings @pmconne I changed this as recommended.


Support expectations on app logs

Allow to write tests over the app log
For example, expect that we have no errors or warnings in log

I would also like the ability to expect that a warning is shown

@DanielZlotin You mean RN warning? Open an issue with RN to have them add a testID to their warning and error views.

@LeoNatan no, actually expectations on device log emitted text.

Preferably, we need to provide assertions on NSLogs while running the e2e suite, because getting the logs manually and running unit tests on them requires a complete new test runner instance which must run after detox. If possible also in Release build (for CI).

Could we borrow parts of the functionality from the local cli of react-native. More precisely this part. By using child_process.spawnSync (detached) return value and adding a stdout and stderr event listener we could actually achieve this cheaply. We could get native as well as JS logs at the same time and for android we could borrow that in a similar way.
Thinking about it, extracting this in a separate module might embrace further contributions and the usage in other projects.

I am not convinced that asserting on logs is a valid approach for testing.

I agree, but relying only on UI will make some things extremely hard to
test. I'm talking weird edge cases.
Having the ability to get the logs out into the test runner is enough (into
the js).
On Jun 6, 2017 10:57 PM, "Leo Natan"<EMAIL_ADDRESS>wrote:

I am not convinced that asserting on logs is a valid approach for testing.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wix/detox/issues/23#issuecomment-306599377, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AGWgj3U3UGBdp8HxoTgXkjfpgpQ17w8Vks5sBa83gaJpZM4JhUIG
.

I strongly believe that this is a must, at least in black box testing frameworks. We probably can do something smarter and more robust in gray box, but I think it will be very hard to implement.
Until we come up with a better idea, I think we should support it.

Would need to take care that something are looking for in the logs isn't hidden in a buffer somewhere.

Thinking about this, on iOS this can, theoretically be achieved on the JS side alone, by running queries against the system log.

Closing old issues. This is out of scope.


Retain IP not working when upgrade a service

Rancher Version: v1.1.0
Steps to Reproduce: Upgrade a service checking Retain IP
I expect the service retain IP after upgrade, but not work.

Did you check the "Start before Stopping" checkbox?  If you don't, it will create two containers, one old one (still running) and the new one (which won't run until you finish upgrade).  You can't have two containers with the same IP.

@tfiduccia, no I do not check "Start before stopping" because this.

You have to check that checkbox or two containers will be created.  Can you check the box and see if that resolves your issue.

Version - master 7/14
Checked and saw that Retain IP field is not being passed in during upgrade.
For QA when returned from Dev:
This should work if

You have "Start before stopping" unchecked
"Retain IP" checked

Please verify container IP with both checkboxes in on/off states.

Check rolling back as well to ensure this works properly there as well.

@tfiduccia before this comes back to test please see the commit comment above which explains a change to the original requirements.