2D dimension spike train dissmillarity cannot be calculated directly

Hello elephant community,
I have been trying to compute spike train dissimilarity using VP and VR distances for 2D data (in my case $156 \times 325$, 325 is time dimension, 156 is spatial dimension), but it always gives me error saying that it cannot broadcast. is it possible to compute the spike train dissimilarities for 2d or higher dimensions?
Thanks in advance

Hi, I'm not sure I fully understand what is meant by VP and VR on 2-D data.
The current implementation take in lists of Neo Spiketrain objects, which contain the spike times of individual neurons, independent of spatial locations (https://elephant.readthedocs.io/en/latest/reference/spike_train_dissimilarity.html).
When you say 2D data, are you referring to a 0/1 matrix of (time x neuronID)? In that case the matrix would have to be converted to Spiketrain objects first -- in fact that's an interesting use case that we didn't come across yet, and probably there should be a function for this -- I'll put that as an issue. For now, you'd have to do something like (no guarantee):
binning = 1 * pq.ms  # time bin size of the matrix
spiketrain_list = []
for neuron_id in range(matrix.shape[1]):
    spiketimes = np.where(matrix[:,neuron_id]==1)(0) * binning
    spiketrain_list.append(
        neo.Spiketrain(spiketimes, t_start=0*pq.ms, t_stop=matrix.shape[0] * binning))

...then use spiketrain_list....

@mdenker thanks for promt reply,
I meant VP -  Victor–Purpura and VR - van Rossum distances. Let me clarify my problem in more detail. I have two spike trains X1 and X2. Both consist of 156 neurons and it's defined by neo.Spiketrain(.). The problem is that I can only calculate distances between neurons, but I want to measure distance between X1 and X2. So, basically, the times argument of neo.Spiketrain consists 2D matrix, rather list of values.

So, to understand correctly, X1 is a Neo Spiketrain object, but X.times is a 2D matrix, where dimension one goes through spike times and dimension 2 through 156 neurons?
As an example, if neuron 1 spikes at 1 ms and 5 ms and neuron 2 spikes at 6 ms and 10 ms, the .times matrix would look like the following?
[ 1, 6;
5, 10] * pq.ms

If this is the case, the problem is that there should be exactly one Spiketrain per neuron (and per trial/condition/time stretch/...), i.e., .times must but a vector. Having multiple neurons per Spiketrain object is problematic, since the spike counts are in general not equal (as in the mock example above, where both neurons fire exactly 2 spikes). Therefore you cannot in general specify a 2D matrix, unless you would introduce something like padding with None or so (a workaround for this is currently in dev in Neo for a container object to hold multiple spiketrains).
So the solution would be to have a list of Spiketrain objects, all of them carrying one spiketrain (with a list of its spike times). Hope this helps?

I agree with @mdenker, that the times of a spiketrain should be a 1d vector for exactly the reasons you listed. Unfortunately, this was not strictly enforced by neo yet, but will (hopefully) be changed soon (https://github.com/NeuralEnsemble/python-neo/pull/802). @tasbolat1 Does this clarify the issue?

@tasbolat1 is your 2D matrix is a binary matrix of zeros and ones?

Thanks everyone. @dizcza, @mdenker, the times is 2D matrix.  @JuliaSprenger, yes it clarifies everything.  Finally, I did it using add-hoc method, basically looping over each row. However, it would be useful if one can calculate spike train dissimilarities for multi-neurons.

Yeah, currently we support what neo supports. As soon as neo releases SpikeTrainList object that stores 2D matrix of times padded with NaNs, we start adding its support in Elephant as well. For now, the only solution is the add-hoc method that you mentioned.
If you want to speed things up, I suggest using our parallel module (docs, tutorial). It's not yet in the pip release, so you need to install the development version from the master branch (see Installation, choose Development version).
I'll leave it open for a while to see any discussion ongoing and close it in a week because, of course, we don't support incorrect ways of using neo data structures.

Ok, this clarifies it. However, then the issue is more about binary spike trains vs spike-time representations. I will  think about #310. This would enable to do something roughly like
a= [...matrix of ones and zeros)
spiketrain_list = elephant.conv.BinnedSpiketrain(a).to_spiketrain_list()
result = elephant.spiketrain_dissimilarity.victor_pupura(spiketrain_list)

BinnedSpikeTrain.to_spike_trains() feature request (make sense when your input data is a binned 2D matrix) is implemented in #390
Feel welcome to try out Michael's suggestion and share the feedback/bugs in a new issue.
Thanks.


Admin can't change things in Django Admin

Describe the bug
Works on 3.7 but not 3.6.6 (which is ok)
Although, when enabling MESSAGES_USE_SESSIONS = False, the Admin can't change things (I think because it can't find the Session for the message). What do you suggest?
Here is the error message:
Traceback (most recent call last):
  File "/web/src/django/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/web/src/django/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/web/src/django/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/web/src/django/django/contrib/admin/options.py", line 607, in wrapper
    return self.admin_site.admin_view(view)(*args, **kwargs)
  File "/web/src/django/django/utils/decorators.py", line 130, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/web/src/django/django/views/decorators/cache.py", line 44, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/web/src/django/django/contrib/admin/sites.py", line 231, in inner
    return view(request, *args, **kwargs)
  File "/web/src/django/django/contrib/admin/options.py", line 1641, in change_view
    return self.changeform_view(request, object_id, form_url, extra_context)
  File "/web/src/django/django/utils/decorators.py", line 43, in _wrapper
    return bound_method(*args, **kwargs)
  File "/web/src/django/django/utils/decorators.py", line 130, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/web/src/django/django/contrib/admin/options.py", line 1522, in changeform_view
    return self._changeform_view(request, object_id, form_url, extra_context)
  File "/web/src/django/django/contrib/admin/options.py", line 1573, in _changeform_view
    return self.response_change(request, new_object)
  File "/usr/local/lib/python3.7/site-packages/parler/admin.py", line 361, in response_change
    redirect = super().response_change(request, obj)
  File "/web/src/django/django/contrib/admin/options.py", line 1307, in response_change
    self.message_user(request, msg, messages.SUCCESS)
  File "/web/src/django/django/contrib/admin/options.py", line 1068, in message_user
    messages.add_message(request, level, message, extra_tags=extra_tags, fail_silently=fail_silently)
  File "/web/src/django/django/contrib/messages/api.py", line 34, in add_message
    return messages.add(level, message, extra_tags)
  File "/usr/local/lib/python3.7/site-packages/drf_messages/storage.py", line 121, in add
    Message.objects.create_message(self.request, message, level, extra_tags=extra_tags)
  File "/usr/local/lib/python3.7/site-packages/drf_messages/models.py", line 89, in create_message
    session = Session.objects.get(session_key=request.session.session_key)
  File "/web/src/django/django/db/models/manager.py", line 82, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/web/src/django/django/db/models/query.py", line 417, in get
    self.model._meta.object_name

Exception Type: DoesNotExist at /en/admin/jpnintl/smartcard/48/change/
Exception Value: Session matching query does not exist.

To Reproduce
Steps to reproduce the behavior:

Set MESSAGE_USE_SESSIONS to False in settings.py
Open the admin panel, and login
Select an item to change
Change something and try to save

Expected behavior
It should have saved successfully with a success message.
Project:

OS: Docker on macOS
Version: 1.1.0
Python Version: 3.7
Django Version Unknown
DRF Version Unknown

Hey, can please send the type(request.session) and dir(request.session)? (from one of your views)
Do you use any custom authentication backend?

Type of request.session: <class 'redis_sessions.session.SessionStore'>
Dir of request.session: ['TEST_COOKIE_NAME', 'TEST_COOKIE_VALUE', '_SessionBase__not_given', '_SessionBase__session_key', '__class__', '__contains__', '__delattr__', '__delitem__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_get_new_session_key', '_get_or_create_session_key', '_get_session', '_get_session_key', '_hash', '_session', '_session_cache', '_session_key', '_set_session_key', '_validate_session_key', 'accessed', 'clear', 'clear_expired', 'create', 'cycle_key', 'decode', 'delete', 'delete_test_cookie', 'encode', 'exists', 'flush', 'get', 'get_expire_at_browser_close', 'get_expiry_age', 'get_expiry_date', 'get_real_stored_key', 'get_session_cookie_age', 'has_key', 'is_empty', 'items', 'keys', 'load', 'modified', 'pop', 'save', 'serializer', 'server', 'session_key', 'set_expiry', 'set_test_cookie', 'setdefault', 'test_cookie_worked', 'update', 'values']

I use FirebaseAuth. If that fails (which it does incase it is an admin), I fallback to SessionAuth.

It is interesting, seems like you are using a different session backend, something like (django-redis-sessions), so the problem is more about storing the relation to it.
I need to add support for session engines other than django.contrib.sessions.backends.db.
I'll also add some test to cover that use case.
Then you will probably also have the option to use MESSAGES_USE_SESSIONS = True if you would like that feature.

Were you able to reproduce the issue?

Changed the the following:
SESSION_ENGINE = 'redis_sessions.session'

to
SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'

And it WORKS! You are right. I think we are in the right direction then. Redis is pretty common, so it'd be great to have that support.

The PR is actually done. I'll merge it to release 1.1.1 today so you will be able to test it against TestPyPI to make sure it is fixed.

@danyi1212 Awesome stuff. Checked that PR out. Hoping to see it up. I'll test for you.

Hey, new release available on TestPyPI https://test.pypi.org/project/drf-messages/


Circle CI fix

Coverage remained the same at 100.0% when pulling c43ef5f8db3083b1a5375bbcae8b37a0afdd0737 on dev into 69c8c05f53d00656db53e17ead3fb5ea9f7e3628 on master.


Ruby 2.8.0dev: ArgumentError when declaring const props in T::Structs

Input
require 'sorbet-runtime'
class MyParams < T::Struct
  const :name, String
end

Observed output
Failure/Error: const :name, String
ArgumentError:
  wrong number of arguments (given 2, expected 1; required keywords: array, enum)

travis-ci:
https://travis-ci.com/chanzuckerberg/sorbet-coerce/jobs/288224784
Expected behavior
No errors.

I'm unable to reproduce this locally, what version of sorbet and ruby are you using?

Hi, it's using sorbet-runtime-0.4.5173 (retrieved via a fresh bundle install).
$ ruby --version
ruby 2.8.0dev (2020-02-17T04:20:51Z master 3fbcdac3e4) [x86_64-linux]

There are problems with sorbet and ruby >= 2.7, could you try with ruby 2.6?

Yep, it works fine with ruby 2.6. I want to flag this issue because I find T::Struct to be a very useful feature and the error on the current ruby-head seems a little interesting :)

