Memory leak

I have been using peerdiscovery in an app for work and it is fantastic. It makes finding other machines and making a distributed cluster quick and easy. Good work!!! I have noticed that when using it in a loop for continuous discovery and building/rebuilding a client list, the application memory usage was increasing. Using the example and running pprof it seems that there is a memory leak with the for loop which scans the socket made. This is running in goroutine which from what I can see doesn't exit.
Type: inuse_space
Time: Feb 10, 2020 at 7:40pm (EST)
Entering interactive mode (type "help" for commands, "o" for options)
(pprof) top20
Showing nodes accounting for 1.61MB, 100% of 1.61MB total
      flat  flat%   sum%        cum   cum%
    1.61MB   100%   100%     1.61MB   100%  github.com/schollz/peerdiscovery.(*peerDiscovery).listen
(pprof) list listen
Total: 1.61MB
ROUTINE ======================== github.com/schollz/peerdiscovery.(*peerDiscovery).listen in D:\goprogs\src\github.com\schollz\peerdiscovery\peerdiscovery.go
    1.61MB     1.61MB (flat, cum)   100% of Total
         .          .    322:           }
         .          .    323:   }
         .          .    324:
         .          .    325:   // Loop forever reading from the socket
         .          .    326:   for {
    1.61MB     1.61MB    327:           buffer := make([]byte, maxDatagramSize)
         .          .    328:           var (
         .          .    329:                   n       int
         .          .    330:                   src     net.Addr
         .          .    331:                   errRead error
         .          .    332:           )
(pprof)`

The above heap profile doesn't show a great deal of memory usage, however over the long run it all adds up and I had it crash the app due to memory restrictions. I resolved this by adding a bool variable into the peerdiscovery struct which I set to true at the end of the Discover method. In the socket for loop I run a check of the bool variable and break the loop if true.

Crude solution but maybe something to consider if making more updates

@kylepritchard Would you mind contributing your solution as a PR? Do not worry about it being "crude" :) I can merge it and refine as needed


Refactor Deathlink

This refactors the DeathLink implementation and logic to mostly be in the form of a series of FSM edits to the Hero Death Anim FSM.
While this is hypothetically more fragile if other mods alter the FSM, it provides a much more elegant way of addressing certain issues.  Rather than taking (and restoring) a snapshot of a shade in shadeless DeathLink, we can skip over the chunk of FSM that creates it entirely.
Closes #96

This is still occasionally ending up in 'stuck' state, where Deathlink won't trigger until you die legitimately.  Still need to figure out why that is happening.


Zenkraft Custom connector added

Please check the following conditions for your PR.

[ ] apiDefinition.swagger.json is validated using paconn validate command.
[ ] apiProperties.json has a valid brand color. Invalid brand colors are #007ee5 and #ffffff.

@waelelzahr In addition to the requested changes, these files should be going into the certified-connectors directory, rather than the custom-connectors directory. Could this please be changed?

Just updated the 'readme.md' file and moved connector to the certified connectors folder.


[Bug] DaemonSet openebs-ndm has too much RBAC permission which may leads the whole cluster being hijacked

Hi Community!
Our team just found a possible security issue when reading the code. And we have reported to the maintainers listed in the MAINTAINERS via email , but have not received a reply yet. The title of the email is the same as the title of this issuse, and at the end of the email we attached detailed information about the issue.
Looking forward to your reply.
Kind regards,
Seona

Which email did you use? I did not receive any email. Also btw I think currently cncf mail list is frozen until we get back into sandboxing.
@dave-brace @avishnu do we have another email meanwhile?


Schema Proposal: Add position type to Position ID

Having the type of the postion in the id is beneficial as it allows for quickly finding the latest open position of each type
example code:
// Finds the open lending position or opens a new one
export function getOrCreateLendingOpenPosition(marketId: string, accountId: string, event: ethereum.Event): Position {
  let positionIdPrefix = `${accountId}-${marketId}-LENDING`;

  let account = getOrCreateAccount(accountId, event);
  for (let curr = 0; curr < account.openPositionCount; curr += 1) {
    let op = account.openPositions.at(curr);
    if (op.startsWith(positionIdPrefix)) {
      return Position.load(op)!;
    }
  }

  let count = 0;
  for (let curr = 0; curr < account.closedPositionCount; curr += 1) {
    let cp = account.closedPositions.at(curr);
    if (cp.startsWith(positionIdPrefix)) {
      count += 1;
    }
  }

  let newPositionId = `${accountId}-${marketId}-LEDING-${count}`;

@this-username-is-taken

Good change 👍


not uploading,Template file invalid

..
I did follow your documentation.

I am also facing the same issue

i think have a error in extension, i did view customization by manual
On Sunday, October 8, 2017, 12:56:15 AM GMT+5:30, bhaskarvgurram<EMAIL_ADDRESS>wrote:
I am also facing the same issue
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@nadh44, @bhaskarvgurram  Can you please share what changes you have made to themes and what steps you have followed.
As well as if you can share the zip file, I can try to replicate the issue at my end and add a fix for it.

I have added the vinsol_spree_theme  sample templates zip files

![fireshot capture 43 - vinsol-spree-contrib_s_ - https___github com_vinsol-spree-contrib_spree_themes](https://user-images.githubusercontent.com/18110247/31423254-4200c6de-ae71-11e7-9ce2-c4ed
my followed
steps

I have  followed these steps

@nadh44 Can you share the theme which you're trying to upload as I could see some themes(i.e. default and crown-theme) uploaded in the above the image.

crown-theme ...firstly crown-theme cloned by GitHub and unzipped the cloned file and later zipped and tried to uploading.

this is the template format inside the crown-theme.

@nadh44 This seems to be a uploading issue through Windows System.
Since you're uploading from a windows system, I guess you're facing this file related paperclip issue.
Solution is given here. Can you please check if this resolves your problem.

@nadh44 Hi, I hope the issue has been resolved at your end now. We are closing the issue.
If you face any other related issues, feel free to raise one here. :)


fixes #13387: replaced ReDoc with RapiDoc for better user experience

Describe your changes:
Fixes #13387 : Replaced ReDoc with more performant and feature full RapiDoc.
Short blurb explaining:

What changes did you make?
OpenMetadata OpenAPI definition is too big for ReDoc to visualize. ReDoc handles it poorly, the experience is very stuttery, slow and frustrating. Current configuration also prohibits usage of other tokens other than currently authorized one
Why did you make them?
I tried using Redoc in OpenMetadata but always ended up with frustration because of very slow and generally bad experience
How did you test your changes?
Locally on machine

Type of change:

[x] Improvement
[x] Documentation
[x] New Feature

Checklist:

[x] I have read the CONTRIBUTING document.
[x] My PR title is Fixes <issue-number>: <short explanation>
[ ] I have commented on my code, particularly in hard-to-understand areas.
[ ] For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

New feature Checklist

[x] The issue properly describes why the new feature is needed, what's the goal, and how we are building it. Any discussion
or decision-making process is reflected in the issue.
[x] I have updated the documentation.
[ ] I have added tests around the new logic.

Hi @T01iK,
Thanks for the PR, I tested it locally and found that it's not picking up authentication locally. Can you check if the User is already authenticated then we can pass the token to API instead of user to do authentication again.
Rest is awesome 🚀

@chirag-madlani can we merge this in and handle the token part in another PR?


new: jupyter notebook for RAPIDS cuGraph & adapter quickstart

Closes #6
(some minor cleanup as well)
A preview of the notebook can be found here (tested to work with a Tesla T4 GPU) 🎊

Closed, as no longer using this branch for the notebook changes. Will be addressing #3 first.


Rendering of multi-widget fields and subwidgets

This is a feature request that may become a pull request if I decide to submit code for these features.
I have a modification of render_field that I have been using (as render_multi_field currently) that allows widgets from multi-widget fields to be rendered individually.  This allows finer control over the rendering of fields using multi-widgets such as SplitDateTimeWidget.
Another widget type that often requires more control than Django offers by default is the RadioSelect widget which uses RadioInput subwidgets.  This widget could be rendered with more control if subwidgets were rendered individually.  RadioInput's tag method could be used to render each radio button when looping over them via the subwidgets method.

@treyhunner that's very useful. Was just about to see how exactly to tackle this, which would have probably involved a custom render method on MultiWidget to return a list instead of a string.

Here is a branch containing a widget_tweaks_extras template tag library with two extra tags I cobbled together long ago for rendering multi-widget fields and fields with subwidgets: https://github.com/treyhunner/django-widget-tweaks/tree/multi-widgets
There are no tests in that branch and the code may not be optimally designed. Anyone is welcome to steal from it as you like for your own purposes or for the sake of creating a more robust solution to add to django-widget-tweaks.

Worked like a charm even 6 years later. This should definitely be a part of the main package.

Remember to accept the code that follows the main: jazzband guideline.
Viability
Testing
Documentation
And not PR it is made!


Add support for other serializers

First try to add support for other serializers. Tried to refactor the python code generator to not directly depend on protobufs.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok to test.

Can I recommend you look at the way this is done for C++, and try to keep
the same data structures as it has. By doing so you'll already have front
ends for several idls already in place, and so you'll just need to provide
new backends for Python.
On Sun, Jul 10, 2016, 10:58 PM Harsh Vardhan<EMAIL_ADDRESS>wrote:

First try to add support for other serializers. Tried to refactor the
python code generator to not directly depend on protobufs.
You can view, comment on, or merge this pull request online at:
https://github.com/grpc/grpc/pull/7304
Commit Summary

Initial Commit

File Changes

M src/compiler/python_generator.cc
https://github.com/grpc/grpc/pull/7304/files#diff-0 (89)
M src/compiler/python_generator.h
https://github.com/grpc/grpc/pull/7304/files#diff-1 (87)
M src/compiler/python_plugin.cc
https://github.com/grpc/grpc/pull/7304/files#diff-2 (124)

Patch Links:

https://github.com/grpc/grpc/pull/7304.patch
https://github.com/grpc/grpc/pull/7304.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/grpc/grpc/pull/7304, or mute the thread
https://github.com/notifications/unsubscribe/AJpudfpn00oWfLiw2iMIpYdix29qZ-ZEks5qUduBgaJpZM4JJDck
.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok to test.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok to test.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok to test.

Sure, will take a look at it. @ctiller


Add italian translation

/home/runner/work/Camera/Camera/app/src/main/res/values-it/strings.xml:33:4: Failed to flatten XML for resource 'image_quality_desc' with error: Invalid unicode escape sequence in string
I guess it wants à in place of "à"? Sorry for the mistake.

We're interested in this but we need to make a translation team for the languages so that it can be reviewed, maintained and so we can ask for it to be updated after we change the strings. We'll ping you when we're ready to assemble a team for Chinese. We'll try to do this in the near future.

@Zanthed you may setup something like Weblate which will help and automate translations.
Cons: sometimes there will be a lot of PRs

The way we want to do it is probably figuring out the top languages used by our community and then making translation teams with each one having their own Matrix channel. Those rooms can be used to coordinate translating apps, and before we're going to do a release we can ping all of them and get it done. I don't think we want to introduce additional software. Once we're ready for that we can go back through these PRs and let people who tried to contribute know about it.


What's the point of x-extendedDiscriminator?

I don't understand the point of x-extendedDiscriminator. From the documentation it seems to exist in order to allow discriminator values that are different from the schema name. But isn't this already supported using mapping? For example:
animal:
  type: object
  oneOf:
    - $ref: '#/components/schemas/Equine'
    - $ref: '#/components/schemas/Feline'
  discriminator:
    propertyName: type
    mapping:
      horse: '#/components/schemas/Equine'
      cat: '#/components/schemas/Feline'

This enables horse and cat to be selected in the discriminator drop-down, and the names Equine and Feline are never surfaced.

mapping was introduced in OpenAPI 3.
x-extendedDiscriminator was introduced to support this with OpenAPI 2.
Now it exists for backward compatibility.

I see, thanks. I suggest updating the vendor extensions with a note to that effect. :)


QF - filter Projects list by QF round

this project is unverified but it is shown in list of project in QF round , plz check @mohammadranjbarz
https://givqf.vercel.app/project/maryam-jafarymehr

this project is unverified but it is shown in list of project in QF round , plz check @mohammadranjbarz https://givqf.vercel.app/project/maryam-jafarymehr

@MohammadPCh  @alireza-sharifpour
Can you put a checking in single page to check verified and listed status before assuming it's part of qfRound?

@mohammadranjbarz Yes sir :)

@MohammadPCh
When calling allProjects query for getting projects related to active qf round please add Verfied filter as well, it would resolve this issue, filters should be like:
filters: ['ActiveQfRound', 'Verified']

hey guys!! actually, for our MVP round, all projects will need to be verified... but we shouldn't make this mandatory in the filtering... we should just filter for projects that are part of "QF Round 1" for example... nonverified OR verified.
We should only show them if they are listed, it's true... but verification shouldn't be a requirement. In admin bro, I want to be able to manually curate which projects we want in the round and not in the round. @MohammadPCh @mohammadranjbarz @maryjaf - is that clear?

hey guys!! actually, for our MVP round, all projects will need to be verified... but we shouldn't make this mandatory in the filtering... we should just filter for projects that are part of "QF Round 1" for example... nonverified OR verified.
We should only show them if they are listed, it's true... but verification shouldn't be a requirement. In admin bro, I want to be able to manually curate which projects we want in the round and not in the round. @MohammadPCh @mohammadranjbarz @maryjaf - is that clear?
@laurenluz  Got it.
@MohammadPCh  Sorry man, I think you should revert the change and not send Verified filter got get projects of a qfRound

OK ;)


Enhancements to Variable Information Page

The following improvements were recommended by various interview participants from 2021:

[ ] Include legend for reference distribution curve

[ ] Increase space between rows of graphs

[ ] Fix legend on choropleth maps
The legend is currently set to the matplotlib parameter of "best-fit", however the legend covers some parts of the map - could this be improved?

[ ] Reverse colour scheme on choropleth map (more intense values need darker shades)

[ ] Suggestion to remove border of choropleth maps?

[ ] Suggestion to use boxplot as a classification scheme for choropleth maps

[ ] Units in choropleth map?

[ ] What is the difference between percentiles and quadrant classification schemes?

[ ] The inclusion of a standard deviation choropleth map would allow for comparison

[ ] Display what type of weights matrix is used in autocorrelation simulation

[ ] Include proper labels in legend for LISA cluster map

Consider grouping information pages by variable and then function type?


Failing to init new project

I am trying to do a fastlane init on a new project.
I am getting this error:
/Users/fork/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spaceship-0.19.4/lib/spaceship/client.rb:268:in `parse_response': [!] {"data"=>nil, "messages"=>{"warn"=>nil, "error"=>["Unauthorized access"], "info"=>nil}, "statusCode"=>"ERROR"} (Spaceship::Client::UnexpectedResponse)
	from /Users/fork/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spaceship-0.19.4/lib/spaceship/tunes/tunes_client.rb:45:in `teams'
	from /Users/fork/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spaceship-0.19.4/lib/spaceship/tunes/tunes_client.rb:83:in `select_team'
	from /Users/fork/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spaceship-0.19.4/lib/spaceship/tunes/spaceship.rb:30:in `select_team'
	from /Users/fork/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.59.0/lib/fastlane/setup/setup_ios.rb:173:in `detect_if_app_is_available'
	from /Users/fork/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.59.0/lib/fastlane/setup/setup_ios.rb:29:in `run'
	from /Users/fork/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.59.0/lib/fastlane/setup/setup.rb:19:in `run'
	from /Users/fork/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.59.0/bin/fastlane:51:in `block (2 levels) in run'
	from /Users/fork/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
	from /Users/fork/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
	from /Users/fork/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
	from /Users/fork/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane_core-0.36.4/lib/fastlane_core/ui/fastlane_runner.rb:23:in `run!'
	from /Users/fork/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
	from /Users/fork/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.59.0/bin/fastlane:150:in `run'
	from /Users/fork/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.59.0/bin/fastlane:156:in `<top (required)>'
	from /Users/fork/.rbenv/versions/2.3.0/bin/fastlane:23:in `load'
	from /Users/fork/.rbenv/versions/2.3.0/bin/fastlane:23:in `<main>'

I don't know whats going on. I can login to developer.apple.com without issues with the credentials I've supplied.
I am part of two teams could that be the issue?

I have the very same issue, and I'm also part of two teams. I've been seeing this issue for a while now. Here's a reference code: 73d6fb1887106701ce180e805fe4b10d

EDIT: It does work fine if I create the Appfile and Fastfile manually.

Yeah, for me too :S

I've noticed that error, too, but it doesn't happen often and, when it does, it's usually mid afternoon or so, eastern time. I just try it again every 30 minutes or so and eventually it works. I suspect it's a problem at Apple since nothing changes at my end.

I don't think so. When I use another AppleID to do the process it doesn't crash.

:+1: I am member of several teams and I get this crash when I run fastlane init, crash ID is 0517ff5ac7f2b4b33d337a3b7f114729.

Same here -- I am a member in three teams (1 app store and 2 enterprise).  Right now, I can't get it to work at all.  Crash id:  'c6918fb648fe4dea2177db7d83adab53'.

I'm getting this, too. Crash ID 73cc542f2900a0b811b7a48358c23d53

Same here, crash id = 430ba8caf85a3f92cb79389fefc140ca

just pushed a release which should allow for an easy fall back to manual initialization which should fix these issues. feel free to reopen if you all have any issues!

I can't verify this due to #1407


Mask warning displayed data

Hi,
the mask warning in responses display unmasked data while type checking is run against masked data (which is sent to the client).
Should the warning message display masked data instead ?

Probably, yes.


version: 1.2.3 -> 1.3.0

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 92.063%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1160

Relevant Lines:
1240

💛  - Coveralls


Push 'update' to p3 & p4 in BattleStream.

Yes, your teammate gets to see exact HP in 4 player battles, even when your teammate isn't really your teammate, because Zarel didn't think that mattered enough to use 6 channels. That said, I guess we probably should be pushing the updates like you suggested, though I'm not entirely sure what this function even gets used for.

Originally posted by @MacChaeger in https://github.com/Zarel/Pokemon-Showdown/pull/5297

I think this fix is required given the current design, but I'd also like to start a discussion around the design decisions regarding channels/streams and 4 player battles.

From a correctness POV, revealing information unnecessarily seems very undesirable. What is the difficultly with adding additional channels? I think in 2 player battles we should have 2 channels and in 4 player battles we should have 4?
From an efficiency POV - I'm not sure we should be creating and updating p3 and p4 streams in every battle in this class, given I expect single and doubles to be substantially more popular and we should be optimizing for the common case. Similar to above - in multi battles we can create and maintain all 4 streams, but keep it with 2 streams in the common case?

I'm not sure we should be creating and updating p3 and p4 streams in every battle in this class, given I expect single and doubles to be substantially more popular and we should be optimizing for the common case. Similar to above - in multi battles we can create and maintain all 4 streams, but keep it with 2 streams in the common case?

Hmm, seems like me might have our hands tied here a bit - when we getPlayerStreams(battleStream) theres no guarantee battleStream has been started to be able to query battleStream.battle.gameType to determine how many streams to set up.

Maybe instead of having just one |split message, we can have multiple.
|split|p1, etc. That'd probably be easier to read/etc than literally six repetitions of the same message.

so my new API doesn't deal with the possibility of privileged information to multiple players in the same line, but I'm 90% sure that case doesn't come up.

'|split|p1|...' sounds like an improvement because it would prevent my concern of p3 and p4 building up buffers in 2 player battles after this change. How exactly does the API cut down on duplication? Would you just append more players ('|split|p1,p3|...' to indicate that they get the same message), or do you mean you still have 6 messages, they're just no longer duplicated because they all have a prefix now?

The idea is that
|split|p1
SECRET
PUBLIC

would mean the same thing as
|split
PUBLIC
SECRET
PUBLIC
SECRET

and
|split|p2
SECRET
PUBLIC

would mean the same thing as
|split
PUBLIC
PUBLIC
SECRET
SECRET

Forked this conversation into a new bug because commenting on a closed PR is easy to forget about. I like the new protocol and I'd be willing to give the implementation a shot.


File changes not being served on Mac

My colleague and I came across this bug today...
When I update a file and then reload it in my browser the updated content is displayed on my Linux desktop but with the identical code on my colleagues Macbook Pro the content displayed will always be what was initially loaded and not contain any changes we make until the process is restarted.
Any idea why this would be?

Looks like the developer has abandoned the project...


Add support for modals

It would be great to have support for modals.
http://materializecss.com/modals.html
It looks like modals should be available outside of angular-materialize in the baseline materializecss but only if the modal contents are already on the page.  This is problematic in Angular because it means controllers will already have run, and also because modal contents are cluttered on the main page.
It would be nice to be able to create the DOM elements fresh and run the ng-controller from scratch.

Fixed with https://github.com/krescruz/angular-materialize/pull/26


I saw a little issue.

This condition will always be “true”:
https://github.com/nerd-of-now/NCP-VGC-Damage-Calculator/blob/main/script_res/ap_calc.js#L664
should use "!="

If you're referring to the "!==", it is a more precise "!=" in JavaScript.

After going through it, the operator wasn't the issue; JavaScript just doesn't perform the operation as expected. The rest of the code's still follows the same logic, so I didn't catch it. Removing the code would work, but using jQuery's $.isEmptyObject() fixes the condition and seems to have better performance. https://github.com/nerd-of-now/NCP-VGC-Damage-Calculator/commit/f5a939e1ce78c224ed0fa5bb4694a34d8a3cac17


feat: include files from directories

issue: https://github.com/hackingharold/ngx-dropzone/issues/60
implemented possibility for extracting files from directories on drag and drop

Hi Michael,
thanks for your contribution. At the moment, I am pretty busy but I will have a look at it asap.

Hi, thank you for your response!
Can you estimate when you will do the review? We need this to plan a bugfix in our software.

Closed by #67


[QUESTION] UploadFile as a CSV file

Description
I'm trying to upload csv file to fastapi server. Is there any clear way to read fastapi File object and write it as a csv file?
When I receive byte stream through the api, it's difficult to save it as a csv file since there could be comma anywhere in the string.
One solution could be write incoming bytes files to disk and load it back but I'm wondering if there is a direct approach without writing it into a disk

there is a whole section in the docs about uploading files: https://fastapi.tiangolo.com/tutorial/request-files/
if you want to avoid writing to the disk you can use the io module from standard library: https://docs.python.org/3/library/io.html

To add to @euri10 's comment, I think you will probably want to make use of UploadFile to receive the csv file (as described in the docs @euri10 linked). This will transparently handle writing the file to disk if it is too large to store in memory, and has both a sync and async API for saving to disk if desired.
Moreover, If you want to load the csv data without saving to disk, I believe it should be possible to pass it directly to pandas.read_csv via:
import pandas as pd

@app.post("/uploadcsv/")
def upload_csv(csv_file: UploadFile = File(...)):
    dataframe = pd.read_csv(csv_file.file)
    # do something with dataframe here (?)
    return {"filename": file.filename}

(I haven't tested this, but it seems like it should be supported based on the pandas docs. Other csv readers may require other modifications.)

Great answers @euri10 and @dmontagu ! Thanks a lot for your help here! :cake:
@enod yep, right what they said :smile: :point_up:

Thanks a lot @dmontagu  for the help and it solved the issue quickly :+1: :100:

@app.post("/uploadfile")
async def check(file: UploadFile = File(...)):

    if file.filename.endswith('.csv'):
        df = pd.read_csv(file.file)
        df_head = df.head(5)
        df_tail = df.tail(5)
        # cli.set("userId",str(df))
        head = df_head.to_json(orient='records')
        tail = df_tail.to_json(orient='records')
        head = eval(head)
        tail = eval(tail)
        # create_db_table()
        insert_data(uuid=1,itemname=file.file.read())
        # final return
        return {
            "head":head,
            "tail":tail
        }

What if the CSV has ; or <tab> as delimiter?

The default file object is a SpooledTemporaryFile, which means that it lives by default in memory and then is put on disk if it's too large. I think it might be a good idea to save the incoming file to a temporary file to make sure it's not in memory that can be lost before processing it further.

thanks a lot

To add to @euri10 's comment, I think you will probably want to make use of UploadFile to receive the csv file (as described in the docs @euri10 linked). This will transparently handle writing the file to disk if it is too large to store in memory, and has both a sync and async API for saving to disk if desired.
Moreover, If you want to load the csv data without saving to disk, I believe it should be possible to pass it directly to pandas.read_csv via:
import pandas as pd

@app.post("/uploadcsv/")
def upload_csv(csv_file: UploadFile = File(...)):
    dataframe = pd.read_csv(csv_file.file)
    # do something with dataframe here (?)
    return {"filename": file.filename}

(I haven't tested this, but it seems like it should be supported based on the pandas docs. Other csv readers may require other modifications.)

thanks ! very useful！

For me it does not work, I have the following error : AttributeError: 'SpooledTemporaryFile' object has no attribute 'readable'
Any ideas @tiangolo ?

For your information, I have it working but only if I write the file on disk like the following:
@router.post("/import-ohlc")
async def import_ohlc(
    file: UploadFile = File(...),
    current_user: models.UserTable = Depends(fastapi_users.get_current_user),
):
    with open("/tmp/" + file.filename, "wb") as buffer:
        shutil.copyfileobj(file.file, buffer)
    df = pd.read_csv(
        "/tmp/" + file.filename,
        header=None,
        sep=",",
        dtype=object,
        names=["time", "open", "high", "low", "close", "volume", "trades"],
    )
    df["time"] = pd.to_datetime(df["time"], unit="s")
    s_buf = StringIO()
    df.to_csv(s_buf, index=False)
    s_buf.seek(0)
    conn = engine.raw_connection()
    cursor = conn.cursor()
    cursor.execute("TRUNCATE TABLE backtestohlc")
    cursor.copy_expert("COPY backtestohlc FROM STDIN DELIMITER ',' CSV HEADER", s_buf)
    conn.commit()
    return {"result": "Import successful"}

Is there any way to do it without writing the csv on disk before reading it with Pandas ?
I tried to implement a custom class as suggested here : https://stackoverflow.com/questions/47160211/why-doesnt-tempfile-spooledtemporaryfile-implement-readable-writable-seekable
But the dataframe is empty with that method.
Thanks a lot in advance.

@Atem18  you could use file.read() like this
files = await file.read()
df = pd.read_excel(files)

import pandas as pd
@app.post("/uploadcsv/")
def upload_csv(csv_file: UploadFile = File(...)):
#  read filename
dataframe = pd.read_csv(csv_file.filename)

return {"filename": file.filename}

FastAPI   ->  csv_file: UploadFile = File(...),
df = pd.read_csv(csv_file.file)  --》 AttributeError: 'SpooledTemporaryFile' object has no attribute 'readable'
df = pd.read_csv(csv_file.filename)  --》 read success

FastAPI+pandas -> csv_file: UploadFile = File(...)
import pandas as pd
@app.post("/uploadcsv/")
def upload_csv(csv_file: UploadFile = File(...)):
  # df = pd.read_csv(csv_file.file)          # --> AttributeError: 'SpooledTemporaryFile' object has no attribute 'readable'

  df = pd.read_csv(csv_file.filename)    # --> read success

FastAPI+pandas -> csv_file: UploadFile = File(...)
import pandas as pd
@app.post("/uploadcsv/")
def upload_csv(csv_file: UploadFile = File(...)):
df = pd.read_csv(csv_file.file)          # --> AttributeError: 'SpooledTemporaryFile' object has no attribute 'readable'
df = pd.read_csv(csv_file.filename)    # --> read success

FastAPI+pandas -> csv_file: UploadFile = File(...)
import pandas as pd
@app.post("/uploadcsv/")
def upload_csv(csv_file: UploadFile = File(...)):
df = pd.read_csv(csv_file.file)  --> AttributeError: 'SpooledTemporaryFile' object has no attribute 'readable'

df = pd.read_csv(csv_file.filename)   --> read success

I didn't want to write the file to disk just so I can use pandas. What worked for me instead was to use BytesIO to read it directly from the SpooledTemporaryFile:
import pandas as pd
from io import BytesIO

def upload_csv(csv_file: UploadFile = File(...)):
    df = pd.read_csv(BytesIO(file.file.read())

from io import StringIO
pd.read_csv(StringIO(str(data_file.file.read(), 'utf-8')), encoding='utf-8')

from io import StringIO
pd.read_csv(StringIO(str(data_file.file.read(), 'utf-8')), encoding='utf-8')

Correct, my problem was actually similar but for pd.read_excel, so I needed BytesIO

@stevennic , @hua7448 , please, could you share what would be the requests.post(...) counterpart of your examples?

I tried @danish45007 approach to upload a csv file and then convert it to json through pandas and it almost work. I have one issue though, it is introducing escapes () in front of each ".
Exampe:
[
    {
        \"key1\":\"value1\"
    }
]

Any idea what is going on ?

For me this works ok:
@app.post('/v1/upload-csv/')
async def upload_csvfile(csv_file: UploadFile = File(...)):
    # content = await csv_file.read()
    df = pd.read_csv(
        StringIO(str(csv_file.file.read(), 'utf-8')), encoding='utf-8')
    print(df)
    return {"filename": csv_file.filename,
            "content_type": csv_file.content_type}

I didn't want to write the file to disk just so I can use pandas. I had to read an Excel file. What worked for me instead was to use BytesIO to read it directly from the SpooledTemporaryFile:
import pandas as pd
from io import BytesIO

def upload_csv(csv_file: UploadFile = File(...)):
    df = pd.read_excel(BytesIO(file.file.read())

Thanks a lot . It helped

This is an automatic reply, confirming that your email was received.I will reply as soon as possible.Thank you.

This works for me.
@router.post("/upload_csv")
async def upload_csv(separator=',', encoding='utf-8',
                     csv_file: UploadFile = File()):
    contents = csv_file.file.read()
    buffer = BytesIO(contents)
    data = pd.read_csv(buffer, delimiter=separator, encoding=encoding, nrows=10000)
    buffer.close()
    csv_file.file.close()

This is an automatic reply, confirming that your email was received.I will reply as soon as possible.Thank you.

This works for me.
@router.post("/upload_csv")
async def upload_csv(separator=',', encoding='utf-8',
                     csv_file: UploadFile = File()):
    contents = csv_file.file.read()
    buffer = BytesIO(contents)
    data = pd.read_csv(buffer, delimiter=separator, encoding=encoding, nrows=10000)
    buffer.close()
    csv_file.file.close()

@batmanscode

Thank you. I didn't realize the files had to be closed.
I ended up using csv_file.filename and just passing that into pd.read_csv


Add --no-summary flag to haml-lint

Haml-lint now prints a summary at the end of the run. E.g.
11 files inspected, 1 lint detected
We need to disable that so that overcommit can parse the output
correctly.
Here's some more context: https://github.com/brigade/haml-lint/pull/176
This will help resolve some of the issues seen in #483.

Ping @michaelherold, thanks for providing that flag in haml-lint. :)

Ah, good point. I hadn't thought of that, but I don't see any other way than to just introduce it and force people to upgrade.
I'm ignoring the appveyor tests for now.


feat: download key mobile user actions

What this PR does / Why we need it:
This PR implements downloading key mobile user actions.
Special notes for your reviewer:

Downloading classic configuration works now via a simple function call to classic.Download instead of a Downloader implementation. The same will be done for all other downloaders, leaving the code with just plain functions for each different type of configuration.

Refactoring is not finished, what's left to be done is:

moving the download/persist filters to the API level
get rid of downloaders for settings, automation and buckets download.

Does this PR introduce a user-facing change?

key user actions for mobile application(s) can be downloaded

@Laubi thx 👌 I've incorporated most of your comments, pls take another look


Ghost orbiting

About the PR
If you could define your own custom lerp functions that would be neat and I could remove the update loop in OrbitVisualsSystem
Orbit params are randomized whenever a ghost spawns on the client. Yes this means other clients dont sync the orbit params but i think that's fine since this is purely visual. This makes lots of ghosts following an entity look a lot cooler I think. Can maybe tweak the bounds for how far it randomizes but other than that I think its a good idea
It tries to lerp orbit stop as well but it kind of sucks at it (see below)
Screenshots

https://user-images.githubusercontent.com/19853115/154784506-3f1ca404-e070-4069-9370-bb72a085742d.mp4
https://user-images.githubusercontent.com/19853115/154784542-e18e1ea3-1775-49b4-a3a2-afe574fb5438.mp4
Changelog

:cl:

add: Ghosts now orbit around entities they follow, rather than just sitting on top of them.

something that may be cleaner is dynamically adding and removing OrbitVisualsComponent every time an entity follows / unfollows something
A) the entity query is probably faster since its only actually iterating over stuff thats orbiting rather than all ghosts
B) can remove the Orbiting bool
C) it gets randomized every time a ghost follows rather than when a ghost spawns
gonna try that


How to add custom AppRouter type?

My backend runs outside of my NuxtApp. And I need to import the AppRouter. Issue is now that i cannot register a custom plugin since the example code for that is missing, how can i insert a custom Approuter?

Sorry, I am not able to visualize it. Can you make a basic repro? Thanks!

If this doesn't help you, please reopen - https://trpc-nuxt.vercel.app/get-started/client
import { createTRPCNuxtClient, httpBatchLink } from 'trpc-nuxt/client'
import type { AppRouter } from 'from-your-location'

export default defineNuxtPlugin(() => {
  const client = createTRPCNuxtClient<AppRouter>({
    links: [
      httpBatchLink(),
    ],
  })

  return {
    provide: {
      client,
    },
  }
})


setting sidebar no longer reacts to IAM version change without refresh

Describe the bug
Previously, the settings sidebar was subscribed to the IAM Version on the store and would instantly react to IAM version changes, displaying the correct menu items for each version.
Since the layout update, a refresh is required to display the correct sidebar.
To Reproduce
Steps to reproduce the behavior:
Reset: IAM v2 -> IAM v1

your local env will start on IAM v2.1 by default
navigate to any settings page
run chef-automate iam reset-to-v1
you can still navigate to the V2-only pages (roles, projects, policies) but they will be empty
to see the V1 sidebar, refresh

Upgrade: IAM v1 -> IAM v2

now run chef-automate iam upgrade-to-v2
you will not see any V2 sidebar items unless you refresh or navigate to a V2 URL directly (https://a2-dev.test/settings/policies)

Expected behavior
When I upgrade to V2, the UI should react quickly and display the Access Management links.
Access Management
- Policies
- Roles
- Projects

When I reset to V1, the UI should react quickly and remove the Access Management links, so that I only see
Identity
- Users
- Teams
- API Tokens

also, if a user has access to nothing under node management, or identity, or access management those headings should be hidden. it seems they always appear after the layout change.


Broken link in the documentation

The link of ENES Climate Analytics Service in the section Obtaining input data in the documentation is broken. Perhaps a rst-link-checker action can be used in the github workflow to check the links!

Hi @SarahAlidoost we have rebuilt both the IS-ENES and the ENES Portal sites this summer, I think the link was pointing to this https://is.enes.org/sdm-which-model-data/ newly moved location

Hi @SarahAlidoost we have rebuilt both the IS-ENES and the ENES Portal sites this summer, I think the link was pointing to this https://is.enes.org/sdm-which-model-data/ newly moved location

The esmvaltool doc says: If you do not have access to such a facility through your institute or the project you are working on, you can request access by applying for the [ENES Climate Analytics Service](https://portal.enes.org/data/data-metadata-service/climate-analytics-service). So I think it should be this new link https://is.enes.org/sdm-climate-analytics-data/

I have written a test utility that runs in a Github Action and checks for broken links in a website, if you find that useful for the Tutorial https://github.com/IS-ENES3/Tests

Thanks. I was thinking about a github action on esmvaltool repo to check links in the documentation. Then, I found sphinx-build has the option -b linkcheck, see its doc.
Perhaps this can be implemented in Test building documentation. Running sphinx-build -b linkcheck for esmvaltool resulted in many broken links. However, it is very slow.


issue/6938-fix-regression-optimized-python-file-collection  (#7138)

Pull request opened by the merge tool on behalf of #7138

Merged into branches iso6 in 2d3bdfb5d8e5aa99c3eb1357867947def7d70425


Improve Routing Table Initialization

What was wrong?
A trin node currently initializes its overlay routing table at boot by running a find nodes query for only its own node ID, with queries for node IDs in farther buckets being run once per minute. With EXPECTED_NON_EMPTY_BUCKETS at 17, it will take 17 minutes from boot to run a query for node IDs in all of the expected buckets.
How was it fixed?
A FindNode query for each of the expected non-empty buckets is run at boot.
Also:

Cleans up overlay_service's !select loop by breaking out findnode query logic.
Consolidates multiple variations of init_find_nodes_query functions into single function.

To-Do

[ ] Add entry to the release notes (may forgo for trivial changes)
[x] Clean up commit history

@carver Agreed, I did a good chunk of work on dynamic initialization while working on this PR but decided to merge this step first.
The dynamic approach I'm going to do in a next PR is the one that the Kademlia paper specifies: doing only a query for your own local ID, and then once that's done starting queries targeting only the buckets that were populated with at least one node during the first query.


waitForSteadyState doesn't detect build failures

When a service's build fails, this doesn't result in a state message, so the up never completes.
This happened in https://github.com/DefangLabs/portal/actions/runs/10728272155 which could've been caused by it using pulumi-defang v0.16.1 instead of v0.16.2.

Only some initial investigation. Decision from stand up was to close as it's part of playground and may be already fixed.


Transition progress display in Animation State Machine Editor

This PR will draw an additional line to indicate the transition progress of one animation state to another.

Looks good to me, but @TokageItLab should approve it

Thanks!


Invalid acl policies generated?

Hello:
I have an acl_policies variable in YAML. After #117 was merged, I had to refactor my array so that the new validation would pass. However, it looks like, even though it passes validation, it's still invalid to rundeck. I'm unable to login and access anything with the 'user' role.
Looking on rundeck's site, it seems like
Below is my variable (in YAML) and below that is the policy generated on the rundeck box. Any ideas?
rundeck::acl_policies:
  - description: 'Admin, all access'
    context:
      project: '.*'
    for:
      resource:
        - allow: '*'
      adhoc:
        - allow: '*'
      job:
        - allow: '*'
      node:
        - allow: '*'
    by:
      - group:
        - 'admins'
  - description: 'Admin, all access'
    context:
      application: 'rundeck'
    for:
      resource:
        - allow: '*'
      project:
        - allow: '*'
    by:
      - group:
        - 'admins'

description: Admin, all access
context:
  project: '.*'
for:
  resource:
      allow: '*'
  adhoc:
      allow: '*'
  job:
      allow: '*'
  node:
      allow: '*'
by:
  group:
    - 'admins'

---

description: Admin, all access
context:
  application: 'rundeck'
for:
  resource:
      allow: '*'
  project:
      allow: '*'
by:
  group:
    - 'admins'

Hi,
Yes the restructuring of the acl is why this has not been released yet (it will be a major version bump soon).
I cannot see the issue immediately. What do your logs say?

Hmm maybe it's the description that appears to be unquoted.

Sorry, I meant the 'admin' role earlier.
Looking at the logs, I see:
2015-08-10 17:26:27,883 - ERROR parsing a policy in file: /etc/rundeck/apitoken.aclpolicy[1]. Reason: ACLPOLICY FORMAT ERROR: Expected 'for: adhoc:' section to contain a sequence, but was [java.util.LinkedHashMap]. context: {project=.*}, by: {group=[api_token_group]}
2015-08-10 17:26:27,890 - ERROR parsing a policy in file: /etc/rundeck/admin.aclpolicy[1]. Reason: ACLPOLICY FORMAT ERROR: Expected 'for: resource:' section to contain a sequence, but was [java.util.LinkedHashMap]. context: {project=.*}, by: {group=[admin]}
2015-08-10 17:26:27,891 - ERROR parsing a policy in file: /etc/rundeck/admin.aclpolicy[2]. Reason: ACLPOLICY FORMAT ERROR: Expected 'for: resource:' section to contain a sequence, but was [java.util.LinkedHashMap]. context: {application=rundeck}, by: {group=[admin]}

Looks like this works:
description: 'Admin, all access'
context:
  project: '.*'
for:
  resource:
      - allow: '*'
  adhoc:
      - allow: '*'
  job:
      - allow: '*'
  node:
      - allow: '*'
by:
  group:
    - 'admin'

---

description: 'Admin, all access'
context:
  application: 'rundeck'
for:
  resource:
      - allow: '*'
  project:
      - allow: '*'
by:
  group:
    - 'admin'

I'll see if I can write up a PR.


Icon contributions

We have had icon requests/contributions from Markets and the FoW experiments team in Bournemouth

alpha/num sortable
notification read
devices e.g. laptop, desktop, mobile

### Tasks
- [x] Create new icons
- [x] Add new icons to Figma library as branch
- [x] Check icons with Icon checker plugin
- [ ] Merge Figma library branch
- [ ] Export icons as SVGs
- [ ] Add to Github
- [ ] Publish Figma library (internal and community)

I've created the following:

notification-read (outline, solid)
sortable-alpha (outline only)
sortable-num (outline only)
mobile (outline, solid)
display (outline, solid)
laptop (outline, solid)
battery (outline, solid)
browser (outline, solid)
devices (outline, solid)
watch (outline, solid)
bank (outline, solid)

It's been flagged by a team that receipt and receipt-solid are missing from code, but are available in design. We need to add this in at the same time.


GROOVY-9168: emit more specific error for use of uninitialized this

Improved error message for cases like:
class Outer {
  class Inner {}
  Outer(Inner inner) {}
  Outer() { this(new Inner()) } // uninitialized this passed to inner class constructor
}

Simplified StaticVerifier and handle this.@foo and this.&foo in addition to this.foo and implicit-this foo().  Special constructor call args and parameter defaults have unified handling.
One test case was disabled.  It is not possible to distinguish this case from other error cases.  And you can add Outer.this. qualifier to reference the property (next test case in the unit test source).
    void _FIXME_testAccessOuterClassMethodFromInnerClassConstructor() {
        assertScript '''
            class Parent {
                String str
                Parent(String s) { str = s }
            }
            class Outer {
                String a

                private class Inner extends Parent {
                   Inner() { super(getA()) } // Is this a reference to instance property or outer property?
                }

                String test() { new Inner().str }
            }
            def o = new Outer(a:'ok')
            assert o.test() == 'ok'
        '''
    }

There is a redundant check in Verifier.visitConstructor (included below).  Is this the better place to do checking for uninitiualized this/super references -- instead of in StaticVerifier?  I think Verifier runs later and could catch references added by the compiler.
    @Override
    public void visitConstructor(ConstructorNode node) {
        GroovyCodeVisitor checkSuper = new CodeVisitorSupport() {
            boolean firstMethodCall = true;
            String type = null;

            @Override
            public void visitMethodCallExpression(MethodCallExpression call) {
                if (!firstMethodCall) return;
                firstMethodCall = false;
                String name = call.getMethodAsString();
                // the name might be null if the method name is a GString for example
                if (name == null) return;
                if (!name.equals("super") && !name.equals("this")) return;
                type = name;
                call.getArguments().visit(this);
                type = null;
            }

            @Override
            public void visitConstructorCallExpression(ConstructorCallExpression call) {
                if (!call.isSpecialCall()) return;
                type = call.getText();
                call.getArguments().visit(this);
                type = null;
            }

            @Override
            public void visitVariableExpression(VariableExpression expression) {
                if (type == null) return;
                String name = expression.getName();
                if (!name.equals("this") && !name.equals("super")) return;
                throw new RuntimeParserException("cannot reference " + name + " inside of " + type + "(....) before supertype constructor has been called", expression);
            }
        };
        Statement s = node.getCode();
        if (s == null) {
            return;
        } else {
            s.visit(new VerifierCodeVisitor(this));
        }
        s.visit(checkSuper);
    }

Also fixes GROOVY-9189

This should close out GROOVY-6777, GROOVY-6809, GROOVY-7609, GROOVY-9168, and GROOVY-9189.

Builds are timing out at 50 min, which is very close to the amount of time they require now.

Yep. Maybe we have to remove testWithIndy as before.

Merged. Thanks!


Websocket and Authentication

Hi reading the documentation I'm doing
`
public CoinbaseClient()
{
        var coinbaseProClient = new CoinbaseProClient();
        _websocket = coinbaseProClient.WebSocket;

        _websocket.OnHeartbeatReceived += WebSocketOnOnHeartbeatReceived;
        _websocket.OnTickerReceived += WebSocketOnOnTickerReceived;
    }

    public void AddTicker(ProductType productType)
    {
        _productTypes.Add(productType);
        if (_websocket.State==WebSocketState.Open)
            _websocket.Stop();

        _websocket.Start(_productTypes, new List<ChannelType>() { ChannelType.Full, ChannelType.User });
    }

`
But I get an error on blazor:
Unhandled exception rendering component: System.Security.Cryptography.X509Certificates is not supported on this platform.
System.PlatformNotSupportedException: System.Security.Cryptography.X509Certificates is not supported on this platform.
Being that I'm using the anonymous socket is there a workaround?

hey @cmorgado, just did some digging and found this related to blazor: https://docs.microsoft.com/en-us/dotnet/core/compatibility/cryptography/5.0/cryptography-apis-not-supported-on-blazor-webassembly. Are you seeing any warnings about it? Unfortunately, there doesn't look to be any good workarounds at the moment according to that article

Hi, I've also been digging on it... and the "culprit" is WebSocket4Net Library. ..
I've been experimenting with the https://docs.microsoft.com/en-us/dotnet/api/system.net.websockets.clientwebsocket?view=net-5.0 ...
But it's not helpful for you due to be dotnet5 only.
I'm going to see if can remove the WebSocket4Net dependency somehow and use this version for my use case.
My use case is building a Blazor App (webassembly) so I can track my investment in Realtime.
Thank you for your support and great work!


Automatic rush update --full

This is an automatic PR generated weekly with changes from running the command rush update --full

Closing this since PR got few unwanted changes as well.


database given is not proper with code

Error Number: 1146
Table 'ecom.vendors' doesn't exist
SELECT vendors.url as vendor_url, products.id, products.quantity, products.image, products.url, products_translations.price, products_translations.title, products_translations.old_price FROM products LEFT JOIN products_translations ON products_translations.for_id = products.id LEFT JOIN vendors ON vendors.id = products.vendor_id WHERE products_translations.abbr = 'en' AND visibility = 1 AND quantity >0 ORDER BY products.procurement DESC LIMIT 5
Filename: C:/xampp/rock/application/models/Public_model.php
Line Number: 445

CREATE TABLE vendors (
id int(11) NOT NULL,
name varchar(50) DEFAULT NULL,
url varchar(50) NOT NULL,
email varchar(50) NOT NULL,
password varchar(100) NOT NULL,
updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Vendors table is in database.sql file. I dont understand the problem @vishu10193 ?

I think Sir the issue is
MySQL said: Documentation
#1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
CREATE TABLE  vendors (
id INT( 11 ) NOT NULL ,
name VARCHAR( 50 ) DEFAULT NULL ,
url VARCHAR( 50 ) NOT NULL ,
email VARCHAR( 50 ) NOT NULL ,
password VARCHAR( 100 ) NOT NULL ,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE = INNODB DEFAULT CHARSET = utf8;

@vishu10193 Can you please tell me what do you do to get this error? I cant reproduce :)

@vishu10193 You make update for?

Here is explained - https://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-5.html
This limitation, which was only due to historical, code legacy reasons, has been lifted in recent versions of MySQL.
Update your mysql :)) or just remove from updated_at current_timestamp


Add metedata to the report file

This patch adds a new metadata section to the report file being
generated by chain-bench.
This initial version adds the generation date, and the check statistics
which is useful to compare different scans and their evolutions over
time.
Fixes aquasecurity/chain-bench#38

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

The report file would now look like this (the results part in the snippet was shortened for readability):
{
  "Metadata": {
    "Date": "2022-06-28T13:40:36-05:00",
    "Statistics": {
      "Passed": 5,
      "Failed": 23,
      "Unknown": 8,
      "Total": 36
    }
  },
  "Results": [
    {
      "ID": "1.1.3",
      "Name": "Ensure any change to code receives approval of two strongly authenticated users",
      "Descrition": "Ensure that every code change is reviewed and approved by two authorized contributors who are strongly authenticated.",
      "Remediation": "An organization can protect specific code branches — for example, the \"main\" branch which often is the version deployed to production — by setting protection rules. These rules secure your code repository from unwanted or unauthorized changes. You may set requirements for any code change to that branch, and thus specify a minimum number of reviewers required to approve a change.",
      "Result": "Failed",
      "Reason": "",
      "Url": "https://avd.aquasec.com/compliance/softwaresupplychain/cis-1.0/cis-1.0-sourcecode/1.1"
    }
  ]
}


[DF] [ENH] Add series.isin support for predicate pushdown

Is your feature request related to a problem? Please describe.
With datafusion we now map column in (val1,val2,val3) like operations to series.isin. This operator does not support predicate pushdown
Describe the solution you'd like
Add support for predicate pushdown for series.isIn operation.
Describe alternatives you've considered
N/A
Additional context
N/A

Minor update: I started exploring this feature and found that we probably need to make a small change in dask.dataframe to make it easier to "regenerate" an isin layer. Right now, the asin implementation is wrapping the iterable values argument in delayed. As far as I can tell, we should be able to avoid this behavior for simple list/tuple arguments.
With the upstream isin method modified, I was able to add M.isin/dd._Frame.isin to the logic in dask-sql/dask_sql/physical/utils/filter.py to produce the following behavior:
import dask.dataframe as dd
from dask_sql.physical.utils.filter import attempt_predicate_pushdown
from dask.utils_test import hlg_layer

ddf = dd.read_parquet("testfile.parquet")
ddf = ddf[ddf["A"].isin([0,2,4,6,8])]
ddf2 = attempt_predicate_pushdown(ddf)

# Check filters
print(hlg_layer(ddf2.dask, "read-parquet").creation_info['kwargs']['filters'])

# Check compute
print("\n",ddf2.compute())

[[('A', 'in', (0, 2, 4, 6, 8))]]

    A
0  0
1  2
2  4
3  6
4  8

As far as I can tell, we should be able to avoid this behavior for simple list/tuple arguments.

It looks like I was wrong about this (see: https://github.com/dask/dask/pull/4727).  Rather than removing the delayed usage in Dask, I may need to add a simple DelayedObject layer to dask (so we get something other than a MaterializedLayer)


Page refers to distro and browser for instructinos how to trust the dotnet dev cert, even though another page of your documentation provides these instructions

Chose the Linux version of this page.
Following the instructions in this page up to section § Trust a development certificate results in the browser displaying certificate errors. Section § Trust a development certificate has this to say on how to fix these errors:

There's no centralized way to trust a certificate on Linux. Typically, one of the following approaches is adopted:

Exclude the app's URL in browser's exclude list.
Trust all self-signed certificates for localhost.
Add the certificate to the list of trusted certificates in the browser.

For more information, see the guidance provided by your browser manufacturer and Linux distribution.

The reason I find this surprising is that another page of your documentation, namely Enforce HTTPS in ASP.NET Core § Trust HTTPS certificate on Linux does provide instructions how to fix the aforementioned browser errors. I followed the instructions from the subsection § Trust HTTPS certificate on Linux using Edge or Chrome and they do seem to be working as expected: Chrome no longer displays certificate errors.
I believe that the Linux version of the page Tooling for ASP.NET Core Blazor, section § Trust a development certificate should link to § Trust HTTPS certificate on Linux using Edge or Chrome instead of saying "For more information, see the guidance provided by your browser manufacturer and Linux distribution.".

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: fa3e99ba-cbe1-e8a1-6628-9b6eb39710a4
Version Independent ID: dd777362-b92d-cac6-2343-a7aaf31d0bdf
Content: Tooling for ASP.NET Core Blazor
Content Source: aspnetcore/blazor/tooling.md
Product: aspnet-core
Technology: aspnetcore-blazor
GitHub Login: @guardrex
Microsoft Alias: riande

Hello @gaazkam ...
The remarks in this topic predate the content in the main doc set, so that's why the cross-link isn't there. The Linux cert trust content was put up in November, 2021 ...
https://github.com/dotnet/AspNetCore.Docs/pull/23766
... but the Linux remarks here were put up in July, 2020 ...
https://github.com/dotnet/AspNetCore.Docs/pull/19121
I'll cross-link this bit now. Thanks for calling it out.


pythonPackages.karton-mwdb-reporter: 1.0.0 -> 1.0.1

Motivation for this change
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[ ] macOS
[x] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 123664 at 7d97cbda run on x86_64-linux 1

3 packages built successfully:

python38Packages.karton-mwdb-reporter
python39Packages.karton-mwdb-reporter
tests.trivial

Result of nixpkgs-review pr 123664 run on x86_64-linux 1

3 packages built:

python38Packages.karton-mwdb-reporter
python39Packages.karton-mwdb-reporter
tests.trivial


For type safe MonadTransformers value type monads should have nested MonadicValue operations

In 1.X they are defined as Stream-like operators, which involve flattening the Maybe / Eval / Future into a Stream. It would be better to continue to work directly on the Maybe / Eval / Future - just as if we were working with one unested instance and not (potentially many) nested instances.

Merged in https://github.com/aol/cyclops-react/pull/451


fix(Accordion): header strips spaces when html tags are used

fix(Accordion): header strips spaces when html tags are used
Use the following example:
<Accordion>
  <AccordionTab header={<>hello world!</>}>
    {<>hello world!</>}
  </AccordionTab>
</Accordion>

Expected behavior: You should read "hello world!"
Actual behavior: You read "helloworld!"
Closes: #209

Could you update CHANGELOG?


Some commands don't tell when there is a connection error

A behavior common to most commands allowing us to detect an abnormal communication error is the following when there is no Internet or if the pipes are jammed:
# drive clashes -depth 1 -hidden "$file" 2>&1

Get https://www.googleapis.com/drive/v2/files?alt=json&q=%22root%22+in+parents+and+title+%3D+%22Missions%22+and+trashed%3Dfalse: Post https://accounts.google.com/o/oauth2/token: dial tcp: lookup accounts.google.com: no such host

However, for some commands, we can't tell the difference between a connection error or some other error. After having cut off all Internet access:
# drive share --with-link -no-prompt -verbose "$file" 2>&1
no matches found!
# drive unshare -role $role -type $type -no-prompt -verbose "$file" 2>&1
no matches found!
# drive pull -force -no-prompt -depth 0 -hidden -verbose "$file" 2>&1
Resolving...

'/Missions/Certifications/Cisco/CCDP/ARCH/Jean-Christophe's Guides/Summary/Cisco & Partners Network & Security Architecture - WLAN Design Excerpt.pdf' aka '/home/actionmystique/Google Drive/Missions/Certifications/Cisco/CCDP/ARCH/Jean-Christophe's Guides/Summary/Cisco & Partners Network & Security Architecture - WLAN Design Excerpt.pdf' doesn't exist locally nor remotely
# drive push -force -no-prompt -depth 0 -hidden -verbose "$file" 2>&1
Resolving...

'/Missions/Certifications/Cisco/CCDP/ARCH/Jean-Christophe's Guides/Summary/Cisco & Partners Network & Security Architecture - WLAN Design Excerpt.pdf' aka '/home/actionmystique/Google Drive/Missions/Certifications/Cisco/CCDP/ARCH/Jean-Christophe's Guides/Summary/Cisco & Partners Network & Security Architecture - WLAN Design Excerpt.pdf' doesn't exist locally nor remotely

The last 2 commands (pull and push) don't have that issue when I remove the option '-force'.
It would be helpful to have all commands output the same type of message under similar circumstances, such as:

communication error
file/folder absence (no matches found or doesn't exist)
other command error
command success

Similarly formatted outputs would help us parse them correctly in scripts.

Hello @jean-christophe-manciot, thanks for raising this.
Yes in deed, we need to be consistent in reporting such errors. Good bug.


Support multi-threaded decoding

Really not an issue, but a request.
Certain codecs, like h264 support multi-threaded decoding.  Would this be possible to support?
Here's a quick snip:
///////////////////////////////
pCodecCtx->thread_count = 4;
pCodecCtx->thread_type = FF_THREAD_FRAME;
///////////////////////////////

static int lock_manager(void **mtx, enum AVLockOp op)
    {
        switch(op)
        {
        case AV_LOCK_CREATE:
            {
            *mtx = new CritSec();
            return 0;
            }
        case AV_LOCK_OBTAIN:
            {
            auto mutex = static_cast<CritSec*>(*mtx);
            mutex->Lock();
            return 0;
            }
        case AV_LOCK_RELEASE:
            {
            auto mutex = static_cast<CritSec*>(*mtx);
            mutex->Unlock();
            return 0;
            }
        case AV_LOCK_DESTROY:
            {
            auto mutex = static_cast<CritSec*>(*mtx);
            delete mutex;
            return 0;
            }
        }
        return 1;
    }
///////////////////////////////
av_lockmgr_register(lock_manager);

If Microsoft actually supported pthreads properly, this nonsensical "lock manager" would actually not be necessary, and everything would work out of the box. Systems like OS/2 and Microsoft Windows are basically the only systems which lack such pthread primitives.

wm4: If Microsoft actually supported pthreads properly, this nonsensical "lock manager" would actually not be necessary...

If over zealous POSIX fans would stop trolling with nonsensical comments, maybe I could have a helpful discussion on this request.

This is certainly something that can be added. We set out to start this project with the idea that it would become community driven. Features like this are exactly what we were hoping to get, as the project gets used, we want to know what is working and what's not, and how people want to make this better and more useful.
JMorrill, you seem to already have coded a change to enable multithreaded decoding, do you want to submit a pull request?

If over zealous POSIX fans would stop trolling with nonsensical comments,

I'm not sure why you call these concerns "zealous", "trolling" or "nonsensical". This is about being able to write portable code so that it works on all platforms, even Windows. Microsoft's very poor support for various industry standards does not make it easy for programmers on other platforms to make sure stuff works on Windows. In fact, most regular FFmpeg contributors are not on Windows platforms, so it's somewhat of a miracle that FFmpeg kind of works at all on Windows. Ignoring these issues only hurts the Windows platform itself (and anyone wanting to develop on it using projects such as FFmpeg). It's rather irrational to dismiss it as "trolling".
Anyway, in this case FFmpeg already has a few hacks to make it actually work, like this thing: http://git.videolan.org/?p=ffmpeg.git;a=blob;f=compat/w32pthreads.h;h=87e816ff6e98000e466fdf1717bce590c39b6fe0;hb=HEAD
There's also another hack that makes setting a "lock manager" unnecessary, even though it will incur a minor memory leak. (Besides, the "lock manager" is only needed to synchronize codec init.)
Also, the default threading type is already frame threading, so only the thread count has to be set.

I have created a PR to solve this issue: #196


8780.2 Update shippable_decrypt for decrypt function to correctly decrypt the encrypted file.

https://github.com/Shippable/pm/issues/8780

RC verified with drydock/u14:master CI project.


Remove daily as an option

Not supported by X13

Pull Request Test Coverage Report for Build 30

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

Totals

Change from base Build 26:
3.9%

Covered Lines:
92

Relevant Lines:
94

💛  - Coveralls


sha512 hash error on /me

After successfully authenticating with either GitHub or Discord, and redirecting to /me, the page loads but never renders any content, and console has this error: None of the "sha512" hashes in the integrity attribute match the content of the subresource.
Not sure what's up here. I'm using Firefox 94.0 on Linux.

Odd, everything works fine for me here. Does refreshing with Ctrl+F5 help in any way?

It seems like previous build had some integrity hash issues for some reason... I just published a new build which should hopefully fix this issue. Let me know if it still isn't fixed after clearing cache for pronoundb.org on your browser.

Works fine now, thanks!


fix advanced audit config format

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Please delete this note before submitting the pull request.
For 1.12 Features: set Milestone to 1.12 and Base Branch to release-1.12
Help editing and submitting pull requests:  https://deploy-preview-9510--kubernetes-io-master-staging.netlify.com/docs/contribute/start/#submit-a-pull-request.
Help choosing which branch to use, see
https://kubernetes.io/docs/contribute/start#choose-which-git-branch-to-use.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Before:

After:

/assign @tengqm
Thanks for help.

@CaoShuFeng this isn't quite the right fix. The numbered list indicates a procedure to be performed in order, which is what we need here, and you do not need to remove the numbered list to fix the code blocks. The fluentd section does this correctly.
HOWEVER, I've been testing locally, and it's clear there's something wrong with the markdown rendering. It seems to be breaking on the dashes in the YAML for step 4. I'll investigate further.
/hold
@lucperkins any ideas here?

It seems to be breaking on the dashes in the YAML for step 4.

Yeah, I tried several ways to fix it, but haven't found any way better.

Updated, what about current version?

I'm in trouble about this rendering problem too.
I found how to resolve this but I think this isn't the best solution.
1. create a [kubeconfig file](/docs/tasks/access-application-cluster/authenticate-across-clusters-kubeconfig/) for kube-apiserver webhook audit backend

        cat <<EOF > /etc/kubernetes/audit-webhook-kubeconfig
        apiVersion: v1
        clusters:
        - cluster:
            server: http://[ip_of_logstash]:8888
          name: logstash
        contexts:
        - context:
            cluster: logstash
            user: ""
          name: default-context
        current-context: default-context
        kind: Config
        preferences: {}
        users: []
        EOF

Remove code fences and make the contents move to one more deep indent level.

ouch, I could have sworn I tried @makocchi-git's solution. But yeah, I just tested it and it does work. And it's not the most elegant solution, for sure. I posted about the issue in #sig-docs, and if we don't hear back there I plan to ask the Hugo folks on the Write the Docs Slack. And then if we can't find a clean solution we'll go with the indents. Does that work for y'all?

@Bradamant3 @makocchi-git @CaoShuFeng This has exposed a bug in the Markdown parser. The issue is that it's interpreting the list inside the YAML as a new Markdown list rather, i.e. it's interpreting the code snippet as Markdown. This is the offending set of lines:
clusters:
- cluster:

These lines have the same problem:
contexts:
- context:

My proposed solution is to use this YAML instead:
$ cat <<EOF > /etc/kubernetes/audit-webhook-kubeconfig
apiVersion: v1
clusters: [{cluster: {server: "http://<ip_of_logstash>:8888"}, name: logstash}]
contexts: [{context: {cluster: logstash, user: ""}, name: default-context}]
current-context: default-context
kind: Config
preferences: {}
users: []
EOF

It's still valid YAML but it doesn't rely on syntax that will break the parser. I haven't tested that YAML in the context of the tutorial steps, though, so make sure to double check @CaoShuFeng.

Updated according to @makocchi-git .

ping @Bradamant3
Thanks :)

@Bradamant3 bump

ping

/lgtm

/hold cancel
/approve
with apologies for the delay. Anyone reading this comment -- always feel free to @ me on Slack. I declare GH notification bankruptcy regularly I'm afraid.


Update icons.json

Category: Frontend
Subcategory: Icons
Closes #1793
Changes proposed
Added details of Iconoir, a website for high quality free icons.
Note to reviewers
Please review and let me know what else needs to be fixed.

Thanks @CBID2 😊.


proposal: allow to omit types in more contexts

Currently, we can omit types inside slice initialization and map initialization, for example:
m := []map[string]string{{"hello" : "goodbye" }}
m2 := []T{{Field:42 }} // type T struct { Field int }

This can be allowed in more contexts.

1. Allow to omit types in composite literal
Before:
type N struct {
    X int
}
type T struct {
    Items map[int]int
    Val N
}

t := T{
    Items: map[int]int{3: 4},
    Val: N{ X : 42 },
}

After:
type T struct {
    Items map[int]int
}

t := T{
    Items: {3: 4},
    Val: { X : 42 },
}

2. Allow to omit return types inside "return" statement.
Before:
func createMap() map[string]string {
    return map[string]string{
        "hello": "goodbye",
        "a": "b",
    }
}

After:
func createMap() map[string]string {
    return {
        "hello": "goodbye",
        "a": "b",
    }
}

This change will make composite literals easier to write for types containing structs, slices and maps. It doesn't seem to require any language changes and doesn't seem to break previously valid Go code.
The change can be argued with on the premise of "reducing readability", but consider the counter example:
t := &T{
    Items: createMap(), // no type in sight
}

However, this might allow to write shorter code because you'll avoid repeating types. The refactoring of struct member types might also become easier as you won't need to change types inside composite literals.
This doesn't seem to require any language/spec changes and doesn't seem to break previously valid Go code (please feel free to correct me if I'm wrong).

Duplicate of #21496


Sort_by_key fails at 6144 elements or more

It looks like sort_by_key fails at any size greater than or equal to 6144 elements.
The gist has the code I used to test this: https://gist.github.com/shehzan10/2d34a612aa3ee44a145b (its a modifies sort_vector example).
Here is the relevant output:
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::compute::opencl_error> >'
terminate called recursively
  what():  Out of Resources
Aborted (core dumped)

Other observations:

This only happens if compute::less<type>() or compute::greater<type>() are specified.
This bug does not affect sort with or without the direction specified.

This bug may possibly be related to #275.

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/7032811-sort_by_key-fails-at-6144-elements-or-more?utm_campaign=plugin&utm_content=tracker%2F402515&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F402515&utm_medium=issues&utm_source=github).

Fixed, see https://github.com/boostorg/compute/pull/619.


added all locations to the selection location dropdown menu

Short Description
Added "All Locations" to dropdown so it is ready for styling, moved button to event sidebar, created a location state, created a handle change for selecting the location, created a copy of location state.
Rationale/purpose of the feature
For the user to have the option to select "all locations" in the select location dropdown.
Link to relevant User Story
Add "all locations" to the dropdown on select location button and move to sidebar. Make a state and handle change for selecting location data and keeping a copy.
Checklist for author and reviewers

[ ] Commits are well named and descriptive
[ ] PR is focused on a single problem, is small enough and easy to review
[ ] PR requests were sent to multiple reviewers
[ ] PR is reviewed by more than one team member
[ ] Code is consistently formatted
[ ] Code is suitably commented on
[ ] There is no duplicate code
[ ] Code tries to follow best practices
[ ] Decide with reviewers if this PR should have tests before merging

Great work! I will start working on the functionality 🙏🏽


Add ReturnResponse for PackageInUseByApplication to Validator Enum

https://github.com/microsoft/winget-cli/pull/2492#issuecomment-1235807256
I think this is all that needs to be done? But, if it isn't, please let me know

Thanks @Trenly Can you also update the spec at documentation/WinGet-1.4.0.yaml as well?

Thanks @Trenly Can you also update the spec at documentation/WinGet-1.4.0.yaml as well?

Done

/azp run


fix: removed all unwraps

Removed all this code snippets:
print!("Enter your name: ");
io::stdout().flush().unwrap();

with new function print_flush():
fn print_flush(prompt: &str) {
    print!("{prompt}");

    if let Err(e) = io::stdout().flush() {
        eprintln!("Error: {e}");
        exit(1);
    }
}

And changed unknown operation handling as suggested:
match operation.unwrap() {
    ...
    op => eprintln!("Unknown operation \"{op}\""),
}

Not ideal, but looks good for now


update func cli version

Codecov Report
Base: 74.63% // Head: 74.52% // Decreases project coverage by -0.10% :warning:

Coverage data is based on head (079a7ff) compared to base (ca4fc7b).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #309      +/-   ##
==========================================
- Coverage   74.63%   74.52%   -0.11%
==========================================
  Files          89       89
  Lines        3737     3737
  Branches      638      638
==========================================
- Hits         2789     2785       -4
- Misses        948      952       +4

Impacted Files
Coverage Δ

src/util/platform.ts
88.23% <0.00%> (-11.77%)
:arrow_down:

src/cli/cli-config.ts
74.73% <0.00%> (-2.11%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Focus mode -  A chat that was not on the chat list is displayed when changing to focus mode

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

Version Number: 1.4.59-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers<EMAIL_ADDRESS>Issue reported by: Applause - Internal Team
Action Performed:

Go to Settings
Click on Preference
Click on Priority mode
Select Focus
Return to chat list

Expected Result:
There shouldn't be a new chat in the chat list that hasn't been there
Actual Result:
New chat is displayed on chat list. The chat has (you) at the end
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

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

Screenshots/Videos
Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/af2941e8-57da-420f-9c87-af5d95b9da2b
View all open jobs on GitHub

@adelekennedy  FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

Ah yes that's correct

made external


About performance

Hello,
First of all thank you for this amazing work. I am interested in tracking players and projecting their coordinates on a 2D plane using live camera. I am not interested in the analysis part, just the projection. Could your detection, homography and reid models  be used with live video stream and achieve good fps performance?

Hey, thanks for the message. Even with a GPU this is not possible at the moment, you will experience delay.

Thank you for the answer.


getting this error when running dart bin/main.dart

Shubhams-MacBook-Air:serverpod_demo_server shubhamsingh$ dart bin/main.dart
SERVERPOD version: 0.9.20 mode: development time: 2022-12-06 05:25:55.398510Z
2022-12-06 05:25:56.127243Z Failed to connect to database.
FormatException: No deserialization found for type RuntimeSettings
#0      SerializationManager.deserialize (package:serverpod_serialization/src/serialization.dart:73:5)
#1      Protocol.deserialize (package:serverpod_demo_server/src/generated/protocol.dart:80:18)
#2      DatabaseConnection._formatTableRow (package:serverpod/src/database/database_connection.dart:239:45)
#3      DatabaseConnection.find (package:serverpod/src/database/database_connection.dart:178:18)

#4      DatabaseConnection.findSingleRow (package:serverpod/src/database/database_connection.dart:199:18)

#5      Database.findSingleRow (package:serverpod/src/database/database.dart:86:12)

#6      Serverpod.start. (package:serverpod/src/server/serverpod.dart:310:13)

#7      Serverpod.start (package:serverpod/src/server/serverpod.dart:299:5)

#8      run (package:serverpod_demo_server/server.dart:30:3)

@yahu1031  @filonov @aldychris @tp

Similar issue to #426

Can you explain to us what function/method you called?

@Shubhamdsingh Please edit the title as
No deserialization found for type `RuntimeSettings`

I am running my server project and its showing the above error
COMMAND
dart bin/main.dart

@Shubhamdsingh What is in here serverpod_demo_server/server.dart line 30

import 'package:serverpod/serverpod.dart';
import 'package:serverpod_demo_server/src/web/routes/root.dart';
import 'src/generated/protocol.dart';
import 'src/generated/endpoints.dart';
// This is the starting point of your Serverpod server. In most cases, you will
// only need to make additions to this file if you add future calls,  are
// configuring Relic (Serverpod's web-server), or need custom setup work.
void run(List args) async {
// Initialize Serverpod and connect it with your generated code.
final pod = Serverpod(
args,
Protocol(),
Endpoints(),
);
// If you are using any future calls, they need to be registered here.
// pod.registerFutureCall(ExampleFutureCall(), 'exampleFutureCall');
// Setup a default page at the web root.
pod.webServer.addRoute(RouteRoot(), '/');
// Serve all files in the /static directory.
pod.webServer
.addRoute(RouteStaticDirectory(serverDirectory: 'static'), '/static/*');
// Start the server.
await pod.start();
}
@yahu1031  this the code of  'serverpod_demo_server/server.dart'  file

@yahu1031  can u help me in this its urgent

@yahu1031  can tell me solution here only ?

I had created a project
Started docker in background
In Server project i created protocols file and created endpoints with  'serverpod generate --watch ' running in terminal
Then i started postgres and redis with command  'docker-compose up --build --detach'
After that i runned my server project with command  'dart bin/main.dart'

@yahu1031

okie... sounds smooth. can you please check if the DB has all the tables?

@yahu1031  yes DB has all tables

Okie can you restart the system and try again?

just clear the serverpod_runtime_settings table and restart the server and you are good to go.

this may work. Try it.

Thanks it works @yahu1031  @suhaelfarouk


pkgs.substitute: Deprecate replacements, introduce substitutions that can handle spaces

Description of changes
Fixes https://github.com/NixOS/nixpkgs/issues/286961. This is very similar to https://github.com/NixOS/nixpkgs/pull/164662
Things done

[x] Add tests
[x] Improve docs
[x] Backwards compatible
[x] Treewide update

Add a :+1: reaction to pull requests you find important.

Before I force push again to rebase, here's the diff of my changes: (diff)


Split up the exercises

Unfortunately a single notebook seems to be crashing the VM machines on our teaching cluster. It may be better to split up the exercises into 10 separate sections.

Closed via #19


Washtower Wont Connect

I have the following LG wash tower and it is not detecting with this integration. It does not find any devices. I have tried reloading it, and rebooting home assistant and it still wont detect it.
https://www.lg.com/us/washers-dryers/lg-wkex300hba-washtower

Any help would be appreciated.

I'm experiencing the same issue with the same model. Anything we can do to fix this?

This is duplicate of #649, so I close this.
Working to implement this new device.


Wire mic with TRS Connector

Hello,
Thanks for this beautiful project !
I'm stuck on the mic wire with TRS connector.
Look below :
I've these cable on my S63

And I want to connect in both TRS like this

Can you help me ?

I try this, do you think is good ?

Green and brown in GND
Red in R
Blue in T

@nickpourazima Hi, I did this thing, can you tell me if it's the good way with these connector ?

Green  = Microphone
Green = Microphone
Blue = Speaker
Red = Speaker

Hi @kbn53, thanks for the kind words!
Your diagram looks solid 👍🏽
However, I did some digging up on this phone and I believe there's another component at play here which looks to be reconfiguring some of the wiring:

Is that the case with your model? Or did you already remove that?
Referenced here
Also, in-case you need it - here is a link to the schematic

Thanks for your answer @nickpourazima
With mine, "Socotel 63" I think is more recent and I don't have this component.
Only my mic/speaker with 4 cable (green, green, red and blue)
2 for speaker and 2 for mic
Here is 2 pictures to show my model. I disconnected the PTT cable, I think it's not useful ?

Here is the schematic inside

I'm not too familiar who those types of phones unfortunately. Does PTT stand for push-to-talk in this case? If so, I'd believe it would be necessary to leave that circuitry intact for the microphone to be enabled. It might be helpful to ask on this forum: https://www.classicrotaryphones.com/forum/index.php?board=1.0

@nickpourazima Ok thanks !
For me the PTT socket is this cable that connects to the phone network normally and I remove it because for me it is not useful.

I'm going to test this connection and I'll tell you if it works

Salut, j’ai fait ce truc, pouvez-vous me dire si c’est la bonne façon avec ces connecteurs ?

Vert = Microphone Vert = Microphone Bleu = Haut-parleur Rouge = Haut-parleur

Hé, je ne suis pas un expert en la matière, mais ce schéma de connexion semble raisonnable. Il convient de noter que pour un micro standard à deux bornes, je ne pense pas que le fil de liaison rouge, qui passe entre les deux bornes « S » de la masse / manchon dans votre dessin, fasse quoi que ce soit. En supposant que vous les branchiez toujours sur la même carte son, je suppose que cela n’endommagerait rien et pourrait être utile plus tard, si vous remplacez le microphone par un microphone qui a besoin de cette masse (pourrait voler la terre du côté du haut-parleur).
Question, si vous débranchez le connecteur TRS du haut-parleur, l’entrée microphone fonctionne-t-elle ? En regardant https://images.app.goo.gl/dSkp43ZhgfHvvPEj6, il semble que le branchement d’une prise TRS normale dans la fente pour carte son compatible TRRS pourrait court-circuiter la broche du microphone avec la masse. Ainsi, si les ports sont câblés ensemble, cela peut essentiellement désactiver le microphone branché sur l’autre port.
De plus, il est possible que le microphone de votre combiné soit tout simplement trop hors spécifications pour être utilisé directement avec une carte son moderne (tension de polarisation, ...). Entendez-vous quelque chose sur l’enregistrement lorsque vous parlez dans le micro ? Si vous criez dans le micro, entendez-vous quelque chose sur l’enregistrement, même faible ? Assurez-vous d’utiliser une application d’enregistrement audio connue pour fonctionner, car nous ne voulons vraiment pas déboguer plusieurs couches de problèmes. Vous pouvez également brancher la carte audio USB sur votre ordinateur de bureau/portable pour vérifier le fonctionnement.
Avez-vous des photos du microphone lui-même ?
Tout le meilleur,
Craig
Pour info, voici un schéma pour utiliser un microphone mems avec une configuration normale de microphone à 2 fils :
https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://invensense.tdk.com/wp-content/uploads/2015/02/Using-a-MEMS-Microphone-in-a-2-Wire-Microphone-Circuit.pdf&ved=2ahUKEwjsv7bt5aaGAxWKADQIHbpEAs8QFnoECBIQAQ&usg=AOvVaw38B-gKcXNfdMPFtHeUdGb4

I @linux4life798 thanks for this answer.
I think It's gonna be ok, I'll test this this afternoon.
But yesterday, I try to connect my USB audio card in my PC and the speaker was good but the mic doesn't work.

Ok so, I finished (I think) my wire. But there is no action when I lift the speaker. In the service (journalctl -u audioGuestBook -f
) It mention that I need to lift but when I lift nothing happend.

I see my USB Audio card in CARD 1 and DEVICE 0 and I configure it in .ascoudrc

I'm in NO (I think) but I try NC and it's the same issue.

I wire black cable on GND GPIO 3 and white one on GPIO 22

Any idea of the problem ?
Thanks !

So I've news
I succeeded once, but I can't reproduce ^^'

I think my previous wire was wrong, I think these blue and pink cable or directly connected at the keypad and the hook so I try to work on these one.

....
I was on the bad GPIO. I replug on the good one GPIO22 and it's good.
Now I can hear the voicemail and the beep but last problem, recording stop after bip (Mic's not detected ? can't save file ?)

I'm searching

Hey @kbn53, thanks for all the details and pictures, it's super helpful! One thing to check, did you set your config back to NO again? I think NO should be correct for you configuration.

Hey @kbn53, thanks for all the details and pictures, it's super helpful! One thing to check, did you set your config back to NO again? I think NO should be correct for you configuration.

Hey @nickpourazima no problem I try to save my conf but if it can help an other user it's cool !
Yes I'm in NO and this is working.
My last problem is after the BEEP It's directly Recording stopped and can't do anything.
Probably because my mic's not woking ? (If I connect my usb audio card on my windows I can use speaker for spotify for exemple but can't use for recording my voice)

When you speak into the mic do you see any voltage variation? Probably set your multimeter to mV.
Another thing I recall when I first tried using the built in carbon mic was that the amplitude is super low and may require being driven beyond what ALSA can do in the digital domain. If you have a headphone amplifier you might be able to test this?

When you speak into the mic do you see any voltage variation? Probably set your multimeter to mV.
Another thing I recall when I first tried using the built in carbon mic was that the amplitude is super low and may require being driven beyond what ALSA can do in the digital domain. If you have a headphone amplifier you might be able to test this?

Hmmm, I can't try to talk because the recording stopping directly I think

And I don't have amplifier sorry...

Oh I meant checking the microphone hardware directly with the wires connected to the probes of your multimeter.
But within a Linux terminal you can also try to open alsamixer and increase the mic gain. It might be labelled 'Capture', then once you're happy with your levels hit Esc and then this to save it upon reboot:
sudo alsactl store

Oh I meant checking the microphone hardware directly with the wires connected to the probes of your multimeter.
But within a Linux terminal you can also try to open alsamixer and increase the mic gain. It might be labelled 'Capture', then once you're happy with your levels hit Esc and then this to save it upon reboot:
sudo alsactl store

If I understand, I connect my multimeter in mV here ? (yellow circle)
And I talk and try to see if the value increase ?

I'll try too the alsamixing.
Also, you need to know that I disconnect the red bridge betweenf both TRS jack (like @linux4life798 said before) It was useless.

That's correct, make sure to set your multimeter to millivolts AC and not DC

Oh, je voulais dire vérifier le matériel du microphone directement avec les fils connectés aux sondes de votre multimètre.
Mais dans un terminal Linux, vous pouvez également essayer d’ouvrir et d’augmenter le gain du micro. Il peut s’appeler « Capture », puis une fois que vous êtes satisfait de vos niveaux, appuyez sur Échap, puis ceci pour l’enregistrer au redémarrage :alsamixer sudo alsactl store

So I try to increase gain mics but nothing happend.

I try too with multimeter (my wire is correct ?, I'm not good with this ^^')

It can't be an other issue ? It's look like the program stopping directly (beacause not found mic ?)

@nickpourazima It's working with my new mic !
I change my wire too and all is ok.
Now I cut my jack to directly connect into my old mic but I don't understand how I can solder this mic with just 1 cable with the TRS 2 cable (red and black)

Do you have any idea ?

Hey @kbn53, glad to hear the other mic is working out for you!
This looks like a mono mic, so you only need to solder to the T (for the primary channel) and S (by uncoiling the ground shield wires around the microphone signal wire. The R channel will be empty.

Hey @kbn53, glad to hear the other mic is working out for you!
This looks like a mono mic, so you only need to solder to the T (for the primary channel) and S (by uncoiling the ground shield wires around the microphone signal wire. The R channel will be empty.

Big thanks for the follow up !
Sorry I don't understand very well,
What cable I need to do here ?

And here, if I understand correctly, I need to put one green on the S and the other one on the L (for T)

Actually if you can fit that whole mic cable inside the mouthpiece are you can just wrap the wires around the screw terminals instead of needing to solder:

Actually if you can fit that whole mic cable inside the mouthpiece are you can just wrap the wires around the screw terminals instead of needing to solder. Alternatively you can clip that mic cable so that it's shorter and then strip the wires and connect them to the screw terminals:

Hmm ok
I tried this but nothing happened

Do I need to strip the blue/grey wire ? You can see this one on my list picture.

Did you unscrew the terminal and wrap the wires around it?

Did you unscrew the terminal and wrap the wires around it?

Yes, I try this and directly on the trs, nothing happened.

Sometimes the wires might be insulated. If you have a piece of sandpaper you can gently rub off the insulation so there's better conductivity. Chrcj

Sometimes the wires might be insulated. If you have a piece of sandpaper you can gently rub off the insulation so there's better conductivity. Also, check the wire with your multimeter set to continuity mode (the diode symbol):
https://m.youtube.com/watch?v=9IOFGcl_29U
Last, for your mic test - make sure you're connecting to the proper terminals on the male TRS connector. The copper should be GND, the other wire is the L channel.

I don't understand what wrong....
I try with a new mic and connect my red cable on the L and the copper on the GND.
But nothings happens.
I try too the continuity but nothing, very weird.

FINALY !
It's working.
I must have burnt the cable to remove the protection. After this it's working.
https://www.youtube.com/watch?v=WlRyQe-O5ME
A big thanks @nickpourazima for your follow up !


PorterStemmerFr and stopwords that begin a sentence

For example:
// Returns ['j', 'aim']
natural.PorterStemmerFr.tokenizeAndStem("J'aime");

// Returns ['aim']
natural.PorterStemmerFr.tokenizeAndStem("j'aime");

In both cases the return value should just be ['aim'].
I think it's because the lowercase is applied after stopwords are removed, and not before.

Thanks! Changed the order: first convert the token to lowercase, then match against stop words.
https://github.com/NaturalNode/natural/pull/530


passing a custom command on the terminal

it is possible to pass a custom string like the first command that will be executed by the terminal?
for example:
press [ctrl]+[shift]+[t] in sublime
and in the command line at the first line appear -->
|------------------------------terminal------------------------------|
| user/my/code/location/file $   my_command_string
|
|
|
|
|
---------------------------------------------------------------------|

This is a duplicate of #175. We don't support running commands in terminals. Here are plugins which do:

Sublime Text's build system
https://packagecontrol.io/packages/Shell Exec
https://packagecontrol.io/packages/Console Exec
https://packagecontrol.io/packages/Exec In Window


refactor: readFromPipe() requires no arguments

readFromPipe() no longer requires this to be passed in as the first parameter.
Fixes #485

LGTM!