[DOC/API] clearer guidance and documentation on how to use various .pick* methods

Proposed documentation enhancement
For selecting channels, there are various methods.
The older ways are .pick_types() and  .pick_channels() whereas the modern way of picking is using .pick().
This may sound like a nitpicky affair [pun intended], but it turns out that passing a list of channels to .pick_channels() versus .pick() will lead to different results: both functions will pick but only .pick will act like similar to a fancy index in numpy, that is, reorder the channels of the instance.
While this is not a bug, it may lead to bugs for e.g. machine learning projects in wich the MNE ways and Numpy/sklearn/PyTorch ways are mixed and combined. Imagine you want to process a large dataset like Temple University Hospital EEG and want to make sure that every recroding is processed not only with the same selection of channels but also with all channels in the same order for all recordings (not a given as channel ordering may change from recording to recording).
Relying on .pick_channels() would not do the job. Only .pick() gets this right. Would you have known? Having some bug in your analysis? ^^
Where do we go from here? For me, improving the documentation would be the least we should do. As discussed with @drammock another option may be to soft-depracate the old ways in printing a user warning and providing a legacy API. I don‘t want to create too much work, but adding some warning that makes users aware of the fact that .pick_channels will not reorder your channels sounds like a good idea.
Any thoughts, MNE wizards?

+1 for depreciate with informative warning, that sounds like the most helpful

just to balance the argument here. The original idea was that a group of
channels is to be considered as a "set" so unordered.
That's why the parameter "ordered" was added to pick_channels:
https://mne.tools/stable/generated/mne.pick_channels.html
I would first consider a better documentation.
In sklearn we heard comparable complaints as people where passing
dataframes and sklearn was ignored the column order
and it was creating bugs. sklearn did not change for this. It was
considered user issue.
just thinking out loud...

Message ID: @.***>

Chiming in to say that there's a middle ground between deprecation (which implies eventual removal) and no deprecation: the legacy decorator. It exists so that old, widely-used API elements can be kept around, old scripts will still work, but send a strong message not to use it in new code. If the old methods are less good but not technically buggy, I think marking as legacy is a good way to go (combined with documentation improvements). I also like @dengemann idea to add an info message saying if order was ignored

This may sound like a nitpicky affair [pun intended], but it turns out that passing a list of channels to .pick_channels() versus .pick() will lead to different results: both functions will pick but only .pick will act like similar to a fancy index in numpy, that is, reorder the channels of the instance.

just to balance the argument here. The original idea was that a group of
channels is to be considered as a "set" so unordered.

Indeed, at the same time this has been a source of confusion (and probably still silent bugs!) since at least 2015:
https://github.com/mne-tools/mne-python/issues/2300#issuecomment-167115027
One reason I've thought to keep pick_channels is in some weird case where you have a channel with the name of a channel type, the .pick which tries to decide automatically if you're talking about types, indices, or channel names might be confused. But this is such a rare corner case that people who run into this can figure out the indices to use themselves using inst.ch_names and pass those directly.
So overall I'm +0.5 for @legacy and +1 for deprecating pick_channels completely. And if we try to make this change in our own code and tests we might see if/where using .pick falls short.

Maybe long deprecation cycle like 2.0?

I usually agree, but in this case we might very well be fixing 10 year old silent user bugs in the process (which isn't usually the case with our deprecations)

@jasmainak you're usually a voice saying "don't break 10-year-old scripts" but you also have expressed dissatisfaction with pick_channels in the past (here, here. Do you vote for "keep it as @legacy" or "deprecate"?

@jasmainak the cool thing I discovered about pick is that it also accepts channel names - were you aware? Seems like it can be that one way.

Why would you deprecate pick_channels but not pick_types since pick seems to cover both functions?

Because pick_channels has been (and probably still is) silently breaking people's code for years. pick_types isn't so we can keep it (why not).

it seems that pick_channels has introduced an explicit argument called ordered=False. Does that not address the concerns about channel ordering?

No because ordered=False is the default, so silent bugs still likely exist.

For clinical workflows and longer research projects, it is critical that core functionality "just works" and doesn't evolve too fast.

Agreed but in this case we want people to change/change/think about their code. We don't know the prevalence, but multiple core devs have made the mistake of assuming inst.pick_channels(my_ch_list) would give them the channels in the given my_ch_list order, so I assume it's prevalent for end-users, too.

No because ordered=False is the default, so silent bugs still likely exist.

Depends what you expect from the method. There is also a reorder_channels method, so I would expect folks wanting reordering to use that explicitly. But I don't feel strongly either way, just offering an alternate perspective ... am happy to adapt.

Looking deeper into .pick, I found another surprise. Consider this minimal example below (tested with main branch of today).
import os
import mne

path = mne.datasets.sample.data_path()
sample_data_folder = mne.datasets.sample.data_path()
sample_data_raw_file = os.path.join(sample_data_folder, 'MEG', 'sample',
                                    'sample_audvis_raw.fif')
raw = mne.io.read_raw_fif(sample_data_raw_file)
raw.copy().pick([0])
try:
    raw.copy().pick([5000])
except Exception as e:
    print(e)

try:
    raw.copy().pick([0, 5000])
except Exception as e:
    print(e)

raw.copy().pick(['MEG 1111'])
try:
    raw.copy().pick(['Haha - fake news!'])
except Exception as e:
    print(e)

# THIS PASSES!!!!
raw.copy().pick(['MEG 1111', 'Haha - fake news!'])

.pick does order and select channels if channels are channel names, but if there is one offender name / a channel that does not exist among valid channels, the selection is implicitly updated and accepted. This although passing that same name in isolation will lead to a ValueError. Not how this is inconsistent with indices, which lead reliably to out-of-bound errors if one bad index is included.
I would say this is on the bug spectrum. Any thoughts?

I see that there is a runtime warning at least. But still, this behavior seems quite implicit. My personal assessment is that you don't want this behavior, you want a proper ValueError here.

Proposal based on today's dev meeting discussion (with some additional suggestions from me for things we didn't discuss):

for pick_channels method (part of UpdateChannelsMixin)

make ordered=None the default (which converts to False)
with deprecation cycle, change default to ordered=True
meanwhile emit a FutureWarning only if order=None and the provided ordering would be different if they had passed ordered=True
mark as @legacy and recommend using .pick method instead

for .pick_types method:

mark as @legacy and recommend using .pick method instead

convert all our tutorial/example docs to use .pick instead of .pick_channels or .pick_types

for functions pick_channels_forward, pick_channels_cov, pick_channels_evoked: mark all as @legacy (or deprecate/remove?) and recommend:

pick_channels_evoked -> evoked.copy().pick() (.copy() is optional of course)
pick_channels_cov -> new method cov.pick() that mirrors the method signature and functionality of the .pick() method in the Mixin (i.e., self, picks, exclude=(), *, verbose=None). I'm not sure if we need to also add the ordered kwarg here; not adding it is equivalent to always passing ordered=True. Meanwhile cov.pick_channels(self, ch_names, ordered=False) should become legacy/deprecated.
pick_channels_forward. This one is different because Forward doesn't keep track of bads, but I think otherwise the method signature and functionality of .pick() should work? Therefore propose a new method forward.pick(self, picks, exclude=(), *, verbose=None). Here again, not sure if we need to preserve ordered kwarg. Also here if we go this route then forward.pick_channels() should become legacy/deprecated.

for functions pick_channels and pick_channels_regexp (these operate on a list of channel names, not an MNE object). We didn't discuss these. My personal feeling is that these probably aren't used as much as the instance methods, and they should also be marked @legacy or even deprecated/removed, because both functions basically boil down to 2 lines of code:

for pick_channels_regexp it's literally defined in 2 lines: r = re.compile(regexp); return [k for k, name in enumerate(ch_names) if r.match(name)].
for pick_channels if you already have a list of all ch_names, a list of includes, and a list of excludes (note that exclude does not support 'bads' here!): chs_to_keep = set(ch_names).intersection(include) - set(exclude), then optionally something to preserve order like np.array(ch_names)[np.isin(ch_names, chs_to_keep)] or [ch for ch in ch_names if ch in chs_to_keep] or list(filter(lambda ch: ch in chs_to_keep, ch_names)).

for function pick_info(info, sel=(), copy=True, verbose=None): this provides unique functionality. For parity there probably should be an info.pick(self, picks, *, verbose=None) method (either in addition to the function or instead of it)... pretty sure it doesn't need exclude though so I removed that

@drammock thanks for the comprehensive overview of the discussion. Regarding pick_channels and pick_channels_regexp, my vote would be to actually keep them. For two reasons:

They do not operate on an instance. I have had to do several code gymnastics since the introduction of the Mixin classes since these operate on only instances while often we are working at the level of info, specially with OPM data. In some situations, you could make a copy of the instance and then pick on that, but imagine doing that when you have several raw objects in memory from different runs. Again, all possible ... but annoying to change the structure of old code that already works (and running into other issues ...).
While the functionality is a simple 2 line, it is not always obvious what those two lines are, specially if it involves regular expressions.

@jasmainak we will not remove pick_channels and pick_channels_regexp but
change the default of ordered to True to avoid the bugs which
triggered this discussion

Message ID: @.***>

Thank you @drammock @larsoner and everyone else for this very constructive and profound collective reflection on some of the most basic pieces of  MNE API.
I like the action plan a lot, which, I think strikes a nice balance between addressing the issue while avoiding disruption of long-term API contracts. 💯 % endorsement from my side.
My only sort of -0 reservation is about investing too much into upgrading / depracting the functions. These have little user attention and who uses them knows what they do. I guess this would be in line with what @jasmainak said.
I would recommend focusing on the instance methods in a first step.


Argo CD Hand-on

kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
https://argo-cd.readthedocs.io/en/stable/

Successfully deploy ArgoCD on local K8s and deploy an app following instruction:

https://argo-cd.readthedocs.io/en/stable/getting_started/

Sample apps: https://github.com/argoproj/argocd-example-apps

Access app via UI
kubectl get services
# kubectl port-forward service/<service-name> <local-port>:<service-port>
kubectl port-forward service/guestbook-ui 8082:80

Visit: http://localhost:8082


HttpError 401 when using JIRA Cloud