This doesn't reproduce with 3.0.0-preview1.
I'm guessing you found a bug in 2.8.0 that has since been fixed upstream.
I tested the snippet in the first post with
❯ ruby --version
ruby 3.0.0preview1 (2020-09-25 master 0096d2b895) [x86_64-linux]


GIT Template check in - Added

1 - Added quite a few widgets to show WIP for Roadmap view and one Git Template
2 - Implemented Issues and Pulls
3 - Modified Collecter default to 90 days (will move to a yml next PR)

Closing this PR. Let's clean it up before the PR.


Warn users that serve static must be after sass middleware

If you load the express.static middleware before node-sass-middleware, the middleware doesn't work. It must be loaded before serving static files.
In other words, this fails:
app.use(express.static(config.PUBLIC_PATH, { index: false }))
app.use(sassMiddleware({
  src: path.join(__dirname, 'styles'),
  dest: config.PUBLIC_PATH,
}))

But this works:
app.use(sassMiddleware({
  src: path.join(__dirname, 'styles'),
  dest: config.PUBLIC_PATH,
}))
app.use(express.static(config.PUBLIC_PATH, { index: false }))

Briefly, this is not possible for node-sass middleware to warn the user.
app.use(express.static(config.PUBLIC_PATH, { index: false }))
// if previous middleware handled the request successfully,
// the request will never reach the next SassMiddleware
//
app.use(sassMiddleware({
  src: path.join(__dirname, 'styles'),
  dest: config.PUBLIC_PATH,
}))

This is the default middleware pattern, where precedence works like:

if nth middleware handles the request successfully, n+1th middleware shall not be executed.
if nth middleware does not want to handle the request, it should bail out and call next() to reach n+1th middleware and since so forth.

Thus, essentially consumers are in control of the application flow and the middleware should be arranged as they see fit.

Sorry, more clearly I meant it should be mentioned in the README that this is required so new users know that they need to double check the order

Just created a PR to add the note

Thanks @danawoodman! :tada:

👍 😸


Fix java.nio.channels.OverlappingFileLockException

Rationale
Exception report.
Related Pull Requests

Changes

call FileChannel.tryLock instead of lock to handle the case when a file was already locked by JVM.

@labkey-matthewb can you review this? I touched that line last but I believe you introduced that lock() call many years ago. My concern is that this change will avoid the exception but potentially copy a partial or mangled file.

@labkey-matthewb can you review this? I touched that line last but I believe you introduced that lock() call many years ago. My concern is that this change will avoid the exception but potentially copy a partial or mangled file.

@labkey-matthewb can you review this? I touched that line last but I believe you introduced that lock() call many years ago. My concern is that this change will avoid the exception but potentially copy a partial or mangled file.

Here is the doc for tryLock. From the description, it returns null if the file is already locked, but would still throw exception due to other reasons.
Attempts to acquire a lock on the given region of this channel's file. This method does not block. An invocation always returns immediately, either having acquired a lock on the requested region or having failed to do so. If it fails to acquire a lock because an overlapping lock is held by another program then it returns null. If it fails to acquire a lock for any other reason then an appropriate exception is thrown.

Doesn't this mean that there is another thread that is trying to write to the same file?  That seems bad.  Maybe we should add error logging to see why we have two threads writing to the same file.  Or just have the caller handle this exception and present a message like "file is in use".  It doesn't seem right to continue.
I say this knowing that the majority of cases in the code we are not so careful and wouldn't notice that we have conflicts.


only captured json files, where is the captured images?

I somehow let the gta v loaded gta5.hk. But, after F12 pressed in game, I only see a lot of  *_state.json file in cap directory.  How can i capture images?

