on page for uploads: /upload/new edit so it only lists images for a service.

Hi, I've done some editing and mainly got the file upload to work as I want, one last part is I note it lists images/files but all that are in the model's uploaded and I'd prefer if it lists only images with the same service full info here on stack: https://stackoverflow.com/questions/46501534/django-jquery-file-upload-filtering-images-only-for-a-service

fixed it


added qualaroo

#4795
The example site mentioned is not using this anymore. Found another: https://www.alllaw.com/

👍


allow host to be passed as a command line input

Currently, there is no way to make the wiki externally visible.  i.e. other computers on the network cannot view the wiki.  Flask will make a server externally visible if the host value is set to '<IP_ADDRESS>'.  i.e.  app.run(host='<IP_ADDRESS>')
This pull request will allow the user to make the wiki externally visible by entering "wiki web --host='<IP_ADDRESS>'"

I've made the changes -- i'm not sure what else i need to do to push this along (i'm relatively new at this)


Line and area chart not working since the version 2.1.0

Checklist

[x] I updated the card to the latest version available
[x] I cleared the cache of my browser
[x] I verified that I'm really running the lastest version in my browser console
[x] I checked if there is another issue opened with the same problem

Describe the bug
Since updating to the verison 2.1.0 line and area chart doesn't work in my dashboard. Column type works as before.
Version of the card
Version: 2.1.2
To Reproduce
This is the configuration I used:
Configuration that doesn't work:
type: custom:apexcharts-card
span:
  start: day
series:
  - entity: sensor.current_spot_electricity_price
    type: line
    color: lightblue
    show:
      legend_value: false
    data_generator: |
      return Object.entries(entity.attributes).map(([date, value], index) => {
        return [new Date(date).getTime(), (value) ];
      });

Configuration that works:
type: custom:apexcharts-card
span:
  start: day
series:
  - entity: sensor.current_spot_electricity_price
    type: column
    color: lightblue
    show:
      legend_value: false
    data_generator: |
      return Object.entries(entity.attributes).map(([date, value], index) => {
        return [new Date(date).getTime(), (value) ];
      });

Screenshots

Expected behavior
Graphs of line type should appear as the column type ones
Desktop (please complete the following information):

Browser Chrome

Version 129.0.6668.101 (Official Build) (64-bit)

Browser Edge

Version 130.0.2849.46 (Official build) (64-bit)

Smartphone (please complete the following information):

Device: [iphone 13]
OS: [17.6.1]
Browser [edge, chrome, safari]

Additional context
Everything was correct in version 2.0.4.
It appears in both instances of Home assistant I have.

I can confirm this bug, last functioning version is 2.0.4. (over one year old).
I found some apexcharts-card:  TypeError: this.series is null and Uncaught (in promise) TypeError: this.w.globals.dom.Paper is undefined in the console log.
One theory could be that HomeAssistant has changed the availability of sensor-data (on load) and 2.1.x versions of apexcharts-card don't handle these situations. Apexcharts-card probably needs some mechanism to retry reading sensor-data without throwing an exception.


document FLUTTER_DEV flag for working on 'flutter' tool

This env var is gone, so no need to document.


Basic batch effect correction for Stereoscope model

Associated Colab notebook
This PR introduces latent batch-effect correction variables in RNADeconv Module (ScModel for Stereoscope).

Closing for now...


jetbrains gateway ide

I created pod-gateway-ide template and workspace.
I configured Jetbrains Gateway on my local and connected to the workspace.
I am able to open intellij ide.
https://github.com/sharkymark/v2-templates/tree/main/pod-gateway-ide
is this the behavior? or do we need to configure coder_app and launch IDE? if so, how to do that?

If you pull that repo, I have deprecated all Gateway projector templates because JetBrains has stopped Projector support. Use Gateway as they recommend. https://coder.com/docs/v2/latest/ides/gateway


Major outage for the next hour

NPMC.dev and any associated domain will be offline for the next hour or so due to moving hosting from Railway to Cloudflare Pages

Moved to cloudflare pages! :zap: :zap: :zap:


Settings page increase precision from 1 to 3 decimals

I have a home automation platform that reads data from the smartevse settings page.
For example the charged_kwh field provides data to see how the charge is progressing.
Currently the data has one decimal precision meaning that it takes a while before you see any data.
I would prefer to see three decimal precision having a much more responsive indication of the charging process.
For example I would change line:
doc["ev_meter"]["charged_kwh"] = round(EnergyCharged / 100)/10; //in kWh, precision 1 decimal
To:
doc["ev_meter"]["charged_kwh"] = round(EnergyCharged)/1000; //in kWh, precision 3 decimal
This can best be done for all fields that have this calculation for mains_meter and ev_meter.

If you want precise progress information you should watch the currents, because that gives you the actual charge at that moment.
A more precise indication will only clobber up your database; feel free to adapt the code to your needs, I dont think mainstream users are interested in this.


add wiring to allow NNS for imported tensor

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.
@havardpe please review
@geirst FYI

should probably still limit to only allowing dense tensors (checking the tensor value type, not the attribute class type)

good catch, done


Cannot Build GameKit with Xcode 14.1 beta

Description
Cannot build my app with Xcode 14.1 and iOS 16.1 beta 1.
It says cannot build module 'GameKit' in FIRGameCenterAuthProvider.m file.
Reproducing the issue
No response
Firebase SDK Version
9.6.0
Xcode Version
14.1
Installation Method
Swift Package Manager
Firebase Product(s)
Authentication
Targeted Platforms
iOS
Relevant Log Output
No response
If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet

Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet

Replace this line with the contents of your Podfile.lock!

facing the same issue

same issue here, please give us a workaround

Thanks for the report. I've also reproduced the same error. I'll check with the team if it's a bug on the SDK or in Xcode since it's only happening on Xcode 14.1. I've also found a ticket in Apple forum getting the same issue.

This looks like an Apple Issue in the Xcode 14.1 beta. I recommend sticking with Xcode 14.0 until Apple resolves it.
To workaround the issue with the Xcode 14.1 beta, if you're not using the GameCenter Firebase Auth provider, you can remove the file FirebaseAuth/Sources/AuthProvider/GameCenter/FIRGameCenterAuthProvider.m after installing Firebase and rebuild.

Same issue. Need to use Xcode14.1 beta to build Live Activities

just to confirm that the workaround suggested is working for now, the project is compiling. Thanks!

This looks like an Apple Issue in the Xcode 14.1 beta. I recommend sticking with Xcode 14.0 until Apple resolves it.
To workaround the issue with the Xcode 14.1 beta, if you're not using the GameCenter Firebase Auth provider, you can remove the file FirebaseAuth/Sources/AuthProvider/GameCenter/FIRGameCenterAuthProvider.m after installing Firebase and rebuild.

@paulb777 Hey - how do you remove that file if it's installed via SPM?

Works for me for now @paulb777 thanks. I will try to reinstall pod after this issue is solved by apple

@yunustek From SPM, change the file permissions from the command line and comment out the contents of the file

The issue is NOT fixed with Xcode 14.1 beta 2

The issue is NOT fixed with Xcode 14.1 beta 2

not, still here

Same problem with Xcode 14.1 beta 2
Apple is really getting into my nerves

This issue is fixed in Xcode 14.1 beta 3 🎉

@kushsolitary Thanks for checking and sharing the news!


Misalignment in Mobile Views

Describe the bug:
The mobile view of the View Opportunities page is a little haphazard. The texts are not constricted to the boxes and the label texts are a little too big for the same.
Expected behavior:
Change the font sizes appropriate and proportional to the screen size.
Screenshots:

Note:

If you want to work on an issue, you should check if it has already been assigned to anyone.

@srishtij2000 go ahead

@srishtij2000 Any updates?

@srishtij2000 Unassigning you from the issue due to your inactivity.


Suggestion: Controlflow with assertions, add ability for "throws" type guards

Search Terms Assert null, control flow strictNullChecks

Suggestion
With strict null checks turned on, I'd like to avoid the use of the escape operator ! when an assert library is used.  The assert library ensures downstream statements are acting on initialized or otherwise constrained values.  It would be great to provide hints to the compiler of the expected type narrowing as a result of the assertions.
Add a new way to define a typeguard that instructs the compiler that it would throw errors in certain scenarios.  Syntax can be something like:
throws when [Existing type guard]

Use Cases

Using runtime assertion libraries/functions that correctly narrow the runtime types for subsequent statements.
Examples

//proposal for new control flow syntax "throws when..."
function assertNotNull(item: any): throws when item is undefined {
   if(!item){
      throw new Error();
   }
}

function doSomething(arg: string | undefined){
  //after invocation, all instances of arg should be treated as arg!
  assertNotNull(arg);

  //this should succeed
  var vals = arg.splt('');
}

Checklist
My suggestion meets these guidelines:

[ X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[ X] This wouldn't change the runtime behavior of existing JavaScript code
[ X] This could be implemented without emitting different JS based on the types of the expressions
[X ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
[ X] This feature would agree with the rest of TypeScript's Design Goals.

Or in other words, this is the negation of the existing "positive" checks:
// Already works (strict checks on)
function doSomething(arg: string | undefined) {
  if (arg) {
    var vals = arg.split('');
  }
}

Makes sense, the negation (excluding the undesired value(s) instead of including the desired ones) should work too. Everything could be reformulated in the existing "positive" checks but why not support both ways to express this.
Here are five ways to type-guard. OPs option is the only one that does not work (strict null checks need to be turned on). An alternative to OPs version is the 5th one — I guess the main selling point of OPs version is that there does not need to be a block.

Another option, using the "positive" flow:
function assertNotNull<T>(arg: T): arg is Exclude<T, undefined> {
   if(!arg){
      throw new Error();
  }
  return true;
}

This returns the narrowed type in the typeguard.  Although that works, It still adds another block increasing the cyclomatic complexity and possibly requiring the addition of an else block (especially if strict return types, implicit returns, etc. is turned on).
The main goal is to remove the need of those additional code blocks and subsequent nesting.

Duplicate #8655 and others

@RyanCavanaugh  It doesn't look #8655 comes to the same proposal (but it's the same problem).  Has the throws when... piece been proposed elsewhere or should I add a comment to whichever issue you are tracking?
Also #8655 is closed due to design limitation - but I don't think that fit's my proposal here since the syntax is an extension of the current type guards

The underlying root cause is the same - bare function calls can't be uniformly inserted into the control flow graph without destroying performance. Additional syntax proposals for the assertion functions' return type annotations don't help that.

Thanks for the explanation @RyanCavanaugh.
Can you share any pointers / area in code where that logic resides?  I wouldn't mind taking a look when I have free cycles.
You are already visiting the statements inside the method, given that "inlining" the assert would succeed.  Going one level deeper to see a function call's return signature doesn't seem like it should offer substantially different performance, especially since this signature (per proposal) wouldn't be inferred.

I thought I had a write-up on this already, but I can't find it.
Anyway, the process for typechecking proceeds as follows:

Construct the control flow graph of each file based on the syntax (not types) of the code
Typecheck the program, which involves (among other things):

Resolving which declaration identifiers point to
Determining the types of those declarations
Checking the control flow graph to see which type guards are in effect

There is both a phase ordering problem and an inherent circularity here: In order to see which functions affect the control flow graph, you have to have a control flow graph in the first place in order to be able to determine which other narrowings might be affecting it.
You can construct examples that show that determining the "true" control flow graph (i.e. one that only has nodes at actual divergence points) would require an unbounded (but finite) number of inlining steps.
The simple fix is to put all potentially-diverging nodes (e.g. function calls) in the control flow graph, but again this is prohibitively expensive.

All this talk of control flow analysis and function calls is starting to sound suspiciously like #9998.

In the limit, all issues eventually link to #9998


Is there a way to customise the css?

Hi all. Thanks for the lovely theme!
Is there a way to customise/tweak the css? I'd like to add a border above the first method in every class (so that it's more clear where the class description ends and the method descriptions start)

You can place a custom.css in your _static directory:
@import url("guzzle.css");

/* custom styles here */

And use this in your conf.py: html_style = 'custom.css'

Thanks!


Using electrical signals as alternative to pressure

I just wanted to ask as I just discovered this repo and I'd love to get involved. From what I gather in the wiki and ReadMe you are planning on using a pressure/flow sensor in the ventilator in order to detect when a patient's lungs are attempting to breath?
I'm curious have you considered using electronic sensors (similar to ECG) to determine when the patient is attempting to breath instead? From my understanding when measuring an electronic signal across the body there is a certain level of attenuation when the patient's chest cavity is expanding. This could be a good alternative to fitting a flow sensor into an existing handheld ventilator as it would be non-invasive and the hospital would probably have an abundance of these sensors lying around as they are commonly used for ECG measurements. Although there may be some issues as it isn't directly being controlled by volume of the chest cavity.
I want to gauge everyone else's opinion on this. A friend of mine worked on a basic ECG project a while ago so I may be able to get the sensors off him and create a basic control system on an Arduino.

This is called "neural assisted ventilation" where a signal is derived from diaphragm movement.
Regardless, a proper ventilator will need a flow sensor/meter for ventilator controls, patient and machine diagnostics reporting.
It is an interesting feature, to work on for many other possible projects, maybe even testable in a PAPR device for battery longevity purposes.


36207 Enhancement: automatic scheduling of Manager Roles

Hello All,
I have been working on an enhancement to the Manager core for the following:
Use Case:
An existing cluster of authenticated Nodes, many with Placement tags for scheduling Services via spread according to user Preferences. Docker can automatically maintain a set of 37 Cowsay replica container Services spread across my availability zones, but if one of my Manager Nodes fails at 3AM then human intervention is required to select an appropriate Node for Role change. I would like to specify a Replica Set of, say, 5 Manager Roles, and have replacement, authenticated Worker Nodes promoted to Manager automatically promoted to Manager in the event of failure of one of the Replicas.
My Solution
I added a roleScheduler feature that allows the user to specify a Replica Set of, say, 5 Manager Roles, and have replacement, authenticated Worker Nodes promoted to Manager automatically promoted to Manager in the event of failure of one of the Replicas. I used as much of the underlying API definitions and Orchestrator/Scheduler/Dispatcher logic as possible to make the user interaction as similar to regular Replicated Service definitions as possible; a new ** RoleManagerService** Mode was made available to allow the user to:

Define the desired number of Manager Replicas to maintain;
Define Placement Constraint and spread Preferences to determine how Managers are distributed across network topology.

roleScheduler does not directly alter Node.Role; it only sets DesiredRole and delegates Role management authority to the existing role_manager.go. Regardless of user-defined Constraints the primary eligibility requirement is that SwarmKit's existing subsystems can change the Role to Manager, so all of the underlying security features of Node registration & authentication and anything else I wouldn't go near are left unmodified and enforced.
Please have a look at https://github.com/foxxxyben/swarmkit for more details in README.md. I have run and passed my unit tests, but not any integration tests as I don't actually have a ginormous cluster to really run it on. Please keep in mind I named my file rolescheduler.go because helloworld.go is overused.
Thanks,
-Ben

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "36207_roleScheduler" git@github.com:foxxxyben/swarmkit.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354613488
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

So, if I understand correctly, the end result of this patch is that if a manager goes down, it gets demoted and a worker is promoted instead?

I honestly don't understand what the use case is for this. If one of your managers goes down at 3am on Saturday, it's no big deal, because the nature of swarmkit and the purpose of multiple managers is that you can tolerate that failure until 9am on Monday, because the cluster can continue running with one manager down. Additional managers don't contribute to performance. Only the Leader ever does anyone work, and the followers just replicate data. As long as you have a quorum of nodes running, you have a fully functioning cluster.

Yes, if a Manager fails, it gets demoted and replaced, but this is only if the user has submitted at least one Service description to the queue (and only the most recently submitted one is active at a time). If the user does not want to use the automated promotion, then it will not run its reconciliation loop if the Services list is empty.
A LOT can happen between 3 and 9 AM, including additional Manager failures. This is to handle emergencies gracefully by adding reserve "Listener" manager nodes to take up replication in case more Managers or even the Leader fails. This initial version will also do its best to push more valuable nodes back into the Manager set when they become available, and failed Managers are marked "Failed" instead of "Pending" to distinguish them from newly promoted Nodes, so there is plenty of room to add preferential membership to Failed Managers that Recover, but I think some additional health metrics would be beneficial to make the determination. A key metric would be for new Managers to somehow advertise the consistency of their Raft logs, and block on the choice between Recovered and Promoted Node until that time, but that's beyond the scope of this version.

Also, if there were some additional flag to notify that a Manager was placed manually by the user via CLI or API, I would make sure that roleScheduler would never remove it from either the "Failed" or "Active" pools, only move between the two, so that when a manually-placed Manager fails, is replaced by a new Node, and then recovers, only automatically-placed nodes will be demoted. I will see what I can do within scheduler.pkg, but some sort of Node.PlacementMode{API, CLI, AUTO} field would be beneficial.

I've been thinking about this for a while, and I don't think I want this feature. It doesn't seem outstandingly useful to me, and it's going to create a support burden for maintainers when we find bugs.
I think something equally functional can be created as a third party program using the API. You'd deploy a global service scoped to managers and have it listen to the Docker events endpoint for node events.
This isn't The Opinion Of The Maintainers or of Docker Inc, by the way, it's just my individual opinion.

While I think that automatically promoting managers to self heal without requiring human intervention is a useful feature, I agree with the other maintainers in that its probably not a very widely applicable feature just yet and also quite complex to build fully and maintain covering all possible scenarios.
Of course, if you do find this feature useful and have any questions we can help with, please do reach out. Hopefully we'll be able to revisit this feature in the future and add it to swarmkit. Also, feel free to work on other open issues in swarmkit. @foxxxyben

@anshulpundir Thank you, yes, this was intended as more of a concept release. To make it as functional as I would like it to be, and address all of the concerns here, would require additional changes to the API and CLI in order to move this away from the domain of "Services" to "System", but this is what I could do with minimal changes to other parts of the system. I do like the idea of making this a third-party option via the API, however I do not know what kind of information the API provides about the current load on individual nodes, as this is vital to the placement algorithm an exported "AvailableResources" would be far better than trying to add up running tasks from a directly-referenced NodeSet.

I think the only way you can do this client-side is by adding up resource usage. However, you can spread out the cost of this by getting cluster state once when your service starts, and then watching the docker event stream to update your local in-memory reference of the cluster state. Then, you'll have a running tally of resource reservations on all nodes, and be able to make intelligent decisions about promotion and demotion.
In general, this is the pattern I use for stateless cluster-management addon-type services. Get the full cluster state, and watch the event logs to update my local copy of the state for the data I need.


Commands: Add "wen" alias for "plan"

This is kind of a meme on Discord where "wen" is commonly used when
asking for features. As this is the purpose of the "plan" command, an
alias "wen" could make the use of "plan" much funnier.

!wen merged

it needs to be added to the help page

@ZikiFlicky Most aliases are not part of the FAQ, such as the old !pr and others.

I don't think this is make much sense as an alias for !plan as the response doesn't make sense for the !wen meme. That being said I see no harm in the alias existing until someone decides to level up the meme to it's own dedicated command.


Carelink Download Interval

Hi,
I currently use the rc1 beta (including the nightscout updater). It works nicely, but I noticed that the new sensor values do not get fetched in regular intervals. To see this, I added a template-sensor with the following definition:
{{ ( as_timestamp(states.sensor.last_glucose_update.last_changed) - as_timestamp(states.sensor.last_glucose_update.state) ) | round(0)}}

and what I observe is this:

This means that the delay between the SGV reading (as reported by Carelink) and the download time (as the time of entering the HA database) vary between roughly 40 and 100 seconds.
1st question: Is there some logic behind the fetching/downloading time of this integration?
2nd: Why is it not a fixed interval of 300 sec, as we know that the data comes in at that rate?
3rd: somehow related, I'd also like to see #4 being implemented.
Thanks for your time spend on this extension :)

