Moved "transparency" and "transparentpart" out from Fun commands and put in Moderators

There's a command called "invisible" in Moderators.

Those two are fun commands; they don't really serve any utilitative purpose other than for fun. Unlike, for instance, :invisible, which moderators can use to hide themselves from other players.
Therefore they shall remain classified as Fun.

Those two are fun commands; they don't really serve any utilitative purpose other than for fun. Unlike, for instance, :invisible, which moderators can use to hide themselves from other players.
Therefore they shall remain classified as Fun.

:transparency and :invisible though kinda the same thing, nearly.

Those two are fun commands; they don't really serve any utilitative purpose other than for fun. Unlike, for instance, :invisible, which moderators can use to hide themselves from other players.
Therefore they shall remain classified as Fun.

:transparency and :invisible though kinda the same thing, nearly.

True, but :invisible has a much more obvious use than :transparency.


Biomedical Concept Category Parent Child

See JIRA DDF-409
The biomedicalConceptCategory includes attributes for both bcCategoryParentIds and bcCategoryChildrenIds. This is superfluous. In case such a relation changes the system must be aware of updating it on both the parent as well as the child side. This can cause errors when not applied correctly.  I would advice to keep it simple and only keep the bcChildrenIds (in alignment with bcCategoryMemberIds) as we only need a one-way reference.

Makes sense. Thoughts?

The common pattern is to use one or the other.  This makes complete sense to me.  We'll do it.

@cupkes keep the child relationship and remove the parent?

Ok, keep the child...follow the linked list to the children until the list ends.  Here's the deal with not having a doubly linked list:  you can't grab a any single element in the list and also grab it's parent.  That's problematic the parent is some sort of categorization that you need to grab similar elements.
Does that make sense?

Notes on model update


Final Fantasy DB?

Hey Alsciende! I love all your DBs so far (and happen to play almost all of the games you have DBs for) and was wondering if you have heard of or played Final Fantasy TCG? They recently rebooted the game and I sorely miss an alsciende.db for the game. Would it be difficult to do? Thanks a lot!

I don't know if Alsciende have time to do it... I don't have a lot either, but if there is some place with a lot of  resources about FF TCG (rules, card images, etc.) I can try to build one, at least something minimal, and then someone continue with the work.
For reference, I adapted de 'alsciende.db' code for Star Wars  Destiny (swdestinydb.com), and also I18Nd thronesdb.

Nice! There are existing sites actually, like fftcgmognet.com and fftcgdb.com. The former is more up-to-date wrt images.

Hey fafranco82! Any updates on the situation?

hey @milchteee - just going through old tickets. a final fantasy deckbuilder is not on the horizon, sorry. that being said - the code for thronesdb is open source, anyone is free to fork it and build their own deckbuilder. it would require some coding skills to do so, but the option exists.


feat: add russian language

What problem does this PR solve?
Add Russian language
Is this PR adding a new feature?
Add Russian language
Is this PR related to any issue or discussion?
Closes #144
PR Checklist

[x] I have verified that the code works as described/as intended.
[ ] This change adds a social icon which has a permissive license to use it.
[x] This change does not include any external library/resources.
[x] This change does not include any unrelated scripts (e.g. bash and python scripts).
[x] I have enabled maintainer edits for this PR.

Thanks @kirill-zak for adding support for Russian language.
Can you include the appropriate configuration for the Russian language in exampleSite/config.toml as well?

@hugo-sid  I added an Russian version into example site and in exampleSite/config.toml


feat: add rest-api exercise

json with sqlite is hard. I have started this a while ago and have done a lot of different things in between. I have to confess, that I do not have a clean way to progress this exercise solution. The rest of the files is fine.
Does anyone want to write a solution and add their credit to the config.json file?

As it is not working yet, we can still change it to whatever we like it to be :)

Here's an example solution:
https://gist.github.com/Steffan153/89135660eadb6286b3e8f4b5f821d177
Also, the tests didn't account for different order of keys, so you might need something like this:
UPDATE tests
SET status = 'pass'
FROM (SELECT database, url, payload, result FROM 'rest-api') AS actual
WHERE (actual.database, actual.url, actual.payload) = (tests.database, tests.url, tests.payload)
AND (SELECT COUNT(*) FROM json_tree(actual.result) as a, json_tree(tests.expected) as b WHERE (a.fullkey, a.atom) IS (b.fullkey, b.atom)) =
    (SELECT COUNT(*) FROM json_tree(tests.expected))
AND (SELECT COUNT(*) FROM json_tree(tests.expected)) = (SELECT COUNT(*) FROM json_tree(actual.result));

@Steffan153
I think this fails as the version we aim for does not support the ->> syntax

The online test runner supports it, it's just the CI that's outdated. Maybe switch the action to Alpine? Ubuntu seems to be outdated

Welp, that's too bad. I've updated the gist to use json_extract.

Welp, that's too bad. I've updated the gist to use json_extract.

I can't see your new commit yet