The capture plugin (https://github.com/philkr/gamehook/blob/master/plugins/capture/capture.cpp) will not trigger any image captioning by itself. The easiest way to capture images is through the webserver. Call localhost:8766/settings?fps=1, which should trigger the recording. You can also use python to trigger it manually, see pyhookv (https://github.com/philkr/pyhookv/blob/master/examples/gtapilot.py) and the python plugin (https://github.com/philkr/gamehook/tree/master/plugins/python) for examples.

@bradyz   thanks,  by your settings I can see albedo, disparity, object_id and flow  images in browser.
But I cann't see "final".  I don't know why?

Okay that's what I thought - I had to make some small tweaks to get the "final" (this is just raw image frames) working.
Replace gta.cpp, line 81 with
std::unordered_set<ShaderHash> final_shader = { ShaderHash("6eef7895:a8818cdd:d19840f5:68c224f4") };

This fix is not the best (the logger spews out warnings), but it gets the job done for now and you should be able to retrieve the images. I'm currently looking for a better fix.

@bradyz, it works, my shader hash is:
final_shader = { ShaderHash("e5807043:550206a0:a0b79a2f:a142d658") }

It looks like v1.0.1365 actually changed some of the post processing shaders out. 12c5bc288e10b5d4a2a0bc0ef01b0be47bdee448 contains a new logic to find the output before the final distortion shader. Closing this for now, please reopen of not fixed.

@yulong314 Do you have an example of the flow image? All I get is a black image. Which GTA version are you using?

@bradyz, it works, my shader hash is: final_shader = { ShaderHash("e5807043:550206a0:a0b79a2f:a142d658") }

@yulong314 @bradyz @benjamintanweihao Hi, do you know how to capture the raw data and image automatically rather than triggering through the webserver?

@annopackage I haven't touched this in a few years but I managed to dig up some notes I had:
GTA

The setup for GTA is pretty involved. These are roughly the setup steps involved:

Download GTA V
Compile the Gamehook and Gamehook GTA Plugin in Visual Studio (This results in the dxgi.dll, server.hk, capture.hk, and gta.hk files)
Copy the compiled assets into the GTA V folder
Copy the ScriptHook V files into the GTA V folder

	After this one time setup, the capture process is roughly:

When GTA V starts, the plugins should be loaded, along with the server and capture plugins
Enter http://localhost:8766/settings?fps=1&targets=flow&targets=final&targets=albedo&targets=disparity&targets=object_id into a browser window to trigger capturing. Each target corresponds to a type of capture.

Object IDs are for instance segmentation. Class segments can be recovered from the object id frames via some bit manipulation. In particular, the last 4 bits encode the class labels.
Disparity captures the depth information.
Final is the original image.
Flow captures the optical flow.

Frames are stored in the cap directory in the GTA V folder.


Deadlock when sarama commit an out of range offset

This is a dup of: https://github.com/bsm/sarama-cluster/issues/121
Reopening this with data here:
`
I am reopening this one as I saw a similar behavior:
(1) Producer was producing at a much higher rate than the consumer
(2) Consumer was trying to commit offset which is already deleted.
I was able to log the error message as well by listening on consumer.Errors() channel and got this one:
kafka-consumer : Failed to consume message. Error: kafka: error while consuming topic: kafka server: The requested offset is outside the range of offsets maintained by the server for the given topic/partition.
After this since the pc.Loop() above doesn't refresh, which means we will just be stuck as @plopik mentioned above. I think it will be better to just trigger a rebalance() which should get us out of this situation as mentioned earlier.
`

@aravindvs can you please test with https://github.com/bsm/sarama-cluster/pull/169, this should fix you issue once and for all

@dim - Thanks! will definitely try it and let you know.

Should be fixed, please re-open if you still experience problems


Initiate bootstrap service on login

[] Add backing store cmd line option, create stores
[] Add "create profile" endpoint
[] Add "retrieve profile" endpoint
[] Add simple client

Split this issue into 4 smaller ones:
https://github.com/trustbloc/hub-auth/issues/18
https://github.com/trustbloc/hub-auth/issues/19
https://github.com/trustbloc/hub-auth/issues/20
https://github.com/trustbloc/hub-auth/issues/21


query about moves.py

On line 215 & 216 of moves.py, the function  OEPerceiveResidues was called twice successively. Is there a particular reason for the current command structure? Just trying to understand the function..
OEPerceiveResidues(molecule, OEPreserveResInfo_All)
OEPerceiveResidues(molecule)

@nathanmlim , any insight? This sounds to me like it is probably a typo.

Addressing in PR #128

Fixed.


getSavedScanAPI

-> currently token used here is basicAuth .

Clarification reg. /getSavedScan API.
As you can see in Postman Collection and Swagger documentation (refer below screenshots) of /getSavedScan API,
it accepts Basic Auth which expects username/password instead of bearer token.
This is specific to this particular API and the reason is, apart from the frontend Saral App this API (/getSavedScan) may be used by other Apps or jobs to fetch saved scan details to process or push to CCube database.
Reference backend implementation for Basic Auth you can find it here - https://github.com/Sunbird-Saral/Project-Saral/blob/v1.0.0-beta.1/v1.0/backend/src/middleware/auth.js#L22-L34
PostMan Collection:
getSavedScan_postmancollection_screenshot.png
Swagger Documentation Reference:
https://github.com/Sunbird-Saral/Project-Saral/blob/v1.0.0-beta.1/specs/v1/swagger-saral-apidoc.yaml#L316-L317
swaggerdoc_screenshot.png


getting exception when booking product type is not same as cart item for same product id

Bug report
Title
getting exception when booking product type is not same as cart item for same product id
Issue Description
getting exception when booking product type is not same as cart item for same product id
Preconditions
1. framework Version- master

Steps to reproduce
1. step1- add to cart appointment booking
2. step2- edit same product type from appointment to event booking from backend
3. step3- now reload the cart again

Expected result
The item should be removed from the cart
Actual result

[points....]

fixed


How do I add an account password to the eureak container apollo-configservice?

Hello, big God,
My version of apollo is:
Apolloconfig/Apollo - configservice: 2.2.0
Apolloconfig/Apollo - portal: 2.2.0
Apolloconfig/Apollo - adminservice: 2.2.0
Basic information:

eureak container apollo-configservice,
Access address:
http://<IP_ADDRESS>:18081/
The screenshot is:

My need is: how to make this access address plus account password? I need to map this address to the public network so that people in other regions can use the apollo-configservice service.
The interface I want to see looks like this:

I really hope you can help me answer this question,Thank you very much

@suixhxy What you need should be the url. This project is an open source autonomous driving system

@suixhxy What you need should be the url. This project is an open source autonomous driving system

@suixhxy What you need should be the url. This project is an open source autonomous driving system

Thank you very much for your answer. I get it


Problem load map on basic example

Hello,
i'm trying to recreate the basic example but it seems that i can't load the map (see image).
I have include the following dependencies:
-angular version 1.2.6
-leaflet 0.7.1
-angular-simple-logger
-ui-leaflet-1.0.0
I get errors reporting that "Failed to load resource: net::ERR_FILE_NOT_FOUND file://a.tile.openstreetmap.org/1/0/0.png" , "file://b.tile.openstreetmap.org/1/1/0.png " etc.
Could you give me any hints about what is going wrong?

Thank you in advance.

Hi cmbreki,
Are you running the example HTML page through a webserver, or are you just testing the HTML page by opening it directly in your browser? (e.g. with a URL of something like file://users/cmbreki/desktop/leaflet-test/index.html)
I think this may be why it's not working for you, because ui-leaflet uses relative paths and assumes you are running on a web server. This is why the tile URLs in your console error messages are all pre-pended with "file://" -- the application is looking on your local file system for these tiles.
If this is the case, try spinning up a simple web server and testing your page through that instead. If you're on a Mac or Linux, you can open Terminal, cd to the folder where your index.html file is hosted, and type python -m SimpleHTTPServer 8000. Then, open your browser and go to localhost:8000.

@cmbreki please respond if this helped.

Thank you very much.
That was the problem.


Cannot test SPFX extension on classic page

Category

[x ] Question
[ ] Typo
[x] Bug
[ ] Additional article idea
I am writing a spfx extension to customizeaster page navigation. I am trying to test the extension on a classic site. But I am not being promoted to load debug scripts after running gulp serve. Are SPFX extensions incompatible with classic sites?
Expected or Desired Behavior: Prompt to load debug scripts comes up when loading classic site when running gulp serve.

Observed Behavior
After running gulp serve prompt to load debug scripts does not show up.
Steps to Reproduce
Create an SPFX extension and set it so that the URL of a classic site loads. Then run gulp trust-dev-cert and gulp serve.

Here is a SPFx application customizer solution works on Classic sites and Modern sites.
Solution: spfx-global-navigation
Classic site deployment process is different. It’s not an app / app package. The solution creates a separate JavaScript file that is uploaded to your site and linked via a site script link.
To generate the latest JavaScript run the build.cmd. That will generate both a new .sppkg for Modern sites and the .js file for Classic sites. After a successful build, the top-navigation.js file will be in the classic-dist folder.
Then upload the file to a library, alternatively you could host this file on a CDN if the plan is to use it on more than 1 site collection. And we can use SP-Editor for Chrome to attach a site script link.
The following article for your reference.
SPFx Application Customizer that works on Classic SharePoint Sites
Dennis Guo
Microsoft SharePoint Community Support


update guide to reflect current dispatcher.js code

Old guide had dispatcher.js code that pointed to a previous dependency (flux). Updated to reflect the current code.

Thank you for submitting this pull request, however I do not see a valid CLA on file for you. Before we can merge this request please visit https://yahoocla.herokuapp.com/ and agree to the terms. Thanks! :smile:

CLA is valid!

Thanks!

Hmm, this article was actually taking a flux example and make it fluxible. So it was actually meant to have flux as the dependency. I think this should be reverted.

Yep I understand. It seemed weird going through the guide the first time around that a new dependency was being brought in ('flux'). In further sections you do have the current source included though, so as long people aren't expecting to create the project as they go the guide (which is what I was trying to do) it works as it is. Great article by the way!


Add a comments field

Add a comment field to each created url.
What for?
I use YOURLS for cross-media campaigns, so the short url's are put on print media like flyers or brochures.
To be able to track these paper sources as "referral" for a visitor of the (long) url, you need to keep track of which short url is used where.
This is where an additional field for notes would help to keep the overview in YOURLS
I think of something like this for the list of URL's:

That's left to plugin territory (there are several issues about this)

I'm still interested in doing this.
Maybe someone with good knowledge of YOURLS's code has hints how to approach that? Where to start looking?
For adding another field to the DB, track-custom-keywords
https://github.com/timcrockford/track-custom-keywords
might help me. But about adding a col. to the list of short-url's, as outlined in my screenshot, i'm not sure where i'd start...

Semoga sukses :
http://obatamandel.utamakansehat.com/
http://obatflekparuparu.utamakansehat.com/
http://obatgondok.utamakansehat.com/
http://obatgulabasah.utamakansehat.com/

+1 - I'd be really interested in that as well and would love to have something like the OP suggested. Couldn't find any other place to leave this feedback/feature request - hope it's somewhat constructive here. Cheers.


KeyError traceback

Trying out generating PHP docs per https://mike42.me/blog/2018-06-how-to-create-effective-php-project-documentation-with-read-the-docs, and doxyphp2sphinx crashed on me:
docs$ doxyphp2sphinx Soong
Processing namespace Soong
  refid is namespace_soong
  Opening xml/namespace_soong.xml
  Page title will be 'API documentation'
  Page path will be  './api.rst'
  Desc is ... '
'
...
Processing class Soong::Console::Command::EtlCommand
  refid is class_soong_1_1_console_1_1_command_1_1_etl_command
  Class title will be 'EtlCommand'
  Class path will be  './api/console/command/etlcommand.rst'
Traceback (most recent call last):
  File "/usr/local/bin/doxyphp2sphinx", line 11, in <module>
    sys.exit(Cli.run())
  File "/Library/Python/2.7/site-packages/doxyphp2sphinx/cli.py", line 28, in run
    generator.render_namespace_by_name(tree, root_namespace)
  File "/Library/Python/2.7/site-packages/doxyphp2sphinx/rstgenerator.py", line 29, in render_namespace_by_name
    self.render_namespace_by_ref_id(child.attrib['refid'], this_namespace_name)
  File "/Library/Python/2.7/site-packages/doxyphp2sphinx/rstgenerator.py", line 79, in render_namespace_by_ref_id
    self.render_namespace_by_ref_id(ns_id, ns_name)
  File "/Library/Python/2.7/site-packages/doxyphp2sphinx/rstgenerator.py", line 79, in render_namespace_by_ref_id
    self.render_namespace_by_ref_id(ns_id, ns_name)
  File "/Library/Python/2.7/site-packages/doxyphp2sphinx/rstgenerator.py", line 74, in render_namespace_by_ref_id
    self.render_class_by_ref_id(cl_id, cl_name)
  File "/Library/Python/2.7/site-packages/doxyphp2sphinx/rstgenerator.py", line 343, in render_class_by_ref_id
    class_rst = self.class_xml_to_rst(compounddef, title)
  File "/Library/Python/2.7/site-packages/doxyphp2sphinx/rstgenerator.py", line 124, in class_xml_to_rst
    baserefid = base_class.attrib['refid']
KeyError: 'refid'

It would seem to be choking either finishing the EtlCommand class or starting the MigrateCommand class in https://gitlab.com/soongetl/soong/tree/master/src/Console/Command.
Any thoughts?

So, while Doxygen seems to handle {@inheritdoc} for purely internal hierarchies, it doesn't pick it up when inheriting from a library in ../vendor (the description is empty in these cases, presumably this is what confused doxyphp2sphinx). I need to research Doxygen a bit to see how I can have it pull in inherited docs from vendor but not generate the docs for everything in there...

Cheers, labeling this as 'bug', since we should prefer to skip past unsupported doxygen features rather than crashing out.

I had some quick fixes locally to get this working, here is the modified file: https://gist.github.com/romaninsh/10a0c8acf24aef9d06a9b658a3c7c0ba


Document EditorPlugin get_plugin_icon and get_plugin_name

Documents the get_plugin_icon feature added in #14348 as well as documenting get_plugin_name. Also, the return value's type hint for get_plugin_icon is now accurate.

Thanks!

Cherry-picked for 3.2.1.


[FLINK-35981][transform] Transform rule support referencing one column more than once

Currently, transform rule (projection / filtering) doesn't support referencing one column more than once, which means if we write such a projection rule:
transform:
projection: *, age * age AS age_square
filter: age < 18 OR age > 60
Caused by: org.apache.flink.shaded.guava31.com.google.common.util.concurrent.UncheckedExecutionException: org.apache.flink.api.common.InvalidProgramException: Expression cannot be compiled. This is a bug. Please file an issue.
Expression: import static org.apache.flink.cdc.runtime.functions.SystemFunctionUtils.*;age * age

please help to review this PR, thanks. @yuxiqian

Hi @MOBIN-F, sorry but another rebasing might be required since #3465 got merged.

Hi @MOBIN-F, sorry but another rebasing might be required since #3465 got merged. :(

done


[ZH-CN] Feedback for: /fundamentals/getting-started/your-first-multi-screen-site/content.html

Hi, I learn this course from chinese page, but I found that the page is defference between the english page.
the chinese edition is missing something like  section and etc.

we don't have every page translated yet, so this would explain it.  We are open to recieving translations if you can help.


Update French localization

Following on from my previous PRs, I again used DeepL and my own knowledge of French to translate the new strings.
All feedback from native French speakers is welcome – especially @Signez of course 🙏
Most of the new strings are related to the upcoming starter packs feature, and I went with pack de démarrage but I have no strong attachment to that so if there's a better translation please let me know :)
I didn't really have a clue what word would be best to use for toggle as a noun here:
https://github.com/bluesky-social/social-app/blob/0a0c7387905c7dc61fefd4f5f27d53b4797c00f6/src/components/StarterPack/Wizard/WizardListCard.tsx#L52
so I took a guess with bouton but that's almost certainly wrong. Please let me know what it should actually be 😄

Hey! I'm just starting now to review your changes, can't wait to dive into those translations.
But first, about starter pack, honestly pack de démarrage is okay, but I feel that kit de démarrage would be even better. If you are okay with such a change, you can find & replace it across all your translations: those nominal groups have the same gender (masculine).
For toggle, I think that most of the time bascule works well, but to be fair, Bascule d‘utilisateur doesn't mean much and sounds weird even in context… honestly, bouton d’ajout ou de retrait de l’utilisateur is nearly the choice that would sound the less weird, but I wasn't really sure if it would fit in the UI (or is it an accessibility label? not clear when I browse the code 😬)

But first, about starter pack, honestly pack de démarrage is okay, but I feel that kit de démarrage would be even better. If you are okay with such a change, you can find & replace it across all your translations: those nominal groups have the same gender (masculine).

Great, just done that 👍

For toggle, I think that most of the time bascule works well, but to be fair, Bascule d‘utilisateur doesn't mean much and sounds weird even in context… honestly, bouton d’ajout ou de retrait de l’utilisateur is nearly the choice that would sound the less weird, but I wasn't really sure if it would fit in the UI (or is it an accessibility label? not clear when I browse the code 😬)

I think it has to be an accessibility label because it doesn't seem like it's displayed in the interface, but then it looks to me like there's an accessibility label right after that? So I'm really not sure what's going on there 🤷🏻♂
Please suggest whatever you think is best and I'll go with it :)

OK I think I got all the changes (sorry for doing the find and replace while you were doing your review, I should have waited until you had finished to avoid complicating things).
I just wanted to double-check whether it should be dans or de here:
https://github.com/bluesky-social/social-app/pull/4611#discussion_r1651618772

Okay, we're set?

Yup, ready to go @pfrazee


Support for Elasticsearch queries from Grafana

Would Trickster work for elasticsearch queries as well

@softwareklinic thanks for the question and for your interest in Trickster. I hope you don't mind that I mark this as a duplicate and close, because we actually have an issue open for ElasticSearch support -- #7. So the short answer is, not yet, but we hope to at some point in 2020. I will update #7 when we have more info to share.


Legion GPU saxpy example

I've read the example code for GPU version realm_saxpy. Is there any example for Legion GPU saxpy? I still can not figure out how to implement a gpu function using the Legion high-level API.
Looking forward to your reply.

I'd recommend looking at the Thrust interop example which happens to implement Saxpy in Legion:
https://gitlab.com/StanfordLegion/legion/-/tree/master/examples/thrust_interop
If you wanted to do it with plain CUDA instead of Thrust, all the Legion code would be identical and you would just replace the thrust::transform call with CUDA kernel launch:
https://gitlab.com/StanfordLegion/legion/-/blob/master/examples/thrust_interop/thrust_shim.cu#L73

I'd recommend looking at the Thrust interop example which happens to implement Saxpy in Legion:
https://gitlab.com/StanfordLegion/legion/-/tree/master/examples/thrust_interop
If you wanted to do it with plain CUDA instead of Thrust, all the Legion code would be identical and you would just replace the thrust::transform call with CUDA kernel launch:
https://gitlab.com/StanfordLegion/legion/-/blob/master/examples/thrust_interop/thrust_shim.cu#L73

Thanks for the repaid replay! Close this issue because I forget to set -ll:gpu parameter in my program. I have successfully implemented the example and will share it in the next few days.
Best regards!


Fix further warnings in headers

Second round of fixes. Among the others, it is possible to mention:
1. misleading-indentation** - (this 'for' clause does not guard...)
2. shift-negative-value - (left shift of negative value)
3.  implicit-fallthrough - (this statement may fall through)
Fix a further warning as found in fontstash.h.

stb_image and stb_truetype upstream is nothings: https://github.com/nothings/stb
Modifying them here I think causes merging problems in future and/or will get overwritten once NanoVG updates to newer versions of these stb files. So these should be patched in nothings upstream and flow then unmodified into NanoVG.

Oooh boy...I see. Sweet Jesus, this thing is escalating! :rofl:

Ok, I'm going to push the patch there and let's see how that goes. Thanks for the super-fast feedback!

@QUItCoding So the fix for fontstash.h is fine, I have only to remove the stuff for stb, right? Also, the stb files seems to have undergone quite a few changes in the upstream repo: do you think that can create issues for the subsequent update of nanovg?

Yes fontstash.h is from NanoVG (or https://github.com/memononen/fontstash) so can be patched here.
It should be possible to update to newer stb_image and stb_truetype, at least you could try and then submit pull request of that =)

It should be possible to update to newer stb_image and stb_truetype, at least you could try and then submit pull request of that =)

Seems they have solved most of the warnings upstream. Yay! Going to open a micro-PR there and let's see. Thanks, as always, for the quick feedback. :smile:

@QUItCoding I've force pushed and removed the offending changes. Could we merge this, now? I think this should be ok now.

@QUItCoding can we merge this? I'll post-pone the update of the nothings stuff at a secondary step, if that is ok for you. I've opened a PR there but there seems to be no answer yet. Thanks.

Ah I had forgotten to push merge button, sorry about that, merged now 👍


postal address

Hi Jason,
Great stuff and thanks for posting this up.
In real world, a lot of people use Postal address, like this:
GPO Box 500606 Canberra Act 2004
When it goes through your parser, it returns :
{'street_name': 'GPO', 'street_type': 'BROW', 'postcode': '5006062004', 'locality_name': 'CANBERRA', 'state': 'AUSTRALIAN CAPITAL TERRITORY'}
Not sure why it generated a street type BROW. Is there training data that could address this?
Or would that require some re-coding?
Cheers,
Nick

This one fails mostly because it's not actually a street address, and the training data was exclusively composed of street addresses. Specifically, it assigns a probability to each letter of the address for each component of a street address (there are 22 possible categories that a letter could be assigned to, which are described in the README file). None of these are presently suitable for a GPO Box or any other non-street address, unfortunately. So to directly answer your question, it would require substantial modifications and additional data. Probably the data would have to be synthetic for G/PO Boxes as I'm not aware of any freely available datasets for this.
The reason you got something strange for the street type ("BROW") is that of the collection of characters that the model assigned a class of "street type", the closet match to a known street type was BROW (based on the Jaro-Winkler string similarity measure). I'm going to take a stab and say that "Box" was though to to be the street type, which was then matched to BROW. This is the first time I've heard of this street type myself, but apparently it's a thing.
I'm going to close this issue as I consider it out of scope, but don't let this discourage you from working on any solutions if you feel so inclined. The reason I consider it out of scope for this project is that the overall objective was to leverage some freely available address data to train a classification model that's easier to handle than some unwieldy regex in view of solving problems like geolocation.
One suggestion for anyone (yourself, myself, or others who read this) going forward might be to introduce a new class of "other" so that you can at least confidently extract known parts like postcode, suburb, state, without falsely extracting street names, etc., when they aren't present. This might produce an output that looks something like the following for your example:
{
    "other": "GPO Box 500606",
    "locality_name": "Canberra",
    "state": "ACT",
    "postcode": "2004"
}

You could then use some downstream processing (perhaps even a regex) to test for things like G/PO Boxes, etc.

Thanks. I'm not expecting you to change your program either just trying to
highlight potential gotchas.
The other type of non Street address is the RMB address (road side mail box
for rural properties) that will break your code too.
https://en.m.wikipedia.org/wiki/Roadside_Mail_Box
Cheers
Nick
On Wed, 18 Sep 2019 at 4:53 pm, Jason Rigby<EMAIL_ADDRESS>wrote:

This one fails mostly because it's not actually a street address, and the
training data was exclusively composed of street addresses. Specifically,
it assigns a probability to each letter of the address for each component
of a street address (there are 22 possible categories that a letter could
be assigned to, which are described in the README file). None of these are
presently suitable for a GPO Box or any other non-street address,
unfortunately. So to directly answer your question, it would require
substantial modifications and additional data. Probably the data would
have to be synthetic for G/PO Boxes as I'm not aware of any freely
available datasets for this.
The reason you got something strange for the street type ("BROW") is that
of the collection of characters that the model assigned a class of "street
type", the closet match to a known street type was BROW (based on the Jaro-Winkler
string similarity measure
https://en.wikipedia.org/wiki/Jaro–Winkler_distance). I'm going
to take a stab and say that "Box" was though to to be the street type,
which was then matched to BROW. This is the first time I've heard of this
street type myself, but apparently it's a thing
https://meteor.aihw.gov.au/content/index.phtml/itemId/429840.
I'm going to close this issue as I consider it out of scope, but don't let
this discourage you from working on any solutions if you feel so inclined.
The reason I consider it out of scope for this project is that the overall
objective was to leverage some freely available address data to train a
classification model that's easier to handle than some unwieldy regex in
view of solving problems like geolocation.
One suggestion for anyone (yourself, myself, or others who read this)
going forward might be to introduce a new class of "other" so that you can
at least confidently extract known parts like postcode, suburb, state,
without falsely extracting street names, etc., when they aren't present.
This might produce an output that looks something like the following for
your example:
{
"other": "GPO Box 500606",
"locality_name": "Canberra",
"state": "ACT",
"postcode": "2004"
}
You could then use some downstream processing (perhaps even a regex) to
test for things like G/PO Boxes, etc.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jasonrig/address-net/issues/8?email_source=notifications&email_token=ANHHLKC5Y5KOIPYVWNFX6PTQKHF7ZA5CNFSM4IXYTI52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD67ALHA#issuecomment-532546972,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANHHLKF73FXFDSUDF6ZJNILQKHF7ZANCNFSM4IXYTI5Q
.


Error using MongoDB on php 8.2

Description:
Error message output from Lambda

Warning: PHP Startup: Unable to load dynamic library 'mongodb.so' (tried: /opt/bref/extensions/mongodb.so (libssl.so.1.1: cannot open shared object file: No such file or directory), /opt/bref/extensions/mongodb.so.so (/opt/bref/extensions/mongodb.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

How to reproduce:
functions:
  test:
    handler: public/test.php
    description: ''
    runtime: php-82
    layers:
      - ${bref-extra:mongodb-php-82}

In order for me to workaround this error on local docker, this is the command I added to Dockerfile
FROM bref/php-82-fpm-dev:2

# Fix "tried: /opt/bref/extensions/mongodb.so (libssl.so.1.1: cannot open shared object file: No such file or directory)" error
RUN yum -y install openssl11-libs.x86_64

Link : https://github.com/brefphp/extra-php-extensions/issues/428


Expand and collapse in the tree needs precise clicking to prevent selecting the node instead of expand or collapse

When in the screenshot below you click on the red marked area it will select the checkpoint instead of collapsing it. A second click will then collapse it but as a user you would like to collapse it without selecting the checkpoint.

Also when you click on the following area once it will select the node and a second click on that area will collapse the node:

I think it would be better to give this area only the function of selecting a node and the collapse/expand icon only the function of collapse and expand

It's also an option to allow the node to expand if the user double clicks, is that also acceptable or do you want it like you described?


New data feed work scheduling system

Description

The new scheduler will create a dedicated thread pool
Work will be prioritized based on their weight and new items will have
highest priority. The weight will be determined by the size of the
subscription enqueueable.
The work queue will be sorted and the weights updated by a dedicated
thread
There will be a maximum weight value that will 'disable' a work item
until their weight comes down
The consumer will not know about workers or anything alike anymore.
Applying a general max work queue size of 400 items, this will reduce
CPU and RAM usage. Can be set by config.

Cloud performance tests
MASTER
596.56 seconds at 2k data points per second. Processing total of 897,569 data points.
526.65 seconds at 2k data points per second. Processing total of 897,569 data points.
513.98 seconds at 2k data points per second. Processing total of 897,569 data points.
Ram usage for the 3 backtests peaked at ~3GB
PR
544.06 seconds at 2k data points per second. Processing total of 897,569 data points.
552.59 seconds at 2k data points per second. Processing total of 897,569 data points.
495.34 seconds at 2k data points per second. Processing total of 897,569 data points.
Ram usage for the 3 backtests peaked at ~2.8GB
Algorithm used for cloud performance tests

public class CoarseFineFundamentalRegressionAlgorithm : QCAlgorithm
{
    private const int NumberOfSymbolsCoarse = 500;
    private const int NumberOfSymbolsFine = 10;
    private readonly Dictionary<Symbol, Symbol> _symbols = new Dictionary<Symbol, Symbol>();

    public override void Initialize()
    {
        UniverseSettings.Resolution = Resolution.Daily;

        SetStartDate(2018, 1, 1);
        SetEndDate(2019, 1, 1);
        SetCash(1000000);

        AddUniverse(CoarseSelectionFunction, FineSelectionFunction);
        Schedule.On(DateRules.EveryDay(), TimeRules.Every(TimeSpan.FromDays(1)), PlotRam);
    }

    public void PlotRam()
    {
        Plot("RAM", "Managed", (double)GC.GetTotalMemory(false) / (1024 * 1024));
        Plot("RAM", "Total", (double)OS.ApplicationMemoryUsed);
    }

    public IEnumerable<Symbol> CoarseSelectionFunction(IEnumerable<CoarseFundamental> coarse)
    {
        var sortedByDollarVolume = coarse
            .Where(x => x.HasFundamentalData)
            .OrderByDescending(x => x.DollarVolume);

        var top5 = sortedByDollarVolume.Take(NumberOfSymbolsCoarse);

        return top5.Select(x => x.Symbol);
    }

    public IEnumerable<Symbol> FineSelectionFunction(IEnumerable<FineFundamental> fine)
    {
        var sortedByPeRatio = fine.OrderByDescending(x => x.ValuationRatios.PERatio);

        var topFine = sortedByPeRatio
            .Where(fundamental =>
                fundamental.AssetClassification.MorningstarIndustryGroupCode == MorningstarIndustryGroupCode.Biotechnology
                ||
                fundamental.AssetClassification.MorningstarIndustryGroupCode == MorningstarIndustryGroupCode.DrugManufacturers)
            .Take(NumberOfSymbolsFine)
            .Select(x => x.Symbol)
            .ToList();

        foreach (var symbol in topFine)
        {
            _symbols[symbol] = AddData<TiingoNews>(symbol).Symbol;
        }
        return topFine;
    }

    public override void OnSecuritiesChanged(SecurityChanges changes)
    {
        foreach (var changesRemovedSecurity in changes.RemovedSecurities)
        {
            if (_symbols.ContainsKey(changesRemovedSecurity.Symbol))
            {
                RemoveSecurity(_symbols[changesRemovedSecurity.Symbol]);
                _symbols.Remove(changesRemovedSecurity.Symbol);
            }
        }
    }
}

Local windows performance tests were executed with:
- Max frequency limited. Boost frequency disabled. No thermal nor power limit throttling.
- Ticks and TradeBars returning SPY symbol in their source
Test 1:
public override void Initialize()
{
    SetStartDate(2015, 11, 10);
    SetEndDate(2015, 11, 11);
    foreach (var symbol in Symbols.Equity.All.Take(50))
    {
        AddSecurity(SecurityType.Equity, symbol, Resolution.Tick);
    }
}

MASTER
43.46 seconds at 618k data points per second. Processing total of 26,841,371 data points.
45.00 seconds at 596k data points per second. Processing total of 26,841,371 data points.
43.83 seconds at 612k data points per second. Processing total of 26,841,371 data points.
Commit 1
42.81 seconds at 627k data points per second. Processing total of 26,841,371 data points.
43.13 seconds at 622k data points per second. Processing total of 26,841,371 data points.
42.48 seconds at 632k data points per second. Processing total of 26,841,371 data points.
Commit 2
42.39 seconds at 633k data points per second. Processing total of 26,841,371 data points.
Test 2:
public override void Initialize()
{
    SetStartDate(2015, 11, 10);
    SetEndDate(2015, 11, 11);
    foreach (var symbol in Symbols.Equity.All.Take(100))
    {
        AddSecurity(SecurityType.Equity, symbol, Resolution.Tick);
    }
}

MASTER
93.60 seconds at 574k data points per second. Processing total of 53,682,738 data points.
92.75 seconds at 579k data points per second. Processing total of 53,682,738 data points.
93.49 seconds at 574k data points per second. Processing total of 53,682,738 data points.
Commit 1
86.74 seconds at 619k data points per second. Processing total of 53,682,738 data points.
88.27 seconds at 608k data points per second. Processing total of 53,682,738 data points.
89.48 seconds at 600k data points per second. Processing total of 53,682,738 data points.
Commit 2
88.70 seconds at 605k data points per second. Processing total of 53,682,738 data points.
Test 3:
public override void Initialize()
{
    SetStartDate(2015, 8, 10);
    SetEndDate(2015, 11, 11);
    foreach (var symbol in Symbols.Equity.All.Take(400))
    {
        AddSecurity(SecurityType.Equity, symbol, Resolution.Minute);
    }
}

MASTER
45.21 seconds at 197k data points per second. Processing total of 8,910,675 data points.
43.91 seconds at 203k data points per second. Processing total of 8,910,674 data points.
45.17 seconds at 197k data points per second. Processing total of 8,910,674 data points.
Commit 1
38.35 seconds at 232k data points per second. Processing total of 8,910,674 data points.
38.09 seconds at 234k data points per second. Processing total of 8,910,673 data points.
38.20 seconds at 233k data points per second. Processing total of 8,910,673 data points.
Commit 2
37.45 seconds at 238k data points per second. Processing total of 8,910,674 data points.
Test 4:
public override void Initialize()
{
    SetStartDate(2010, 1, 1);
    SetEndDate(2018, 1, 1);
    foreach (var symbol in Symbols.Equity.All.Take(400))
    {
        AddSecurity(SecurityType.Equity, symbol, Resolution.Daily);
    }
}

MASTER
7.43 seconds at 90k data points per second. Processing total of 669,511 data points.
7.22 seconds at 93k data points per second. Processing total of 669,511 data points.
7.23 seconds at 93k data points per second. Processing total of 669,479 data points.
Commit 1
6.28 seconds at 107k data points per second. Processing total of 669,543 data points.
6.04 seconds at 111k data points per second. Processing total of 669,479 data points.
6.48 seconds at 103k data points per second. Processing total of 669,511 data points.
Commit 2
6.04 seconds at 111k data points per second. Processing total of 669,479 data points.
Test 5:
public override void Initialize()
{
    UniverseSettings.Resolution = Resolution.Daily;
    SetStartDate(2015, 1, 1);
    SetEndDate(2018, 1, 1);
    AddUniverse(CoarseSelectionFunction);
}
public static IEnumerable<Symbol> CoarseSelectionFunction(IEnumerable<CoarseFundamental> coarse)
{
    var sortedByDollarVolume = coarse.OrderByDescending(x => x.DollarVolume);
    var top = sortedByDollarVolume.Take(400);
    return top.Select(x => x.Symbol);
}

MASTER
46.02 seconds at 128k data points per second. Processing total of 5,894,398 data points.
45.07 seconds at 131k data points per second. Processing total of 5,894,390 data points.
45.06 seconds at 131k data points per second. Processing total of 5,894,374 data points.
Commit 1
31.99 seconds at 184k data points per second. Processing total of 5,894,374 data points.
31.51 seconds at 187k data points per second. Processing total of 5,894,395 data points.
31.39 seconds at 188k data points per second. Processing total of 5,894,410 data points.
Commit 2
31.15 seconds at 189k data points per second. Processing total of 5,894,384 data points.
Test 6:
public override void Initialize()
{
    UniverseSettings.Resolution = Resolution.Minute;
    SetStartDate(2017, 10, 1);
    SetEndDate(2018, 1, 1);
    AddUniverse(CoarseSelectionFunction);
}
public static IEnumerable<Symbol> CoarseSelectionFunction(IEnumerable<CoarseFundamental> coarse)
{
    var sortedByDollarVolume = coarse.OrderByDescending(x => x.DollarVolume);
    var top = sortedByDollarVolume.Take(400);
    return top.Select(x => x.Symbol);
}

MASTER
70.78 seconds at 145k data points per second. Processing total of 10,230,414 data points.
69.98 seconds at 146k data points per second. Processing total of 10,230,414 data points.
74.70 seconds at 137k data points per second. Processing total of 10,230,413 data points.
Commit 1
48.91 seconds at 209k data points per second. Processing total of 10,230,412 data points.
48.40 seconds at 211k data points per second. Processing total of 10,230,413 data points.
47.98 seconds at 213k data points per second. Processing total of 10,230,413 data points.
Commit 2
46.52 seconds at 220k data points per second. Processing total of 10,230,413 data points.
CLOUD MASTER - SetStartDate(2017, 9, 1);
94.91 seconds at 142k data points per second. Processing total of 13,475,195 data points.
92.07 seconds at 146k data points per second. Processing total of 13,475,195 data points.
CLOUD PR commit 2 - SetStartDate(2017, 9, 1);
58.69 seconds at 230k data points per second. Processing total of 13,475,195 data points.
53.69 seconds at 251k data points per second. Processing total of 13,475,195 data points.
Test 7:
public override void Initialize()
{
    SetStartDate(2017, 6, 1);
    SetEndDate(2018, 1, 1);
    foreach (var symbol in Symbols.Equity.All.Take(400))
    {
        AddData<TiingoNews>(AddSecurity(SecurityType.Equity, symbol, Resolution.Daily).Symbol);
    }
}

MASTER
63.61 seconds at 302k data points per second. Processing total of 19,195,228 data points.
64.15 seconds at 299k data points per second. Processing total of 19,195,225 data points.
65.52 seconds at 293k data points per second. Processing total of 19,195,223 data points.
Commit 1
58.06 seconds at 326k data points per second. Processing total of 18,907,289 data points.
58.07 seconds at 326k data points per second. Processing total of 18,907,289 data points.
58.84 seconds at 321k data points per second. Processing total of 18,907,289 data points.
Commit 2
57.11 seconds at 336k data points per second. Processing total of 19,195,223 data points.
Test 8:
HistoryRequestBenchmark

MASTER
22.08 seconds at 41k data points per second. Processing total of 907,031 data points.
22.08 seconds at 41k data points per second. Processing total of 907,031 data points.
Commit 1
26.09 seconds at 35k data points per second. Processing total of 907,031 data points.
25.69 seconds at 35k data points per second. Processing total of 907,031 data points.
Commit 2
21.68 seconds at 42k data points per second. Processing total of 907,031 data points.
21.69 seconds at 42k data points per second. Processing total of 907,031 data points.
Related Issue

Closes https://github.com/QuantConnect/Lean/issues/3976
Motivation and Context

Faster is better but efficient and faster is the sky

Requires Documentation Change

N/A
How Has This Been Tested?

Unit and regression tests, performance tests.
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] Refactor (non-breaking change which improves implementation)
[x] Performance (non-breaking change which improves performance. Please add associated performance test and results)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Non-functional change (xml comments/documentation/etc)

Checklist:

[x] My code follows the code style of this project.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[x] All new and existing tests passed.
[x] My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

Big one congrats @Martin-Molinero; leaving your mark at the core of LEAN =)


Pushing view after alert messes up nav and makes select unusable

Short description of the problem:
If you push a view/page in the handler of an alert, the page will load. If a select is present on the new page and a user tries to choose an option and then hits OK or cancel the select will disappear, but the alert backdrop doesn't disappear and the user is brought to the previous page.
What behavior are you expecting?
A user hits a button to go to the next page from a list page, an alert displays prompting them they need to take additional steps (handled in the list page's controller). Clicking OK on the alert takes them to the "issue resolution" page where they are given a form to fill out. In the form the user can use a select to choose an option.
Steps to reproduce:

Trigger an alert in a view on click
For the OK button's handler, do a nav.push to another page/view
On the next page, insert a select

// On list page
let alert = Alert.create({
    title: "Issues Found",
    subTitle: "Issues were found that need to be resolved.",
    buttons: [{
        text: "Resolve",
        handler: () => {
            this.nav.push(ResolutionPage, {
                data: this.data
            });
        },
    }],
});

this.nav.present(alert);

ResolutionPage
<ion-label>Select Label</ion-label>
<ion-select [(ngModel)]="data.propery">
    <ion-option value="1" checked="true">Option 1</ion-option>
    <ion-option value="2">Option 2</ion-option>
</ion-select>

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
Which Ionic Version? 1.x or 2.x
2.0.0@beta8
Run ionic info from terminal/cmd prompt: (paste output below)
Cordova CLI: 6.1.1
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.8
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
OS:
Node Version: v4.2.6

Hello, thanks for opening an issue with us! Our navigation system in Ionic 2 is completely async, so you have to wait for other animations/transitions to complete before you can fire off another one. The proper way to push a page onto the stack from an alert would be to do this
let alert = Alert.create({
  title: "issues found",
  subTitle: "Issues were found that need to be resolved.",
  buttons: [{
    text: "Resolve",
    handler: () => {
      alert.dismiss().then(() => {
        this.nav.push(ResolutionPage, {
          data: this.data
        })
      })
    }
  }]
})

this.nav.present(alert);

If you would like to read more about how our nav system works async you can check out these docs. Thanks for using Ionic!

That fixed it! Thanks for the quick reply!

@pathartl no problem at all! 😃

Hi. I have the same problem and this but in my case it didn't work.
showAlert() {
    const alert = this.alertCtrl.create({
      title: 'Wait...',
      subTitle: 'Working...',
      buttons: [
        {
          text: 'Details',
          handler: () => {
            alert.dismiss().then(() => {
              this.navCtrl.push(DetailsPage)
            })
          }
        }
      ]
    });
    alert.present();
  }

and with this code I have this error on detail click.
Runtime Error
Uncaught (in promise): invalid views to insert

Yes i am also getting the same problem.
Runtime Error
Uncaught (in promise): removeView was not found


Fix: SwiftLint warnings and errors on LineLength

We limit the line length to 120 or less since the default Line length specified by SwiftLint is 120.

@pushkarnk Should we consider modifying/increasing the limit?


Combine --color and --vimgrep

Is it possible to have --vimgrep and --color options working together ? I would like ag to output and behave like grep (and --vimgrep seems to be doing exactly this) but with --vimgrep options --color and --color-win-ansi are not working. While with grep I can use --color=always

Could you also add --color=auto option, like latest grep? The auto option will highlight the matched word in the line


Add workflow default file support

Goes together with https://github.com/galaxyproject/galaxy/pull/13110/

Does this need a schema update?

It is already in the schema (http://galaxyproject.github.io/gxformat2/v19_09.html#WorkflowStepInput), but its type is Any. I'll add the mandatory keys.

Hmm, default is Any in cwl as well (https://www.commonwl.org/v1.2/Workflow.html#WorkflowStepInput). And I guess that makes sense ? So maybe we don't need to do anything here for now ?

@mvdbeek right; all good then!


Enable Segoe Variable

By adding another entry to our maxversiontesteds.
Screenshots in https://github.com/microsoft/terminal/issues/12452#issuecomment-1035356054

[x] Closes #12452
[x] I work here
[x] Docs are fine
[x] Tests are fine

Sure you don't want to just shotgun every RTM build number into there between 18362 and 22000 while you're at it?

You kept an eye out for the other Quirks, right?

@msftbot merge this in 1 minutes


Manifest's fileserver config

Signed-off-by: tpmccallum<EMAIL_ADDRESS>

Excellent. Thank you again. I really appreciate it.


Can view previous users data when switching accounts

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

CURRENTLY UNABLE TO REPRODUCE
When I sign out from my expensify account and into a new account I can see comments from the social room. Only when I try to send a message do I see an error message.
Version Number: All
Reproducible in staging?: Yes
Reproducible in production?: Yes
Action Performed:

Sign into account with up to date data (for example our internal accounts)
Sign out
Sign into an account with no messages (this makes the bug more obvious)
Notice that you can see some chats from the previous user

Expected Result:

This definitely should not happen

Actual Result:

I can see messages from another users account

Platforms:
I have only tested Android so far...
Which of our officially supported platforms is this issue occurring on?

[x] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[ ] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos

View all open jobs on GitHub

Haven't seen this since


Add CAIP support

[x] add CAIP utils
[ ] replace assetId on engine
[ ] replace assetId with assetAddress on protocol

closing for now


Refactor, Replace Bootstrap with Bulma

Refactor, see https://github.com/ThomasTJdev/nim_websitecreator/issues/22#issuecomment-429519107 and https://github.com/ThomasTJdev/nim_websitecreator/issues/23#issuecomment-429326459
Clean out.
Frontend Help welcome.
Wording Grammar Review welcome.
WIP

:cat:

Hi @juancarlospaco
I have been testing the new layout and it looks good. I have a rough list below, which I will start to look at in prioritized order (OK?):

I have some trouble with the arrangement of elements - (row/col/alignement)
Some CSS glitches
Colors of the login page
Missing standard text sizes for fonts
A base CSS formatting for blogpost
The main hurdle is, that jQuery is required on the admin pages - especially when editing pages and blog. Either rewrite js_admin.js or append jQuery for all admin pages.
Rewriting JS to avoid jQuery on non-admin pages

Pictures
Here's how it looks:
Settings

Blog edit layout

Blog layout

Frontpage

Edit main area

Navbar (logged in)

Append jQuery for all admin pages and rewrite JS to avoid jQuery on non-admin pages.
Make sure you try on Incognito mode, sometimes browser cache gets your UI weird too.
Fontpage you said you are gonna replace it with more Documentation oriented content, so I didnt touch it.

Ive manually tested all of it, it looks and feels really cool :grey_exclamation:  :tada::smiley_cat::+1:

Can urlEncoderCustom() be replaced with uri.encodeUrl( usePlus = true) :grey_question:
https://github.com/ThomasTJdev/nim_websitecreator/blob/master/nimwcpkg/resources/web/urltools.nim#L5
Or I am missing something... :thinking:

Can urlEncoderCustom() be replaced with uri.encodeUrl( usePlus = true)

https://github.com/ThomasTJdev/nim_websitecreator/blob/master/nimwcpkg/resources/web/urltools.nim#L5
https://nim-lang.org/docs/uri.html#encodeUrl%2Cstring

Or I am missing something...

I think my original idea for the custom implementation was:

To ensure pretty URLs
Escape special characters in URL ()*#?`'^~œæøåôõâö etc.

echo urlEncoderCustom("url with hashtag#") # ==> url+with+hashtag
echo encodeUrl("url with hashtag#", true) # ==> url+with+hashtag%23

Should we allow the use of special chars which anyways will be converted to e.g. %23? I like to give the freedom to the user, but I dont like ugly URLs ;-)

Some spoken languages need those I think, like Arab, Portuguese, Japanese, etc.

Some spoken languages need those I think, like Arab, Portuguese, Japanese, etc.

My own included ;)
IDN's are supported using Punycode but how should we handle it? Save it using encodeUri, convert to IDN directly (æble.dk ==> æble.dk) or save it with clear text and let the browser handle the parsing?
I have had some trouble with how to show the URL's when generating them as link and for the user to edit them again.
But I'm up for a another approach.

I think we should not make our own standard just for this, I say keep it simple, I see 2 options:
Use the std lib encodeUrl() and use the pattern to only allow ASCII of <input> tag on the URL.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/url#Pattern_validation
Use Punycode, we also have Punycode on std lib because Nim is awesome.

Super minimal Log Viewer.
Implemented auto-rotating file logging, the option to notify Admin still exists on a template.

Honestly the mention on readme dont adds too much for me, but Collaborator can be cool, for example lets say you are on holidays travelling and NimWC explodes I can at least fix it right away.
:smile:

https://mathiasbynens.github.io/rel-noopener

We dont have Login / Logout button on Mobile.
Can you please take a look at that before we Merge ?.

Merge-time this weekend :) !?

urlEncoderCustom()
Login button on mobile

Other stuff before merging?

I run out of improvements for current iteration of changes, everything looks good, 84 Commits so far. :+1:

Cool :grey_exclamation:
Make a new Release so Nimble catch up the version change: https://github.com/ThomasTJdev/nim_websitecreator/releases

Thank you very much for the tremendous work! NimWC is really nice now :)
I'm making you a collaborator now. Code review is required for breaking changes and design changes.