Hi @Trenar I think I can answer all these questions at once. The interval is fixed right now and is about 3/4 minutes. This is because the same interval is used by the pump and app to upload new data to Carelink. We would unnecessary stress the Carelink api if we fetch with a higher interval rate. When there are gaps this is 99% of the time because there was a hiccup with the sync between pump en Carelink somewhere is my experience. And so for your last question, I still not sure if it's worth the time implementing this feature as it will not make the experience better.

Hi @yo-han ,
how do you know that the pump/app upload happens every 3 or 4 minutes? I think it's rather "every time a new value arrives from the pump", which is (roughly) every 300 sec then.
From my experience, when using the official Carelink Connect App you see the new SGV every 5 minutes with only a little delay.
Also from experimenting with xDrip+, the values could be downloaded with a constant rate of 300 sec and an SGV receive delay (measurement vs. download time) below one minute. I think this should also be possible here?
Thanks for your time!

And (just a little note): Isn't the download rate right now at 60 seconds?
https://github.com/yo-han/Home-Assistant-Carelink/blob/8dfee4fa594ab6114b200ef11cf896061a33d4c3/custom_components/carelink/__init__.py#L85C1-L85C14

The download speed is indeed 60 seconds. We made adjustments somewhere along the line but completely forgot about it. What I recall is that even with this download speed, Carelink only provides new data every 4 to 5 minutes. However, it's possible that things have changed since last year.
Another change is that my wife, for whom I created this component, is no longer using it and has switched to using the Carelink app and the Apple Watch complication. Additionally, I'm currently occupied with other fun projects and work, which means my time to address these issues is very limited. On the other hand, @sedy89 has made some excellent contributions, so I'm confident that development will continue.
For now, I'll keep this issue open and revisit it when I have more time available.