I updated the gist: https://gist.github.com/Steffan153/89135660eadb6286b3e8f4b5f821d177
(I don't have write access for a commit)


Added parameter to set gas price for transaction to 0

Signed-off-by: azoumi<EMAIL_ADDRESS>Changelog
-Fixed not able to do a transactions as a member node by setting min gas price to 0 as this is an enterprise network.
Reviewed by
@lakshyakumar
Linked issue
#999

Have you checked deploying the quorum solidity smartcontract using the script on any non validating peer?

Yes I have tested it and it seems to deploying fine


Tidy up all html templates

All HTML templates in /views are copied across from old dpr-api so there are lots of obsolete code, e.g., unnecessary/incorrect imports, old js scripts etc. We want to have neat HTML templates so page loading speed is as quick as possible.
Acceptance criteria

[ ] There are no extra line of code that is somehow irrelevant/unnecessary

Tasks

[ ] tidy up templates one by one (priorities are base.html, home.html, showcase.html)

FIXED

@Mikanebu can you also tick the complete tasks/acceptance criteria


Define "type alias" for Content<SpoonNode, RoledValue>

Just to reduce the visual overload of seeing that thing written all over. It could be as simple as a wrapper class called SpoonContent wich is simply befined as public final class SpoonContent extends Content<SpoonNode, RoledValue> {}.

This turned out to be a bad idea


The RVWMO is version 2.0

The preface says the RVWMO is version 2.0 and has been ratified, but the text
of the standard still says it's version 0.1.
Signed-off-by: Palmer Dabbelt<EMAIL_ADDRESS>

Whoops, thanks.


Remove ML connectives from the predicate type

Turn Predicate into a newtype for Terms of sort Bool. This also removes all the predicate simplifications, since those rules introduce ML connectives. This should be a sound thing to do since the frontend turns all requires REQ clauses into REQ #Equals true. All we should do when internalising is to unwrap REQ #Equals true into X.
If we add a restriction to requires/ensures that they can only be expressions of sort Bool (https://github.com/runtimeverification/k/issues/3284), this should be sound. Equally, we dont want to use any rules such as
rule {K1 =/=Int K2 #Equals true} => #Not({K1 #Equals K2})

from domains.md: https://github.com/runtimeverification/k/blob/71a183b85a48da94e34541ca138757fbeb37ce8a/k-distribution/include/kframework/builtin/domains.md?plain=1#L966-L974
since they would now introduce ML connectives which are unnecessary in this instance. We want this rule to be applied instead
rule I1:Int =/=Int I2:Int => notBool (I1 ==Int I2)

other rules, such as
rule {true #Equals @B1 andBool @B2} => {true #Equals @B1} #And {true #Equals @B2}

are kind of meta-rules which we implicitly apply already:
https://github.com/runtimeverification/hs-backend-booster/blob/37717b4e33455e8e16e7ca51e946b9a7b4f3c1be/library/Booster/Pattern/Simplify.hs#L20-L25
There is still the question of ceil simplification rules but given that they are most likely unsound in their current state and the booster is very conservative around definedness, I don't think we need to worry about them right now... the question is whether/how we will have to deal with them in the future.

| Test                                      | sam-predicate-simplification time | master time        | (sam-predicate-simplification/master) time
|-------------------------------------------|-----------------------------------|--------------------|--------------------------------------------
| mcd/vat-addui-fail-rough-spec.k           | 171.39                            | 322.21             | 0.5319201762825486
| erc20/hkg/totalSupply-spec.k              | 79.81                             | 132.32             | 0.6031590084643289
| erc20/ds/approve-success-spec.k           | 82.98                             | 111.83             | 0.7420191361888582
| benchmarks/encode-keccak00-spec.k         | 78.36                             | 105.29             | 0.7442302212935701
| bihu/forwardToHotWallet-failure-3-spec.k  | 194.4                             | 248.34             | 0.7827977772408794
| erc20/hkg/transferFrom-failure-2-spec.k   | 159.17                            | 202.9              | 0.784475110892065
| mcd/dsvalue-read-pass-spec.k              | 89.98                             | 114.44             | 0.7862635442153094
| bihu/functional-spec.k                    | 128.96                            | 162.26             | 0.7947738197953902
| benchmarks/encodepacked-keccak01-spec.k   | 67.68                             | 84.8               | 0.79811320754717
| erc20/ds/transfer-failure-1-c-spec.k      | 83.7                              | 104.69             | 0.7995032954436909
| benchmarks/structarg00-spec.k             | 75.54                             | 93.07              | 0.8116471473084776
| benchmarks/requires01-a0gt0-spec.k        | 70.87                             | 86.49              | 0.8194010868308476
| benchmarks/dynamicarray00-spec.k          | 73.54                             | 89.68              | 0.8200267618198037
| mcd/flopper-cage-pass-spec.k              | 98.17                             | 119.48             | 0.8216437897556076
| mcd/vat-muluu-pass-spec.k                 | 209.42                            | 253.51             | 0.8260818113683878
| benchmarks/storagevar02-overflow-spec.k   | 71.81                             | 86.88              | 0.8265423572744015
| mcd/flipper-ttl-pass-spec.k               | 96.8                              | 117.11             | 0.8265733071471266
| erc20/ds/transfer-success-1-spec.k        | 174.53                            | 210.99             | 0.8271956016872837
| bihu/forwardToHotWallet-success-1-spec.k  | 98.06                             | 118.14             | 0.830032165227696
| benchmarks/staticarray00-spec.k           | 71.86                             | 86.36              | 0.832098193608152
| benchmarks/requires01-a0le0-spec.k        | 72.19                             | 86.59              | 0.8336990414597528
| erc20/ds/transfer-failure-2-b-spec.k      | 78.48                             | 94.02              | 0.8347160178685387
| erc20/hkg/transferFrom-success-1-spec.k   | 113.13                            | 135.25             | 0.8364510166358595
| benchmarks/overflow00-nooverflow-spec.k   | 258.33                            | 307.2              | 0.84091796875
| erc20/ds/transferFrom-success-1-spec.k    | 151.06                            | 179.14             | 0.8432510885341075
| erc20/ds/transfer-failure-1-a-spec.k      | 101.04                            | 119.73             | 0.8438987722375345
| erc20/ds/transferFrom-success-2-spec.k    | 121.58                            | 144.05             | 0.8440124956612287
| erc20/ds/balanceOf-spec.k                 | 75.48                             | 89.4               | 0.8442953020134228
| benchmarks/storagevar03-spec.k            | 59.83                             | 70.7               | 0.8462517680339462
| benchmarks/ecrecover00-sigvalid-spec.k    | 137.29                            | 162.11             | 0.8468940842637714
| erc20/ds/totalSupply-spec.k               | 249.75                            | 294.78             | 0.8472420109912477
| benchmarks/keccak00-spec.k                | 83.95                             | 99.02              | 0.8478085235306
| erc20/hkg/transfer-failure-2-spec.k       | 90.3                              | 106.26             | 0.849802371541502
| benchmarks/storagevar00-spec.k            | 257.18                            | 302.23             | 0.850941336068557
| erc20/hkg/transferFrom-success-2-spec.k   | 92.49                             | 108.57             | 0.8518927880630008
| erc20/ds/transfer-failure-2-a-spec.k      | 108.68                            | 127.45             | 0.8527265594350726
| benchmarks/storagevar01-spec.k            | 63.29                             | 74.21              | 0.8528500202129093
| benchmarks/overflow00-overflow-spec.k     | 57.98                             | 67.87              | 0.8542802416384263
| bihu/forwardToHotWallet-failure-2-spec.k  | 89.83                             | 105.13             | 0.8544658993626938
| benchmarks/address00-spec.k               | 72.25                             | 84.45              | 0.8555358200118413
| examples/storage-spec.md                  | 361.52                            | 420.44             | 0.8598610978974407
| benchmarks/ecrecover00-siginvalid-spec.k  | 115.67                            | 134.17             | 0.8621152269508833
| mcd/dai-symbol-pass-spec.k                | 262.9                             | 304.55             | 0.8632408471515349
| functional/evm-int-simplifications-spec.k | 250.7                             | 290.05             | 0.8643337355628339
| erc20/ds/transferFrom-failure-2-b-spec.k  | 141.24                            | 163.08             | 0.8660779985283297
| erc20/hkg/balanceOf-spec.k                | 248.78                            | 287.11             | 0.8664971613667235
| mcd/vat-subui-fail-rough-spec.k           | 370.08                            | 425.91             | 0.8689159681622877
| erc20/ds/transferFrom-failure-1-d-spec.k  | 107.42                            | 123.57             | 0.8693048474548839
| mcd/vat-move-diff-rough-spec.k            | 326.11                            | 374.34             | 0.8711599081049315
| erc20/ds/transferFrom-failure-1-c-spec.k  | 159.59                            | 182.65             | 0.8737476047084588
| examples/erc20-spec.md                    | 288.25                            | 329.84             | 0.8739085617268979
| erc20/ds/transfer-failure-1-b-spec.k      | 149.52                            | 169.94             | 0.879839943509474
| mcd/flipper-bids-pass-rough-spec.k        | 228.78                            | 258.48             | 0.8850974930362117
| mcd/vat-subui-pass-rough-spec.k           | 274.36                            | 306.09             | 0.8963376784605837
| erc20/ds/transferFrom-failure-2-c-spec.k  | 204.63                            | 227.81             | 0.8982485404503753
| mcd/vat-deny-diff-fail-rough-spec.k       | 160.82                            | 178.72             | 0.8998433303491494
| erc20/ds/approve-failure-spec.k           | 110.24                            | 121.54             | 0.9070264933355273
| mcd/vat-subui-pass-spec.k                 | 275.0                             | 297.63             | 0.9239659980512718
| mcd/dai-adduu-fail-rough-spec.k           | 112.96                            | 120.05             | 0.9409412744689712
| erc20/ds/transfer-success-2-spec.k        | 127.27                            | 134.27             | 0.9478662396663439
| erc20/ds/allowance-spec.k                 | 81.63                             | 86.01              | 0.9490756888733867
| benchmarks/bytes00-spec.k                 | 93.86                             | 98.68              | 0.9511552492906363
| benchmarks/storagevar02-nooverflow-spec.k | 77.87                             | 80.92              | 0.9623084527928819
| bihu/forwardToHotWallet-failure-1-spec.k  | 80.1                              | 77.13              | 1.0385064177362893
| mcd/functional-spec.k                     | 801.83                            | 772.09             | 1.0385188255255215
| erc20/ds/transferFrom-failure-2-a-spec.k  | 136.7                             | 130.83             | 1.0448673851563095
| examples/solidity-code-spec.md            | 332.93                            | 317.03             | 1.0501529823675995
| erc20/hkg/approve-spec.k                  | 82.2                              | 77.93              | 1.0547927627357885
| mcd/vat-slip-pass-rough-spec.k            | 376.69                            | 356.52             | 1.056574666217884
| erc20/hkg/transfer-success-1-spec.k       | 99.44                             | 93.44              | 1.0642123287671232
| mcd/vat-addui-pass-spec.k                 | 311.24                            | 292.29             | 1.0648328714632727
| mcd/dsvalue-read-pass-summarize-spec.k    | 95.93                             | 89.0               | 1.077865168539326
| erc20/ds/transferFrom-failure-1-b-spec.k  | 260.4                             | 237.53             | 1.0962825748326526
| mcd/flipper-addu48u48-fail-rough-spec.k   | 121.49                            | 108.19             | 1.1229318791015805
| erc20/hkg/allowance-spec.k                | 98.26                             | 85.65              | 1.147227086981903
| erc20/hkg/transfer-success-2-spec.k       | 105.81                            | 90.08              | 1.1746225577264655
| erc20/hkg/transferFrom-failure-1-spec.k   | 249.51                            | 194.7              | 1.2815100154083205
| mcd/vat-mului-pass-spec.k                 | 345.75                            | 268.7              | 1.2867510234462225
| mcd/dsvalue-peek-pass-rough-spec.k        | 168.88                            | 86.17              | 1.9598468144365788
| TOTAL                                     | 12707.5                           | 14002.080000000004 | 0.9075437363591693

| Test                                              | sam-predicate-simplification time | master time | (sam-predicate-simplification/master) time
|---------------------------------------------------|-----------------------------------|-------------|--------------------------------------------
| PlainPrankTest.test_stopPrank_notExistent()       | 60.58                             | 62.98       | 0.9618926643378851
| ExpectRevertTest.test_expectRevert_internalCall() | 69.56                             | 67.03       | 1.0377442935998806
| AccountParamsTest.testDealSymbolic(uint256)       | 78.25                             | 74.4        | 1.051747311827957
| TOTAL                                             | 208.39                            | 204.41      | 1.0194706716892519


How to run machine_translation examples??

How to run machine_translation examples??when i run by command:"python -m machine_translation  machine_translation/saved_state", i get this error:
import configurations - ImportError: No module named 'configurations'.
so how to run it with other commands or need some parameters???

@orhanf
On 5 November 2015 at 04:48, astrung<EMAIL_ADDRESS>wrote:

How to run machine_translation examples??when i run by command:"python -m
machine_translation machine_translation/saved_state", i get this error:
import configurations - ImportError: No module named 'configurations'.
so how to run it with other commands or need some parameters???
—
Reply to this email directly or view it on GitHub
https://github.com/mila-udem/blocks-examples/issues/55.

Please add a README file for this example

@astrung, i couldn't replicate the error that you got, is there a chance that you've changed the directory structure or renamed a file? But in order to pass some additional arguments you have two options:

add your additional argument(s) here, to be parsed by the argument parser.
or you can add them into the parameters dictionary in configurations.py, and use them inside the main function, they will be in the config dictionary.

I don`t have changed anythings.But can i forget some prepare_data or not??Can you give me how to run examples on your computer???(from begin-prepare data to end)??

I fixed module by add examples to PYTHONPATH-It seem main module can find configuration module.But i get an other error:FileNotFoundError: [Errno 2] No such file or directory: './data/vocab.cs-en.cs.pkl'>>Do i need prepare data??How to prepare data??

When i run : "python prepare_data.py">>Many errors which conflict between python 2 and python 3 appear(print , urlopen,....)>>do we have any versions for python 3??
I run block with python 3.4.3

@astrung prepare_data.py is a convenience script and actually we have not spent any effort making it python3 compatible, so this is my bad, i'll fix incompatibility issues soon, thank you for the pointers.
For an immediate solution, i may suggest downloading the corresponding files and doing the pre-processing manually, by following prepare_data.py code.

I have installed python-2.7>>no error with this version>Run by command :"python2.7 prepare_data.py" + "python2.7 -m machine_translation" > No errors.
Another question:how long(your test with your computer) to run completed this example??
And can we save the model which trained by this example to a single file(a module for using to translate)??Does blocks support it???

@astrung as far as i recall, it was taking 4-5 days (or approximately a week) for the model to converge by using all of the data available by wmt'15 on a titan black.
The model is automatically saved after every t iterations, and is controlled by the save_freq parameter.
Further, the BleuValidator calculates bleu score on a given validation set after every k iterations, controlled by bleu_val_freq and saves the best model so far. You can also track more than one model by changing track_n_models parameter.

So we will save model to "search_model_cs2en" file after running?(In configuration.py)??Can I bring this file to another computer and use it??With using gcc, i think we will have conflicts with dynamic libraries(64bit-32bit) or python version.

@astrung Yes the parameters & iteration states & log will be saved there. According to my experience, to use it on another computer you have to make sure the data files (src_data, trg_data, dictionaries) are in the same directory as the computer that were used to train the model, because those information is written in model files and cannot be modified easily.

It creates model successfully.so how to see samples from model??I don`t see any samples from running.

@astrung You can figure this out by reading the code, it's all there.
'hook_samples' number of samples will be thrown out every 'sampling_freq' updates.

Can we check model is completed or not??From my log,I think training process has been terminated.Model is saved,but i haven`t seen any lines as "TRAINING HAS BEEN FINISHED".Re-runing command,my model is re-trained.

@astrung what do you mean by "the model is completed or not" ? Do you mean config['finish_after'] many iterations are done and training has stopped ? Or is it terminated externally?
Either way, if you re-run your model, with config['reload']=True, the model will re-load the parameters, state and log from the last checkpoint and will continue training.

Last lines from log(command will output to a file):
Training status:
batch_interrupt_received: False
epoch_interrupt_received: False
epoch_started: True
epochs_done: 1
iterations_done: 2228
received_first_batch: True
resumed_from: None
training_started: True
Log records from the iteration 2228:
decoder_cost_cost: 8
Then the model is saved.
With common examples,we wil get some lines as
:TRAINING HAS BEEN FINISHED:
Training status:
epochs_done: 1
iterations_done: 235
So i think training can be stopped or terminated.

and what is config['finish_after'] set to?

BUt why don`t  train with all of training data?

Because this is just to show how to use NMT with search not to replicate an experimental result. prepare_data.py is just a convenience script but you can change it to download all the data and use it respectively.

When i try to run example with GPU,i get this error:
TypeError: ('Bad input argument to theano function with name "/home/admin/trungtv/python/lib/python2.7/site-packages/blocks/algorithms/init.py:253"  at index 0(0-based)', 'TensorType(float32, matrix) cannot store a value of dtype float64 without risking loss of precision. If you do not mind this loss, you can: 1) explicitly cast your data to float32, or 2) set "allow_input_downcast=True" when calling "function".'.
I have set floatX=float32 in .theanorc file.
It run normally with CPU.
How to fix it??

Can you try explicitly adding floatX=float32 into your THEANO_FLAGS and run

do we have any different between .theanorc file and THEANO_FLAGS?

Please check here

Run by THEANO_FLAGS still same error

First ,i train model with default parameter and CPU(model can be saved by float64bit) . Then i use with GPU and float32>>Can we have conflicts here??

@astrung thank you for pointing this out, we've never tried switching between devices (cpu/gpu) during training.
So i've made the necessary changes here, can you try it again with these changes.

How can we get BLEU score??BLEU class in sample.py,but in log or save files i don`t see any records for BLEU score(Only sample sentences-and sample sentences is so different with target sentences)

Will we get BLEU score after : iterations_done=5000??But model has been stopped after 2000 iterations_done

@astrung BLEU will be calculated after config['val_burn_in'] = 80000 iterations, at the frequency of config['bleu_val_freq'] = 5000. With this configuration, the first BLEU score will come out at 85000th iteration.

But why was my model stopped after 2000 iterations_done??

@astrung as @orhanf  mentioned previously, what is your  config['finish_after']?

I haven`t changed anything in code.

What is the size (number of lines) of your training data, source and target?
If it is stopping after ~2k updates, which is approximately 1 epoch, may be the data iterator is not able to send the right error to reset the iterator after the epoch. Can you try with the latest version of fuel please?
Also, it would be nice to see the last few outputs of the model (if the stderr and out are directed to different files, its better to see them both)

Now,i try to re-run,so i can not give last model output now ( It has been replaced ).But it takes so long.Do we have some differents for speed when use floatX=float32 or floatX=float64???(Last model with 2000 iterations takes 3 day)

@astrung if you're running it on cpu, you should expect those numbers. But if you run it on a gpu, 2000 updates should take at most ~2 hours.

Last lines from stderr file:
INFO:machine_translation.checkpoint: Number of parameters loaded for computation graph: 37
INFO:machine_translation.checkpoint: Loading iteration state...
INFO:machine_translation.checkpoint: Loading log...
INFO:blocks.algorithms:Initializing the training algorithm
INFO:blocks.algorithms:The training algorithm is initialized
INFO:machine_translation.checkpoint: Saving model
INFO:machine_translation.checkpoint: ...saving parameters
INFO:machine_translation.checkpoint: ...saving iteration state
INFO:machine_translation.checkpoint: ...saving log
INFO:machine_translation.checkpoint: Model saved, took 37.0450139046 seconds.
INFO:machine_translation.checkpoint: Saving model
INFO:machine_translation.checkpoint: ...saving parameters
INFO:machine_translation.checkpoint: ...saving iteration state
INFO:machine_translation.checkpoint: ...saving log
INFO:machine_translation.checkpoint: Model saved, took 34.8084151745 seconds.
INFO:machine_translation.checkpoint: Saving model
INFO:machine_translation.checkpoint: ...saving parameters
INFO:machine_translation.checkpoint: ...saving iteration state
INFO:machine_translation.checkpoint: ...saving log
INFO:machine_translation.checkpoint: Model saved, took 37.9112868309 seconds.
LAST LINE FROM STDOUT:
Training status:
batch_interrupt_received: False
epoch_interrupt_received: False
epoch_started: True
epochs_done: 1
iterations_done: 3609
received_first_batch: True
resumed_from: f1e281b4f0664784bbf92a5491c58d79
training_started: True
Log records from the iteration 3609:
decoder_cost_cost:<PHONE_NUMBER>43

I think the speed problem depends on floatX.Did you run model with float32 or float64??

So it has passed 2000 iterations and not stopped, that's good.
You can further use Timing(after_batch=True) extension to monitor some timings at each iteration.

But it has stopped after last iteration.I don`t know why,but when i try to open stdout when running or run another examples.it may send a terminated signal to this process.I run by command:nohup python2.7 -m machine_translation > foo2.out 2> foo2.err < /dev/null &.>>>Do we have some interrupt  handles???

Error allocating 40000000 bytes of device memory (out of memory). Driver report 25915392 bytes free and<PHONE_NUMBER> bytes total >> I fix with smaller batch size=40 >> Error allocating 80000000 bytes.
How to fix it??

Reduce batch size, number of hidden units and word embedding dimensions

Original exception:
MemoryError: Error allocating 143360000 bytes of device memory (out of memory).
Apply node that caused the error: GpuAlloc{memset_0=True}(CudaNdarrayConstant{0.0}, Elemwise{add,no_inplace}.0, Shape_i{0}.0, Shape_i{1}.0)
Toposort index: 180
Inputs types: [CudaNdarrayType(float32, scalar), TensorType(int64, scalar), TensorType(int64, scalar), TensorType(int64, scalar)]
Still conflicts between float32 and float64??Even i have deleted model??

so this is a gpu memory problem, you have to shrink your model size, or run it on a larger gpu

config['enc_nhids'] = 800
config['dec_nhids'] = 800

config['enc_embed'] = 520
config['dec_embed'] = 520

config['batch_size'] = 40

I have reduced,but it need more memory(40000000<143360000)

reduce it more :)

Half for all configs>Ok now and so fast:300 iterations in some minnutes:))

But will it reduce model's correct??

Your model may not have enough capacity, resulting lower performance.

With default configuration parameters,how much for BLEU score???(from your model)

Machine translation example implements this paper, please see the paper for numbers.

After 85000 iterations:
INFO:machine_translation.checkpoint: Model saved, took 9.74095320702 seconds.
INFO:machine_translation.sampling:Started Validation:
INFO:machine_translation.sampling:Total cost of the validation: 0.0
ERROR: could not find reference file ./data/newstest2013.en.tok at ./data/multi-bleu.perl line 32.
INFO:machine_translation.sampling:
INFO:machine_translation.sampling:Validation Took: 0.00110449790955 minutes
ERROR:blocks.main_loop:Error occured during training.
Blocks will attempt to run on_error extensions, potentially saving data, before exiting and reraising the error.Note that the usual after_training extensions will not be run. The original error will be re-raised and also stored in the training log. Press CTRL + C to halt Blocks immediately.
Traceback (most recent call last):
File "machine_translation/sampling.py", line 251, in _evaluate_model
assert out_parse is not None
AssertionError:
Original exception:
AssertionError

OTHER ERROR!!!
In data folder, i have newstest2013.en.tok and newstest2013.cs.tok.But perl can not find file???

folder:
-blocks-examples-master:
+data
-newstest2013.en.tok
-newstest2013.cs.tok
-multi-bleu.perl
+machine_translation
And i run from blocks-examples-master

Try giving full paths to all of your files in your config.

Add full path,still error:
ERROR: could not find reference file /home/admin/trungtv/blocks-examples-master/data/newstest2013.en.tok at /home/admin/trungtv/blocks-examples-master/data/multi-bleu.perl line 32
File "machine_translation/sampling.py", line 251, in _evaluate_model
assert out_parse is not None
AssertionError:
Original exception:
AssertionError

Total cost of the validation should not be 0.0 , probably there are no lines in you source file. Can you check newstest2013.en.tok and newstest2013.cs.tok files ?

That file is empty.When i use ls:
-rw-r--r--. 1 root root        0 Nov  6 18:52 newstest2013.cs.tok
-rw-r--r--. 1 root root        0 Nov  6 18:52 newstest2013.en.tok

Re-run prepare_data.py.Now files is not empty,but still error:

INFO:machine_translation.sampling:Started Validation:
ERROR:blocks.main_loop:Error occured during training.
File "machine_translation/sampling.py", line 174, in do
self._save_model(self._evaluate_model())
theano.compile.function_module.UnusedInputError: theano.function was asked to create a function computing outputs given certain inputs, but the provided input variable at index 3 is not part of the computational graph needed to compute the outputs: sequencegenerator_generate_outputs.
To make this error into a warning, you can pass the parameter on_unused_input='warn' to theano.function. To disable it completely, use on_unused_input='ignore'.
Original exception:
UnusedInputError: theano.function was asked to create a function computing outputs given certain inputs, but the provided input variable at index 3 is not part of the computational graph needed to compute the outputs: sequencegenerator_generate_outputs.
To make this error into a warning, you can pass the parameter on_unused_input='warn' to theano.function. To disable it completely, use on_unused_input='ignore'.
Use of uninitialized value $length_reference in numeric eq (==) at /home/admin/trungtv/blocks-examples-master/data/multi-bleu.perl line 136.

Add on_unused_input='warn' on your THEANO_FLAGS, as it is written in the error text.
@astrung please read the errors carefully and double check blocks-users group and other issues in this repo, for example this one is mentioned here before.

Is validation_out.txt translated from newstest2013.cs.tok and compared with newstest2013.en.tok??
But model output and target is very different,and with low BLEUSCORE ( BLEU= [8 ;10] )- do we need more word-embedding dimensions ??? ( In some papers, they report that standart embedding-dimensions is 640)

I guess this is a research question rather an issue about the code base.
@rizar i think we can close this issue, thanks


Homework Session 6 OOP - Todos 1, 2, 3

Solved TODOS #1. #2, #3 of the first OOP homework.
This pull request is meant to replace the unwanted closed pull request #35
I dont understand problem describet in TODO #4
     * Currently the bank hands out accounts (e.g. [openAccount] returns an [Account]).
     * That's weird because it allows customers to interact directly with the account
     * without going through the bank.
     *
     * Instead of acting on [Account] entities all methods should receive and return
     * [AccountNumber] values (i.e. data classes).

The build fails with a compile error (see here) - looks like a } is missing.

Regarding Todo #4, have a look at the homework video.


Revert "Merge pull request #166 from jingxu97/May/drivename"

This reverts commit 278ece378a5054f16a07622b51ddaf82b328d6e6, reversing
changes made to 2df71ebbae66f39338aed4cd0bb82d2212ee33cc.
Revert this PR due to issue https://github.com/kubernetes/utils/issues/172

/lgtm


[Fix #8499] Fix Style/IfUnlessModifier to prevent offense when first-line comment and code after end block

Fixes #8499.

Before submitting the PR make sure the following are checked:

[x] Wrote good commit messages.
[x] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
[x] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
[x] Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

I'd love to approve this PR, but there are many issues with IfUnlessModifier and WhileUntilModifier; ideally resolving this issue would be part of a bigger refactor. If you are not willing to tackle that, than the minimum acceptable is to add a corresponding test to WhileUntilModifier; for example the first_line_comment method in the module you are tweaking is redefined for IfUnless but not WhileUntil... I wish I had to time to look at all this myself.

I'd love to approve this PR, but there are many issues with IfUnlessModifier and WhileUntilModifier; ideally resolving this issue would be part of a bigger refactor. If you are not willing to tackle that, than the minimum acceptable is to add a corresponding test to WhileUntilModifier; for example the first_line_comment method in the module you are tweaking is redefined for IfUnless but not WhileUntil... I wish I had to time to look at all this myself.

Well, actually I was thinking about handling WhileUntilModifier too. But later, not in this ticket.
And to be honest, I don't really think IfUnlessModifier and WhileUntilModifier are that much similar. They differ in the fact that if/unless constructs return something meaningful while while/until always return nil. Because of that people use if in assignment, in arrays, in hashes, etc, while no one usually uses while like that
[
  1, while foo # this is due to ...
       do_something
     end, 3
]

because what for? It would just return nil, no matter what happens inside the loop.
But still, I agree that something must be done with WhileUntilModifier, but definitely not in this PR. That's why there is a separate issue for that problem: https://github.com/rubocop-hq/rubocop/issues/8281.

It would just return nil, no matter what happens inside the loop.

That is a good point, but not completely accurate... while true; break 42; end returns 42.
Sorry if I wasn't clear: this PR is probably fine as is, but without a corresponding test in WhileUntilModifier, it's difficult for me to see the effect of the change on the module it shares, especially since they don't share the implementation of first_line_comment (which seems like a code smell).

That is a good point, but not completely accurate... while true; break 42; end returns 42.
Sorry if I wasn't clear: this PR is probably fine as is, but without a corresponding test in WhileUntilModifier, it's difficult for me to see the effect of the change on the module it shares, especially since they don't share the implementation of first_line_comment (which seems like a code smell).

Ah, got it now. Updating the code.

@marcandre
Is there any chance this PR can be approved? :)

@dmytro-savochkin I'm fine with the proposed change. It'd be nice if you updated the cop examples, so it's clear to users we're taking the comments into account.

@bbatsov, updated the examples.

Thanks!


graphqlbin.com demo broken

The README says "You can [...] use the web version at graphqlbin.com: Demo". Going to that link redirects to a legacy subdomain, and shows a blank page.
https://legacy.graphqlbin.com/new

I came here after just discoving graphql-playground and discovered a demo that does nothing.

Related: #793


Add categories to the problems

Add to problems a way to categorize them, so it will be possible to search problems by type (like mathematics, string manipulation, etc) or difficulty (easy, medium, etc). It can be some tagging library or just keep it simple and create a new model to store that information.
We can split this issue in two parts (the first is a blocker for the second):

[ ] labels/tags/categories to one problem (each problem can have more than one of each) and show them in problem details;
[ ] Think a way to allow the user search by this categories in UI (and create a new issue to handle it)

Hi Renne,
So,Do you want to add tags,categories for each problem and display them in UI.
Or One can filter the problems by tags ?
Thank You

I will consider this issue done if we can add categories to the problem and the categories are displayed when we see problem details. Filtering and searching by categories can be handled in a separated issue.


Support all datatypes in clickhouse_loader.py (ANTLR parser)

Example JSON
we should support this https://github.com/Altinity/clickhouse-sink-connector/blob/develop/sink-connector/tests/data_types.sql

JSON is now addressed https://github.com/Altinity/clickhouse-sink-connector/pull/316


[Feature] Add Periodic Table Calculator

Description
The Periodic Table Calculator is a web application that provides users with:

Visual Representation: A dynamic display of the periodic table, with clickable elements for exploration.

Element Information: Detailed information about selected elements, including name, symbol, atomic number, atomic mass, and properties.

Mass Calculation: A feature to calculate the mass of a specified element based on its symbol.

Educational Tool: A valuable resource for learning about chemistry and the properties of elements.

In summary, the Periodic Table Calculator offers a user-centric, educational, and customizable solution for exploring the elements of the periodic table and conducting basic calculations related to atomic mass.
Screenshots
No response
Checklist

[X] I have checked the existing issues.
[X] I follow Contributing Guidelines of this project.
[X] I am a GSSOC'24 contributor.
[ ] I am a IWOC'24 contributor.
[ ] I am a JWOC'24 contributor.
[ ] I am a SWOC'24 contributor.

Code of Conduct

[X] I agree to follow this project's "Code of Conduct".

@Rakesh9100 kindly assign me this.

@Rakesh9100 Kindly assign me this issue.

Go ahead @manishh12


Any plans to bring this to SAMD21 chips? (Arduino Nano 33 IoT)

Hi,
your nice library is exactly what I'm looking for. Unfortunately for an Arduino Nano 33 IoT sporting an 32-bit ARM SAMD21 µC. Any plans to port your lib to this chip?
I was briefly looking through the sources and they are fairly complex. I'm not sure whether my coding skills are sufficient to implement that on my own. I would be willing to help, if I can understand what is happening on your code.
Kind regards,
elims

I have checked the datasheet samd21 and have found out, that this device has no mcpwm module or pulse counter like the esp32. But the timers (TCC) could be used, just like the avr solution. This means, the implementation from StepperISR_avr.cpp could be a good starting point. Unfortunately this means, for every generated step one interrupt has to be serviced. The implementation will require still a remarkable effort. So the question is, if you could switch over to an Arduino Nano/Mega or even an esp32 ?

Maybe redesigning the board for ESP32 might indeed be the solution with the least effort. Any particular board you can recommend?

The Arduino Nano 33 IoT has a small size. There will be no drop in replacement. If the form factor can change, then there are plenty of options.


Automator: update proxy@master in istio/istio@master

Generated by Automator - 2024-04-19T14:19:55+00:00

@istio-testing: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

unit-tests-arm64_istio
32dd5cdb300f4391b2c96a36dc1a936e0b9c42f4
link
true
/test unit-tests-arm64

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


cal_flops

Thanks for your open source~
I would like to ask what tool do you use to count the flops of styleGAN2, I use torchstat, but it has not been able to run normally, can you share the code of this part?

You may find the function named StyleGAN2_FLOPCal under the file Util/Calculators.py.


Async query fails on Mono 4.0.x (OS X/Linux)

Async queries will fail on Mono 4.0.x. The Mono implementation of LINQ will throw this error:

System.InvalidOperationException : The provider for the source IQueryable doesn't implement IAsyncQueryProvider. Only providers that implement IEntityQueryProvider can be used for Entity Framework asynchronous operations.

This will be resolved in a future Mono release. Currently their 4.2.0 branch contains the fix, but this is pre-release.
(No changes required in EF. Adding this issue just to track the upgrade of Mono)
Update
Preview packages are available.
Draft release notes for 4.2.0

This is a bit off-topic, but the exception message seems weird, e.g. is the requirement to implement IAsyncQueryProvider to IEntityQueryProvider?
cc @anpete

A preview package for 4.2.0 is available for OS X. See this post: Mono for El Capitan (OS X 10.11) preview package now available.
Note that there are breaking changes on OSX due to El Capitan's new feature that restricts access to /usr/. Read the post for details.

Mono 4.2.0 has been published.
Release notes
Note that this replaces System.Linq with a Microsoft's implementation

Cool! In the release notes it says System.Data is also replaced with a Microsoft's implementation. Do you know if that means we are getting more compatibility?
E.g. are Precision and Scale now in DbParameter? Does GetFieldValue<T>() works for their SqlClient?

The version of System.Data in Mono 4.2.0 is compiled from these files, which includes Microsoft's System.Data.Common.DbParameter.
GetFieldValue<T> is still not implemented.

...so yes, SqlParameter on Mono has .Precision and .Scale

Thanks!


{latency} placeholder should probably return 0ms instead of 0s (for lower than 1ms requests)

1. What version of Caddy are you using (caddy -version)?
0.10.10 (for Windows 7 x64)
2. What are you trying to do?
Test latency speed using {latency} placeholder.
3. What is your entire Caddyfile?
:2015 {
	root F:\caddy2\caddySites
	log / access_log "{remote} | {user} | {when} | {method} | {uri} | {proto} | {status} | {size} | {latency}"

	rewrite {
		to {path} {path}/ /maintenance.html /
	}
}

4.
Double-click the .exe. (no additional commands)
5. Please paste any relevant HTTP request(s) here.
Some simple navigations and Ctrl-F5 refreshes.
6. What did you expect to see?
0ms for fast requests.
(other requests are listed in ms such as 1ms, 5ms or 20ms)
It's a minor issue, but I think 0ms requests should be noted as being "0ms" instead of "0s" to use a common base.
It's kinda odd seeing 1ms, 5ms 7ms then 0s (for quick requests).
It's also kinda odd when both the {latency} and {latency_ms} placeholders are used and they return:
latency: 0s
latency_ms: 0
I'm also unsure the microsecond part in this function works:
https://github.com/mholt/caddy/blob/master/caddyhttp/httpserver/replacer.go#L183
(I've not seen microsecond results locally.)
7. What did you see instead (give full error messages and/or log)?
0s for fast requests.
8. How can someone who is starting from scratch reproduce the bug as minimally as possible?
Navigate in a site with low latency locally.

I closed the related PR due to a possibility that this is likely a Windows issue more than a bug in Caddy. It should be reporting microseconds if your system clock ticked at all, if not milliseconds.


gBar compiles and runs very well in aarch64 - aur

Just a heads up - when using makepkg, it throws an error about aarch64 and won't compile. When using makepkg -A it compiles and runs very well. Perhaps, aarch64 can be added to the list of architectures it will compile and run under. Thank you for gBar, it's my goto bar!

Ok, thanks for the report. Updated PKGBUILD to include aarch64.


DataReader - request to truncate retrieved data to specified dates

Pandas version 0.6.0
from pandas.io.data import DataReader
import datetime
import matplotlib.pyplot as plt
sp500 = DataReader("SPY", "yahoo", start=datetime.datetime(2005, 1,1))
sp500.info()
sp500["Adj Close"].plot()
plt.show()
<class 'pandas.core.frame.DataFrame'>
Index: 4744 entries, 1993-01-29 00:00:00 to 2011-11-25 00:00:00
Data columns:
Open         4744  non-null values
High         4744  non-null values
Low          4744  non-null values
Close        4744  non-null values
Volume       4744  non-null values
Adj Close    4744  non-null values
dtypes: int64(1), float64(5)
As you can see the index begins at 1993-01-29 despite a user specified start date of 2005-1-1. You can specify any ticker and the start date specified in the DataReader function seems to be ignored.
Comment from Wes below:
The Yahoo API is very unreliable in my experience-- the code currently returns whatever data is returned by the query, so something must have changed recently there. I guess it should truncate to the passed date
range regardless of what is returned.

I got this one.  Will submit a pull request on Thursday.

This issue is fixed in pull request 427 -- https://github.com/wesm/pandas/pull/427

It's been merged in -- https://github.com/wesm/pandas/commit/b6be1c088e9fce50635047639cd3b9806b168a61

verified fixed. thanks guys


DLLExport Example with by-ref parameters

Can you please provide an example where a complex type or an arrary of complex types is handed to c# by ref.
Unmanaged code (c++) creates a complex type and fills this type with some data.
Unmanaged code calls an c# Function and hands over the complex type.
c# Reads the data that has been provided by unmanaged code.
c# Modifies the data and hands back the modified data to unmanaged code.
Unmanaged code (c++) uses the data which has been modified by c#.

Use IntPtr > Between unmanaged C++ / C# / Java /... Complex types and Strings. [Part-2]
+
https://github.com/3F/Conari/issues/2
dlr.somefunc<int>(ref cid, out data);
l.bind<FuncRef4<AVCodecContext, AVPacket, AVFrame, int, int>>("avcodec_encode_audio2")(c, pkt, frame, ref output);


llvm error when compiling nif library in windows

@seomwan encountered this error when trying to build the nif library on windows

Currently stuck at LLVM ERROR: Bad $ operand number: #195 (comment)

LLVM ERROR: Bad $ operand number in inline asm string:
possibly a missing configuration setting when compiling for windows in general, might require

changes to build.zig that depend on windows

Some more details:
I used this mix test command to reproduce (hope it's doing what I think it is and just running that test only):
mix test .\test\support\zigtest\failing_test.ex

The output is this:
[..]
Compiling test/support/zigtest/failing_test.ex (it's taking more than 10s)
Compiling test/support/zigtest/passing_tests.ex (it's taking more than 10s)

== Compilation error in file test/support/zigtest/failing_test.ex ==
** (CompileError)  this zig compiler warning hasn't been incorporated into the parser.
Please file a report at:
https://github.com/ityonemo/zigler/issues
<--- missing zig error message details in this line HERE <---

    lib/zig/parser/error.ex:54: Zig.Parser.Error.parse/2
    lib/zig/command.ex:36: Zig.Command.compile/2
[..]

Noticed three things:

ex file compilation timing messages (it's taking more than 10s) at the beginning
missing zig error message details (as indicated by in this line HERE <--- )
it's compiling other tests while only failing_test.ex was given as an argument

Doing it a second time doesn't have that issue, and gives a proper error message:
[..]
== Compilation error in file test/support/zigtest/failing_test.ex ==
** (CompileError)  this zig compiler warning hasn't been incorporated into the parser.
Please file a report at:
https://github.com/ityonemo/zigler/issues
LLVM ERROR: Bad $ operand number in inline asm string: ' movl %fs:0x18, $92135591189151744'

    lib/zig/parser/error.ex:54: Zig.Parser.Error.parse/2
[..]

A third time gives the same error message as expected. But I'd expected the string to change randomly, but it didn't.
However, another test was run this time:
== Compilation error in file test/support/zigtest/passing_tests.ex ==

Along with ZiglerTest.ZigTest.Transitive, the three tests are generated every time, although only one test runs and gives the error message.
Why does this happen? Am I using mix test the wrong way to run a single test?

This issue was recently fixed, it should build just fine now.

This issue was recently fixed, it should build just fine now.

I think @ityonemo may need to update, they're mostly tracking stable branch?

I think @ityonemo may need to update, they're mostly tracking stable branch?

Cool.  I'm deliberately tracking stable branch on zigler, but it should be possible to tell use Zig to use a custom zig version.  I'll try to test it out this weekend to make sure that feature is working.

Cool.  I'm deliberately tracking stable branch on zigler, but it should be possible to tell use Zig to use a custom zig version.  I'll try to test it out this weekend to make sure that feature is working.


part-of-speech tags are abbreviation

Thanks for your very well tutorial, Suppose the word like " I need 100 dollar to buy a iphone ..
.......What is the part-of-speech tags are abbreviation of 100 ?
Also like 2nd example :" My account is number is ABC123XT
What is the part-of-speech tags are abbreviation of ABC123XT ?
Can you please help me out how to implement on your code?
Also, can you please give node what is the execution steps ?
I get error while running below model

(base) C:\Users\nbehera4\Desktop\AI\POS-Taggers\model>python pos.py
Traceback (most recent call last):
File "pos.py", line 315, in
main()
File "pos.py", line 277, in main
unigram_p, bigram_p, trigram_p, trigram_d = calc_ngram_probs(brown_tags, unigram_c, bigram_c, trigram_c)
File "pos.py", line 82, in calc_ngram_probs
unigram_p = {(a,): math.log(unigram_c[(a,)], 2) - math.log(unigram_total, 2) for a in unigram_c}
File "pos.py", line 82, in
unigram_p = {(a,): math.log(unigram_c[(a,)], 2) - math.log(unigram_total, 2) for a in unigram_c}
ValueError: math domain error

this repo's code doesn't work unfortunately


How to follow redirects without writing a module?

I just want to do an inline request without making a whole module for it. Is there a way I can follow redirects?
 resp = Tesla.get(url, [
    opts: [
      follow_redirects: [max_redirects: 3], ############## NOT SURE
      adapter: [timeout: 1000]
    ],
    headers: [{"accept", "*/*"}, {"user-agent", "Test/1.0"}]
  ])

not relevant anymore i just made a client module


Restrict growth of harvester

To constrain thicknesses of surfaces with the harvester it would be handy to restrict the growth in an upward or downward direction.
@leouieda suggested to mask the prism mesh to prevent the harvester from expanding into unwanted directions.

@cmeessen thanks for reporting this and for creating the PR!

The problem with masking the mesh is that the harvester still can grow sidewards. This in turn results in somewhat porous bodies that I would like to avoid. I had a closer look at harvester.py and came up with the following solution:
To _neighbor_indexes() I now hand over a list restrict with directions that restrict the growth. The list needs to be defined when calling harvest() and is empty by default. Here is a link showing the changes in the code in my fork.

@cmeessen OK, that really seems like a good solution! Would you open another PR with these changes?
One thing I saw right away: never use Python mutable objects (lists, dicts, numpy arrays) as default arguments. Specifically restrict=[]. The problem is that the list will be created when the module is imported. So every call to harvester will use the same list (in memory). If you do restrict.append or modify the list in any way, all calls to harvester will be affected. It's better to use restrict=None and check if restrict is None in the code to avoid this kind of thing.

@leouieda thank you for the input. I changed the code according to your comment and created the PR.

@cmeessen great! I appologize in advance if I takes me some time to look carefully at the code. This month is a bit crazy for me.


Create the results directory not filename

This fixes a crash during graph writing due to the destination filename existing as a director.

I see this was fixed in the repo


Maintainers for the custodian recipe

@shyuep and @mkhorton should I add both of you to this recipe as well?

Yes pls. Thanks

Done


F# (**)-style comments are broken

(Original issue 1440 created by igor_chubin on 2018-05-01T19:30:39.456352+00:00)
F# (**)-style comments are broken.
They probably are not considered as comments at all.
My code:
(*
 * Recursive lambdas in F#
 *
 * Yes, it's possible using so called y-combinators
 * (http:en.wikipedia.org/wiki/Y-combinator) (or fixed-point
 * combinators). Ex:
 *)

let rec fix f x = f (fix f) x

let fact f = function
| 0 -> 1
| x -> x * f (x-1)

let _ = (fix fact) 5 (* evaluates to "120" *)

It is highlighted fully wrong.

(Original comment by igor_chubin on 2018-05-01T19:33:57.118570+00:00)
Oh, I'm sorry, probably it is my fault.
I used pygments.lexers.dotnet.FSharpLexer for that.
Probably it was wrong.
Because, I've tried pygments.lexers.FSharpLexer thereafter, and it worked 100% correct.


Upgrade to JSDOM@11

The new JSDOM has limited features comparing to 9 and below.
It does not provide API to load scripts.
We have to load scripts by composing script tags.
One alternative is to load all scripts using systemjs.
There are two questions related to that approach:

Will systemjs choke up on a certain script?
Performance issue.

For (1), it should be ok as all scripts currently loaded by JSDOM are just global scripts and should be able to load by systemjs.
For (2), need to see the actual before to decide.
One good thing on this approach it that it would likely be easier to add hook to systemjs to support code coverage as needed in https://github.com/istanbuljs/nyc/issues/529

Fixed by #7


Add TE header validation for HTTP/2 and HTTP/1.1 requests

This PR introduces two interceptors, H2RequestTE and RequestTE, to ensure the correct validation of the TE header in both HTTP/2 and HTTP/1.1 requests:

H2RequestTE: Ensures that the TE header in HTTP/2 requests only contains the trailers directive, as required by the protocol. Any other transfer coding present will result in a ProtocolException.

RequestTE: Validates the TE header in HTTP/1.1 requests by:
Ensuring the chunked transfer coding is not explicitly listed, as it is implicitly supported.
Verifying that the Connection: TE header is present to prevent TE from being forwarded by intermediaries.

@arturobernalg It is not our job to police the users, if they manually add headers to requests. We need to ensure strict protocol conformance of headers that HttpCore protocol interceptors generate and leave those added by the users alone. The TE interceptors can be useful, but we should not add them to the protocol processors by default.  These checks eat into the overall execution time and transport performance. Let the users decide whether or not they want to have them.
What we might do is to have strict versions of protocol processors in addition to the default ones.

@arturobernalg

@since tag should be 5.4
Now we have similar check done twice, once in the new interceptors and another one in H2RequestConformance.  I think these new checks should be moved to the existing interceptors.

@arturobernalg
1. `@since` tag should be 5.4

2. Now we have similar check done twice, once in the new interceptors and another one in `H2RequestConformance`.  I think these new checks should be moved to the existing interceptors.

@ok2c
I’ve made the changes as you suggested. I’ve removed the new TE checks for HTTP/2 since they were redundant with the existing validations in H2RequestConformance. Apologies for the oversight on my part, as I had previously validated your PR with these changes.

@ok2c I’ve made the changes as you suggested. I’ve removed the new TE checks for HTTP/2 since they were redundant with the existing validations in H2RequestConformance. Apologies for the oversight on my part, as I had previously validated your PR with these changes.

@arturobernalg Do not worry. This is why do reviews and cross check one another's changes.

@ok2c  please take another look.

@arturobernalg Please take a look https://github.com/ok2c/httpcomponents-core/commit/24a7c00154cf5806125d83886c87967ea2d8bfc4 This is all it takes. The cost is 4 booleans and two lambdas.

@arturobernalg Please take a look ok2c@24a7c00 This is all it takes. The cost is 4 booleans and two lambdas.

@ok2c You’re absolutely right. I’ve made the necessary changes as per your suggestion. Thanks for the feedback!


9.0.2 File Manager - clicking on row with folder or file doesn't do anything

Description
Small UX item:
Would be awesome if clicking on the folder row, you view the files / folders in that folder rather than having to click directly on the name (esp. since the hover and cursor indicate its clickable). Perhaps a file could take one to the details view in the same way :)
It looks like this was referenced in #9508
Example
No response

This will be resolved when https://github.com/concrete5/concrete5/pull/10518 is merged, and released in 9.1.0.
Originally we didn't want to do this because it made it really annoying (and difficult) to click the checkboxes in the rows reliably; but I found a solution to that with some JavaScript that I think makes this really nice. It'll be a good improvement.


Adjust severity level

Hello,
first of all: thank you for your effort creating this config!
I started using this config because I like your order set - but now I realized that you forced the severity level to "warn".
This results is that pre commit hook and pipeline is not failing on wrong order.
There seems no easy way to reverse that - so possible ways to fix this I see are:

make severity somehow configurable
remove severity from rule definition so that defaultSeverity setting can influence
provide 2 flavors e.g. "stylelint-config-clean-order/warn"

what do you think?
kind regards

Hello,
I think it makes sense to use warning level severity because there is no logical issue with rules but only formatting problems. If you're using stylelint extensions in your editor, I think it's no fun to see formatting problems as errors when you're writing CSS.
We're using stylelint --max-warnings=0 to limit maximum allowed warnings in our team with great success. You can even do this with eslint. Would this work for you? There is also a way to override rules but it looks a little bit messy in a config file.

make severity somehow configurable

I don't think there is a reliable way to achieve that. Stylelint configs can be JSON file and as far as I know there isn't a way to pass some kind of config object to config packages.

remove severity from rule definition so that defaultSeverity setting can influence

They will be using error level by default and I think we shouldn't change their severity like this.

provide 2 flavors e.g. "stylelint-config-clean-order/warn"

If it's possible I want to keep this config opinionated at some level. If we can't go with the solutions that I mentioned above, I'll research a bit to see what I can do this elegantly.

 For what it's worth, I'm also checking TypeScript/JavaScript formatting problems with prettier --check . in CI. I think even warnings shouldn't make the build pass. We're doing in more strict way but yours are also okay.

All good.
can totally agree with your point of view.
but adding "stylelint-config-clean-order/error" or "stylelint-config-clean-order/default" could be a way to satisfy both worlds/views.

Hello again,
I'm sorry it took a while but I published a new version with a support to changing severity level to error. You can extend the config with error suffix to use it. Your feedback is welcome.
{
  "extends": ["stylelint-config-clean-order/error"]
}


Test workflow fails on a new Firefly App

Steps to Reproduce

Create a Firefly Project aio app init and check options: actions, web assets and CI/CD.
Push your project on Github
Edit README.md and open a PR

The PR checks will fail because of

Also I noticed that the E2E tests won't run by default. What do you recommend if devs want to include E2E tests into the pipeline ?

@sandeep-paliwal can you investigate?

Looking into this

Added PR - https://github.com/adobe/aio-apps-action/pull/3


feat: Support templateRef in LifecycleHook, fixes #7558

Signed-off-by: Peixuan Ding<EMAIL_ADDRESS>Hi! This PR adds templateRef support in LifecycleHook, allowing users to call a workflow template directly from a lifecycle hook. Please see #7558 for details.
Thanks!

LGTM, added @jessesuen and @alexec for approving spec change

@sarabala1979 are you happy with the spec changes please?

yes

@sarabala1979 if you are happy, I am happy.


False positives

As Discord uses the discord.gg domain for certain things like server/game invites, this one causes some false positives
https://github.com/nikolaischunk/discord-phishing-links/blob/26cbac7c02e827bb1a1a37a221449ecea6e2b332/domain-list.json#L4826

@ProbablyRaging Are you using the npm package? If so please check that you are using a new version >= 0.2.0.
The false positive isn't caused by the list but by the check that the module made pre-version 0.2.0.
Let me know.
Thank you

@lucapolesel this also brings up the question if we should include the two other domains again? yk iscord.gg

@nikolaischunk yeah, I think that we should put some kind of message on top of the readme like "If false positive please make suere you are using version.." or so. But let's see if it was indeed using an older version first.

@nikolaischunk @ProbablyRaging From what I can see (I might be wrong) if you are refering to your bot CreatorBot it seems like you are not using the module but your own implementation based on the old npm package's code.
See: https://github.com/ProbablyRaging/CreatorBot/blob/master/modules/blacklist/bl_nitro.js#L34
That .includes(..) is causing false positives.

@lucapolesel correct, I'm just fetching the json file from this repo and doing my own check against it (not a very good one). I appreciate the info and will start using the npm package ASAP.
Also, a link for you to add is discrdgifts.com/event, let me know if you'd like me to create a new issue for this.


ibmcloud provider

Adding ibmcloud provider.

@googlebot I fixed it.

Hello,
I need help with resolving the two checks that are failing please,
I can't figure out what's wrong with my cla, why is it saying it needs a CLA for more commit authors when it's just me ?
And I don't understand the error from the travis build, I don't see any of my codes in the error log ?
can you please clarify what's failing ?
Thank you.


fix: thumb not working when set disableTrackFollow

This PR closes this issue: https://github.com/alantoa/react-native-awesome-slider/issues/26


about preprocessing

Hi, I am wondering that what "sm.get_preprocessing" actually do.
For example, assume we are using
BACKBONE = 'resnet34'
preprocess_input = sm.get_preprocessing(BACKBONE)
I trace the code back to line 385 (somewhere near it) in
"/my_virtual_environment/lib/python3.6/site-packages/classification_models/models/resnet.py".
And it occurs to me that the preprocess function appears as :
def preprocess_input(x, **kwargs):
    return x.
It means that the preprocess_input = sm.get_preprocessing(BACKBONE) did actually nothing.
I am not so sure if it is the truth. But here is my question. If it actually works like I say aboved, it is really necessary to give detailed introduction of the preprocessing functions which were used when pretraing the networks on imagenet. And it is important that we know the scaling of the inputs ([0-255] or [-1,1] or others).
Hope you can help me. Your work is excellent.

It's because Resnet (the original backbone that was trained on ImageNet) didn't have any pre-processing/scaling. So in this case, preprocess_input('backbone = 'resnet34'), really doesn't do anything. But for other backbones the pre-processing/scaling might be between [0, 255], [-1, 1], [0, 1], or some subtraction of the mean pixel value.
So even if you use resent, keep the code in there for good practice, and also, it makes it easier when you try other backbones.
Lastly, yeah it is important to pre-process the images if you're using imagenet weights with the backbone of your choice. If you use VGG w/ imagenet weights, it is expecting some range of values of the images it is given. If you all the sudden provide it with a different range of values, it's not going to do well at all. I believe that if you're training some backbone from scratch, then you can use whatever pre-processing methods you want. But again, if using imagenet weights you should do what the original author of the code/architecture did to get the best results.

It's because Resnet (the original backbone that was trained on ImageNet) didn't have any pre-processing/scaling. So in this case, preprocess_input(backbone = 'resnet34'), really doesn't do anything. But for other backbones the pre-processing/scaling might be between [0, 255], [-1, 1], [0, 1], or some subtraction of the mean pixel value.
It is important to pre-process the images if you're using imagenet weights with the backbone of your choice. For example, If you use VGG w/ imagenet weights, it is expecting some range of values of the images it is given. If you all the sudden provide it with a different range of values, it's not going to do well at all. I believe that if you're training some backbone from scratch, then you can use whatever pre-processing methods you want. But again, if using imagenet weights you should do what the original author of the code/architecture did to get the best results.

Thank you. Now I have a better understanding about what I should do. Your answer is great.

I still believe it would be useful to document which range is expected for which backbone. For instance, it's not clear from the documentation whether VGG wants pictures to be scaled from 0 to 1 or from 0 to 255 as input to the preprocessing function, or in fact whether it is unimportant what input is being passed.

It's because Resnet (the original backbone that was trained on ImageNet) didn't have any pre-processing/scaling. So in this case, preprocess_input(backbone = 'resnet34'), really doesn't do anything. But for other backbones the pre-processing/scaling might be between [0, 255], [-1, 1], [0, 1], or some subtraction of the mean pixel value.
It is important to pre-process the images if you're using imagenet weights with the backbone of your choice. For example, If you use VGG w/ imagenet weights, it is expecting some range of values of the images it is given. If you all the sudden provide it with a different range of values, it's not going to do well at all. I believe that if you're training some backbone from scratch, then you can use whatever pre-processing methods you want. But again, if using imagenet weights you should do what the original author of the code/architecture did to get the best results.

Thank you for answer. But could we understand which preprocess needs for which model from this repository code? I watched at the code, but didn't understand which type of preprocess is determined for each model. I see two functions:
init.py: def get_preprocessing(name):
preprocess_input = Backbones.get_preprocessing(name)
# add bakcend, models, layers, utils submodules in kwargs
preprocess_input = inject_global_submodules(preprocess_input)
# delete other kwargs
# keras-applications preprocessing raise an error if something
# except backend, layers, models, utils passed in kwargs
preprocess_input = filter_kwargs(preprocess_input)
return preprocess_input
and
backbones_factory.py: def get_preprocessing(self, name):
return self.get(name)[1]

I noticed that, while using ResNet backbone, sm.get_preprocessing("resnet34") returns a pre-processing function that is present in classification_models/models/resnet.py, and as @LeeJayHui said, the function simply returned x because, ResNet didn't use any scaling while training on the ImageNet dataset. This, however, is not the case with a VGG16/19 backbone, in which case, sm.get_preprocessing("vgg16") uses the  keras_applications.imagenet_utils.preprocess_input() with mode = 'caffe'.
This made me wonder, why the ResNet based Backbone doesn't use the ResNet pre_processing function that comes with Keras, like it does with VGG16/19. Another thing, I noticed is that, while creating a ResNet50 model using Keras.applications, it uses its own preprocessing function that also calls the same imagenet_utils.preprocess_input() but with mode = 'tf'.
As a result, the ResNet models in Segmentation Model package and Keras package, are using different pre-processings.

Moreover, Unet in segmentation_models never calls get_preprocessing it only calls get_model, which seems to be a bug, because in Unet a frozen encoder that requires a non-trivial preprocessing will produce wrong encodings.

Use get_preprocessing for your data is your responsibility


Timestamp results directories

Make a timestamp unique to each run.
Maybe also add --overwrite flag (might be useful in cases when the run fell over and the results were absolutely not needed).

Rather than overwrite, --new_out, but overwrite by default.


Playertable not separated in Teams

The playertable often looses team-information on updating, then it is all in one team or only few players in the other team which is obviously incorrect.

I hope I fixed it now.


Add the plugin to Gradle Plugin repository

If you add your plugin to the Gradle Plugin Repository then applying the plugin would be even easier:
plugins {
  id "gradle-util-plugins" version "0.1.0-RELEASE"
}

and that's it - no need for additional classpath entries!

Nice proposal, ready to provide any help on this.

Thanks for the suggestion. I missed it. I have published to Gradle plugin portal now. Readme shows plugin id.


Deprecate vault

As per 1.12.5 release notes, vault support has been marked deprecated

FWIW this is a different use of Vault than the one I deprecated:

we used to support a Vault plugin for getting pachd auth tokens on behalf of users, which is deprecated now
this is about getting S3 credentials from Vault, which still seems like a valid use case?


Qualification testing on other platforms (IKS)

Update scripts
Documentation
Automation?

is this done @ericvn ?

I just need to update the documentation in the repo now that the other PRs have merged.

This is stale so closing.


Doesn't work with Play 2.7.x

Following the examples from here: http://pauldijou.fr/jwt-scala/samples/jwt-play/ I took an existing, running, response and did the following
 Ok(responseVal)
          .withJwtSession(("id", 1), ("key", "value"))

where I had imported import pdi.jwt.JwtSession._ at the top of the file.
I also included the library in my build.sbt file as "com.pauldijou" %% "jwt-play" % "4.2.0" as directed.
The error I got was the following:
[error] /Users/patientplatypus/Documents/platypusNEST/the_daily_blech/scala_blech_blog/blog/app/controllers/PostController.scala:635:12: value withJwtSession is not a member of play.api.mvc.Result
[error] possible cause: maybe a semicolon is missing before `value withJwtSession`?
[error]           .withJwtSession(("id", 1), ("key", "value"))
[error]            ^

I don't know why but this library doesn't work.

I've also tried mimicing the example from here: https://github.com/pauldijou/jwt-scala/blob/master/examples/play-angular/app/controllers/Application.scala which has the line Ok.addingToJwtSession("user", User(username)), but that again results in
[error] /Users/patientplatypus/Documents/platypusNEST/the_daily_blech/scala_blech_blog/blog/app/controllers/PostController.scala:635:12: value addingToJwtSession is not a member of play.api.mvc.Result
[error] possible cause: maybe a semicolon is missing before `value addingToJwtSession`?
[error]           .addingToJwtSession(("key2", "value2"), ("key3", "value3"))
[error]            ^

How is this library supposed to work?

Here is my entire function that uses the jwt handler. The warning about the semi-colon is just because the result and the addingToJwtSession were on separate lines, but on a single line it also errors.
def admin_login: Action[AnyContent] = Action.async {request: Request[AnyContent] =>
    Future {
      val body: AnyContent          = request.body
      val jsonBody: Option[JsValue] = body.asJson
      println("inside admin_login")
      jsonBody
      .map { json =>
        var returnVal:Future[String] = admin.login(json);
        val result = Await.result(returnVal, 3.second)
        println("value of result")
        println(result)
        var responseVal = new Response().standard_response("/admin/login", result)
        println("value of responseVal: ")
        println(responseVal)
        println("value of responseVal.msg: ")
        var responseValMsg:String = Json.stringify((responseVal \ "msg").get)
        responseValMsg = responseValMsg.substring(1, responseValMsg.length()-1);
        println(responseValMsg)
        if(responseValMsg=="passwords_match"){
          Ok(responseVal)
          .withSession("access_rights"->"admin")
          // .addingToJwtSession(("key2", "value2"), ("key3", "value3")) //DOESNT WORK
          // .withJwtSession(("id", 1), ("key", "value")) //DOESNT WORK
        }else{
          Ok(responseVal)
          .withSession("access_rights"->"no_access")
          // .withJwtSession(("id", 1), ("key", "value"))
        }
      }
      .getOrElse {
        BadRequest("Expecting application/json request body")
      }
    }(ec)
  }

I've tried to word around suggested here (https://github.com/pauldijou/jwt-scala/issues/19) and that didn't work either. Note, in the above I have also tried  Ok(responseVal).withJwtSession(("id", 1), ("key", "value")) and
          var response = Ok(responseVal).JwtSession
          println("value of response")
          println(response)

Could you try that?

In Play 2.8, even with both clock and conf implicit in scope, using withJwtSession still throws value withJwtSession is not a member of play.api.mvc.Result.

@patientplatypus did you get it to work? I have the clock and configuration implicit in scope yet I still see the value withJwtSession is not a member of play.api.mvc.Result error. Thanks


Update experimental branch to be ready for merge with master

Return old packages that had been removed from the branch for clarity, and add deprecation tags to them.

I've taken a slightly different strategy here, and I've just cherry-picked the relevant commits to the generator and profileBuilder onto my fork's dev branch. From there, I'll submit another PR with the generated packages.


Allow using Value with TimestampFlag

What type of PR is this?

[x] bug
[ ] cleanup
[ ] documentation
[ ] feature

What this PR does / why we need it:
Allows to use default Value with TimestampFlags.

Check if there's a Value before overriding
Basic unit test

Which issue(s) this PR fixes:
fixes #1144
Special notes for your reviewer:
Thanks @aloababa for the tip!
cc @lynncyrin
Testing
Just a small unit test to check if setting a Value will led to a filled parameter when there is no cli input.
Release Notes
Fixed TimestampFlag to allow default Value assignment.

Would there be a new release for this fix?

Someone would have to create a new release, I don't know offhand if anyone is currently planning to do so!


Managed lifecycle of CacheManager

I want to make sure I got this right and I hope I used the right channel. Let me know otherwise and I'll move this issue.
I find the current API a bit confusing with regards to how the lifecycle of a CacheManager should be managed. Let's take the basic example of Caching.getCachingProvider().getCacheManager(). This call may return me a "new" CacheManager or an existing CacheManager that was created previously with the same "settings" (ClassLoader and URI).
CacheManager has a close method with no specific Javadoc details as how/when it should be invoked but my general understanding is that it should be invoked when the "component"/"app" terminates to reclaim resources or clean stuff up.
Here is the problem. How do I know that the CacheManager I hold belongs to me? Maybe it was provided by the environment in some form. Maybe it's shared.
I am not sure this is clear so I want to describe this in a different way.

I have a method to retrieve a  CacheManager
This CacheManager has a close method that I should invoke when "I am done with it"
I have no idea when I invoke said method if I am managing the returned CacheManager or if a component that has called the method previously owns it.

So, yes, calling close multiple times works per spec but my main problem is that when one component terminates and not the others. This is definitely in the corner case area but I want to make sure I didn't overlook something from the spec.
I am not sure if the idea of a managed CacheManager provided by the environment and shared by multiple apps make sense but that would be yet another example of this problem.
Thoughts?

You cannot. Calling CacheManager.close() on the default cache manager on component level is the problem.
What you can do on component level:

Use distinct caches with in the default cache manager and close them separately
Use a unique cache manager by retrieving with distinct URI and/or classpath.

I would say, closing the default cache manager only makes sense during application shutdown or in general the default manager lifecycle is tied to the application lifecycle.

Thanks for the reply. So a CacheManager is not shared by multiple applications. Never.
In a provisioned environment, this can happen (even a bit uncommon). For instance a DataSource retrieved via JNDI.

Thanks for the reply. So a CacheManager is not shared by multiple applications. Never.

Oops. That is an interesting point! I would say it depends on the caching implementation and whether the cache implementation is loaded by the container or application class loader.
The reference implementation RICachingProvider defines:
public ClassLoader getDefaultClassLoader() {
return getClass().getClassLoader();
}
I checked the current implementations github repositories:
Infinispan: dito
EHCache: dito
Hazelcast: dito
I thought there are more variants on this. Maybe it could be instead:
public ClassLoader getDefaultClassLoader() {
return Thread.currentThread().getContextClassLoader();
}
This means, in short: Within an application container context, an application only gets a distinct cache manager, when it comes with its own caching provider. This holds for the current implementations, at this moment. I am not sure whether it has to be this way by definition. The TCK needs to be checked on this. Will do it later.
Disclaimer: I am feeling not as classloader and application container expert, so a second thought on this would be nice...

I did some experiments with getDefaultClassLoader variants and cannot find a TCK test that imposes any restrictions here.
=>
What you get when requesting the default cache manager in containerized applications depends on the cache implementation. There is nothing enforced by the standard.

To your original question:
The spec originally said in the CacheManager section:
After closing a CacheManager, another instance, possibly representing the previously managed Caches, may be acquired using the CachingProvider that originally produced the CacheManager. This is covered in the section on CachingProviders.
To clarify this I added:
Closing a CacheManager does not necessarily destroy the contents of a CacheManager. It simply signals that the owning CacheManager is no longer required by the application and that future uses of that specific CacheManager instance should not be permitted. Depending on the implementation and Cache topology, e.g., a storage-backed or distributed caches, the contents of a closed CacheManager.
To make this a little more concrete:
In Hazelcast and Coherence, a CacheManager exists in a running cluster. When you call CachingProvider.getCachingManager it will connect your application to that cluster. When you call close() it disconnects you from that cluster. The life cycle of the distributed cache is tied to the life cycle of the cluster.
In Ehcache in-process, i.e. not the distributed kind backed by Terracotta Server Array (at least when I was still at Terracotta and this is a little simplified) a CacheManager is typically described in configuration. When you close a CacheManager all of its contents will be discarded, unless caches are marked persistent. But the CacheManager itself exists in a config file. So when you get it again from the CachingProvider a new one will be created. If none of the caches were persistent you get new empty caches. However if they were persistent the new CacheManager will get created with populated caches.
Hope this helps.

It does, thanks.

The specification document 1.0 page 38 says:

Closing a Cache does not necessarily destroy the contents of a Cache. It simply signals to the owning
CacheManager that the Cache is no longer required by the application and that future uses of a
specific Cache instance should not be permitted. Depending on the implementation and Cache
topology, e.g., a storage-backed or distributed caches, the contents of a closed Cache may still be
available and accessible by other applications or in fact via the Cache Manager that previously owned
the Cache if an application calls getCache at some point in the future.

I checked the wordings of CacheManager.close() and Cache.close(). Adding this or the the last sentence to the Java Doc helps to avoid confusion.


How do you run this as sudo?

I haven't actually tested this library yet but as far as I understand, the underlying native library needs to run under root for this to work. Do you run nodejs as root user or is there a way for nodejs to run under an ordinary user and still be able to control the LEDs?

The underlying library allows to drop privileges after the hardware is set up via some option. Not sure if this is already accessible in this nodejs wrapper.

I have only tested with root user (and sudo privilegies).
I have to get some time to update this nodejs wrapper with the new (cool) stuff from @hzeller library ...

Do you think it's okay to run nodejs as root in a production environment? If not, is there some other way of communicating with the native binary running under root through non-root nodejs? A possible approach would be to communicate with an already running root binary through unix sockets. Does that sound okay?

I guess it's no the best way to run in root in production environment.
For now, I use this lib for some testing an playing with a LedMatrix in my home, I produce no serious work yet with it. So the security question in a production environment is far away for the usage I have with it unitl today.
For this reasons I cannot respond to yours others questions. But it seems to be a hard and complicated way to do, mainly if the C library from @hzeller have now mechanism to drop this privilegies.

@hzeller do we need root only for /dev/mem? Can't we use /dev/gpiomem instead?

It also needs to initialize the timer subsystem, which is also memory mapped.
But if this is accessible via /dev/gpiomem, then I am happy to accept a pull request that alternatively works with that as well.


add view.anchorPoint

Checklist

[x] I checked the Contributing Guidelines before creating this request.
[x] New extensions are written in Swift 4.
[x] New extensions support iOS 8.0+ / tvOS 9.0+ / macOS 10.10+ / watchOS 2.0+.
[x] I have added tests for new extensions, and they passed.
[x] All extensions have a clear comments explaining their functionality, all parameters and return type in English.
[x] All extensions are declared as public.
[x] I have added a changelog entry describing my changes.

          1 Warning

:warning:
The source files have been modified. Please consider adding a CHANGELOG entry if necessary.

          4 Messages

:book:
Thank you for submitting a pull request to SwifterSwift. The team will review your submission as soon as possible.

:book:
iOS: Executed 541 tests, with 0 failures (0 unexpected) in 22.481 (24.808) seconds

:book:
tvOS: Executed 507 tests, with 0 failures (0 unexpected) in 8.602 (10.044) seconds

:book:
macOS: Executed 370 tests, with 0 failures (0 unexpected) in 1.347 (1.735) seconds

  Generated by :no_entry_sign: Danger

Hey @qjshuai :))
Can you add the changelog entry for that?

Just cleaning up those old PR's.
@qjshuai  Closing this one due to inactivity, feel free to reopen if you like :))


cannot add query parameters to put request

When you use put(), calls to param() are ignored.

you can use
uri += "?" + WebbUtils.queryString(request.params)

yes, that is a valid wordaround for it, I think that was what I used, but it is will a bug isn't?

I think you can have a body for put() (same as for post()), where the params go automatically (but I don't know if that is true. For get you surely have no request body, so params go to the queryString.).

I'm not sure. Having query-params in URL of POST or PUT request can be useful, but AFAIK there are backend stacks which don't support it. At least for application/x-www-form-urlencoded it can be ambiguous.
Does anybody know facts about this?

After some quick reading, it does not seem to break any RFC and I agree with what one said: "The difference between /user/john and /?user=john is merely a semantic one".
https://stackoverflow.com/questions/611906/http-post-with-url-query-parameters-good-idea-or-not
https://stackoverflow.com/questions/14551194/how-are-parameters-sent-in-an-http-post-request/26717908#26717908


Improve viewport awareness higher-order component

This pull request contains the following enhancements:

Optimisation of the layout measurements done for viewport aware components
Fix of a bug where the state of the component would be set even after it has been unmounted (React triggers a warning because of this)

Coverage decreased (-0.1%) to 82.7% when pulling 00329cb257dee1b5481b9b6708810c73f95221ce on feature/viewport-awareness-improvements into cdea043d7d67838823cc23fc75f8574cd7faca1d on master.


To initialize the geometry

This is the one way to initialize the geometry.

Can you elaborate the code you have used like what does it do?

@tirthbh how is this method different and effective from the one given in Com-Phy ? Could you explain how can your code be implemented for different structure?

Yes, exactly we can find the similar in compphys. But how can we be sure to choose for different configurations?

@reshnashrestha @pratibha77118 I have added details in the code shown below. This is just an example for the tetrahedron structure. You can take this as a reference for your chosen sructure.
import numpy as np

# Define the edge length of the tetrahedron based on expected ion separation
# Edge length is set to 0.3 nanometers, an arbitrary starting point that might represent the average ion distance
edge_length = 0.3

# Define the vertices of a regular tetrahedron
# These vertices are in a normalized form and represent the corners of a regular tetrahedron
# Each vertex is a 3D coordinate [x, y, z]
vertices = np.array([[1, 1, 1],
                     [-1, -1, 1],
                     [-1, 1, -1],
                     [1, -1, -1]])

# Scale the vertices to the actual edge length of the tetrahedron
# Division by sqrt(3) scales the unit-length edges of the normalized tetrahedron to the desired edge length
tetrahedron_positions = vertices * (edge_length / np.sqrt(3))

# Assign Na+ and Cl- ions to the vertices alternately
# This loop creates pairs of ion type (Na or Cl) and their positions at the tetrahedron vertices
ideal_geometry = []
for i, pos in enumerate(tetrahedron_positions):
    ion = 'Na' if i % 2 == 0 else 'Cl'  # Alternating assignment: even index gets Na, odd index gets Cl
    ideal_geometry.append((ion, pos))   # Append a tuple of ion type and position

# Convert the list of ion positions and types into a structured NumPy array
# This array now represents the ideal geometric arrangement of Na+ and Cl- ions in a tetrahedral structure
ideal_geometry = np.array(ideal_geometry)


2FA for Admin portal

There should be a option to enable 2fa for admin portal

You're definitely not wrong. Just dont really want people exposing the admin portal anywhere regardless, I tend to use it over an SSH forward

I think what Im going to do for this is just use an OIDC provider to log in instead of implementing 2fa myself. It makes it a bit easier on me.

I have now added an oidc provider to the admin page which can be configured via the management ui json setting:
	ManagementUI struct {
		usualWeb
		Enabled bool
		Debug   bool

		OIDC struct {
			AdminDomainURL string

			IssuerURL    string
			ClientSecret string
			ClientID     string
			Enabled      bool
		} `json:",omitempty"`
	} `json:",omitempty"`

Still needs so work in terms of, adding the oidc admin to the admin users list. And potentially if people want, restrictions.

Sweet all that minus the restrictions are done. If people want this to be part of a groups claim or whatnot add it to this issue. Otherwise this feature is now completed


Add to JFXCentral

Would be great if you add your library to JFXCentral (jfx-central.com). Simply add your data to the website's data repository at https://github.com/dlemmermann/jfxcentral-data.

OK, I will do this this Week-end :)


docs(*): add sip for moving wit files outside Spin repo

Signed-off-by: Michelle Dhanani<EMAIL_ADDRESS>

Sorry, this is on me for the comment about git subtrees but the SIP seems quite narrowly focused on moving the WIT files, whereas the issue is more broadly about moving the SDKs.  It would be good to understand how things like versioning and examples and tests and templates and stuff are going to work with SDKs in their own repos (e.g. currently we tag SDKs as part of the Spin release workflow).  Managing the WIT files is an important part of that and it's great to have this writeup, but it would be super valuable to nail down the broader proposal.  Sorry and thanks!

@itowlson - no worries. I went back and forth on whether I should include the language SDK move as part of this SIP or as a separate SIP and then wrote this as a separate SIP since it can be an independent change. My plan was to have a follow up SIP for the SDK move. Would you prefer me to merge the SIPs here or do a follow up one for the SDK move?

Ah cool, no worries either way then.  Because the WIT move is motivated by the SIP move I'd be inclined to consider them together, but two separate SIPs could keep things straighter as well!  Thanks for clarifying!

I'm not super keen on moving these out of spin; it would be another thing that could get out of sync with Spin itself. One alternative would be to make the spin repo a submodule in SDK repos and have a language-specific "generate" script to produce the bindings for that SDK, like we do for Go currently.

Closing as this is not relevant right now.