The Demo at https://nimwc.org is using the old version, needs Re-Deploy.

I think we should not make our own standard just for this, I say keep it simple, I see 2 options:
Use the std lib encodeUrl() and use the pattern to only allow ASCII of <input> tag on the URL.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/url#Pattern_validation
Use Punycode, we also have Punycode on std lib because Nim is awesome.

I ran into trouble..
I am naming my blog posts:
website.com/blog/YYYY/MM/DD/name
But this now returns the following in the addressbar in Chrome.
https://website.com/blog/2018%2F11%2F16%2Fmy-normal-name


heading font-size key only works when using underscore instead of dash

I was only able to change the heading sizes in the PDF output when I used   h6_font_size instead of  h6-font-size.
The documentation: https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc#keys-heading shows dash instead of underscore when using the font-size key.
in the end this worked for me:
heading:
  h1_font_size: 32
  h2_font_size: 24
  h3_font_size: 18
  h4_font_size: 16
  h5_font_size: 14
  h6_font_size: 12

Can you please describe how you are defining your theme? Where are you defining it? How are you loading it?

My tests and the test suite show that this scenario is supported. However, the one case it is not supported is if you are modifying the default theme from the gem (because the keys do not receive special processing in that file).
Here's how to define it in a way that works:
my-theme.yml
extends: default
heading:
  h3-font-size: 40