the integration is currently configured to scan for updates every 60 seconds.
The "last_update" sensor will show the time the integration got the last lifesign from the pump, which usually is ~5min. ***
On the other hand, the "last_glucose_update" sensor will only be updated once there is a new and valid SG reading available.
If the pump owner is too far away from the smartphone, there won't be an update on this sensor, but on the "last_update". ***
*** this was changed/introduced in the beta release
Personally, I don't see a reason why the value should be changed.
The 60 seconds scan timer of the integration will start as soon as the integration was sucessfully initialized.
In my understanding, the biggest possible delay until the integration finally has the latest information is more or less equal to the scan interval, because the smartphone could have just reported the latest values right after we tried to check for them.
This gap would increase the higher we configure the scan interval value.
In my opinion, a smaller cycle time is better. At least it should be smaller than the update cycle of the pump.
But once I have some time, I can check if I can make it configurable on the integration setup page.


How to get meta data without downloading?

I just want to get meta data only,not download it.

What do you mean by metadata? Get the torrent file ?

@rom1504  yes

I'd guess you could remove the torrent as soon as you have the metadata.
var torrent = client.add(torrentId)
torrent.on('metadata', function () {
  //something something
})

I didn't test that though...

@Tercus  I tried before.But will still download files.

The torrent will auto start once metadata is found. What @Tercus suggested is the way to go at this moment