Hi,
as already mentioned in #30 , when using jira-dependency-graph with JIRA cloud, unfortunately an HttpError 401 is received:
Traceback (most recent call last):
  File "/jira/jira-dependency-graph.py", line 302, in <module>
    main()
  File "/jira/jira-dependency-graph.py", line 291, in main
    graph = graph + build_graph_data(issue, jira, options.excludes, options.show_directions, options.directions,
  File "/jira/jira-dependency-graph.py", line 207, in build_graph_data
    return walk(start_issue_key, [])
  File "/jira/jira-dependency-graph.py", line 157, in walk
    issue = jira.get_issue(issue_key)
  File "/jira/jira-dependency-graph.py", line 49, in get_issue
    response.raise_for_status()
  File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 953, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: [..]

That's really a pity, I was so looking forward to see that dependency graph :)

@jfrantzius it works for me .... can you send full command that you use? of course with credentials redacted

I didn't get a 401 (used --cookie= for auth), but the rest api is different so the call for issues fails with 404.

I updated my web version to use Jira Cloud, but only for api token auth for now, I broke cookie auth in the process: https://jiragraph.regenhardt.dev

@jfrantzius For me it worked with Jira Cloud by following these steps:

generate api token for my user via https://id.atlassian.com/manage-profile/security/api-tokens
run jira-dependency-graph.py -u "jira-user-email-address" -p 'generated-api-token' --jira="https://prisma.atlassian.net"


[Backend] Use JSONB rather than TEXT for DB cols storing JSON data

Migrate 3 tables to using JSONB rather than TEXT for columns storing JSON data:

orders
external_orders
external_payments

Added a unit test (our very first backend unit test!) to test the changes. It can be run using yarn run test
Notes regarding sqlite:

JSONB is not supported so we use JSON
altering a column type is messy (involves creating a temp table). since sqlite is not used in prod, we create the column with the JSON type in the first place and skip the migration.

SQLite support is much older than that


Add unit tests for CryptoKey

Further to #43440, this Pull Request adds three unit tests for CryptoKey.

CryptoKey Load and save a .key file.

These concern a CryptoKey instance that has loaded in the attached private key, namely tests/data/crypto/in.key:

load() a private key implies not is_public_only()
default save() leads to identical file contents as tests/data/crypto/in.key, since they are the same private key
save() with public_only set to true leads to identical contents as the separately prepared public key, namely tests/data/crypto/in.pub

My apologies, there was a careless error in 78193af , involving a file being compared to itself.

Sorry - I'm managed to lock myself out of the original account 😓
This is it's successor, on the same email address as before.
If that's too complex, please close this PR, and I will gladly open another in the new account's name.

Since CryptoKey is implemented by the mbedTLS module (core come with the interface, but no implementation), we might want to move the tests there, since they would all fail when module_mbedtls_enabled=no

@Calinou please could you close this PR?
I can't do it myself, because it was created by my irrecoverable account, nor can I implement the suggestions.
I will open a duplicated one at the weekend, in this new accounts name, and link it to this one.
@AThousandShips @Faless - sorry, you both gave really helpful comments - they won't be in vain!


Refactoring func sort first item

I made refactoring for the function Utilities.sortFirstItem and added correct jsDoc definition. Also, I have fixed TODO(an issue when the function possibly may modify the arguments which is bad practice). I have added the missed test for this function and made sure that the function makes a deep copy of the input array and does not change the arguments.

LGTM


Timeout problem

getting this error ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPConnectionPool(host='localhost', port=9000): Read timed out. (read timeout=30)
when tried to execute
import corenlp
text = "Chris wrote a simple sentence that he parsed with Stanford CoreNLP."
with corenlp.CoreNLPClient(annotators="tokenize ssplit pos lemma ner depparse".split()) as client:
ann = client.annotate(text)
sentence = ann.sentence[0]
assert corenlp.to_text(sentence) == text
print(sentence.text)

Ah, I think the *2 was intentional in that I wanted to provide additional
buffer to the HTTP request to make sure it didn't timeout before CoreNLP
did (and the ms -> sec conversion is because of a difference in units
between CoreNLP and the requests module).
The concern is why is the HTTP client timing out? It would be very helpful
to see the messages outputted by the CoreNLP server -- one possibility is
that the first utterance takes an exceptionally long time to load because
it's loading up all of the models: if that's the case, the best solution
for this would be to up the timeout a bit more.
More generally, I would recommend moving over to the new (official)
Stanford CoreNLP python library: https://github.com/stanfordnlp/stanfordnlp
On Thu, Jan 31, 2019 at 2:23 PM greasystrangler<EMAIL_ADDRESS>wrote:

getting this error ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='localhost',
port=9000): Read timed out. (read timeout=30)
when tried to execute
import corenlp
text = "Chris wrote a simple sentence that he parsed with Stanford
CoreNLP."
with corenlp.CoreNLPClient(annotators="tokenize ssplit pos lemma ner
depparse".split()) as client:
ann = client.annotate(text)
sentence = ann.sentence[0]
assert corenlp.to_text(sentence) == text
print(sentence.text)
Set the timeout parameter in the annotate function. i.e.
ann = client.annotate(text, timeout=30000)
The timeout is the client http request, not the server.
Note that confusingly the timeout is in 2ms units! The value you provide
is multiplied by 2 and then divided by 1000 before being passed to Python
request module....
https://github.com/stanfordnlp/python-stanford-corenlp/blob/01a60b7eb816435c39768ff90e822aba43821229/corenlp/client.py#L199
So in the above example using a timeout of 30000 means 60 seconds
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/stanfordnlp/python-stanford-corenlp/issues/29#issuecomment-459529805,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFOydqyNfsZ52y6tf3tueX3uEU3fJRwks5vI2zggaJpZM4aQaUZ
.

--
Arun Tejasvi Chaganty
http://arun.chagantys.org/

Hi, had the same problem. Here is the error message running demo.py:
input text
Chris Manning is a nice person. Chris wrote a simple sentence. He also gives oranges to people.
starting up Java Stanford CoreNLP Server...
Starting server with command: java -Xmx16G -cp /Users/abirqasem/stanford-corenlp-full-2018-10-05/* edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000 -timeout 100000 -threads 5 -maxCharLength 100000 -quiet False -serverProperties corenlp_server-492f7481310348df.props -preload tokenize,ssplit,pos,lemma,ner,parse,depparse,coref
[main] INFO CoreNLP - --- StanfordCoreNLPServer#main() called ---
[main] INFO CoreNLP - setting default constituency parser
[main] INFO CoreNLP - warning: cannot find edu/stanford/nlp/models/srparser/englishSR.ser.gz
[main] INFO CoreNLP - using: edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz instead
[main] INFO CoreNLP - to use shift reduce parser download English models jar from:
[main] INFO CoreNLP - http://stanfordnlp.github.io/CoreNLP/download.html
[main] INFO CoreNLP -     Threads: 5
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator tokenize
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator ssplit
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator pos
[main] INFO edu.stanford.nlp.tagger.maxent.MaxentTagger - Loading POS tagger from edu/stanford/nlp/models/pos-tagger/english-left3words/english-left3words-distsim.tagger ... done [1.2 sec].
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator lemma
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator ner
[main] INFO edu.stanford.nlp.ie.AbstractSequenceClassifier - Loading classifier from edu/stanford/nlp/models/ner/english.all.3class.distsim.crf.ser.gz ... done [4.2 sec].
[main] INFO edu.stanford.nlp.ie.AbstractSequenceClassifier - Loading classifier from edu/stanford/nlp/models/ner/english.muc.7class.distsim.crf.ser.gz ... done [0.7 sec].
[main] INFO edu.stanford.nlp.ie.AbstractSequenceClassifier - Loading classifier from edu/stanford/nlp/models/ner/english.conll.4class.distsim.crf.ser.gz ... done [1.1 sec].
[main] INFO edu.stanford.nlp.time.JollyDayHolidays - Initializing JollyDayHoliday for SUTime from classpath edu/stanford/nlp/models/sutime/jollyday/Holidays_sutime.xml as sutime.binder.1.
[main] INFO edu.stanford.nlp.time.TimeExpressionExtractorImpl - Using following SUTime rules: edu/stanford/nlp/models/sutime/defs.sutime.txt,edu/stanford/nlp/models/sutime/english.sutime.txt,edu/stanford/nlp/models/sutime/english.holidays.sutime.txt
[main] INFO edu.stanford.nlp.pipeline.TokensRegexNERAnnotator - ner.fine.regexner: Read 580704 unique entries out of 581863 from edu/stanford/nlp/models/kbp/english/gazetteers/regexner_caseless.tab, 0 TokensRegex patterns.
[main] INFO edu.stanford.nlp.pipeline.TokensRegexNERAnnotator - ner.fine.regexner: Read 4869 unique entries out of 4869 from edu/stanford/nlp/models/kbp/english/gazetteers/regexner_cased.tab, 0 TokensRegex patterns.
[main] INFO edu.stanford.nlp.pipeline.TokensRegexNERAnnotator - ner.fine.regexner: Read 585573 unique entries from 2 files
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator parse
[main] INFO edu.stanford.nlp.parser.common.ParserGrammar - Loading parser from serialized file edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz ... done [0.4 sec].
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator depparse
[main] INFO edu.stanford.nlp.parser.nndep.DependencyParser - Loading depparse model: edu/stanford/nlp/models/parser/nndep/english_UD.gz ...
[main] INFO edu.stanford.nlp.parser.nndep.Classifier - PreComputed 99996, Elapsed Time: 32.876 (s)
[main] INFO edu.stanford.nlp.parser.nndep.DependencyParser - Initializing dependency parser ... done [35.2 sec].
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator coref
[main] INFO edu.stanford.nlp.coref.statistical.SimpleLinearClassifier - Loading coref model edu/stanford/nlp/models/coref/statistical/ranking_model.ser.gz ... done [0.8 sec].
[main] INFO edu.stanford.nlp.pipeline.CorefMentionAnnotator - Using mention detector type: dependency
[main] INFO CoreNLP - Starting server...
[main] INFO CoreNLP - StanfordCoreNLPServer listening at /0:0:0:0:0:0:0:0:9000
Traceback (most recent call last):
File "demo.py", line 19, in
ann = client.annotate(text)
File "/Users/abirqasem/.local/share/virtualenvs/nlp_teach_tg-acJp7X5Y/lib/python3.7/site-packages/stanfordnlp/server/client.py", line 398, in annotate
r = self._request(text.encode('utf-8'), request_properties, **kwargs)
File "/Users/abirqasem/.local/share/virtualenvs/nlp_teach_tg-acJp7X5Y/lib/python3.7/site-packages/stanfordnlp/server/client.py", line 311, in _request
self.ensure_alive()
File "/Users/abirqasem/.local/share/virtualenvs/nlp_teach_tg-acJp7X5Y/lib/python3.7/site-packages/stanfordnlp/server/client.py", line 137, in ensure_alive
raise PermanentlyFailedException("Timed out waiting for service to come alive.")
stanfordnlp.server.client.PermanentlyFailedException: Timed out waiting for service to come alive.

This could happen if you didn't start the CoreNLP server before calling it from Python. For help with starting the CoreNLP server, see: https://stanfordnlp.github.io/CoreNLP/corenlp-server.html

After doing this, you also have to open this in a tab as well : http://localhost:9000/
This worked for me.

Hmmm... it's a bit hard to debug with just the information you've provided: (a) do you have the latest version of the library (3.9.2)? (b) When running, can you set "be_quiet=False" on the client, e.g. with corenlp.CoreNLPClient(annotators="tokenize ssplit pos lemma ner depparse".split(), be_quiet=False) as client and share what messages you get from the Java process?
…
On Mon, Jan 28, 2019 at 10:34 AM Saurabh Verma @.***> wrote: started server before calling it on the same port number tried both with large time out like 1500000 and without mannual timeout taking as default value. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#29 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFOyZGq9coIpRATaqtLHPA-o-HHqVZqks5vH0KlgaJpZM4aQaUZ .
-- Arun Tejasvi Chaganty http://arun.chagantys.org/

I still meet this issue, but in a different situation. With setting be_quiet=False, I printed the details:
[main] INFO CoreNLP - --- StanfordCoreNLPServer#main() called ---
....
[main] INFO CoreNLP - Starting server...
[main] INFO CoreNLP - StanfordCoreNLPServer listening at /0:0:0:0:0:0:0:0:3220
After waiting, I got the following error with Traceback:
Traceback (most recent call last):
doc = client.annotate(text)
r = self._request(text.encode('utf-8'), request_properties, **kwargs)
self.ensure_alive()
raise PermanentlyFailedException("Timed out waiting for service to come alive.")
stanfordnlp.server.client.PermanentlyFailedException: Timed out waiting for service to come alive.
It seems the request has not responded. How can I fix it? Any ideas?

We have no idea what you're doing, so probably hard to get good suggestions.  However, it looks like you're running the server on port 3220.  Are you also setting the client to use that port?

We have no idea what you're doing, so probably hard to get good suggestions. However, it looks like you're running the server on port 3220. Are you also setting the client to use that port?

Yes. Port 3220 is just randomly select. I also tested with default port 9000, but doesn't work.
I check the listening ports, using netstat -l and both ports are free.

A good idea is to check the permissions as https://github.com/stanfordnlp/stanza/issues/245#issuecomment-617437964


Bug on fresh install when enabling jq

Hi and thank you for open sourcing this toolkit.
When I tried out dev-env today, I hit a bug with my first binary I enabled.
Environment:

Mac
nix-env (Nix) 2.3.7
direnv version 2.19.2

Reproduction steps (following readme and using a Mac):
curl -sL https://github.com/digital-asset/dev-env/archive/main.tar.gz | tar xzf - --strip-components=1 dev-env-main/dev-env dev-env-main/.envrc
  direnv allow

# Enable jq in default.nix
# Create symlink when PWD=../dev-env
ln -s ../lib/dade-exec-nix-tool dev-env/bin/jq

At this point an ls -lah gives the following result:
lrwxr-xr-x  1 me  staff    25B Jan 30 12:53 dev-env/bin/jq@ -> ../lib/dade-exec-nix-tool

If I execute jq I get the following failure:
[dev-env] Building tools.jq...
[dev-env] Built tools.jq in /nix/store/msxm3ssbk0anbmdqlb6cvfxlpjwpys67-jq-1.6-bin and linked to /Users/zph/src/testing/dev-env/var/gc-roots/jq
/Users/zph/src/testing/dev-env/bin/../lib/dade-common: line 133: /bin/jq: No such file or directory

Line 133 is:
exec "$(readlink "$DADE_BUILD_RESULT")/bin/$binary" "$@"

When I debug it, my jq binary isn't at that location and I can fix it by patching L133 as:
exec "${DADE_BUILD_RESULT}-bin/bin/$binary" "$@"

(Note the path difference)
When debugging further, I see that the readlink invocation is returning an empty string but the $DADE_BUILD_RESULT is present.
Please let me know if I can help with debugging and I'll experiment a bit more w/ the project. I saw the PRs not accepted note in readme so filing this as an Issue in case you're interested. Thanks 👍

Hi @zph,
Terribly sorry I missed this. This is sort of a known issue, though I presume it could be better documented. Not all Nix packages have the same internal structure, and dev-env needs to be able to find the appropriate bin directory within them. For most packages, dade-exec-nix-tool works, but for some you'll need dade-exec-nix-bin-tool instead. So the linking step must become:
ln -s ../lib/dade-exec-nix-bin-tool dev-env/bin/jq

I don't know of an easy way to predict which packages will need which linking tool; I usually just try dade-exec-nix-tool first, as that's the one that works most often, and switch to dade-exec-nix-bin-tool if there is any issue. I have not yet found a package for which neither worked, but I suppose that might happen. If this happens to you, at this point I'm afraid you'd be on your own to debug it.


Spike on relative addressing in VM circuit

Write down on hackmd the consequences of introducing relative addressing as suggested by @sirasistant
Essentially, the addressing is defined by a base address + relative offset.
The base address is set at position 0 of the memory space (address zero is hardcoded and compiler will make sure that this address is "safeguarded" as it belongs to standard memory address space).
The relative offset is "direct" in the sense that this one is passed a literal/hardcoded in a bytecode operand.

What would mean for it to be safeguarded? we'll need to write to it in runtime :D

The spike outcome is on the following hackmd:
https://hackmd.io/@aztec-network/rygKJu8cT


Parse error: syntax error, unexpected '?' in C:\xampp\htdocs\laravel-adminpanel-master\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php on line 242

I have installed php version , on this version all my previous project  are working but laravel-adminpanel-master is not working.
when i execute it on web its show me error.
Parse error: syntax error, unexpected '?'
There was two error one i solved by deleting file composer.lock but now for this i could not find any solution need help please
PHP 5.6.20 (cli) (built: Mar 31 2016 14:56:44)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

@bilal26036  here you can able to see that the minimum requirement for this project is php":  >=7.1.3 #L14 . So it might be the primary issue.
the secondary you can try this php composer.phar dump-autoload which will regenerate the class path.
Hope it might helpful to you.

$ php composer .phar dump-autoload
Could not open input file: composer
should i upgrade php version?

Yes we are using laravel 5.6 so you need to install php 7.1

i have installed laravel 7.2 but now
Warning: require(C:\xampp\htdocs\laravel-adminpanel-master\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\laravel-adminpanel-master\bootstrap\autoload.php on line 17
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\laravel-adminpanel-master\bootstrap/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\laravel-adminpanel-master\bootstrap\autoload.php on line 17
these error is showing, second thing is
$ php -v
PHP 7.2.6 (cli) (built: May 23 2018 20:51:04) ( ZTS MSVC15 (Visual C++ 2017) x86
)
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
you can check this now what should i do?

Can you please run composer install

$ composer install
Composer could not find a composer.json file in C:\xampp\php7
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section

Can you please check readme and run all the commands mention over there ?

@bilal26036 you need to go to C:\xampp\htdocs\laravel-adminpanel-master and run composer install.

I got it the right question and it’s answer that , you have to remove all
bootstrap cached items the it works.
Now how to achieve it. Using following command.
Php artisan config:clear
Php artisan route:clear
Php artisan view:clear
If above not solve your issue, try this danger command.
rm -rf bootstrap/cache/*.php
Make sure before running above command.
On Tue, 26 Jun 2018 at 6:10 PM, Vipul Basapati<EMAIL_ADDRESS>wrote:

@bilal26036 https://github.com/bilal26036 you need to go to
C:\xampp\htdocs\laravel-adminpanel-master and run composer install.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/viralsolani/laravel-adminpanel/issues/240#issuecomment-400293164,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALc0UzhYjoz01J5VQFgUGkej4oyWHxbqks5uAivXgaJpZM4U2jwZ
.

--
Sent from iPhone
Vallabh Kansagara
+91<PHONE_NUMBER>

@bvipul  after composer install command
Generating optimized autoload files
Warning: Ambiguous class resolution, "App\Http\Responses\Backend\Menu\EditRespon                                                                                se" was found in both "C:/xampp/htdocs/laravel-adminpanel-master/app\Http\Respon                                                                                ses\Backend\BlogCategory\EditResponse.php" and "C:/xampp/htdocs/laravel-adminpan                                                                                el-master/app\Http\Responses\Backend\Menu\EditResponse.php", the first will be u                                                                                sed.

Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover
Discovered Package: arcanedev/log-viewer
Discovered Package: arcanedev/no-captcha
Discovered Package: barryvdh/laravel-debugbar
Discovered Package: creativeorange/gravatar
Discovered Package: davejamesmiller/laravel-breadcrumbs
Discovered Package: fideloper/proxy
Discovered Package: hieu-le/active
Discovered Package: intervention/image
Discovered Package: laravel/socialite
Discovered Package: laravel/tinker
Discovered Package: laravelcollective/html
Discovered Package: spatie/laravel-cors
Discovered Package: tymon/jwt-auth
Discovered Package: unisharp/laravel-filemanager
Discovered Package: xethron/migrations-generator
Discovered Package: yajra/laravel-datatables-oracle
Package manifest generated successfully.

@bilal26036  That warning is fine... we will fix that in our next release... but now your project should work

yes its working but new error genrate

@bilal26036 as @viralsolani said, you need to follow our readme, and it should work fine.

Run the database migrations (Set the database connection in .env before migrating)
php artisan migrate
Run the database seeders
php artisan db:seed
please can you explain this, i am new at laravel

@bilal26036 okay,
so in .env (if you don't have that by default, copy .env.example and rename it to .env), you need to specify database name and username and password of database, you will find three fields
DB_DATABASE=your_empty_database_name
DB_USERNAME=database_user_name(xampp default: root)
DB_PASSWORD=database_password(xampp default:'' (blank))

After that in your project root folder(C:\xampp\htdocs\laravel-adminpanel-master): you need to run the above commands:
php artisan migrate
php artisan db:seed

@bvipul  thank you so much, now i am following READme now i am at npm install, should i download it first ?

@bilal26036 yes run npm install.

C:>npm run development
npm ERR! path C:\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'C:\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR!      C:\Users\ArsalanLap\AppData\Roaming\npm-cache_logs\2018-06-26T20_2
9_50_686Z-debug.log
C:>npm install
npm WARN saveError ENOENT: no such file or directory, open 'C:\package.json'
npm WARN saveError EPERM: operation not permitted, open 'C:\package-lock.json.25
54286627'
npm WARN enoent ENOENT: no such file or directory, open 'C:\package.json'
npm WARN !invalid#2 No description
npm WARN !invalid#2 No repository field.
npm WARN !invalid#2 No README data
npm WARN !invalid#2 No license field.
up to date in 2.399s
found 0 vulnerabilities
no i am getting this error.

C:\Users\ArsalanLap>npm -v
6.1.0
C:\Users\ArsalanLap>node -v
v8.11.3
C:\Users\ArsalanLap>npm install
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\ArsalanLap
package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\ArsalanLap\pac
kage.json'
npm WARN ArsalanLap No description
npm WARN ArsalanLap No repository field.
npm WARN ArsalanLap No README data
npm WARN ArsalanLap No license field.
up to date in 1.685s
found 0 vulnerabilities
C:\Users\ArsalanLap>

You have to do that in your project directory.

@bilal26036 please follow all the steps from readme to run the project.

@viralsolani i am following read me

@bvipul can you please explain?

Please make sure you have correct php version installed.
Laravel 5.6 requires php version >= 7.2
On Thu, Jun 28, 2018, 12:31 AM Muahammad Bilal<EMAIL_ADDRESS>wrote:

@viralsolani https://github.com/viralsolani i am following read me
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/viralsolani/laravel-adminpanel/issues/240#issuecomment-400793584,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AL0dDKsqi8SacWtEsH19GpUsoq8FKfJHks5uA9aXgaJpZM4U2jwZ
.

What do you want to be explained?@bilal26036

The Mix manifest does not exist. (View: C:\xampp\htdocs\laravel-adminpanel-master\resources\views\frontend\layouts\app.blade.php) (View: C:\xampp\htdocs\laravel-adminpanel-master\resources\views\frontend\layouts\app.blade.php)
this is error

@pratik916 PHP 7.2.6 (cli) (built: May 23 2018 20:51:04) ( ZTS MSVC15 (Visual C++ 2017) x86
)
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

@bvipul C:\Users\ArsalanLap>npm install
npm WARN<EMAIL_ADDRESS>No description
npm WARN<EMAIL_ADDRESS>No repository field.
up to date in 0.504s
after using command
npm install express
or
npm install -g express-generator
or you have to add a package.json file and register your modules here. The easiest way to get such a file is to let npm create one by running
npm init
i am facing this error.

The Mix manifest does not exist.  Now, how much have you done?

C:\Users\ArsalanLap>npm install
npm WARN<EMAIL_ADDRESS>No description
npm WARN<EMAIL_ADDRESS>No repository field.

@bilal26036 are you in your project directory? I don't think you setup everything correctly. please make sure that first.

@viralsolani i am following READ me, nmp is not working even its showing is version, i have set path ,now i could not see what is issue there

@bilal26036 I don't know if you are understanding us correctly. You need to run npm install and then npm run dev in the project directory. That is C:\xampp\htdocs\laravel-adminpanel-master\ in your case.

now i install my modules at project directory and facing this issue.
C:\xampp\htdocs\laravel-adminpanel-master>npm install -g express

<EMAIL_ADDRESS>added 50 packages in 10.928s

C:\xampp\htdocs\laravel-adminpanel-master>npm run development
npm ERR! file C:\xampp\htdocs\laravel-adminpanel-master\package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! Unexpected string in JSON at position 1435 while parsing '{
npm ERR!   "private": true,
npm ERR!
npm ERR!
npm ERR!   "scripts": {
npm ERR! '
npm ERR! File: C:\xampp\htdocs\laravel-adminpanel-master\package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! Tell the package author to fix their package.json file. JSON.parse
npm ERR!      C:\Users\ArsalanLap\AppData\Roaming\npm-cache_logs\2018-06-28T13_0
7_02_020Z-debug.log

https://stackoverflow.com/questions/16827858/npm-warn-package-json-no-repository-field
using the answer of this, i added in my package.json
"repository": {
"type": "git",
"url": "git://github.com/username/repository.git"
}
but still issue is same

C:\xampp\htdocs\laravel-adminpanel-master>npm run development

@ development C:\xampp\htdocs\laravel-adminpanel-master
cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress
--hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

'cross-env' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: cross-env NODE_ENV=development node_modules/webpack/bin /webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/we bpack.config.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to in
stall?
npm ERR!      C:\Users\ArsalanLap\AppData\Roaming\npm-cache_logs\2018-06-28T13_1
5_09_428Z-debug.log

@bilal26036, did you run npm install before n run development. And why are you doing npm install express... You just need to run npm install, as it is....

@bvipul  yes i did


runtime: bump version

let's get that 0.1.5-testnet release going!

oh, weird. it makes more sense to have the version be the one you're working on, but it's also hard to know what version you're working on. let's just close this for now :)


Feature/writer can throw

Disclaimer: I have no Linux OS at my disposal to compile or test this on.

Thanks man !


Only a single CPU core is used

Not sure if this is a bug or feature, but I have observed that on my Ubuntu 14.04 machine HDBSCAN only ever uses one core, some other cores also spike occasionally but 90% of the time it's just a single core at 100% and all the others 0%.
Is this algorithm not parallelizable? Or has it not been done yet?

The algorithm is not easily parallelizable, so for the most part it will
indeed only use one core. Where easy parallelism was available I have made
use of it, hence the apparent use of other cores. The majority of the work,
however, is quite hard to parallelise in any reasonable way, and my focus
was on data structures and algorithms that could significantly improve
single core performance. There is some hope that Dask and a suitably
dask-enabled space tree might enable some better parallel performance, but
that is some ways off from being developed.
On Mon, Jul 25, 2016 at 7:47 PM, Dringite<EMAIL_ADDRESS>wrote:

Not sure if this is a bug or feature, but I have observed that on my
Ubuntu 14.04 machine HDBSCAN only ever uses one core, some other cores also
spike occasionally but 90% of the time it's just a single core at 100% and
all the others 0%.
Is this algorithm not parallelizable? Or has it not been done yet?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/lmcinnes/hdbscan/issues/49, or mute the thread
https://github.com/notifications/unsubscribe-auth/ALaKBXN6nlrr1BefTDqFXsnnEPsf4Jlvks5qZUsQgaJpZM4JUqCJ
.

I also noticed that by simply shuffling the dataset I'm able to get different cluster counts. So what about introducing the option to  train an ensemble (multiple instances) in parallel? You can of course do this using python tricks yourself, but those are never pleasant to orchestrate.

Hmmm, that's actually slightly less than ideal. Can you use the
approx_min_spanning_tree=False and see if that remedies the variability
upon shuffling? Also, how much variability are you seeing? A little bit, or
large swings in the number and nature of clusters?
On Mon, Jul 25, 2016 at 9:53 PM, Dringite<EMAIL_ADDRESS>wrote:

I also noticed that by simply shuffling the dataset I'm able to get
different cluster counts. So what about introducing the option to train an
ensemble (multiple instances) in parallel? You can of course do this using
python tricks yourself, but those are never pleasant to orchestrate.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/lmcinnes/hdbscan/issues/49#issuecomment-235140261,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALaKBe5zcG2OkTCdv1k6YW3Qyuc8F1e7ks5qZWi3gaJpZM4JUqCJ
.

Now that I have started to explore my dataset in more depth using this tool I have more problems to deal with.
I have a very noisy dataset with 20 dimensions and 100k samples.
HDBSCAN(min_cluster_size=32, min_samples=1, alpha=1.0)
Produces only 4 clusters, 3 of them containing almost nothing. With about 15k classed as noise.
I guess I will have to go and play with the alpha parameter now.
This is somewhat surprising, I was expecting great things from HDBSCAN after the 2D demos, but so far it looks like it has serious problems detecting structure in mere 20 dimensions.
Prior to this I used self-organizing maps and I can tell you that it had no problem detecting a lot of structure in this dataset, it was just very slow.

I actually doubt alpha will give you much. A more useful approach may be to
use some dimension reduction (t-SNE is good) down to 2-10 dimensions and
see if that helps at all (as that will be the kind of structure the self
organzing maps was pulling out). I would actually argue that perhaps the
data is less structured than you thought -- at least as far as clusters go
(there may be geometric/topological structure beyond pi_0 that may be of
interest for example). I would also suggest that you try increasing
min_samples. More of your data will be classified as noise, but you will be
more likely to find any finer structure in clusters.
On Mon, Jul 25, 2016 at 11:17 PM, Dringite<EMAIL_ADDRESS>wrote:

Now that I have started to explore my dataset in more depth using this
tool I have more problems to deal with.
I have a very noisy dataset with 20 dimensions and 100k samples.
HDBSCAN(min_cluster_size=32, min_samples=1, alpha=1.0)
Produces only 4 clusters, 3 of them containing almost nothing. With about
15k classed as noise.
I guess I will have to go and play with the alpha parameter now.
This is somewhat surprising, I was expecting great things from HDBSCAN
after the 2D demos, but so far it looks like it has serious problems
detecting structure in mere 20 dimensions.
Prior to this I used self-organizing maps and I can tell you that it had
no problem detecting a lot of structure in this dataset, it was just very
slow.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/lmcinnes/hdbscan/issues/49#issuecomment-235151659,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALaKBRf7JEZlrat4zoNjCZLX_mHU-HIAks5qZXw5gaJpZM4JUqCJ
.

I would also point out that I have used HDBSCAN quite successfully on
50-100 dimensional data, so it is not simply the case that it doesn`t work
in higher dimensions. I would be interestyed in your dataset if you can
share it (I understand that is not the case in many situations).
On Mon, Jul 25, 2016 at 11:17 PM, Dringite<EMAIL_ADDRESS>wrote:

Now that I have started to explore my dataset in more depth using this
tool I have more problems to deal with.
I have a very noisy dataset with 20 dimensions and 100k samples.
HDBSCAN(min_cluster_size=32, min_samples=1, alpha=1.0)
Produces only 4 clusters, 3 of them containing almost nothing. With about
15k classed as noise.
I guess I will have to go and play with the alpha parameter now.
This is somewhat surprising, I was expecting great things from HDBSCAN
after the 2D demos, but so far it looks like it has serious problems
detecting structure in mere 20 dimensions.
Prior to this I used self-organizing maps and I can tell you that it had
no problem detecting a lot of structure in this dataset, it was just very
slow.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/lmcinnes/hdbscan/issues/49#issuecomment-235151659,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALaKBRf7JEZlrat4zoNjCZLX_mHU-HIAks5qZXw5gaJpZM4JUqCJ
.

The dataset is unfortunately confidential. Every dimension has been normalized to 0..1 with mean 0.5 +- 0.02.
I must confess that I'm a high level user of such tools as this, I make only rudimentary reading of how they function, enough to gauge importance of parameters and little else.
What is the purpose of using tSNE in combination with HDBSCAN? I was actually planning on trying tSNE next but not in conjunction with HDBSCAN.
I'm also curious about your comment on SOM, what is your opinion of it in general? I have studied its inner workings but I don't have the mathematical grounding to understand why it works, it uses euclidean distance to establish nodes on a lattice that share similarity to the data, but I really don't know why it works so much better than every other algorithm - in this case even HDBSCAN.
I followed your suggestion and it really doesn't matter what parameters I choose, if min_samples is low then over 90% of the data is noise, if it's high then over 90% is in one cluster. Also the probabilities are always near 100% or 0% (for the noise).
Perhaps what you said about the data not having clusters is true, but SOM identifies at least 7 hot spots that contain significant fractions of the dataset. I think that HDBSCAN is unable to deal with bridges and just follows the sparse points and merges the hot spots into a cluster. Is it not capable of classifying the bridges (which are made of sparse points) as noise?

I understand with regard to the data; that is often the case.
So it is possible that there are clusters and HDBSCAN doesn't find them. My
goal in clustering is "Don't be wrong" -- don't claim there are clusters
when there aren't, because that can lead to bad intuitions about the data.
That means that I like somewhat conservative algorithms. That being said,
HDBSCAN can deal with bridges -- a higher setting of min_samples will break
bridges, unless the bridges are just as dense as the cluster they are
bridging (at which point I am reluctant to call them separate clusters).
The goal with tSNE is that, if there is some underlying manifold structure
to your data, you can bring out that structure more clearly (in a lower
dimension space) and this can aid HDBSCAN in identifying the clusters.
Since SOM is essentially doing a dimension reduction and you are seeing
structure there then it may be a case that manifold structure exists and is
important. I would trust tSNE more than SOM with regard to such a reduction
(although you may want to check the final KL divergence you get with tSNE
just to be sure).
I'm tend to view SOM as a dimension reduction technique, and as with many
such techniques it is not especially conservative (and with SOM it has a
slight bias toward clumpiness, as PCA has a bias toward fan like
structures, and Isomap toward loop like manifold structures). I would want
to verify the results it gives carefully. It may be worth experimenting
with other dimension reduction techniques to see if they reveal similar
patterns (I would recommend trying RobustPCA, Isomap, LLE, and tSNE).
On Tue, Jul 26, 2016 at 12:32 PM, Dringite<EMAIL_ADDRESS>wrote:

The dataset is unfortunately confidential. Every dimension has been
normalized to 0..1 with mean 0.5 +- 0.02.
I must confess that I'm a high level user of such tools as this, I make
only rudimentary reading of how they function, enough to gauge importance
of parameters and little else.
What is the purpose of using tSNE in combination with HDBSCAN? I was
actually planning on trying tSNE next but not in conjunction with HDBSCAN.
I'm also curious about your comment on SOM, what is your opinion of it in
general? I have studied its inner workings but I don't have the
mathematical grounding to understand why it works, it uses euclidean
distance to establish nodes on a lattice that share similarity to the data,
but I really don't know why it works so much better than every other
algorithm - in this case even HDBSCAN.
I followed your suggestion and it really doesn't matter what parameters I
choose, if min_samples is low then over 90% of the data is noise, if it's
high then over 90% is in one cluster. Also the probabilities are always
near 100% or 0% (for the noise).
Perhaps what you said about the data not having clusters is true, but SOM
identifies at least 7 hot spots that contain significant fractions of the
dataset. I think that HDBSCAN is unable to deal with bridges and just
follows the sparse points and merges the hot spots into a cluster. Is it
not capable of classifying the bridges (which are made of sparse points) as
noise?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/lmcinnes/hdbscan/issues/49#issuecomment-235325734,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALaKBfoNQYrON7YM-qmedkpP4lfwh6fSks5qZjargaJpZM4JUqCJ
.

The package tsne is the reference package (in C++ with bindings to Python
and R) from the original authors; it ought to be about as good as things
come. I agree that the sklearn implementation currently leaves a little to
be desired.
A quick look at the source of the tsne package shows me that you can simply
alter the max_iter value in tsne/bh_tsne_src/bh_tsne.cpp, line 40 and
recompile. Not exactly ideal I must admit, but if you really want more
iterations that is one way.
As to intuition on the parameters: as you increase min_samples you raise
the bar on how dense connecting bridges have to be. I would suggest a large
min_samples value and then possibly look at the condensed tree plot if you
are only seeing a small number of clusters and see how and where your
cluster structure is breaking down. Ostensibly if there are few clusters it
is because most clusters don't persist for much of a range of distance
scales.
On Tue, Jul 26, 2016 at 3:26 PM, Dringite<EMAIL_ADDRESS>wrote:

I started getting some results with min_cluster_size=8, min_samples=1, as
in over 1000 of clusters. But then as soon as I changed min_samples to 2 it
went back to 1 big cluster, this is not very intuitive as to why this is
happening... I think I will just end up doing a grid search to maximize
histogram distribution.
It is remarkably difficult to find a good implementation of t-SNE with a
python wrappings, wow.
sklearn implementation gets MemoryError with 16gb RAM on a mere (35000,20)

how is that even useful? Seems like it was designed solely for the Iris
dataset. The pip tsne implementation works fine but does not let you vary
the number of iterations - so it ends with a high error of 4.4 and a big
blob result despite the error being on a decreasing trajectory.
I would not have expected such a mess for what's touted to be a rather
popular algorithm.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/lmcinnes/hdbscan/issues/49#issuecomment-235377561,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALaKBSWO_c5f3tNwrg3YqpH761PFKdSUks5qZl9ugaJpZM4JUqCJ
.

Thanks for the suggestion, I will just fork it, make the changes to it and then install it with pip git url, lazy paths are optimal ;)
As for min_samples you are of course correct, but then how can increasing that value actually decrease the number of clusters? Since in theory the fewer bridges the more clusters, and lower min_samples means more bridges - and yet it gives me more clusters. Hence why I said it's somewhat un-intuitive.

The number of clusters falls out of the optimization game at the end where
we attempt to find the most stable set of clusters (over varying distance
scales). A higher min_samples can cause things to break up more, but that
may, in fact, lead to clusters being much less stable over varying distance
scales, and hence the new "most stable" result is a single parent cluster
of the previous clusters which now fall apart quickly. This can be a little
unintuitive, and thus I suggest you look to the condensed tree plots when
this sort of thing happens to see what is going on. It does imply to me
that your clusters are generally not all that stable, which would explain
why HDBSCAN is mostly giving a single cluster. I suspect the condensed tree
is is very fragmented.
On Tue, Jul 26, 2016 at 4:09 PM, Dringite<EMAIL_ADDRESS>wrote:

Thanks for the suggestion, I will just fork it, make the changes to it and
then install it with pip git url, lazy paths are optimal ;)
As for min_samples you are of course correct, but then how can increasing
that value actually decrease the number of clusters? Since in theory the
fewer bridges the more clusters, and lower min_samples means more bridges -
and yet it gives me more clusters. Hence why I said it's somewhat
un-intuitive.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/lmcinnes/hdbscan/issues/49#issuecomment-235389163,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALaKBagAZEAEOB1lO1_l4Z_zCnRC0HOMks5qZml5gaJpZM4JUqCJ
.


Tristans/add 2.1 install instructions

I think you want to merge to release/2.1 branch instead of master.


graph2dot

echo "nullsrc,scale=640:360,nullsink" | graph2dot -o graph.tmp
dot -Tpng graph.tmp -o graph.png

I think I may use this function to implement #93


no module name error

i am installed successfully the python-barcode packages. but i get the no moduled name error when i use the module.
"ModuleNotFoundError: No module named 'barcode'"

Can you provide any information?

i am installed successfully the python-barcode packages. but i get the no moduled name error when i use the module.
"ModuleNotFoundError: No module named 'barcode'"

Perhaps your python file is named barcode.py which is the same as the module name. You would need to rename your file to something else.

Closing due to inactivity. Lemme know if this is still an issue.


TypeError: Cannot redefine property: useSelector

What version of React, ReactDOM/React Native, Redux, and React Redux are you using?

React: "17.0.2"
React Native: "0.68.2"
Redux: "4.2.0"
React Redux: "8.0.1"

What is the current behavior?
In some test cases I used spyOn for mock useSelector hook -
import * as ReactRedux from 'react-redux';

jest.spyOn(ReactRedux, 'useSelector').mockReturnValueOnce({value: mockValue});

after updating to "8.0.1", I'm getting error -
TypeError: Cannot redefine property: useSelector
        at Function.defineProperty (<anonymous>)

What is the expected behavior?
everything was okay on
"react-redux": "7.2.8",
"redux": "4.1.2",

Which browser and OS are affected by this issue?
No response
Did this work in previous versions of React Redux?

[X] Yes

I don't have a particular answer for this, tbh.  We are still using Babel for the build output, just doing TS transpilation as part of that.  I did turn off some of the IE11 compat settings along the way, but we should still have CJS and ESM build artifacts.
Having said that, we would strongly recommend against trying to mock the hooks in tests anyway!  Instead, we specifically recommend writing "integration"-style tests that create a real Redux store with test data, and rendering a <Provider> around your components - not mocking the hooks.
See https://redux.js.org/usage/writing-tests for our recommended approach to testing.
Given that, I'm going to close this.
If anyone else does want to look into what the technical issue is here, please feel free to investigate and contribute, but this does not seem like something that we're going to spend time working on ourselves.

I've also run into this issue. The above method for mocking out useSelector or useDispatch no longer works, and with upgrading to latest react-redux all tests written in this way fail without a clear and/or gradual way to move forward. The only option seems to be to switch to Redux Toolkit and the test setup for this, but that requires a lot of effort.
See how this method is recommended in various places:

https://schneide.blog/2021/05/20/flexible-react-redux-hook-mocks-in-jest-react-testing-library/
https://stackoverflow.com/questions/49597432/react-redux-changing-webpage-language/49597482#49597482
https://stackoverflow.com/questions/50051464/react-redux-fail-to-import-classes/50051552#50051552

For the record this has nothing to do with Redux Toolkit, at all.
If anything, it's something about how we updated our build steps in React-Redux as part of the TS conversion process.
But regardless of that, the suggestion to "mock the network layer, not our hooks" is still fully applicable no matter how the actual Redux logic is written.
I'll also point out that we, the maintainers, have never recommended mocking the hooks, ever, in any of our documentation.  That's something folks in the community decided to try doing.
I'm open to suggestions of possible tweaks to the build process that might help, if there are any...  but in general we do not think mocking React-Redux hooks is a good idea in the first place!.

I understand, and I agree that mocking hooks is probably not the best way to go about things. However, this is a very simple "api" in that all it takes is 3 lines of code and I have react-redux stare mocked in my test(s). I cannot find an alternative for my use-case (i.e. not using RTK), when testing components using redux (via useDispatch / useSelector). A hint/guide/link as to how to proceed in our case would be extremely helpful.

@pjg that's part of the point of our recommendations at https://redux.js.org/usage/writing-tests#components . Your test code will not care how the logic has been written.  It will not matter whether it's a single component with just React state, or a huge complex tree of Redux connected components dispatching thunks or using RTK Query.  If you set up a Redux store, wrap the component under test in a <Provider store={store}>, mock out the network request via msw or mirage, and click "Fetch Some Data", the Redux logic will kick in and run, regardless of how that logic is implemented.

FYI, @phryneas just did a bit of investigation, and it looks like the actual exports definitions may be fixable if we tweak our Babel settings:

https://github.com/babel/babel/issues/4265#issuecomment-770250799
https://babeljs.io/docs/en/assumptions#constantreexports

Doesn't change our recommendation about not mocking hooks, but if changing that setting improves the build output in a way that is more compatible with Jest mocking, I'm up for releasing it.

I will add to that that this is caused by a babel default setting.
Mocking imports is extremely flimsy and cannot really be relied on. While we can make this work for now, I want to 💯 stress what @markerikson already said a few times: this is not how we recommend testing components. Testing components in isolation with directly mocked methods will not give you a lot of confidence at all - you are essentially testing implementation details, not actual functionality.

This solved our issue:
const mockDispatch = jest.fn();

jest.mock("react-redux", () => ({
 ...jest.requireActual("react-redux"),
 useDispatch: () => mockDispatch,
}));

is this fixed? i am using 8.0.2 getting this error still

@arcollector it should have been fixed. Can you post a project that shows this still happening?

Yeah. Sorry, I was wrong when I closed this.
Lenz pointed out that the setting could be changed. But no one has filed a PR to actually change this setting.

Looking back at this again.
It's still not a practice we want users to do, and it looks like there's a userland workaround at https://github.com/reduxjs/react-redux/issues/1920#issuecomment-1147559047 .
Given that, I'm going to close this for real this time.

This solved our issue:
const mockDispatch = jest.fn();
const mockSelector = jest.fn();

jest.mock("react-redux", () => ({
 ...jest.requireActual("react-redux"),
 useDispatch: () => mockDispatch,
 useSelector: () => mockSelector,
}));

I think there is a syntax error. Spent hours trying to figure out why it was not working. Needed paranthesis after mockSelector
const mockDispatch = jest.fn();
const mockSelector = jest.fn();

jest.mock("react-redux", () => ({
 ...jest.requireActual("react-redux"),
 useDispatch: () => mockDispatch(),
 useSelector: () => mockSelector(),
}));


object implements an interface, but failed to check the return type of function

Bug Report
🔎 Search Terms
interface void return check ,void
🕗 Version & Regression Information
My version is 4.8.4
⏯ Playground Link

Playground link with relevant code
💻 Code

🙁 Actual behavior
I find when I implents an interface, the void return type in interface maybe not checked in implemented objects. Actually I did return somthing, in my opinion, its should be noticed you shouldn't return anything.
🙂 Expected behavior
I defined this function return void in an interface, it should warn me when return something in subclass.

See the TypeScript FAQ: Why are functions returning non-void assignable to function returning void?

See the TypeScript FAQ: Why are functions returning non-void assignable to function returning void?

hi Martin, thx for your reply. I accept the "I'm not going to look at your return value, if one exists".
But I still  confused about why in the first case it can checked

Because a function implementation that returns void must not return anything. You have the same in your initial example if you make your function return void. Right now the return type is inferred, due to the missing type annotation. I'd post the adjusted code, but I'm on mobile and you didn't post the code for me to copy and adjust.


Add terraswap route swap support (for bPSI-DP-24m)

This PR will:

Add terraswap route swap support, initially with focus on supporting bPSI-DP-24M trades
Add "events from log" helper to extract events from log messages

testing
Two random transactions picked up from the route-swap contract:

https://finder.extraterrestrial.money/mainnet/tx/DB5A846ABE56585EF99906108C4251F508FCCDDCD15629D318B8AA8FF907CAE5
https://finder.extraterrestrial.money/mainnet/tx/7090E0A61AFAF52D4597B853C8063FC5F33E87A215FCC7953C7D70DC83A289EE

Close #118

@hodgerpodger still WIP but creating PR early for feedback. Python is not my strongest language so there might be things to improve, just let me know! :)

I think it's ready now.

Yup, I stand corrected from my first comment.  Great stuff.  All tests passed--and I have a few tests specificilly for "execute_swap_operations".
I'll add some private tests to detect regression and merge/deploy in a little bit.

is this one supposed to handle #46 ?

is this one supposed to handle #46 ?

Not intentionally, but at least now the token info is in place.
I might have time to look at it during the weekend if there are no other takers 😊


Ending Support For Node 14 and Node 16 in November 2023

More and more dependencies are dropping support for Node 14 and Node 16 since both versions have reached end-of-life.
In November 2023, this project will follow suit, stop testing against these older versions of Node, and fully embrace Node 18 and Node 20.

[x] Update engines block in package.json to >=18.0.0.
[x] Unblock dependency updates that discontinue support for Node 14 and Node 16.
[x] Remove helpers/polyfills as they are no longer needed.
[x] Update Node versions in coverage.yml.

Updated in acabebe8ac71c06f701040abd6126930755f92eb


apache2 default settings

This pull request includes updates to the apache2 config meant ensure that the package works as a new user would expect. Right now new user has to edit the apache2 conf for a single-site-setup to work with apache2. This update fixes that.

reason of removing the public -
https://github.com/laradock/laradock/commit/2af40b0ba107a86b57710226fb3b2c29b309f164#commitcomment-23570558

@tpalts it's not a problem we needed to make the default setup compatible with multiple projects. Cause more people uses Laradock as a central development tool for all their projects. And in all cases if you want to use it for single project you'll have to edit some files such as removing unused containers.. so editing the server config file is very normal.


[Feature] Support dev mode for official vite/svelte template

Currently if, for example, one fuses the official vite template for svelte:
https://github.com/vitejs/vite/tree/main/packages/create-app/template-svelte-ts
When then applying this extension and running dev mode, it throws:
[plugin:chrome-extension] context method emitFile() is not supported in serve mode. This plugin is likely not vite-compatible. (x4)

Otherwise it compiles properly. Another thing to review should be merging the tsconfig.json from that same template.
Thank you a lot for such amazing project!
Cheers,

Hi @fchpr, thank for your feedback. I am not familiar with svelte, and more important I am focusing on tracking assets dependences(which discuss a lot in    rollup/rollup#2872).
If you have time, welcome to add these features. I'd like to think about these as soon as after finishing the tracking work (I already have some ideas to solve this problem, so it will not taken much time : - ) ).

Heyo! Sorry for not being able to answer... Your example seems pretty fine. The issue is that default vite command seems made to develop web/apps and not extensions per se. So what we should be looking for is a custom run script for watching source files and then re-run the dist build on any change to them.
Storybook is a great tool, indeed, but it may not apply to every case. I mean for small projects may be overkill...
Anyways, I will try to post any update here when I have time to look at the vite source code. Thanks for the update!

Heyo! Sorry for not being able to answer... Your example seems pretty neat. The issue is that by default vite command seems to be made for hot-relaoding web/apps, not extensions per se. So what we should be looking for is a custom run script for watching source files and then re-run the dist build on any change to them.
Storybook is a great tool, indeed, but it may not apply to every case. I mean for small projects may be overkill...
Anyways, I will try to post any update here when I have time to look at the vite source code. Thanks for the update!

As mentioned in #6, whether the --watch option mentioned by @infix is what you need? In this mode, vite will rebuild the source code when it detect changes. As far as I know, Chrome extension can only be updated by reloading files which is differ from how vue or svelte development server works.

Yes, it's. Let's follow the feature there. Thanks! Cheers,


Bot Does Not Receive Messages From Server

I'm not sure what this is about, but at some point the bot just does not receive any messages from the server anymore. This happens to me frequently now, about two minutes after starting the bot.
I don't think the message structure has been changed, i.e. our regex parsing should be fine.
We also receive the PING message from the server and should answer with the PONG message.
I'm also not aware of the fact that my bot exceeded the message limit.
@joshuaskelly Any ideas? Can you confirm that?

I contacted Twitch to increase the rate limit of my bot and set the bot status accordingly. Maybe that helps.
See https://dev.twitch.tv/limit-increase/.

The JavaScript library tmi.js sends out PONGs every minute, not in response to a PING message. Maybe that is the problem where are facing here, that due to rare PONG sending the bot gets disconnected.
Can we receive an error message with the reason for disconnection?


Feature request: Tags for steps?

Hello,
I'm thinking about writing a jira ticket updating tool so that labels/fields in the tickets can be updated after feature/scenario/step run. The problem I face is that tags only appear on feature and scenario level, not on step level.
To test some tickets in Jira, I sometimes only add 1 step in a scenario and then add a comment at the end of the line with the ticketnumber.
Would adding a 'tag' functionality to steps not be interesting?

I don't think the Gherkin language supports that (it supports tags per example for scenario outline, which we are missing, but I think this is the only place where we miss support for tags)

Yes I know Gherkin doesnt have this but we could 'throw the first stone'?

You can tag method of context instead of step itself.

Sounds handy for debugging purposes, but it is definitely more suited to being a Behat Extension rather than core Behat.
Tags are for organisational purposes, making it easy to run a feature or scenario -- it doesn't make sense to organise or run a single step imo.

To 'throw the first stone' I'd encourage you to start discussion with the cucumber/cucumber project


Sm/gauntlet-docs

What does this PR do?

get SDR registry synced with toolbelt's
doc updates for registry contributions
additional registry validations

What issues does this PR fix or reference?
@W-10064254@
Testing: the registry now matches toolbelt--but there may be some SDR behavioral reason why it shouldn't match or other bugs that were hidden.
QA deploy/retrieve/convert with

customFieldTranslation mdType.  You can find a decent repo at https://github.com/SalesforceFoundation/Volunteers-for-Salesforce/tree/master/src/objectTranslations

a bigObject with an index https://help.salesforce.com/s/articleView?id=sf.custom_bo_considerations.htm&type=5 <-- the best way to create these is to build them in the UI and then source:retrieve it (after which you can use that code to deploy or convert).
Here's a bigObject example: https://github.com/SFDC-Assets/ebikesBigObjectExtension/tree/master/force-app/main/default/objects/Big_Ride__b

QA NOTES
Repo for testing: https://github.com/iowillhoit/org--gaunlet-docs
Pre-changes (customFieldTranslation):

👍 sfdx force:source:retrieve -m CustomObjectTranslation,CustomObject
👍 sfdx force:source:deploy -m CustomObjectTranslation,CustomObject

Made a small change and it shows up in UI

👍 sfdx force:source:convert -d pre-changes

Post-changes (customFieldTranslation):

Deleted folders
👍 sfdx force:source:retrieve -m CustomObjectTranslation,CustomObject

No diff

👍 sfdx force:source:deploy -m CustomObjectTranslation,CustomObject

Made a small change and it shows up in UI

👍 sfdx force:source:convert -d post-changes
👍 No difference between pre-changes/ and post-changes

Pre-changes (BigObject):

👍 sfdx force:source:retrieve -m CustomField,CustomObject,Index
👍 sfdx force:source:deploy -m CustomField,CustomObject,Index

Made a small change and it shows up in UI

👍 sfdx force:source:convert -d big-object

Did this a little differently, committed directory to view diff easier

Post-changes (BigObject):

Deleted Big Object folder
👍 sfdx force:source:retrieve -m CustomField,CustomObject,Index

No diff

👍 sfdx force:source:deploy -m CustomField,CustomObject,Index

Made a small change and it shows up in UI

👍 sfdx force:source:convert -d big-object

No diff in big-object folder

Please let me know if you find anything else that you feel needs QA'd


New release

Could you make a newer release? The latest released version is from 2011.

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 14 Oct 2013 at 2:46

No need to merge everything prior to a new release. Just formalise the current situation. :)
See also #85.


Fix updateLayer reducer to allow remove the legend

Using the current code if you want to remove the legend, you cannot do it because once the layer is added, this code ...(layer.legend && { is always true.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

3 of 3 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.02%) to 72.044%

Totals

Change from base Build<PHONE_NUMBER>:
0.02%

Covered Lines:
1607

Relevant Lines:
2088

💛  - Coveralls


Element Selection Dialog Browse option not working

Issue and tracking information
Developer's time Estimated effort to fix (hours):
Developer's Actual time spent on fix (hours)
Issue reporter to provide a detailed description of the issue in the space below
When attempting to give a type to an element within a model, the Element Selection Dialog box's Browse option is not working and only displays a blank page. It should show a Project Explorer that allows the user to search through the different projects in the workspace.

It looks like this is still an issue. I would expect the Browse tab to show a project explorer view that would allow the user to look through each project in the workspace to find the desired element type like in RSA.

Can you let me know the exact steps to reproduce this issue? or the reproducer model would be good too. I can browse the elements on my environment so I think there is some specific case where this is an issue.

So, if you open a project's model, and go to any of it's components, then add a port interface. Next, go to set the type in the CX view and this should open a dialog box with two tabs: Search and Browse. It defaults to the Search tab, but when you switch to the Browse tab, all I'm seeing is a white screen when I'd expect to see a model explorer that would show all the models in the workspace. This has happened for every model I've tried this on. To reproduce, I used an unmodified BasicPubSub Example, added a port interface to its model, and tried to set its type from the Browse tab and got a white screen.

Hi Jonathan,
I am also using the BasicPubSub model and I see the browse tab working fine.
Can you please attach the model to the issue? Or send me the model via  email so I can try myself?
Thanks.
Regards,
Young-Soo Roh
Sr. Software Developer
Zeligsoft (2009) Ltd.
From: Jonathan Daniel<EMAIL_ADDRESS>Sent: Thursday, March 26, 2020 11:15 AM
To: ZeligsoftDev/CX4CBDDS
Cc: ysroh; Comment
Subject: Re: [ZeligsoftDev/CX4CBDDS] Element Selection Dialog Browse option not working (#98)
So, if you open a project's model, and go to any of it's components, then add a port interface. Next, go to set the type in the CX view and this should open a dialog box with two tabs: Search and Browse. It defaults to the Search tab, but when you switch to the Browse tab, all I'm seeing is a white screen when I'd expect to see a model explorer that would show all the models in the workspace. This has happened for every model I've tried this on. To reproduce, I used an unmodified BasicPubSub Example, added a port interface to its model, and tried to set its type from the Browse tab and got a white screen.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/ZeligsoftDev/CX4CBDDS/issues/98#issuecomment-604488206 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG235Y2XV4SJJE4FNT2LN3RJNWOTANCNFSM4LSUOLOQ .  https://github.com/notifications/beacon/AAG2355QVVAHYXYTDHJS22TRJNWOTA5CNFSM4LSUOLO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEQD4EDQ.gif
--
This email has been checked for viruses by AVG.
https://www.avg.com

Uploading BasicPubSub.zip…
Here's an example project where I'm seeing this issue.

Is the sample model uploaded? It says "Uploading ... " and I can't download it.

BasicPubSub.zip
I think it uploaded this time. Sorry about that.

I got it but it works on my env. I suspect that there is an another model that causes the problem in your workspace. Can you please attach any error log messages related to this action? You can open Error log from "Windows->View->Error Log" menu.

errorLog (2).txt
Here's the error log. It's throwing an unhandled loop exception. I have a project in my workspace with several subdirectories and each of these subdirectories contains a ModelFiles directory. For example, if you open project A you see the subdirectories B, C, and D. I think that since there is not ModelFiles directory within this project A this causes the issue.

I've just committed the fix.

Can you verify if this is resolved?

It does not look like this resolved the issue. The issue still occurs and the same error log message seems to appear. I can attach that as well if you'd like.

Thanks. Can you please attach the log again? So you have the latest code?

ERROR_LOG.txt
Here's my error log. And yes I working off of the latest code.

NEW_ERROR_LOG.txt
Still appears to not be working. There definitely appears to be a model in the workspace causing this issue, but I don't believe that it should prevent other models from being able to utilize the Browse tab (like BasicPubSub for example).

Thanks for the error log. This should be fixed now.

Tested and confirmed that the issue is now fixed.


MRG: Add convenience function to "prepare" emptyroom raw file for maxwell_filter

Fixes #10533
This is a first quick draft, I'm looking for feedback.
cc @agramfort

This is ready for review.

Return a copy then

Qt test failure is unrelated. This is good to merge from my end.

Rendered API docs
https://output.circle-artifacts.com/output/job/b3b16b20-50ea-482c-b438-f3b4a9bd0548/artifacts/0/dev/generated/mne.preprocessing.maxwell_filter_prepare_emptyroom.html#mne-preprocessing-maxwell-filter-prepare-emptyroom

@larsoner could you push to this branch the correct behavior for you? or
point us
to the code in mnefun?

Message ID: @.***>

I'll push a commit to show what I'm talking about

@larsoner Could you please take a look at my latest commit 971a519?
My idea was to allow for a transfer of annotations without forcing the measurement date to be adjusted.
Some tests are failing and I don't have the time to look into this right now, but I wanted to ask what you think about this approach in general?

Note to self (I don't want to push changes while @larsoner is potentially working on something): Remove the ability to pass a list of bads. If a user wants to have a specific list of bads, they can set them before calling this function, and then pass bads='keep'. This keeps this function smaller and requires less testing

Feel free to push, I don't have any in-progress changes currently

@hoechenberger I simplified the logic a bit, split the test for speed purposes, and added a new param. Can you look and see what you think?

Will do! We can talk tomorrow during the dev meeting

We can talk tomorrow during the dev meeting

From my end this is feature complete and ready to go, hopefully you agree and can just merge. But yes if you think there is something wrong or more to change then we can discuss

Thanks @larsoner!


Add basic type aliases for std::chrono types to ink_time.h for future use.

We've said for years we need to switch to std::chrono. This represents a first, small effort in that direction by putting some basic aliases for std::chrono types in a common header file.

I'm fine with using std::chrono, but what's the goal again? I don't remember why we need to switch. Are we going to eliminate ink_time and ink_hrtime?

In the long run, yes. The goal is to reduce our code footprint by using standard tools where possible. In addition, std::chrono is much more type safe and goes a long way to eliminate issues (which we have had) about the units of a duration.

I'll take that as we are not introducing yet another ink_hrtime. Having some aliases for convenience is fine since std::chrono::high_resolution_clock:time_point is too long, but I wouldn't want to hide std::chrono more than necessary because that would require extra TS specific knowledge. In that sense, I may want to retain the original names, like ts_hr_time_point, so I can easily associate the original types with the aliases. It would reduce questions like "Can I pass ts_hr_time to functions that receive high_resolution_clock:time_point ?".

I think these are close enough. It wouldn't be that hard to change later if not.

Cherry-picked to v9.1.x branch.


How to Get Past Level Four?

Great program, but I am having a hard time getting past level four on beginner mode. Could you please help?

To get past level four is crucial that your warrior rest, just like in level three. However, now you must check that you are not being attacked before resting. You should store your health in a Player's instance property at the end of each turn, and if your warrior is injured but the health at the end of past turn is greater than its current health, you should walk/attack instead of rest.

I've been trying to do that, but I can't figure out what the code for it would be.

I could give you a few pointers, but not the complete solution. After all, this game is intended to learn, and you won't learn anything if I do.
class Player {
  constructor() {
    this._health = 20;
  }

  playTurn(warrior) {
    // TODO: Add missing condition
    if () {
      warrior.rest();
    } else {
      if (warrior.feel().isEnemy()) {
        warrior.attack();
      } else {
        warrior.walk();
      }
    }

    // TODO: Update this._health with warrior.health
  }

  isInjured(warrior) {
    // TODO: Return false if warrior health is less than 20
  }

  isUnderAttack(warrior) {
    // TODO: Compare this._health with warrior.health()
  }
}

You can call the newly defined methods isInjured and isUnderAttack (and any other method you create in the future) from the playTurn method like this:
this.isInjured(warrior);

Good luck!

Thanks!

My JS ain't that good, although I'm pretty sure I'm on the right track. I've added my code to this gist so as not to spoil for anyone. Would appreciate some guidance via a tip in the gist (do gist comments send notifications?)

@pawel2105 I just left a comment in your gist. Good luck!

@olistic Hi, really enjoy the game however struggling with the above.
Everything goes okay however my warrior does not rest enough to beat the final sludge, he will rest for one turn then walk the other!
Would appreciate some guidance if possible? It feels like such a small thing.
`
class Player {
constructor() {
this._health = 20;
}
playTurn(warrior) {
if (this.isInjured(warrior) === true && this.isUnderAttack(warrior) === false) {
warrior.rest();
} else {
if (warrior.feel().isEnemy()) {
warrior.attack();
} else {
warrior.walk();
}
}
this._health = warrior.health();
}
isInjured(warrior) {
if (warrior.health() < 20) {
return true;
} else {
return false;
}
}
isUnderAttack(warrior) {
if (this._health !== warrior.health()) {
return true;
} else {
return false;
}
}
}
`

Hi @williamgurney! I left a comment in your gist, cheers!

class Player {
constructor() {
this._health = 20;
}
playTurn(warrior) {
// TODO: Add missing condition
warrior.think("Am I under attack? "+this.isUnderAttack(warrior.health()));
if (
this.isInjured(warrior.health()) &&
!this.isUnderAttack(warrior.health())) {
warrior.rest();
} else if(!warrior.feel().isEmpty()) {
warrior.attack();
} else {
warrior.walk();
}
this._health = warrior.health();

}
isInjured(health) {
if(health < 20){
return true;
}
return false;
// TODO: Return true if warrior health is less than 20
}
isUnderAttack(health) {
if(health < this._health){
return true;
}
return false;
// TODO: Compare this._health with warrior.health()
}
}
Based on your example this implementation works. Try creating a method chained IsEnemy() to feel(), but doing a !warrior.feel().isEmpty() is enough

class Player {

  constructor() {
    this._health = 20;
  }

  playTurn(warrior) {
    // TODO: Add missing condition
    warrior.think("Am I under attack? "+this.isUnderAttack(warrior.health()));
    if (
      this.isInjured(warrior.health()) &&
      !this.isUnderAttack(warrior.health())) {
      warrior.rest();
    } else if(!warrior.feel().isEmpty()) {
      warrior.attack();
    } else {
      warrior.walk();
    }

    this._health = warrior.health();
  }

  isInjured(health) {
    if(health < 20){
      return true;
    }
    return false;
    // TODO: Return true if warrior health is less than 20
  }

  isUnderAttack(health) {
    if(health < this._health){
      return true;
    }
    return false;
    // TODO: Compare this._health with warrior.health()
  }

}

@olistic Based on your example this implementation works. I tried creating a method chained IsEnemy() to feel(), but doing a !warrior.feel().isEmpty() is enough

No es muy creativa mi respuesta, pero es otra alternativa:
class Player {
playTurn(warrior) {
if (this.health==null){this.health=0;}

if (this.health==0) {warrior.walk()}
else if(this.health<=5){warrior.attack()}
else if(this.health<=6){warrior.walk()}
else if(this.health<=10){warrior.attack()}
else if(this.health<=20){warrior.rest()}
else if(this.health<=22){warrior.walk()}
else if(this.health<=30){warrior.attack()}
else if(this.health<=35){warrior.walk()}
this.health = this.health+1
warrior.think(this.health);
}
}


Angular 2.0 Sample

Have added angular 2.0 documentation, please let me know any other changes needed, very happy to change the docs available

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@karthikeyanVK : Thanks for your contribution to the Azure documentation! The author, @dstrockis, has been notified to review your proposed change.

@karthikeyanVK wow, thanks so much for sharing! We have been getting a lot of asks lately for Angular 2.0 guidance, so I'd love to feature your sample somehow in our docs.
Adding @jmprieur as FYI.  We'll figure out someone to do a quick review of your code and decide how we want to publish it.

Glad to change as per Microsoft standards.

@jmprieur @danieldobalian did you guys ever decide what to do with this? @karthikeyanVK has provided a great angular 2 sample that would be useful for other customers I'm sure; we should find a way to feature this in our docs.

@karthikeyanVK sorry for how long this is taking.  We're taking a look at the code internally and will get back on that point.
Are you open to contributing this code to a repo hosted by Microsoft? We will not be able to accept a contribution that's pointing to code in your personal repo. If so, we would create a new repo in the Azure-Samples organization for this sample. Please let me know!

@danieldobalian : i have no problem in contributing in repo hosted by Microsoft. Thanks.

@danieldobalian Please follow up with @karthikeyanVK regarding hosting code in Microsoft repo and pointing content to that.

@karthikeyanVK thanks for your patience. We're reviewing the request internally right now.  I'll post here with an update and steps to re-submit if we want to go that direction.

@danieldobalian  Sure. Please Let me know after your review

@danieldobalian Have you had a chance to review?

@karthikeyanVK Apologies for the delay. We reviewed the sample and noted that the library used for authentication is a fork of a library that is not actively maintained and documented. We unfortunately cannot point to this sample from our docs. Thank you for contributing and for your patience.

#please-close


Add feature so that model properties can have an attribute to "override" built in conversion of .NET to SQL types

EF 6 "assumed" that all .NET DateTime properties should be converted into SQL DateTime2 data types when using SQL 2008+.
https://github.com/aspnet/EntityFramework6/issues/578
It would be nice if the person building the .NET models could "override" this "automatic" conversion by adding attributes to their .NET properties.
This way they have more control of the SQL data types.
Maybe EF Core could add this feature?
Something like this.
[Column(TypeName ="datetime2")]
public DateTime TestDate { get; set; }

[Column(TypeName ="datetime")] // Not needed by default
public DateTime AnotherTestDate { get; set; }

Hi,
It’s already there ... see https://docs.microsoft.com/en-us/ef/core/modeling/relational/data-types#data-annotations
Cheers

@amoorthaemer
EF 6 also had a "Column / TypeName" attribute for the Data Annotations but it seems to ignore the "TypeName".
Which is why I can't use it with SQL 2016.
Anyway, thanks for the information link.

@ImGonaRot if you have provide a repro that shows EF Core ignoring ColumnAttribute.TypeName please re-open. That shouldn't be the case.


64 items limit :(

Atleast it should be documented, preferably in the README.md

It's documented here: http://aantron.github.io/better-enums/ExtendingLimits.html
I'll make it more obvious when adjusting docs in the future.


feat(builder): add inline chunk plugin

PR Details

add PluginInlineChunk

add webpack plugin InlineChunkHtmlPlugin into builder
register InlineChunkHtmlPlugin in PluginInlineChunk and enable inline base on options in output

change PluginEntry

add entries defined by source.vendorEntry into webpack-chain entry

change PluginHtml

filter out vendorEntry before register html plugin, because they don't need a html file
add all vendorEntry to existing html plugin chunks option

change PluginSplitChunk

set runtimeChunk to single mode (with name builder-runtime) because there could be more than one entries in a html

Description

Related Issue

Motivation and Context

How Has This Been Tested

Types of changes

[ ] Docs change / refactoring / dependency upgrade
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

[ ] My code follows the code style of this project.
[ ] I have updated changeset
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

把 vendorEntry 相关内容独立到 #1688 中，这个 PR 只保留 inline chunk 的功能

LGTM~


[Bug] Unstable tailscale client Integration Test fails

Is this a support request?

[X] This is not a support request

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
Currently the Integrationtest for TestAuthKeyLogoutAndRelogin is failing with the latest unstable tailscale client. This is probably caused by an update of the client. In more detail some verification of DERP is failing. For detail see for example this failed job
Also was able to reproduce this behaviour locally.
Expected Behavior
The Integration test should work for the new unstable version again. We probably to investigate a bit further.
Steps To Reproduce
To localy reproduce you can run the run.sh scrip in the integration test as following:
integration/run.sh ^TestAuthKeyLogoutAndRelogin$ 1

Environment
- Integration Test [Workflows](https://github.com/juanfont/headscale/blob/main/.github/workflows/test-integration.yaml)
- Locally

Runtime environment

[ ] Headscale is behind a (reverse) proxy
[ ] Headscale runs in a container

Anything else?
No response

Now fixed in #1931


Adding Kurdish Language (cks)

hello,
this is all about the Kurdish Language:
https://en.wikipedia.org/wiki/Kurdish_languages
thanks for adding it. ♥

Right ISO code for Kurdish is ku (not cks): https://fr.wikipedia.org/wiki/Liste_des_codes_ISO_639-1
Then if you know Kurdish, you should submit a pull-request to add the src/Lang/ku.php file.

thanks, @kylekatarnls  for your response,
We have tow of most used dialects in the Kurdish language:

ckb: Central Kurdish (used by Kurdish people in Iraq and Iran)
Ku: Kurmanji (used by Kurdish people in Turkey and Syria)

and they are different from writing alphabets and speaking, so they are used on facebook, Check this:
https://developers.facebook.com/docs/messenger-platform/messenger-profile/supported-locales
ku: Kurmanji Kurdish: facebook code = ku_TR
ckb: Central Kurdish: facebook code = cb_IQ
and I'm from the part of Kurdistan of Iraq. that's a reason that why I asking for the ckb version of the Kurdish language.
best regards.

So what you propose is in fact cb.php if I well understand.

that's my pull Request: https://github.com/jenssegers/date/pull/303