sorry for replying late, I am confused right now, as my latest incarnation of the yml works with both dash and underscore...
yes, I am extending the default theme.

There was at least one release that had this bug. If it comes back, feel
free to reopen and we'll track it down.


Pair programming week 4 javascript

Changes into the html with Nav section
CSS updates for JS class and event listerners
JS functionality add to the portfolio

Hi @Rifat8080 😊,
While you made a great effort in this project, unfortunately, I cannot proceed to review your code.
Invalid Code Review Request 🆘💀
You should work on a new branch and submit a different pull request for each milestone.
Your Code Review Request will be marked as invalid in your Dashboard, so please submit a new one once you are ready 🙏
Cheers, and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.
Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.d


Server validations

How can we use this grid with server validations?
Thanks

Hello,
You would handle server side validation on the server side.  When you Insert/Edit/Delete a row you can use whatever backend system you are using to validate the results.  Then if there are issues you can send those back to the client.
Perhaps if I knew what backend system you were targeting I could give a better example on how to validate.

Hello,
I'm using ASP.NET MVC
Thanks

I guess you can't leverage data annotations advantages with it.
On Jul 14, 2016 1:57 PM, "fredericoregateiro"<EMAIL_ADDRESS>wrote:

Hello,
I'm using ASP.NET MVC
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tabalinas/jsgrid/issues/358#issuecomment-232759431,
or mute the thread
https://github.com/notifications/unsubscribe/ATBD408J-kENsvggI4JqarDX_7FPFWXpks5qVoaagaJpZM4JMaTo
.