I'd also like to be able to get the metadata / full torrent file before downloading the file contents.
(I'm working on a fork of webtorrent that includes payments. The torrent file contains some license information needed to pay for the right to download a file. The downloader needs to pay for the license before an uploader will seed the file to them. In order to do this the downloader needs the full torrent file first.)
I might work on having a way to block all requests except those for metadata if there isn't a better solution out there.

+1
Having this feature would simplify my code so much.

@nightwolfz What does you code currently look like?

If I'm not mistaken, torrent metadata is sent even when peers are choked (because only "requests" are dropped when choking, whereas extended messages, which are used by ut_metadata, are unaffected). This means that if you want to get the metadata first you should be able to just keep the peer choked until after the 'metadata' event.

@feross I can't speak for @nightwolfz but here is what I'm using to pull and emit metadata:
    function cleanUp(path){         if(fs.existsSync(path)){             var files = fs.readdirSync(path);             files.forEach(function(file,index){                 var curPath = path + "/" + file;                 if(fs.lstatSync(curPath).isDirectory()){                     cleanUp(curPath);                 } else {                     fs.unlinkSync(curPath);                 }             });             fs.rmdirSync(path);         }     }     function pullMetadata(magnet){         var torrent = wt.add(magnet);         console.log('Checking: ' + torrent.infoHash);         torrent.eto = setTimeout(function(){             torrent.destroy(function(){                 console.log('Timeout: ' + torrent.infoHash);             });         }, 120000); // 2 minutes for slow connections, small swarms, and or large metadata torrents         torrent.on('metadata', function(){             torrent.pause();             clearTimeout(torrent.eto);             var fileid = 0;             torrent.files.forEach(function(file){                 file.deselect();                 var data = {infohash: torrent.infoHash, fileid: fileid, path: file.path, length: file.length};                 self.emit('file', data);                 fileid += 1;             });             torrent.destroy(function(){                 console.log('Completed: ' + torrent.infoHash);                 cleanUp(loc + torrent.infoHash);             });         });     }
Having args in wt.add that would disable the creation of the file storage, automatically destroy torrents that are timing out, and deselect all files by default would eliminate most of the above code (the cleanUp, setTimeout, torrent.pause, and file.deselect) and likely reduce the overall resource usage for high volume scraping. In addition the recursive delete aspect of cleaning up the file storage is potentially dangerous to less experienced developers.
Here is what I think the simplified code might look like if the features were implemented:
    function pullMetadata(magnet){         var opts = {onlyMetadata: true, timeout: 120000}; // just an example         var torrent = wt.add(magnet, opts);         console.log('Checking: ' + torrent.infoHash);         torrent.on('metadata', function(){             var fileid = 0;             torrent.files.forEach(function(file){                 var data = {infohash: torrent.infoHash, fileid: fileid, path: file.path, length: file.length};                 self.emit('file', data);                 fileid += 1;             });             torrent.destroy(function(){                 console.log('Completed: ' + torrent.infoHash);             });         });     }

You can use the rimraf package to have an easier time recursively deleting files.
Or better yet, use the store option to client.add to pass a custom chunk store. You can use memory-chunk-store and no files should be created.

Thanks to feross, bittorrent-protocol, torrent-discovery and ut_metadata provide all the plumbings you need.
First you need torrent-discovery to find peers using infohash only, discovery = new Discovery(opts), make sure { dht: true } option is included. As soon as you have peer address from discovery.on('peer', function (peer) {}) event, you can create a client (the ut_metadata usage example is a server) with wire.use(ut_metadata()) and send the peer a handshake. Call wire.ut_metadata.fetch() after the peer responds to you with a handshake. Now listen to ut_metadata.on('metadata', function (metadata) {}) event for the metadata. That's basically it.
I implemented a bep9-metadata-dl module using the modules mentioned above with callback and Promise interface, plus timeout and concurrent metadata download connections options. Thanks again to to feross. Without his work, it'll take months if not years to make it work.
The following is proof of concept code to fetch ubuntu-16.04.1-server-amd64.iso's metadata:
const Discovery = require('torrent-discovery');
const Protocol = require('bittorrent-protocol');
const ut_metadata = require('ut_metadata');
const addrToIPPort = require('addr-to-ip-port');
const bencode = require('bencode');
const net = require('net');

const SELF_HASH = '4290a5ff50130a90f1de64b1d9cc7822799affd5';   // Random infohash
const INFO_HASH = '90289fd34dfc1cf8f316a268add8354c85334458';   // ubuntu-16.04.1-server-amd64.iso

Discovery({ infoHash: INFO_HASH, peerId: SELF_HASH, port: 6881, dht: true })
.on('peer', function (peer) {
  const peerAddress = { address: addrToIPPort(peer)[0], port: addrToIPPort(peer)[1]};
  console.log(`download metadata from peer ${peerAddress.address}:${peerAddress.port}`);
  getMetadata(peerAddress, INFO_HASH);
});

const getMetadata = (peerAddress, infoHash) => {
  const socket = new net.Socket();
  socket.setTimeout(5000);
  socket.connect(peerAddress.port, peerAddress.address, () => {
    const wire = new Protocol();

    socket.pipe(wire).pipe(socket);
    wire.use(ut_metadata());

    wire.handshake(infoHash, SELF_HASH, { dht:true });
    wire.on('handshake', function (infoHash, peerId) {
      wire.ut_metadata.fetch();
    })

    wire.ut_metadata.on('metadata', function (rawMetadata) {
      metadata = bencode.decode(rawMetadata).info;                // Got it!
      console.log(`${metadata.name.toString('utf-8')}:`);
      console.log(metadata);
      process.exit(0);
    })
  });
  socket.on('error', err => { socket.destroy(); });
}


Conflict resolver does not support conflict style "diff3"

VSCode Version: Code 1.13.1 (379d2efb5539b09112c793d3d9a413017d736f89, 2017-06-14T18:18:03.540Z)
OS Version: Linux x64 4.4.0-79-generic
Extensions:

Extension
Author
Version

rainbow-brackets
2gua
0.0.6

ng-template
Angular
0.1.3

EditorConfig
EditorConfig
0.9.3

cucumberautocomplete
alexkrechik
2.3.0

gitlens
eamodio
4.1.1

tslint
eg2
0.15.0

vscode-great-icons
emmanuelbeziat
2.1.7

debugger-for-chrome
msjsdiag
3.1.4

indent-rainbow
oderwat
0.6.1

vscode-jscpd
paulhoughton
0.2.0

postal
postal-team
1.0.0

vscode-icons
robertohuertasm
7.9.0

stylelint
shinnn
0.24.8

code-spell-checker
streetsidesoftware
1.2.0

Steps to Reproduce:

run command git config --global merge.conflictstyle diff3
create a conflict with git merge (or rebase or am or cherry-picking)
in vscode, conflict is displayed with 3 sections (<<<<<<< ours ||||||| original ======= theirs >>>>>>>)
if you click Accept Current Changes, both ours and original sections are included
or if you click Accept Both Changes, all sections are included (ours, original, theirs)
or if you click Compare Changes, left pane of comparison view contains both ours and original sections.

Fixed as #28507


In mixed-content page page.exposeFunction is stuck indefinitely

Steps to reproduce
Tell us about your environment:

Puppeteer version: 1.5.0
Platform / OS version: Mac OS 10.13.3
URLs (if applicable): https://www.bennish.net/mixed-content.html
Node.js version: 10.1.0

What steps will reproduce the problem?
Please include code that reproduces the issue.

Access to a mixed-content page.
expose a function by page.exposeFunction.
the execution is stuck indefinitely.

const puppeteer = require('puppeteer');
(async() => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();

  await page.goto('https://www.bennish.net/mixed-content.html');
  await page.exposeFunction('compute', function(a, b) {
    return Promise.resolve(a * b);
  });
  const result = await page.evaluate(async function() {
    return await compute(3, 5);
  });
  console.log(result);
  await browser.close();
})();

What is the expected result?
Expose function successfully or at lease throws an error.
What happens instead?
The execution is is stuck indefinitely.

For the record: this happens because execution contexts are not created for iframes that failed to load.
Upstream CL: https://chromium-review.googlesource.com/c/chromium/src/+/1102154

Hi, i am getting protocol error only in version 1.18.0
it works fine in version 1.17.0
{"name":"PDFGenerator","hostname":"26b7bc9c5bbd","pid":59,"level":30,"err":{"message":"Protocol error (IO.read): Invalid parameters handle: string value expected","name":"Error","stack":"Error: Protocol error (IO.read): Invalid parameters handle: string value expected\n    at Promise (/usr/app/node_modules/puppeteer/lib/Connection.js:183:56)\n    at new Promise ()\n    at CDPSession.send (/usr/app/node_modules/puppeteer/lib/Connection.js:182:12)\n    at Function.readProtocolStream (/usr/app/node_modules/puppeteer/lib/helper.js:238:37)\n    at \n  -- ASYNC --\n    at Page. (/usr/app/node_modules/puppeteer/lib/helper.js:111:15)\n    at /usr/app/pdf-creator/index.js:228:14\n    at \n    at process._tickCallback (internal/process/next_tick.js:189:7)"},"msg":"Failed on PDF generation page one","time":"2019-06-24T08:07:32.960Z","v":0}


Consolidate syntax recommendations in docs

Similar to: https://github.com/artsy/eidolon/pull/412 but for all docs
Choices @ashfurrow and I made:

Always skip the { and } for the dictionary params
If there's two params or less, inline it and remove all other
IMO there should be a space after a function & before the params, so

 hockey (
   thing: "thing"
 )

These are ruby 2.0 things, which is 10.9 - 10.10, which is all Xcode 6 supports, so using fancy syntax feels reasonable to me.

Happy to do this.

Sounds like a good plan. I already require Ruby >= 2.0, so that's not a problem.
I already wrote all examples (e.g. https://github.com/fastlane/fastlane-example) and of course the documentation using the other style :disappointed:

Another thing which I'm not happy about yet: Sometimes the example docs use ' and sometimes ", which might confuse some users. I guess we should stick with ".

yeah, imo standardising on " means when people try to interpolate with #{} they won't get confused.

Just pushed https://github.com/KrauseFx/fastlane/commit/986375f50569847ec2900b8101f69a98f1461889
I decided to not got for the space after the method name, but to drop the ({ and only have ( :+1:


Add license file to repository

Problem description
The LICENCE file defined within the repository template is missing within the repository.
Expected action
Additional context

Apache licence is already here.


Error at end of step j in jetson installation.

I'm at the end of step J in the jetson installation:
rostopic hz /kinect2_head/depth_ir/points
For which I get the following error:
ERROR: Unable to communicate with master!
Everything else seemed to work up until this point.

@redfood,
the rostopic hz /kinect2_head/depth_ir/points is able to provide you the framerate of the messages streamed in the topic /kinect2_head/depth_ir/points.
Your error means there is no one who is publishing that topic. So, you have to run it only while
roslaunch kinect2_bridge kinect2_bridge_ir.launch
is running in another terminal. If you stop this roslaunch command before running the rostopic one you should see the error you report.

Great thank you.
When when I run 'rostopic hz /kinect2_head/depth_ir/points' I get framrates a bit over 21 FPS which is great.  However, the other process running roslaunch kinect2_bridge kinect2_bridge_ir.launch continually reports errors which look like this:
[RgbPacketStreamParser::handleNewData] skipping rgb packet!

[DepthPacketStreamParser::handleNewData] skipping depth packet because processor is not ready

Is this normal/to be expected or does something give to be done?

Don't worry, if the framerates are as you said you should not have problems about the errors you mentioned.


Is it thread safe ?

hello , I have exactly the same question : https://github.com/DataDog/datadogpy/issues/5
thank you

Apparently yes -> https://github.com/indeedeng/java-dogstatsd-client/issues/4


Addon should not depend in ember-cli-babel

Only addons that ship runtime code should have ember-cli-babel as a runtime dependency
@dbouwman could you release a new version of the addon after this?

Definitely @cibernox - thanks!


Hide mask's items that have multiple options

For example
[''+370(##)###-##-##','+375(##)###-##-##'']
When user enter '37' widget will show first mask with empty third element - +37 _ ( _ _ ) _ _ _ - _ _ - _ _
Similar solution was implemented in https://github.com/andr-04/inputmask-multi

+1

@artemkaint ,
@andychups ,
Something like https://jsfiddle.net/wrnf0fh6/ ?

Hi! Look at this case: https://jsfiddle.net/c5fthj3b/ (type 3)

@andychups ,
Thx for the case.
Working on it.

@andychups ,
Finally fixed ;-)


x-hp branch windows test failures

Currently these tests are failing even on the hetzner windows box with very good connectivity:
failures:
hp::magicsock::timer::tests::test_timer_abort_late
tests::test_blob_reader_partial
tests::test_custom_request_blob
tests::test_custom_request_collection
tests::test_ipv6
tests::test_run_fsm
tests::test_server_close

Latest stable rust can not compile iroh in release mode, neither x-hp nor main. It fails with these errors:
cargo build --release
...
The unwind destination does not have an exception handling instruction!
  %651 = invoke noundef nonnull align 8 ptr @_ZN5tokio7runtime4task3raw7RawTask5state17hbe42a8dd9af72982E(ptr noalias noundef nonnull readonly align 8 dereferenceable(8) %4)
          to label %652 unwind label %439
The unwind destination does not have an exception handling instruction!
  %653 = invoke noundef zeroext i1 @_ZN5tokio7runtime4task5state5State21drop_join_handle_fast17ha31ef8dfccb9d118E(ptr noundef nonnull align 8 %651)
          to label %654 unwind label %439
The unwind destination does not have an exception handling instruction!
  invoke void @_ZN5tokio7runtime4task3raw7RawTask21drop_join_handle_slow17hf84c911dc3ba07e5E(ptr noundef nonnull %656)
          to label %657 unwind label %439
CleanupReturnInst must unwind to an EH block which is not a landingpad.
  cleanupret from %674 unwind label %439
The unwind destination does not have an exception handling instruction!
  invoke fastcc void @"_ZN4core3ptr190drop_in_place$LT$quic_rpc..server..RpcServerError$LT$quic_rpc..transport..quinn..QuinnServerEndpoint$LT$iroh..rpc_protocol..ProviderRequest$C$iroh..rpc_protocol..ProviderResponse$GT$$GT$$GT$17h6e9fa75bbe317f9eE.llvm.15694831338480034589"(ptr noundef nonnull %44)
          to label %774 unwind label %439
in function _ZN4iroh8provider20Builder$LT$E$C$C$GT$5spawn28_$u7b$$u7b$closure$u7d$$u7d$28_$u7b$$u7b$closure$u7d$$u7d$17h84920bfe42870ceeE.llvm.15694831338480034589
LLVM ERROR: Broken function found, compilation aborted!
error: could not compile `iroh`

You have to explicitly set 1.65.
rustup default 1.65

or
cargo +1.65 test --release

Focusing on test_ipv6, since that is a relatively simple test...
Some clues:

test_ipv6 fails, but test_run_ticket does not.
when pausing in test_ipv6 after the provider is created and connecting via iroh get from cmd.exe it works

https://github.com/n0-computer/iroh/pull/1044 should at least fix test_ipv6

CI is green now on windows, thanks @rklaehn 🎉


Add default ntp configuration

Currently, when the system boots after install, ntp is not configured.
I added the following in the config file and it works fine:
write_files:

container: ntp
path: /etc/ntp.conf
permissions: "0644"
owner: root
content: |
server 1.pool.ntp.org iburst
server 0.pool.ntp.org iburst
restrict default nomodify nopeer noquery limited kod
restrict <IP_ADDRESS>
restrict [::1]
runcmd:

timedatectl set-ntp true

But I would suggest to have a default configuration as time sync problem sometime causes underlying issues.

This is fixed in recent images.


first try to simplify the shutdown thread for decommissioning

Here shutdown thread does the following three steps one by one before triggering the exit for the executor:

give time to process DecommissionExecutor for the driver
wait for all tasks to finish
wait for migration to finish

Disclaimer: this change main purpose to help in our discussion and it is just slightly tested, BlockManagerDecommissionIntegrationSuite runs successfully:
[info] BlockManagerDecommissionIntegrationSuite:
[info] - verify that an already running task which is going to cache data succeeds on a decommissioned executor after task start (8 seconds, 651 milliseconds)
[info] - verify that an already running task which is going to cache data succeeds on a decommissioned executor after one task ends but before job ends (5 seconds, 608 milliseconds)
[info] - verify that shuffle blocks are migrated (5 seconds, 942 milliseconds)
[info] - verify that both migrations can work at the same time (5 seconds, 562 milliseconds)

I checked this log line too:
─attilazsoltpiros@apiros-MBP16 ~/git/attilapiros/reviewing2/work ‹SPARK-31197-attila*›
╰─$ grep " No running tasks, migration finished or not configured, stopping" */*/*/*                                                        2 ↵
app-20200801052114-0000/2/target/unit-tests.log:20/08/01 14:21:21.619 wait-for-blocks-to-migrate INFO CoarseGrainedExecutorBackend: No running tasks, migration finished or not configured, stopping.
app-20200801052122-0000/2/target/unit-tests.log:20/08/01 14:21:27.234 wait-for-blocks-to-migrate INFO CoarseGrainedExecutorBackend: No running tasks, migration finished or not configured, stopping.
app-20200801052127-0000/0/target/unit-tests.log:20/08/01 14:21:33.748 wait-for-blocks-to-migrate INFO CoarseGrainedExecutorBackend: No running tasks, migration finished or not configured, stopping.
app-20200801052134-0000/2/target/unit-tests.log:20/08/01 14:21:40.182 wait-for-blocks-to-migrate INFO CoarseGrainedExecutorBackend: No running tasks, migration finished or not configured, stopping.
╭─attilazsoltpiros@apiros-MBP16 ~/git/attilapiros/reviewing2/work ‹SPARK-31197-attila*›

So this just introduces more race conditions, I’m not seeing how this is better. For one thing the migration can be marked as finished while the task is still running and then the task goes away but stores some blocks. I know the current logic is complicated but this is just worse.

Regarding

For one thing the migration can be marked as finished while the task is still running

The numRunningTasks is only decreased when the task is finished: https://github.com/apache/spark/blob/757086950c19b038bcace4841ef0c1357a3967ab/core/src/main/scala/org/apache/spark/executor/Executor.scala#L690 or killed.

New task is not scheduled when the driver knows the executor is decommissioned.

From 1) and 2) I can can see only a small window when one task can be scheduled in the very beginning of the shutdown process and the sleep is about to decrease this (meanwhile migration thread is working to move the files away). Also when decommissioning is triggered during task running there will be no new task scheduled as the executor is already busy (this will be the case most of the time).
Did I miss something? Please give me an example to help me see what I missed.
I tried to illustrate it with a diagram:
 PreviousTask
  Started        wait-for-blocks-to-migrate # start
      |                        |
      | DecommissionExecutor   |       Checking               No running tasks,        migration finished
      |        to              |    numRunningTasks          checking migrations          stpping
      |      Driver            |          |                           |                      |
      |         |              |  sleep   |                           |                      |
      |         |              |<-------->|                           |                      |
 ---------------|--------------|----------|---------------------------|----------------------|------->  CoarseGrainedExecutorBackend timeline
      |         |                ^
      |         -AAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCC-----> Driver timeline
      |            Driver might send a new task
      |            right before it processes the decom
      |            and no more task scheduled after
      |
      |
  --------------------------------------------------------------------------------------------------> Task timeline

A: safe time period to start a new task
B: still safe
C: not safe

I think using a sleep to attempt to order the events baking in a flaky design that we already have a better alternative to. This just seems worse. The best case of this code is the worst case of the other code.

I agree your concern regarding the sleep I would like to avoid it meanwhile keeping the code a bit more simple.
It seems to me here we cannot have both so please keep the current solution but please add some unit tests to make it easier for everybody to get the intention behind.


Infinite render

I installed the extension and copy-pasted one of the example snippets in the presentation page, but once i click outside of the box the rendering circle spins infinitely without producing a rendered result

I had the same issue, in my case restarting obsidian fixed the problem.

Same here, but I get the problem often enough where it's become an issue.

Same here; specifically, everything works normally except for when I try to render an [op amp] node; when I do that, the graph begins an infinite render.

I also encounter this whenever using the circuitikz package. Restarting obsidian doesn't fix

I only just discovered this plug-in and I have this problem. I've only seen it successfully render once and I'm unable to reproduce the conditions that worked.

I'm having the same issue, only the first example is working for me. It seems like an infinite loop occurs when using an  additional package through \usepackage that, in fact, isn't used in first example


Fix/#161

Description
Edited and fixed some files that have // @ts-nocheck or //@ ts-ignore.
And I passed BackButton text as a children
fixes # 161
Screenshots

These changes are present in #162 so will only check that PR


The first day of the week should be configurable

In expanding keywords, this_week (tw) and last_week (lw), the first day of the week is fixed to Monday. Some people like to start the week with Monday, and others like the way to start with Sunday.
It should be configurable.

A new setting will be added to config.yml.
:sunday_start: true

The default value is false (it means a week starts with Monday).


Overworld 2003 Update WIP

THINGS THAT HAVE CHANGED:

Mundane'd generation, to minimize problems, while also maintaining visuals
Added categories to the gen's (oopsie)
Fixed Grass in oceans
Changed Savana (not going to spell that properly) water to not be vomit green (was intended to be blue)
Reattached sphinx
modified how mountain generation is formed (more hills now, less plateau walls)
Modified swamp lakes // beaches
Implemented ALL trees into custom trees (Only works in respective biome-to-sapling trees IE: Jungle sapling in a jungle biome)
removed fences and fence gates from some trees, will likely remove all later // as I see them
Removed entity spawns, replaced with a new system
Implemented a new system for spawning
Fixes for general biome generation
Remitted the Tuff, Calcite blocks that I forgot to ever add lmao.
General Fixes as well
Added more objects

Made my final touches, still need to add biome specific spawns, but ill do that tomorrow

I can't look at it today, but what I saw based on screenshots & talking to 2 users, it looks fine in general.


PyPI release

Latest available version on PyPI is 1.11.0 from August 2015. Many things got updated since then.

Thank you @KostyaEsmukov for taking on the maintenance of this package!


Document using the gem with Devise

The Devise gem is the de-facto standard for implementing authentication in Rails. It also assumes the responsibility of sending some common types of transactional emails, such as sign up confirmations, password reset links, welcome emails, and others.
The postmark-rails gem is known to work seamlessly with Devise, as it relies on basic ActionMailer facilities. That said, some users reported confusion regarding how certain Postmark features (e.g., templates) fit with Devise. Thus, it might be worth providing an official guide for getting started with Devise on Postmark. Such guide would cover the following:

Initial configuration
Development VS production
Customization (Rails templates VS Postmark templates)

@temochka I have just hooked up devise with a custom mailer using postmark Templates, I will send a PR with a wiki page perhaps it could be of assistance as i see this still seems to be a 'hot topic' I'll edit this with a gist i am going to do on this as well.

@TheMindlessDevCanada thank you for sharing this! I’m no longer with Postmark, but I wonder if @ibalosh or @tomazy could help.

@tomazy @nickhammond could you check out this one?

Thank you @TheMindlessDevCanada! This is super helpful. We will incorporate this in our wiki as soon as possible.

@TheMindlessDevCanada - we've added a page to our wiki based on your work. Thanks again!


Disable external tests requiring a X server

No idea what is happening with codecov, I think you can ignore.


CallbackQueryHandler using Google-Apps-Script

Saw extensions available for python, and they are calling it CallbackQueryHandler.
I couldn't find any sources for such method in Google-Apps-Script.
Is it possible to update to have such method?
For example:

Inline keyboard button asks for first Option1 and Option2.
On callback, if Option1 chose, then editMessageReplyMarkup() with for Options 1.1, 1.2, 1.3. If Option 2 chose, then Options 2.1, 2.2, 2.3.

hi @ducky7788 OwO//
i am sorry
but "Google-Apps-Script-Telegram-Bot-Library" just a "Library", it is not "Framework"
so... now i have not this plan to add "CallbackQueryHandler"

but if you want to "CallbackQueryHandler"
maybe use json-hook to reach
Is there anything I can do to help you?

hi @ducky7788 OwO//
i am sorry
but "Google-Apps-Script-Telegram-Bot-Library" just a "Library", it is not "Framework"
so... now i have not this plan to add "CallbackQueryHandler"

but if you want to "CallbackQueryHandler"
maybe use json-hook to reach
Is there anything I can do to help you?

Thanks for your reply @we684123
I will try what you have suggested, i dont have much coding experiences.
Will take some time to trial and error of your json-hook library.

Thanks for your reply @we684123
I will try what you have suggested, i dont have much coding experiences.
Will take some time to trial and error of your json-hook library.


Add ERC: Single Sign-On for Account Discovery

When opening a pull request to submit a new EIP, please use the suggested template: https://github.com/ethereum/EIPs/blob/master/eip-template.md
We have a GitHub bot that automatically merges some PRs. It will merge yours immediately if certain criteria are met:

The PR edits only existing draft PRs.
The build passes.
Your GitHub username or email address is listed in the 'author' header of all affected PRs, inside .
If matching on email address, the email address is the one publicly listed on your GitHub profile.

approved

@lightclient can we merge as draft please :)

There will be a small overhaul on some semantics post Denver workshops. Will update this week or next

@SamWilsn Can we get this merged so I can get it in draft state, will help with pushing along changes imo


Need Example

So when a user logs in how to I generate the JWT token to send back to the client which is attached to future requests?

+1 for this

Answered my own question.
take a look at
https://github.com/auth0/node-jsonwebtoken

Glad you figured it out.  This strategy was only intended to authenticate JWTs, not issue them. I was originally using it with JWT's from a 3rd party and not issued by my own application.
I suppose this behavior could be added to the strategy but the intent was to leave it up to another party like an OAuth2 service.

@themikenicholson thanks for this package.
But I think it is a good ideia to also provide a Strategy to issue JWT tokens in this own package

@sibeliusseraphini I see where you're coming from but this library was originally designed to work with tokens issued by a 3rd party - particularly those issued by the Google Sign-in API for android.  My primary use case was not to replace easier-to-implement session based auth methods with a JWT. Instead I'm trying to simplify interacting with third parties' oauth2.0 and simliar services using JWT as the token type.
Other JWT authentication strategies also leave issuing the token up to 3rd parties or other modules. See https://www.npmjs.com/package/passport-http-jwt-bearer.

I would like to share my solution using koa@2, I need to share the secret to use in jwt and passport-jwt.
This can be used with any Strategy, and will return a json with the JWT token
export function doLogin(ctx, next) {
  return passport.authenticate('custom', async (user, info, status) => {
    if (user === false) {
      ctx.status = 401;
    } else {
      const token = jwt.sign({ id: user._id}, config.secret);
      ctx.body = {
        token: token,
      };
      next();
    }
  })(ctx, next);
}

@themikenicholson thanks


bump openssl to fix RUSTSEC-2024-0357

This MR bump openssl crate to include the fix for RUSTSEC-2024-0357

This is not necessary. Run cargo update locally.

Just to understand, by not bumping the version here, cargo is allowed to resove openssl to a lower version that contain the vulnerability right?
We don't want to prevent this by only allowing version >= 0.10.66  ?

That's correct.

Why don't we want to prevent this ? Because the vulnerability is not critical enough ? Or maybe we don't want the churn of everybody recompiling if they don't care about the vulnerability ?

Oh I see, thanks a lot for taking the time to answer my question


Create CardDisplay to place the Cards from Deck

closed with commit: https://github.com/sopra-fs23-group-37/client/commit/9a42f27bba7b80d1bf9e0c204c06cd25ef40ef08


Feature/ami parameter

#6

Thanks for this Chris. However Py26 fails due to an issue with the test itself. I've merged for the time being.


Cannot insert legacy ACL for an object when uniform bucket-level access is enabled

Following https://cloud.google.com/ruby/getting-started
When attempting to save an image to a book.
The following error is logged:
Google::Cloud::InvalidArgumentError: invalid: Cannot insert legacy ACL for an object when uniform bucket-level access is enabled. Read more at https://cloud.google.com/storage/docs/uniform-bucket-level-access
	/layers/google.ruby.bundle/gems/.bundle/gems/ruby/2.5.0/gems/google-cloud-storage-1.34.1/lib/google/cloud/storage/service.rb:763:in `rescue in execute'
	/layers/google.ruby.bundle/gems/.bundle/gems/ruby/2.5.0/gems/google-cloud-storage-1.34.1/lib/google/cloud/storage/service.rb:760:in `execute'
	/layers/google.ruby.bundle/gems/.bundle/gems/ruby/2.5.0/gems/google-cloud-storage-1.34.1/lib/google/cloud/storage/service.rb:350:in `insert_file'
	/layers/google.ruby.bundle/gems/.bundle/gems/ruby/2.5.0/gems/google-cloud-storage-1.34.1/lib/google/cloud/storage/bucket.rb:1515:in `create_file'
	/workspace/app/models/book.rb:141:in `upload_image'
	/workspace/app/models/book.rb:137:in `update_image'
	/workspace/app/models/book.rb:131:in `update'
	/workspace/app/controllers/books_controller.rb:44:in `update'

The code may be attempting to set an ACL directly. Need to investigate.

yes this is happening because we are setting acl as public for the file being uploaded here https://github.com/GoogleCloudPlatform/ruby-docs-samples/blob/3e0deb9c360112109919c59aa2ba43b7749ad084/getting-started/bookshelf/app/models/book.rb#L152
either the bucket can be created with fine-grained access to allow setting acls for individual objects

or the sample can be modified to remove the explicit acl setting.
Closing this issue for now, please feel free to reopen if you have any further questions.


Question regarding to trk.hit_streak >= self.min_hits or self.frame_count <= self.min_hits

Hello,
First, thank you for sharing this repository.
I'm testing OC-SORT on one of my own video using the demo_video.py file as you suggested in readme.  I found that some detection results are not included in any of tracking results.  Digging further I found that the main problem is at ocsort.py where we output results:
https://github.com/noahcao/OC_SORT/blob/7a390a5f35dbbb45df6cd584588c216aea527248/trackers/ocsort_tracker/ocsort.py#L316-L318
specifically on line 316 trk.hit_streak >= self.min_hits or self.frame_count <= self.min_hits:
Let's suppose the video has 4 frames,  the a still object appear on frames 2, 3, 4,  and we set min_hits = 3 as the default params.

track successfully stablished for the object on frame 2 and 3
On frame 4:  we associate the object, so the hit_streak=  2, min_hits=3, frame_count=4,   it does not satisfy the condition to include to the return,  hence empty blob is outputted.

I'm a bit confused what's the rational behind trk.hit_streak >= self.min_hits or self.frame_count <= self.min_hits. My guest is that it may boost performance for certain types of videos?  Should I use a different function other than update for general videos (eg: not security footage, with shot changes, etc)?
I guess my concern is that I can fix this specific part with something making sense. but there may be other parts you did intentionally for performance on certain types of videos that I'm not aware of.
Thank you

i understand now that since it's an online tracker, we only track objects starting from the min_hits


fix: AWS region for S3 bucket

followup for https://github.com/cncf-tags/green-reviews-tooling/pull/48. name changed. and the location too.


Display filter box external from the grid.

I can't find in the docs how to set all filter box external from the grid (as shown in your screenshot).
I've missed something?

Hello,
https://github.com/Abhoryo/APYDataGridBundle/blob/master/Resources/doc/template/render_external_filters.md

Thank You very much!
But how did I not see it?
I think I will have to take a vacation ... I'm a bit tired:-).


bpf: Handle tuple collisions on UDP services for inactive backends

Cilium chooses to pick a new active backend in the case when the backend picked from the CT_SERVICE entry is inactive for TCP service (See #20407). However, in such a tuple collision case, it still sends traffic to the inactive backend for the UDP service. This PR fixes this issue by selecting a new active backend for the UDP service.
Please ensure your pull request adheres to the following guidelines:

[x] For first time contributors, read Submitting a pull request
[x] All code is covered by unit and/or runtime tests where feasible.
[x] All commits contain a well written commit description including a title,
description and a Fixes: #XXX line if the commit addresses a particular
GitHub issue.
[x] If your commit description contains a Fixes: <commit-id> tag, then
please add the commit author[s] as reviewer[s] to this issue.
[x] All commits are signed off. See the section Developer’s Certificate of Origin
[x] Provide a title or release-note blurb suitable for the release notes.
[x] Thanks for contributing!

Fixes: #24128

On second thought, we found out that we should fix this issue on our side because it's specific to our environment


made enhancement in how we manage audio files for smoother use and up…

…dated the repo to have  .env.example and .gitignore to be more developer friendly

when i ran on windows i was facing issue like
ed by another process: 'output_audio.mp3'
Exception in LiveClient._listening: [WinError 32] The process cannot access the file because it is being used by another process: 'output_audio.mp3'
Handled Error: {
    "description": "Exception in LiveClient._listening",
    "message": "[WinError 32] The process cannot access the file because it is being used by another process: 'output_audio.mp3'",
    "type": "Exception",
    "variant": ""
}
Connection Closed

and ```
age(completion_tokens=37, prompt_tokens=986, total_tokens=1023)) Exception in LiveClient._listening: [Errno 13] Permission denied: 'output_audio.mp3' Exception in LiveClient._listening: [Errno 13] Permission denied: 'output_audio.mp3' Handled Error: { "description": "Exception in LiveClient._listening", "message": "[Errno 13] Permission denied: 'output_audio.mp3'", "type": "Exception", "variant": "" }.
which meant when the system was trying to generate new file it was being denied as it was still linked to a resource so to fix that i updated the play audio function to unlink the audio after playing

def play_audio(file_path):
pygame.mixer.init()
pygame.mixer.music.load(file_path)
pygame.mixer.music.play()
while pygame.mixer.music.get_busy():
    pygame.time.Clock().tick(10)

# Stop the mixer and release resources
pygame.mixer.music.stop()
pygame.mixer.quit()

# Signal that playback is finished
mute_microphone.clear()
```

and i also added a code snippet to delete the audio after playing for a better management of resources


Cannot rename parent folder

Type: Bug
Create a folder in vs code and then create another folder within it and you'll see that you cannot rename the parent folder. it just gives the permission error,
VS Code version: Code 1.86.2 (903b1e9d8990623e3d7da1df3d33db3e42d80eda, 2024-02-13T19:40:56.878Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-10700F CPU @ 2.90GHz (16 x 2904)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: enabled_ondirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_graphite: disabled_offvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: enabled

Load (avg)
undefined

Memory (System)
15.92GB (6.66GB free)

Process Argv
--crash-reporter-id 794ebb75-3150-45d2-ba79-244d0342617a

Screen Reader
no

VM
0%

Extensions (11)

Extension
Author (truncated)
Version

codesnap
adp
1.3.4

vscode-tailwindcss
bra
0.10.5

es7-react-js-snippets
dsz
4.4.3

prettier-vscode
esb
10.1.0

auto-close-tag
for
0.5.15

auto-rename-tag
for
0.1.10

dotenv
mik
1.0.1

color-highlight
nau
2.5.0

material-icon-theme
PKi
4.34.0

prisma
Pri
5.10.2

vscode-styled-components
sty
1.7.8

(1 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:30899288
vscaat:30438848
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
accentitlementsc:30887149
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
d34g3935:30971562
edj9j583:30969295
a89i1917:30961429
7j2b6412:30969109

I do not know how to add a recording but in your case it seems like you don't have git initialized. in my case it is initialized and it happens when I initialize it with git, if I just remove .git folder from my project I can make changes to the folder structure.

Git must be locking your file in someway then and not VS Code. Can you rename the file via the windows explorer? My hypothesis is you cannot and will also hit a permission error

I can do it via the windows explorer although I have to close vs code entirely.

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


Feature request: Auto load related data on Find, First, and so on

Hi and at first: great work. Gorm is really impressive and cover the entire functionnalities I want :)
I'm creating a complete framework and I'm implementing Gorm as "plugin" (mysql, pgsql and sqlite will use gorm, but mongo will use mgo and so on...)
To be easilly implemented and usable, as Mongo can do, I really want to be able to fetch data with joined value. Let me explain:
type Address struct {
     City string
     Street string
}

type User struct {
    Name string
    Addresses []Adress
}

Gorm understand that I should regsiter Addresses, Mongo registers full data in one dataset.
When I save an User. That's ok. Each of drivers saves the result as it should.
But when I fetch User, the Addresses "field" is not filled... Mongo hasn't this "problem" because the Addresses field is in the record.
With Gorm I have to call Related to set another list, I have to give struct to fill.
Yes... I can do it myself in drivers (fetch field, verify they have tables, then assgn related object to the main struct). But... if Gorm plans to be able to do it... That could be great :)

Seems you are requesting something like https://github.com/jinzhu/gorm#preloading-eager-loading
And Gorm has a plugin system, you could register callbacks with it, I think this maybe helpful for you, check it out: https://github.com/jinzhu/gorm/blob/master/doc/development.md#register-a-new-callback
(not well documented yet, still improving the plugin system API, so please let me know if you have any questions)
Thank you.

Will many2many be supported in the preloading api in the future?

mmmmh yes... there are too much things to do for my framework to be able to autoload joined data.
I have to discover table fields to preload, and user has to set "EntityId" to make it working. Warn: I really love gorm and I'm impressed by your work. What I'm telling is only for my own work in a special case. Don't think I'm saying that gorm is bad :)
I paste you a test that I made to test preloading, and I've got a big error log calling this:
package kwiscaledbsqlite3

import (
	"github.com/jinzhu/gorm"
	_ "github.com/mattn/go-sqlite3"
	"os"
	"testing"
)

func cleanDB(db string) {
	os.Remove(db)
}

type SubData struct {
	id       int64
	Info     string
	UpDataId int64
}

type UpData struct {
	Id       int64
	Name     string
	SubDatas []SubData
}

func TestDirectDB(t *testing.T) {

	defer cleanDB("testdb.db")

	g, _ := gorm.Open("sqlite3", "testdb.db")
	g.LogMode(true)
	g.CreateTable(&UpData{})
	g.CreateTable(&SubData{})

	s := &UpData{
		Name: "foodata",
	}

	sub := make([]SubData, 0)

	sub = append(sub, SubData{
		Info: "info 1",
	})
	sub = append(sub, SubData{
		Info: "info 2",
	})

	s.SubDatas = sub
	g.Save(s)

	res := UpData{}
	g.Preload("SubDatas").Find(&res)
	t.Log(res)
}

Hi @daMupfel
Yes, we will support preload many to many, this is not used often, so I don't have the time to code it up.
@metal3d
There is an error in your struct definition
type SubData struct {
    id       int64
    Info     string
    UpDataId int64
}

Should be
type SubData struct {
    Id       int64
    Info     string
    UpDataId int64
}

You're absolutly right. That works now.
Anyway, I know that Gorm is not made to do what I plan to do. Even if I will use it and tell everybody that Gorm is the better ORM for Go I've ever tried (and trust me, I tested a lot of Go ORM :))
I plan to make Gorm working as a Mongo/mgo like interface. I have to test again, maybe I've got solutions. If I found something interessing, I will tell you how I made.
And anyway, I will use Gorm in my framework.
Big thanks :+1:

Cool, looking forward to it ;)

To precise, the only problem (this is not a problem from gorm, but from my need) I've to find a solution to not tell user to set "ParentId" for related structs...
Gorm is very cool, I can set "Id" on a "parent" struct that my users have to use as composition:
type User struct {
    ORMData
    Name string
    Age int
}

My "ORMData" parent struct has got an Id and Gorm works like I want. Now, the problem I've to resolve:
type Email struct {
    ORMData
    For string
    Address string
    // Without this one, that cannot work
    // but I'm seeking solution to remove this need:
    UserId int64
}

type User struct {
    ORMData
    Name string
    Age int
    Emails []Email
}

As soon as I found this solution (see comment in Email struct), I will be able implement my mgo driver and my framework will be able to manage any data with any database :)

You have to have a column to save foreign key, so we could get relations later.

Yes, I understand why we need this column. My work is to make it transparent for the user.

@jinzhu is Preload for many2many not currently supported? Thanks!

@LiranCohen As far as i know not yet.

+1 for preloading many2many associations

Hi @all
Preloading for many2many is already supported.


Newline error

When I run " python2.7 Cr3d0v3r.py<EMAIL_ADDRESS>I get
bash: syntax error near unexpected token `newline'
Any suggestion?

python2.7 Cr3d0v3r.py -q<EMAIL_ADDRESS>Just forgot to add the -q argument

try putting the email between quotations and which os are you using?

Quotations should fix it.


Comments from Nobu Ishimaru

[x] Table of Contents - "11. ISO Concepts" and "12. Abbreviated Terms" [-> should be included in Annex D?]

[x] iii. Preface - "More content to be provided." [What is the meaning of this sentence?]

[x] iv. Submitting organizations - [How about moving CityGML logo and introduction of homepages to other part such as vii. Acknowledgements?] NOTE [What is the meaning of this NOTE?] "To be provided" -> should be mentioned

[x] 2. Scope - "implementable expension mechanism" -> "implementable extension mechanism" [?] "potrayal formats" -> "portrayal formats" "LoD" -> "LOD" [align with 12. Abbreviated Terms]

[x] 3. Conformance - "1. Conceptual Models" link to "#conceptual_model_definition" -> should linked to "#conceptual-model-definition"

[x] 4. References - ISO 19123 "geomentry" -> "geometry"

[x] 7.2.1 - bi-temporal? bitemporal?

[x] 7.2.2 - "Hierachy" -> "Hierarchy"

[x] 7.4.4 - "[[Lowner2016]]" link to "#Lowner2016" -> should be "[Lowner2016]" link to "#Löwner2016",
Figure 8 "[Lowner2016]" link to "#Lowner2016" -> should link to "#Löwner2016"
[or id in Annex E should be modified as "Lowner2016"?]

[x] 8.2.1 - "Implemenation Specification" -> "Implementation Specification"

[x] 8.2.5 - "LoD" -> "LOD" [align with 12. Abbreviated Terms]

[x] 8.7.3 - "Genericsn" -> "Generics"

[x] 8.15 - "Contruction module" -> "Construction module"

[x] 9.1.3 - "Integer" link to "#integer-section" -> should link to "#Integer-section"
[or id should be modified as "integer-section"?]

[x] 9.1.13 - "Not-navigable associtation" -> "Not-navigable association"

[x] 9.1.14 - "ISO 19108:2006" link to "#iso19108" [where is iso19108?]

[x] 9.2.1. Classes - "GenericName" like to "#GenericName-section" -> should link to "#GenericName-Section"
[or id should be modified as "GenericName-section"?]

[x] 9.13.1 - "sucessor" -> "successor"

[x] 9.17.1 - "accessability" -> "accessibility" [?]

[x] 10.4 - "corrresponding" -> "corresponding

[x] 10.5 - "capabilty" -> "capability"

[x] A.7 - "confilcts" -> "conflicts",
"attribue" -> "attribute"

[x] A.14 - "Unresolved directive in abstract_tests/ATS_WaterBody.adoc - include::WaterBody/ATS_WaterBody_Boundaries.adoc[]" [?] "Unresolved directive in abstract_tests/ATS_WaterBody.adoc - include::WaterBody/ATS_WaterBody_ADE_Use.adoc[]" [?]

[x] Annex C: Changelog for CityGML 3.0
[will you add changelog before TC voting?]

[x] 11. ISO Concepts
"[[iso19108]]" should be modified as "[iso19108]" with appropriate link

[x] In many sections:
"in the figure Figure" -> "in the Figure"
"mutiplicity" -> "multiplicity"
"multiplicies" -> "multiplicity" [?]

[ ] [I think the font size in the UML figures is too small to read.
Is there any way to make them larger? (e.g. link to large image?)]

Annex C: Changelog for CityGML 3.0
I removed this chapter now. We decided some time ago, that we do not list changes between CityGML 2.0 and 3.0 in the specification. The changelog will start with CityGML 3.1.

ISO Concepts

I added ISO 19108 to Chapter 4. The official standard is ISO 19108:2002. In Figure 13, however, an ISO 19108:2006 package is shown. This is the only package I have in Enterprise Architect. It is a corrigendum to the 2002 version.
Thus, should we rather reference this corrigendum, or is it uncommon to reference corrigendums?

@TatjanaKutzner Reference the Corrigendum. There is a precedent.  For years we commonly referenced the corrigendum of ISO 19115 in OGC standards.

@cmheazel Good to know, I referenced the corrigendum now.
Most typos have been corrected. The remaining ones seem to occur in the templates. @cmheazel Could you please take care of those?

iii. Preface: The idea was probably to add more text to this section. I removed the sentence.
iv. Submitting organizations:

I moved the OGC logo and links to web pages to vii. Acknowledgements. Also not the best place, but better then before.
I removed the note that we still have to add an OGC logo. I don't think that the logo is required.

All issues except for the font size on the UML diagrams have been addressed.

Proposed changes which have not been addressed have been moved to #171


Removed redundant visibility check

Since visible_entities_system already checks Visiblie::is_visible for each entity and requires it to be true, there's no reason to verify visibility in PassNode::prepare which consumes entities produced by the system.

Removing my review request as I am not familiar with the render code.

This makes sense! PassNode will be removed in the bevy_render rewrite, but this is uncontroversial / small enough that I'm cool with merging it now.

bors r+


Jamie prettify optimize with py ciemss

BEFORE

AFTER

Please be aware I have made the following PR to take this one's place as there are many changes, merge conflicts, and reverts that need to be done and I did not want do that
https://github.com/DARPA-ASKEM/terarium/pull/3117

Fixed via #3117


[Bug] Fix: deliverable_setup.sh not working

Issue
We dont have DeliverableConstants.rb in the project in the project anymore
Expected
Have the script assist in setting up constants for github or bitrise ci/cd
Steps to reproduce

run sh deliverable_setup.sh
get result: The file /{path}/fastlane/Constants/DeliverableConstants.rb does not exist.

@edgarss What version of the iOS-templates are you using?
Just checked the deliverable_setup.sh, it now opens the Constants.swift

Youre right @suho , i was looking in a cloned project that is a bit behind.


Premature drop w/ JanetAbstract

I've noticed that for non-Copy types, the passed value to JanetAbstract::new gets dropped immediately when the mutable pointer it gets moved into goes out of scope. This isn't ideal obviously, so I've been wrapping the types in ManuallyDrop and then using ManuallyDrop::drop in the gc handler. This seems like something the API should handle for you, or at least something added to the documentation.

Yes, nice catch, I had a similar issue with it last week!
I'll investigate the possibilities to make that less error-prone.

@yrns
I have found a way to solve this issue.
JanetAbstract::new always wraps the given value in a ManuallyDrop and what you get from the get family of functions now depends on the IsJanetAbstract::Get type. For non-Drop types, reinterpreting the type to Self is fine since ManuallyDrop is repo(transparent) and only disables the drop calls through compiler magic.
So, although it automatically wraps in ManuallyDrop on creation (JanetAbstract::new). It is the programmer's responsibility to implement IsJanetAbstract to get the correct type.
The downside of this approach is that the usage of turbo fish syntax will be required almost always when using the get functions

@GrayJack Sorry, I didn't understand this completely when I originally submitted the issue. Isn't this what you want?
// instead of: *unsafe { s.get_mut_unchecked() } = value;
unsafe { std::ptr::write(s.get_mut_unchecked(), value) };

std::ptr::write is semantically a move, and neither source or destination is dropped.

Looks like my solution for the JanetAbstract::new produced the same effects, but my solution doesn't have the same semantic guarantees after some more digging. I'll change that on the next commit


object() takes no parameters

Traceback (most recent call last):
File "/usr/local/anaconda3/envs/hyk/lib/python3.6/site-packages/mmcv/utils/registry.py", line 51, in build_from_cfg
return obj_cls(**args)
TypeError: object() takes no parameters
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/hyk/lib/python3.6/site-packages/mmcv/utils/registry.py", line 51, in build_from_cfg
return obj_cls(**args)
File "/userdata/hyk/mmdetection/mmdet/datasets/pipelines/test_time_aug.py", line 58, in init
self.transforms = Compose(transforms)
File "/userdata/hyk/mmdetection/mmdet/datasets/pipelines/compose.py", line 22, in init
transform = build_from_cfg(transform, PIPELINES)
File "/usr/local/anaconda3/envs/hyk/lib/python3.6/site-packages/mmcv/utils/registry.py", line 54, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
TypeError: DefaultFormatBundle: object() takes no parameters
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/userdata/hyk/mmdetection/1.py", line 12, in
inference_detector(model, 'demo/demo.jpg')
File "/userdata/hyk/mmdetection/mmdet/apis/inference.py", line 117, in inference_detector
test_pipeline = Compose(cfg.data.test.pipeline)
File "/userdata/hyk/mmdetection/mmdet/datasets/pipelines/compose.py", line 22, in init
transform = build_from_cfg(transform, PIPELINES)
File "/usr/local/anaconda3/envs/hyk/lib/python3.6/site-packages/mmcv/utils/registry.py", line 54, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
TypeError: MultiScaleFlipAug: DefaultFormatBundle: object() takes no parameters

Hi @hankangying Please use the issue template, otherwise we cannot help locate the issue.

Closed due to long time with no response. Feel free to reopen it if you still have problems.


Running pronto run --staged (after git add .) I get the following error message:
/Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-0.9.3/lib/pronto/git/repository.rb:52:in `new': the path 'test.rb' does not exist in the given tree (Rugged::TreeError)
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-0.9.3/lib/pronto/git/repository.rb:52:in `blame'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-0.9.3/lib/pronto/git/patch.rb:17:in `blame'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-0.9.3/lib/pronto/git/line.rb:45:in `blame'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-0.9.3/lib/pronto/git/line.rb:20:in `commit_sha'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-0.9.3/lib/pronto/message.rb:18:in `initialize'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:49:in `new'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:49:in `new_message'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:41:in `block (2 levels) in inspect'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:41:in `map'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:41:in `block in inspect'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:38:in `map'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:38:in `inspect'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:18:in `block in run'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:18:in `map'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:18:in `run'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-0.9.3/lib/pronto/runners.rb:20:in `block in run'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-0.9.3/lib/pronto/runners.rb:13:in `each'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-0.9.3/lib/pronto/runners.rb:13:in `run'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-0.9.3/lib/pronto.rb:64:in `run'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-0.9.3/lib/pronto/cli.rb:61:in `block in run'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-0.9.3/lib/pronto/cli.rb:60:in `chdir'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-0.9.3/lib/pronto/cli.rb:60:in `run'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/gems/pronto-0.9.3/bin/pronto:6:in `<top (required)>'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/bin/pronto:23:in `load'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/bin/pronto:23:in `<main>'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
	from /Users/MyUser/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'

Only after I commit I get to see the error messages of the runners. However I would prefer to be able to run pronto as a pre-commit-git-hook.
Update 1:
Seems like the issue is that the file is untracked. Is there a way to run pronto on untracked files?
Update 2:
Running pronto run --unstaged on existing files works fine before running git add . - however running pronto run --staged after git add . still crashes.
Update 3:
Seems like pronto run --staged only crashes for new files. It does however work fine for existing files.

My workaround:

Git reset newly added (Ruby) files once and re-add later after pronto run --staged
Check the newly added (Ruby) files by running separate checkers (Reek, Rubocop, ...)

https://gist.github.com/vochicong/9c58ffbe045772fc2d4010b0b7c63f41#file-precommit-part1-sh
https://gist.github.com/vochicong/9c58ffbe045772fc2d4010b0b7c63f41#file-precommit-part2-sh


merge package template from Kronos-Tools/npm-package-template

package.json

chore(devDependencies): update<EMAIL_ADDRESS>from template

Codecov Report

Merging #191 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #191   +/-   ##
=======================================
  Coverage   86.38%   86.38%
=======================================
  Files           1        1
  Lines         191      191
=======================================
  Hits          165      165
  Misses         26       26

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 592f807...b93c2a0. Read the comment docs.


GPT-2.py output a json with low bleu3

Hello
For GPT-2.py model, I decode the sentences with the script
CUDA_VISIBLE_DEVICES=0 python GPT2.py --do_test --load_from models/GPT_ep8.pt
but I got the outputs GPT_gpt2_0.03.json which has a low bleu_3, the content in the GPT_gpt2_0.03.json like this:
"2-18424778-6.html.csv": [
"",
"",
"",
"",
""
],
"2-1458666-4.html.csv": [
"",
"",
"",
"wins iaa mwcwcwcwcwcwcwcwcwcwcw",
""
]
Does it because of args.model==gpt2? Or it should be gpt2-medium

Hi there, I couldn't reproduce your error. Could you use "pytorch=1.4" and "transformers=2.6", and make sure you unzip all_csv.zip. From the output, it seems the model is not properly loaded. Could you make sure the model.load_state_dict is actually working?

Thank you for your answers.
I update pytorch to 1.4 and transformers to 2.6.
It solved my problem.


Logo & Title out of alignment on Bookmarklet?

This seems to happen even when the site CSS isn't being a pain.

Have centre aligned now, which looks same as plugin. However, it does still look like there is an issue with the header whitespace not aligning with the right side of the plugin window.

Tried some other pages and now title spilling over into second line. Annoying and fiddly! Will try more bookmarklet css when I get time.

As I told @JosephMcArthur earlier I couldn't test out the bookmarklet, because my Safari browser wasn't functional. I was able to get the Button installed on my work laptop today and saw the alignment issue. This is assigned to me, but I don't think this is something for me to fix.
@markmacgillivray Open Access Button is text and not an image, right? Is it black or the dark blue from our style guide? Looks like the plugin and bookmarklet OAB name looks black to me, but wanted to verify.

Hi @chealsye thanks for the screenshot, this makes it clearer what was meant by being out of alignment. Which version of the plugin did you install? Are you using a manually installed development one or did you install from the chrome store?
The header text is text rather than image, yes. I believe the colour is black, as was the old one. Are you expecting it to be dark blue?

@markmacgillivray This was the bookmarklet on Safari. I installed it from the website.
Black isn't in our style guide, so it is surprising to me.

Changes have been made on the dev bookmarklet, so for now my contribution here is done. Normally this means I would assign it to whoever has to work on it next, so it is clear who is responsible for moving it forward, however after discussion at the meeting on Monday, it is no longer clear that assigning is acceptable. @JosephMcArthur I am unassigning myself so I can keep track of what things I actually have to work on, and this can be raised tonight as an issue for how we would keep track of who is owning something at a given time, if not by assignment.

Megan can you test this on a few sites, should be blue, one one line & align with the logo nicely.

Megan can you test this on a few sites, should be blue, on one line & align with the logo nicely.

The bookmarklet appears to be all aligned now, it's also keeping me logged in a lot longer (days) than it used to-which is fantastic because then I don't have to sign in as often!


Redesign routing execution

How does routing execution currently work?
We build off the assumption that there is a way to route a positive amount of capacity over the provided route that has an end-to-end effective that's better or similar to the specified spill_price.
First, we pick the first position on the first hop and simulate execution over the entire route. If routing flow is bottlenecked at any position, we identify that position as a limiting constraint, track it, and continue routing capacity through the remaining hops. At the end of the simulation, we know whether we can execute the entirety of the first order, or if we must deal with a more constraining position first ("lift the constraint").
If no limiting hops were found, that's great we execute that amount and try again until spill price is hit. If some constraints were found, we pick the most limiting one, compute its saturating input i.e. $\Delta^*_1$ such that when we execute over the route again we exhaust that constraint. The reason we are able to do this without fearing getting bottlenecked by another hop along the route is because we explicitly picked the most limiting constraint i.e. no other position along the route will bottleneck execution. Once the constraint is lifted, we can proceed again from the start, trying to route as much flow as possible until the position is filled or the spill_price is hit.
Why this does not work
However, the current design of routing execution does not take into account the possibility that lifting the most limiting constraint may result in an output that exceeds the capacity of the next constraint on the route. This is a capital error (manifested in #2484) and a serious flaw in the current design of routing execution.
Interim proposed solution:
In addition to selecting the saturating input ($\Delta^*_1$) that lifts the most limiting constraint, we should simulate execution and backtrack until we find some amount of routable flow across the route.  This solution adds overhead to an already quadratic algorithm, but will let us work on the DEX concurrently as we work to improve it.
Dust swaps and dust positions
Dust swaps and dust positions are a class of undesirable behavior that happen when provisioning an action (position, or swap) with infinitesimal amounts of reserves. While these limitations of the DEX engine are not directly related to routing execution, they are still important to consider and should be given priority in any future improvements to the system. The DEX engine works with limited precision: a U128x128 fixed-point type which handles pricing and quantity transformations, and an integral Amount type which is 128 bits wide and stores denoms scaled numbers such as the reserves $R_1, R_2$, the objective valuations of each assets $p, q$, and the input/output amounts $\langle (\Delta_1, \Delta_2), (\Lambda_1, \Lambda_2) \rangle$
When we execute against a position, we feed a tuple $(\Delta_1, \Delta_2)$ and obtain an output $(\Lambda_1, \Lambda_2)$ from execution. Internally, execution is handled by multiplying the input $\Delta_1$ by the exchange rate $\frac p {q \gamma}$ between assets 1 and 2. However, when $\Delta_1 \lt \epsilon$ is very small, computing the output $\Lambda_2 = \lfloor {\Delta_1 \cdot \frac p q \cdot \gamma} \rfloor = 0$. (as manifested in #2499) as well as in the early design discussions about implementing routing execution. This is a dust swap i.e. a swap that submits inputs and receives no outputs, and the reason why the current dex design does not support NFT transactions of cube. Our thought process was that this was an acceptable tradeoff for our first iteration of the DEX engine, and that swap inputs were to be denom scaled anyway (i.e. swapping 1gm -> $\Delta_{gm} = 1,000,000$). However, in the process of executing a route, it is possible that a swap will be partially filled up to some dust amount, triggering this scenario, or that attempting to lift a very limiting constraint becomes tantamount to routing a dust flow that recreates this scenario, as it is the case in #2499.
Interim proposed solution:
I propose that burning dust might actually be the correct behavior for the current system we have, which is not to say that a better system is not possible or what we should be aiming for.

The core problem here is one that we've been concerned about from the start: how to ensure that when we fill against a position, we completely exhaust its reserves, so that we can eliminate it from consideration in further routing.  In the current fill code, we don't do this properly, which leads to the problem we're seeing where filling loops indefinitely.  Even if we did a fix to just that part (e.g., by skipping positions we've already executed against), it wouldn't solve the problem, because we could run into it again at the next higher level: in the next iteration of path search, we'd still be searching through positions with dust reserves.
To ensure that the fill phase always makes progress, we need to ensure it upholds the following invariant: in each iteration of the fill phase, EITHER:

we completely fill the input trade, exhausting the input amount to 0;
we completely fill at least one minimally-priced position, setting its reserves to 0.

We need to change the structure of the fill step so that we can see that this invariant is always upheld: we should know whether we're in the exhaust-input case or the exhaust-reserves case, and in the latter case, to be able to identify which position we'll be exhausting. To do that, one helpful simplification would be to disallow cycles at the micro-scale, ensuring that all positions on the fill path are distinct, letting us compute exact input and output amounts along the path.


Update GradleScriptKolin version

The real change here is that my IDE now doesn't complain about how the
functions in GradleScriptKotlin was compiled I suspect that there is a
difference between tasks.KotlinCompile and dsl.KotlinCompile,
specifically in terms of setting the parameter `javaith a pre-release
version of Kotlin.

Nuts. Closing this and re-opening as a PR against development


support chatglm3

Downloaded the chatglm3-6b-32k model. @bjwswang

@Lanture1064  Please verify if we can run chatglm3

closed as @Lanture1064 verified