Please checkout my answer to the similar question on SO http://stackoverflow.com/a/36291243/1140893.


Component controller not being initialized on route change

I just ran into a really obscure bug. When switching routes, components that happen to be in the same structural position in the virtual dom don't reinitialize their controllers. I managed to strip it down to this test:
test(function() {
  // a route change should initialize a component's controller
  mock.requestAnimationFrame.$resolve()
  mock.location.search = "?"

  var root = mock.document.createElement("div")
  var countA = 0
  var countB = 0
  var subA = {
    controller: function(){ countA += 1 },
    view: function() { return m("div") }
  }
  var subB = {
    controller: function() { countB += 1 },
    view: function() { return m("div") }
  }
  m.route(root, "/a", {
    "/a": {
      view: function () {
        return m('.page-a', [
          m('h1'), m.module(subA, { x: 11 })
        ])
      }
    },
    "/b": {
      view: function() {
        return m('.page-b', [
          m('h2'), m.module(subB, { y: 22 })
        ])
      }
    }
  })

  mock.requestAnimationFrame.$resolve()

  m.route("/b")

  mock.requestAnimationFrame.$resolve()

  m.route("/a")

  mock.requestAnimationFrame.$resolve()

  return countA === 2 && countB === 1
})

If the components don't have the same position in the tree, everything works fine. For example, if you remove either the h1 or h2 element, the test passes.

Very nice catch. Fixed.

:clap:


Is it 2D/3D dataset?

Is RadImagenNet 2D dataset or 3D dataset?
The 4 pre-trained weights come with 2D network. But I'm curious if this dataset has 3D version with corresponding 3D pre-trained weights!

this version of RadImageNet is 2D based. We are working on 3D weights now. We'll update this repo once the 3D version is ready.

this version of RadImageNet is 2D based. We are working on 3D weights now. We'll update this repo once the 3D version is ready.

It's a really useful work for AI in medical images,Hope to have 3D weights and pytorch weights version like ‘pth’... at your earliest convenience.By the way, If it is convenient, could you upload the version and other information of tensorflow/pythoch，witch are Important for environment building.


fixed nonrandom_discovery issue

Checked, ran and worked

Checked and ran eg6, worked

checked and ran eg 3 and 7 and worked


starred \newtheorem produces warnings with hyperref

If hyperref is loaded, the starred \newtheorem produces a warning
Package hyperref Warning: Counter '' or the representation '\theH`
(hyperref)                don't exist. No target created.

Here's an example.
\DocumentMetadata
  {
    lang=en-US,
    pdfversion=2.0,
    pdfstandard=ua-2,
    testphase={phase-III,math,table,title,firstaid}
  }
\documentclass{article}
\usepackage{amsthm}
\usepackage{hyperref}

\newtheorem*{theorem}{Theorem}

\begin{document}

\begin{theorem}
text
\end{theorem}

\end{document}

This happens because the redefined \@begintheorem unconditionally calls \MakeLinkTarget{\l__block_thm_current_counter_tl}. With an unnumbered theorem \l__block_thm_current_counter_tl is empty. I guess changing this line to \tl_if_empty:nF{##2}{\MakeLinkTarget{\l__block_thm_current_counter_tl}} is enough.

good catch and good timing ;-) I just adjusted the firstaid anyway.


Use canonical units in core functions

First attempt to fix #707.

Introduced new Halley orbit example (this can be splitted off this PR)
All tests passing except for long propagation with Kepler
Pending moving Hohmann and bielliptic calculations to fast functions
Pending more uniform unit conversion

Bringing this back to life would need making a massive rebase. If I ever do it, I will start from scratch. Closing!


Data import error - RangeError: Extra bytes found at buffer

I have been getting this error intermittently while trying to load my image targets.
RangeError: Extra 5000 byte(s) found at buffer
I took some random screenshots... terrible targets, but you can use these to reproduce the bug.

Do the target images need to be a specific size? I tried 1024 square but it gave me the same error.

Can confirm this is happening. It seems to never appear when using certain markers, but always (or almost always) when using others.
However when generating .mind again (using the same image that apparently works) also produces erroneous .mind. If the problem is even there, that is.

Upon further investigation this turned out to be a simple case of missing files, the path to the .mind 'imageTargetSrc' file was wrong.
Create-react-app (or webpack) can't know .mind files should be copied to a folder that will be served publicly, unless you specifically configure them to do so.
The error itself sounds strange and/or misleading but, in my case at least, was resolved.
I suggest you copy your targets file (e.g. 'targets.mind') to your build folder (public, dist, or whatever the final destination of your app is called), then set:
<a-scene mindar-image="imageTargetSrc: ./targets.mind;" >

I tested and confirmed this is the issue. Thanks for your insights @divljikunic!
@hiukim Do you think it would make sense to catch this error and emit something more descriptive?

I've encountered this in my project. I've moved my files to public folder and it works. Thanks.


The way to draw near 340000 features

Hi all. I need to solve problem and show near 340000 on esri leaflet map . Now i use cluster and its work amazing  during i have near 5000 points
This is snippet of code where i try to add layer .
    const featureLayer = L.esri.Cluster.featureLayer({
      url: `${this.currentServiceURL}/${id}`,
      renderer: new L.Canvas(),
      simplifyFactor: 0.35,
    });
      featureLayer.addTo(this.lMap);

Could you give suggestions in which way could i solve problem ??

Could you give suggestions in which way could i solve problem ??

yup. you'd need to rewrite this plugin to use something like https://github.com/mapbox/supercluster
related: #14

@jgravois Thanks. I will try


Create page detailing about project processes incorporated

Closing this task as the same was handled with #47 changes.


Feedback

Yo Jason, here are some initial comments:

There should be an installation section:

had to install virtualbox & docker-machine, in addition to docker itself
had to create a default docker machine and connect my shell to the new machine
only then was able to pull mongo and orion

I was not able to connect to orion ("curl: (7) Failed to connect to localhost port 1026: Connection refused"), had to change the command to "curl -X GET http://$(docker-machine ip default):1026/version"

had to change all the following commands because the localhost or <IP_ADDRESS> didn't work

the outputs of GET commands should be in a json format, but shown in the console as plain text. To get the output shown in the tutorial I had to use the following command:
"curl -X GET http://$(docker-machine ip default):1026/v2/entities/urn:ngsi-ld:Store:001?options=keyValues | python -m json.tool" (this also doesn't work for all GET commands, no idea why)

my output was not UTF-8, but something like "Bornholmer Stra\u00dfe 65". I didn't bother to change it, but probably this should be mentioned.

perhaps the parameter/flag -X should be discussed

for this command: "curl -X GET http://$(docker-machine ip default):1026/v2/entities?type=Store&georel=near;maxDistance:1500&geometry=point&coords=52.5162,13.3777" I get a confusing output:

[1] 3876
[2] 3877
[3] 3878
-bash: maxDistance:1500: command not found
[4] 3880
[2]   Done                    georel=near
[3]   Exit 127                maxDistance:1500
[4]+  Done                    geometry=point
Filips-MacBook-Air:~ flemic$ [{"id":"urn:ngsi-ld:Store:001","type":"Store","address":{"type":"PostalAddress","value":{"streetAddress":"Bornholmer Straße 65","addressRegion":"Berlin","addressLocality":"Prenzlauer Berg","postalCode":"10439"},"metadata":{}},"location":{"type":"geo:json","value":{"type":"Point","coordinates":[13.3986,52.5547]},"metadata":{}},"name":{"type":"Text","value":"Bösebrücke Einkauf","metadata":{}}},{"id":"urn:ngsi-ld:Store:002","type":"Store","address":{"type":"PostalAddress","value":{"streetAddress":"Friedrichstraße 44","addressRegion":"Berlin","addressLocality":"Kreuzberg","postalCode":"10969"},"metadata":{}},"location":{"type":"geo:json","value":{"type":"Point","coordinates":[13.3903,52.5075]},"metadata":{}},"name":{"type":"Text","value":"Checkpoint Markt","metadata":{}}}]
Cheers!

Since the details of the developer's setup will vary, we can't cover all necessary steps for setting up Docker from scratch for all systems. I think we have to assume that the link to the Docker install should be enough. However what we can do is add a troubleshooting section when checking for the heartbeat to solve common issues (e.g. docker container not running, docker container on wrong port etc.)

Since this is not a cUrl tutorial we shouldn't discuss the usage of cUrl -X - the link at the head of the tutorial should be sufficient.

The responses have only been formatted for readability - it is not strictly necessary for the tutorial, and is a cUrl issure not a FIWARE issue. Finding a method for formatting a cUrl response can easily be found on Stack Overflow

The semi-colon ; in the cUrl command is being interpreted as a break - the URL needs to be placed in quotes.


[BUG] [hyperf/async-queue :2.2.*] Interface 'Hyperf\Signal\SignalHandlerInterface' not found

Execute the command and paste the result below.
Command: uname -a && php -v && composer info | grep hyperf && php --ri swoole
# Paste the result here.
Darwin xuzhendeMBP.lan 20.5.0 Darwin Kernel Version 20.5.0: Sat May  8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64
PHP 7.3.29 (cli) (built: Jul 12 2021 11:36:07) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.29, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.29, Copyright (c) 1999-2018, by Zend Technologies
hyperf/async-queue                   v2.2.0  A async queue component for hyperf.
hyperf/cache                         v2.2.0  A cache component for hyperf.
hyperf/command                       v2.2.0  Command for hyperf
hyperf/config                        v2.2.0  An independent component that provides configuration container.
hyperf/constants                     v2.2.0  A constants component for hyperf.
hyperf/contract                      v2.2.0  The contracts of Hyperf.
hyperf/crontab                       v2.2.0  A crontab component for Hyperf.
hyperf/database                      v2.2.0  A flexible database library.
hyperf/db                            v2.2.0
hyperf/db-connection                 v2.2.0  A hyperf db connection handler for hyperf/database.
hyperf/devtool                       v2.2.0  A Devtool for Hyperf.
hyperf/di                            v2.2.0  A DI for Hyperf.
hyperf/dispatcher                    v2.2.0  A HTTP Server for Hyperf.
hyperf/engine                        v1.1.6
hyperf/event                         v2.2.0  an event manager that implements PSR-14.
hyperf/exception-handler             v2.2.0  Exception handler for hyperf
hyperf/filesystem                    v2.2.0  flysystem integration for hyperf
hyperf/framework                     v2.2.0  A coroutine framework that focuses on hyperspeed and flexible, specifically use for build microservices and middlewares.
hyperf/guzzle                        v2.2.0  Swoole coroutine handler for guzzle
hyperf/http-message                  v2.2.0  microservice framework base on swoole
hyperf/http-server                   v2.2.0  A HTTP Server for Hyperf.
hyperf/ide-helper                    v2.2.0  IDE help files for Hyperf.
hyperf/logger                        v2.2.0  A logger component for hyperf.
hyperf/memory                        v2.2.0  An independent component that use to operate and manage memory.
hyperf/model-listener                v2.2.0  A model listener for Hyperf.
hyperf/paginator                     v2.2.0  A paginator component for hyperf.
hyperf/pool                          v2.2.0  An independent universal connection pool component.
hyperf/process                       v2.2.0  A process component for hyperf.
hyperf/redis                         v2.2.0  A redis component for hyperf.
hyperf/server                        v2.2.0  A base server library for Hyperf.
hyperf/testing                       v2.2.0  Testing for hyperf
hyperf/utils                         v2.2.0  A tools package that could help developer solved the problem quickly.
hyperf/watcher                       v2.2.0  Hot reload watcher for Hyperf
xiangxin/hyperf-gaode                2.2.0   hyperf gaode

swoole

Swoole => enabled
Author => Swoole Team<EMAIL_ADDRESS>Version => 4.6.7
Built => May 17 2021 10:26:05
coroutine => enabled with boost asm context
kqueue => enabled
rwlock => enabled
sockets => enabled
openssl => OpenSSL 1.1.1j  16 Feb 2021
dtls => enabled
http2 => enabled
json => enabled
curl-native => enabled
pcre => enabled
zlib => 1.2.11
brotli => E16777225/D16777225
mysqlnd => enabled
async_redis => enabled

Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => On => On
swoole.unixsock_buffer_size => 262144 => 262144

Description:
组件：hyperf/async-queue
PHP Fatal error:  Interface 'Hyperf\Signal\SignalHandlerInterface' not found in /path/vendor/hyperf/async-queue/src/Signal/DriverStopHandler.php on line 20
Fatal error: Interface 'Hyperf\Signal\SignalHandlerInterface' not found in /path/vendor/hyperf/async-queue/src/Signal/DriverStopHandler.php on line 20
Steps To Reproduce:

将 hyperf 组件版本都修改为 '2.2.*'
composer update -o
php bin/hyperf.php start

升级到 PHP7.4 版本以上，或者 安装对应的组件

升级到 PHP7.4 版本以上，或者 安装对应的组件

组件：hyperf/async-queue
缺少组件：hyperf/signal
安装
composer require hyperf/signal

问题已解决


Unable to run input() in Python

I'm unable to run the input() function in Python here. This is my code:
x = input('What is your name? ')
print(x)

@hermanzdosilovic  Is there any way to run code in interactive mode? Like I want the program to take input while running. Is that possible?

@chandansgowda unfortunately no that is not possible. Follow https://github.com/judge0/judge0/issues/273 for the updates on that matter.


check for string type

gotta make sure there's a split method on the token, otherwise it throws.

thanks!


Hygen triggering another with-prompt generator hangs

I have three generators:

handler - this generator basically just delegates between the other two generators based on a prompt
batch-handler - handles batches
sequential-handler - handles one-at-a-time message processing

When you run hygen handler new, it prompts asking which kind of handler you want (batch or sequential):

Based on your answer, it triggers the proper generator using this sh command:
---
sh: hygen "<% if (type === 'one-at-a-time') { %><%= 'sequential-handler' %><% } else if (type === 'batches') { %><%= 'batch-handler' %> <% } %>" new
---

Then, those handlers should prompt again, but it appears to just "hang":

I'm assuming this is because stdin isn't being passed through to the sh command.
If I run the sub-generator separately, it does prompt properly:

I have an example of this issue in a sample repo: https://github.com/blimmer/hygen-issue

i think maybe the right way for you to do that is to switch to "script mode" where actually you build your own workflow:
https://github.com/jondot/hygen/blob/master/src/__tests__/metaverse/hygen-templates/_templates/recursive-prompt/new/prompt.js

I see what you mean, but I'm not quite sure that meets my exact use-case. I basically have two generators and I want to guide the user through a series of prompts to choose the proper hygen generator to run. I could always just write a separate enquirer prompt to do this, probably. I was originally thinking it would be nice to keep everything in the same framework, though.

To add to this, lets say you have the following:

Here, a package is the base output type, so :

all Components are Packages, but they go in design-system/packages not packages.
all Cli Tools are also Packages, but they go in tools/* not packages.

So I want all the generated workspace package types to have all the files and attributes of the package generator output, but i then want to do extra stuff.
---
sh: >-
  yarn generate new package
  title:<%= title %>
  code:<%= code %>
  package_name:<%= package_name %>
  package_path:<%= package_path %>
  main_export:<%= main_export %>

---

---
sh: mv packages/<%= code %> tools/
---

but it hangs on tools/generators/new/cli/1-create-package.ejs.t

So i figured this out by :

modifying my custom prompter to run the hygen prompter or not based on an interactive flag
using nconf to turn envvars, argv, default file contents into pre-seeded answers.

https://github.com/airtonix/crypto-app/tree/feaure/new-app-and-basic-components/packages/hygen-prompts/src
yarn generate new cli --title my awesome thinger
# ...asks a bunch of questions providing a mutated version of `title` as an initial value to each

Now because interactive is true by default you get asked all the questions.
if you instead provide --no-interactive then it will only succeed if you provide all the expected parameters (fails otherwise)
You won't find a use of this topic in that repo, but I'll paste it here from another repo:
tools/generators/new/cli/01_generate_package.ejs.t
---
sh: >-
  yarn generate new package
  --no-interactive
  --title <%= title %>
  --code <%= code %>
  --package_name <%= package_name %>
  --package_path <%= package_path %>
---

This ends up creating what I expect and then any other parts of my new/cli generator take effect.

I also tried something similar
sh: yarn create_<%= item %> —name<%= name %>
but can’t get that to work @airtonix  saw your custom package but it’s not hard to grasp
Basically I want to have questions that trigger the proper generator and or follow up question path

@airtonix you could check it it’s in the args and then use the skip methode


Auto-distribute silver: should it prefer big planets?

It seems that all my tiny planets get dumped silver instead of the big ones.

But a 90k planet would sink silver for a day starving all little planets ...


Support tests that return Result<T, E>

First off: thanks for the crate, it makes getting started writing tests pretty easy to work with.
In regular (standard, not async) Rust we can do:
#[cfg(test)]
mod tests {
    use super::*;
    use std::error::Error;

    #[test]
    fn it_works() -> Result<(), Box<dyn Error>> {
        let _ = f32::try_from(20usize)?;
        Ok(())
    }
}

However, the test! macro doesn't support this form at all, and assumes that all tests return ().
This means that we can't write:
#[cfg(test)]
mod tests {
    use super::*;
    macro_rules_attribute::apply;
    use std::error::Error;

    #[apply(smol_macros::test!]
    async fn it_works(_ex: &Executor<'_>) -> Result<(), Box<dyn Error>> {
        let _ = f32::try_from(20usize)?;
        Ok(())
    }
}

The current workaround to this is to just .unwrap or .expect all Result types in the function. Materially, they don't really change the logic of the test (since a panic means failure), but it is often nice to be able to write the code with ? and FromResidual only because the tests can often serve as an example for how code should be written in practice.
Thoughts? Would the current macro be able to be reworked so that the return type for a test can be set as well?

I would accept a PR for this.

I submitted #6 to test this issue. However, it looks like tests that return Result already work?
#[apply(test!)]
async fn it_works(_ex: &Executor<'_>) -> Result<(), Box<dyn std::error::Error>> {
    let _ = u32::try_from(20usize)?;
    Ok(())
}

I do recall testing the example I pasted, and it did not work. Perhaps there was some update in the meantime that allowed for this? I believe I was testing on 1.75.0, but if it works now I'd be happy to close this.

I doubt it. The MSRV tests on 1.63, so unless the bug was introduced and then fixed at some point between then and now it wouldn't make sense.

Huh. Well, I'll go ahead and close. Appears that I was mistaken and I apologize for the churn. I could swear I had this failing but very clearly that test passes.


net, setup: Integrate the unplug flow through netpod (and nmstate)

What this PR does / why we need it:
Integrate the network interface unplug flow through the netpod setup flow (which uses the nmstate API).
This change also includes a fix to the networks that are processed on setup (see last commit).
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
This PR depends on #10518, only the last 6 commits are relevant.
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

[ ] Design: A design document was considered and is present (link) or not required
[x] PR: The PR description is expressive enough and will help future contributors
[x] Code: Write code that humans can understand and Keep it simple
[x] Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
[x] Upgrade: Impact of this change on upgrade flows was considered and addressed if required
[x] Testing: New code requires new unit tests. New features and bug fixes require at least on e2e test
[ ] Documentation: A user-guide update was considered and is present (link) or not required. You want a user-guide update if it's a user facing feature / API change.
[ ] Community: Announcement to kubevirt-dev was considered

Release note:
NONE

/test pull-kubevirt-build
/test pull-kubevirt-build-arm64
/test pull-kubevirt-generate
/test pull-kubevirt-manifests
/test pull-kubevirt-unit-test
/test pull-kubevirt-e2e-k8s-1.27-sig-network

change: Answered review comments.

/retest-required

/approve

change: Responded to the review comments.

/cherry-pick release-1.1