feat(collection): filter & search

SearchBar component looks a bit weird on collection page.
Maybe we need to update design/blocks or create an uniq search component for collection.
I would like to try to have filter on the left (replace with icon) & searbar at the center.
PR type

[x] Feature

Before submitting this PR, please make sure:

[x] Code builds clean without any errors or warnings
[x] I've merged recent default branch -- main and I've no conflicts
[x] I've didn't break any original functionality
[x] I've posted screenshot of demonstrated change in this PR

What's new? (may be part of changelog)

#831 related
Add SearchBar component on collection

Screenshot

Uwaga! 😄 Opozorilo
Screen.Recording.2021-10-12.at.12.21.15.mov

Looks like a new feature to me 😄

I see, I'd vote for it probably, we can duplicate it later for one component:)

Proposal UI
current

with filter icon left

without toggle

Let's use with filter icon left and add buy now to the end, right next end of Search field?

I miss pagination there but I would vote for 2nd (+ add 'filter' label for non-technical users)


More libiberty test compat

Coverage increased (+13.02%) to 91.348% when pulling e2daa6e0e9dd9796c335d5c17e83975c066237fd on libiberty-test-compat into 0b39f81b1373c6578a10045d793cfcc4fe4b05a8 on master.


np.array issue

import jax.numpy as jnp
jnp.array([4,5], dtype=np.object)
# ==> RuntimeError: Invalid argument: Convert does not allow non-arrays, so cannot convert from s32[] to TOKEN.:  This is a bug in JAX's shape-checking rules; please report it! https://github.com/google/jax/issues

As Peter mentioned in #1580, JAX won't support object arrays.
WDYT about closing this issue and following up the discussion in #1580?

Well, that's a quite confusing error, I think there's something to improve here in the error department.

Indeed, we should improve the error message, but should we just have one issue to improve errors around object-dtype arrays, or multiple issues?


Support for jsx and tsx

Hi,
Could you also support jsx and tsx extensions also? Since the comment is same as JS,  I guess it would be a relatively easy change
thanks a lot :)

Any spare time to support this? :)

I hope I can find time. Do you need any more extension other than .jsx and .tsx?

Thats all needed as of now!
Next time I will try to raise the PR for same. Need to learn a bit how to write the vs extension :)


Where is scanvideo.pio.h ? Unable to build pico_scanvideo demo1

src/common/pico_scanvideo/include/pico/scanvideo/composable_scanline.h
tries to include scanvideo.pio.h - which as far as I can tell, does not exist.
I've tried searching the organisation with path:scanvideo.pio.h but found nothing.
FWIW, I'm trying to import demo1 from scanvideo in pico-playground into the Arduino IDE, by pasting in whatever seems to be needed, but that file appears to be missing from any of the repos.

scanvideo.pio.h gets automatically generated from scanvideo.pio.

... the Arduino IDE

I have no familiarity with the Arduino IDE, but maybe you need to do a least one build with cmake, and that should generate the scanvideo.pio.h that you need.

@lurch I see.  Thanks.  It seems I can use this to generate the .h:
Online pioasm for Raspberry Pi Pico
https://wokwi.com/tools/pioasm
It's too early to declare victory, but that gets me past the missing .h file error, and on to the next one.

Okay, yes.  Thanks.


Fix error with self instruct to argilla method

Description
This PR fixes the error found by @ignacioct related to SelfInstructTask splitting the instructions by character in a sentence instead of the whole sentence.
Added a simple unit test for the check.
Closes #254

@ignacioct check if your tutorial runs properly and let me know when you can


still some errors

Hi, it doesn't work yet, once again, here is the code I use to test:
using Agents

model, zombie_step!, model_step! = Models.zombies()

using OSMMakie
using GLMakie
ac(agent) = agent.infected ? :green : :black
as(agent) = agent.infected ? 6 : 5
fig = Figure(); display(fig)
ax = Axis(fig[1,1])
osmplot!(ax, model.space.map)
ids = model.scheduler(model)
colors = Observable([ac(model[i]) for i in ids])
sizes = Observable([as(model[i]) for i in ids])
pos = Observable(Point2f[OSM.latlon(model[i].pos, model) for i in ids])
scatter!(ax, pos; color = colors, markersize = sizes)

with Agents master. This code is useful because now the default graph is different. It already highlighted one problem.
In line 41 in recipe.jl you need to write zip(1:Graphs.ne(osm.graph), instead of 1:osm.gra.ne. Not all graphs have a .ne field, but the ne function always returns the number of edges.  I was going to do a PR but even after this fix there is another problem:
ERROR: LoadError: KeyError: key :osm_edge_colors not found
Stacktrace:
  [1] getindex(h::Dict{Symbol, Observable}, key::Symbol)
    @ Base .\dict.jl:481
  [2] getindex
    @ C:\Users\datse\.julia\packages\MakieCore\S8PkO\src\attributes.jl:96 [inlined]
  [3] getindex
    @ C:\Users\datse\.julia\packages\MakieCore\S8PkO\src\attributes.jl:192 [inlined]
  [4] getproperty
    @ C:\Users\datse\.julia\packages\MakieCore\S8PkO\src\attributes.jl:83 [inlined]
  [5] set_edge_defaults(osmplot::Combined{OSMMakie.osmplot, Tuple{LightOSM.OSMGraph{Int32, Int64, Float64}}})
    @ OSMMakie C:\Users\datse\.julia\dev\OSMMakie\src\defaults.jl:45
  [6] plot!(osmplot::Combined{OSMMakie.osmplot, Tuple{LightOSM.OSMGraph{Int32, Int64, Float64}}})
    @ OSMMakie C:\Users\datse\.julia\dev\OSMMakie\src\recipe.jl:55
  [7] plot!(scene::Scene, P::Type{Combined{OSMMakie.osmplot, Tuple{LightOSM.OSMGraph{Int32, Int64, Float64}}}}, attributes::Attributes, input::Tuple{Observable{LightOSM.OSMGraph{Int32, Int64, Float64}}}, args::Observable{Tuple{LightOSM.OSMGraph{Int32, Int64, Float64}}})

Indeed, looking at the definition of Attributes at lline 23, there isn't any attribute with that name. I'm not sure how to fix this part as I've never learned the Makie recipe system yet.

Indeed, looking at the definition of Attributes at lline 23, there isn't any attribute with that name.

Sorry, accidentally left that osm_edge_colors attribute in there even though it's currently unused. Just fixed that on master.

In line 41 in recipe.jl you need to write zip(1:Graphs.ne(osm.graph), instead of 1:osm.gra.ne. Not all graphs have a .ne field, but the ne function always returns the number of edges.

That should be fixed now as well. Thanks for the heads up.
I wanted to test your MWE but it threw an error that I don't have permissions to load the Artifacts.toml:
ERROR: LoadError: SystemError: opening file "/home/fbanning/.julia/packages/Agents/vmoBx/src/spaces/../../Artifacts.toml": Keine Berechtigung
Stacktrace:
  [1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
    @ Base ./error.jl:168
  [2] #systemerror#62
    @ ./error.jl:167 [inlined]
  [3] systemerror
    @ ./error.jl:167 [inlined]
  [4] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Bool, append::Nothing)
    @ Base ./iostream.jl:293
  [5] open(fname::String, mode::String; lock::Bool)
    @ Base ./iostream.jl:355
  [6] open(fname::String, mode::String)
    @ Base ./iostream.jl:355
  [7] open(::Pkg.Artifacts.var"#9#13"{Dict{String, Any}}, ::String, ::Vararg{String, N} where N; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Base ./io.jl:328
  [8] open
    @ ./io.jl:328 [inlined]
  [9] bind_artifact!(artifacts_toml::String, name::String, hash::Base.SHA1; platform::Nothing, download_info::Nothing, lazy::Bool, force::Bool)
    @ Pkg.Artifacts /home/abuild/rpmbuild/BUILD/julia-1.6.3/usr/share/julia/stdlib/v1.6/Pkg/src/Artifacts.jl:245
 [10] test_map()
    @ Agents.OSM ~/.julia/packages/Agents/vmoBx/src/spaces/openstreetmap.jl:136
 [11] zombies(; seed::Int64)
    @ Agents.Models ~/.julia/packages/Agents/vmoBx/src/models/zombies.jl:12
 [12] zombies()
    @ Agents.Models ~/.julia/packages/Agents/vmoBx/src/models/zombies.jl:12
 [13] top-level scope
    @ ~/Code/test-OSMMakie/agents-test.jl:3

I've never worked with artifacts before as far as I know. Do I have to set up anything in a specific way?

@AayushSabharwal ooooooo oooooo problem! You know anything of this artifacts??? @fbanning thanks for the fixes, I'll get back to it as soon as I can, probably in a couple of days.

Worked now after I've cloned the master branch and created a symlink to its directory from ~/.julia/dev/. Don't ask me why it works like this but not when I do ]add Agents#master. Maybe something to keep in mind if it continues to happen.

This is weird. I'll take a look.

This is what the plot looks like now:

Take care that you need to use lonlat instead of latlon for proper north-oriented plotting. Here's a quick fix for it:
pos = Observable(Point2f[reverse(OSM.latlon(model[i].pos, model)) for i in ids])
Also it's currently impossible to see the uninfected agents, so I suggest to use ac(agent) = agent.infected ? :red : :green instead.

That looks awesome!

Since the errors raised in this issue seem to be fixed now, I would close it. Feel free to play around with OSMMakie a bit more and see how you can break and/or extend it. :)

@fbanning just double checking: all of these stuff are fixed in the interaction branch, right? Nothing is on master as far as I can tell:

I've created the above plot on the master branch. The fixes discussed above were merged in v0.0.2. There should be no need to use the interaction branch to be able to use osmplot/osmplot!.


No picture when doorbell camera is not streaming

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Start P2P stream from the doorbell
Stop the P2P stream using eufy.stop_p2p_livestream or camera.turn_off service
See that entity_picture state attribute points to  /api/camera_proxy/camera.doorbell?token=.... that returns 500 Internal server error. Currently, if retrieving the image from eufy fails with non-200, there is no additional logging as far as I understand.

Expected behavior
Valid picture retrieved and cached.
Screenshots

**Hardware Information about Home Assistant
**Hardware Information about Cameras

Camera Model: T8222-Z
Live Streaming Protocol: P2p

Additional context
It has stopped working recently. I suspected that it may be as a result of the recent privacy scandal where Eufy was caught uploading the footage and pictures to the cloud.
Those suspicions were confirmed when I checked the raw properties through eufy-security-ws client:
{
  "type": "result",
  "success": true,
  "messageId": "get_properties",
  "result": {
    "serialNumber": "T822CAMERA_SERIAL",
    "properties": {
      "name": "Doorbell",
      "model": "T8222-Z",
      "serialNumber": "T822CAMERA_SERIAL",
      "stationSerialNumber": "T8020REDACTED_STATION_SERIAL",
      "pictureUrl": "T8020REDACTED_STATION_SERIAL~/media/mmcblk0p1/video/20221228183018_c00.jpg"
      // truncated for visibility
    }
 }
}

Full output

```
eufy-security> device.get_properties T822CAMERA_SERIAL
eufy-security> {
type: 'result',
success: true,
messageId: 'get_properties',
result: {
serialNumber: 'T822CAMERA_SERIAL',
properties: {
motionDetected: false,
personDetected: false,
personName: '',
ringing: false,
name: 'Doorbell',
model: 'T8222-Z',
serialNumber: 'T822CAMERA_SERIAL',
type: 16,
hardwareVersion: 'T8222-Z',
softwareVersion: '3.6.4',
stationSerialNumber: 'T8020REDACTED_STATION_SERIAL',
lastChargingDays: 44,
lastChargingFalseEvents: 114,
lastChargingRecordedEvents: 641,
lastChargingTotalEvents: 755,
batteryUsageLastWeek: 0,
pictureUrl: 'T8020REDACTED_STATION_SERIAL~/media/mmcblk0p1/video/20221228183018_c00.jpg',
recordingClipLength: 100,
recordingRetriggerInterval: 2,
recordingEndClipMotionStops: true,
snoozeTime: 0,
snoozeHomebase: false,
snoozeStartChime: false,
snoozeMotion: false,
snoozeStartTime: 0,
state: 1,
chimeHomebase: true,
notificationType: 2,
notificationRing: true,
notificationMotion: true,
enabled: true,
battery: 54,
batteryTemperature: 9,
watermark: 1,
motionDetection: true,
motionDetectionSensitivity: 4,
chimeHomebaseRingtoneType: 0,
videoStreamingQuality: 0,
chimeHomebaseRingtoneVolume: 16,
autoNightvision: true,
videoWdr: false,
chargingStatus: 2,
snooze: false,
statusLed: true,
chimeIndoor: false,
audioRecording: true,
speakerVolume: 100,
ringtoneVolume: 80,
wifiRssi: -59,
wifiSignalLevel: 4,
motionDetectionType: 2,
powerWorkingMode: 2
}
}
}
</details>

This indicates that the image should be retrieved directly from the station rather than AWS which is great news from privacy and reliability standpoint, but it's no longer a valid URL so the HTTP get obviously fails. I have not figured out how to construct the correct URL. Will try when I have more time, but I am open to suggestions :)

if you are using alpha version of integration, it would cache the live stream picture and hold it until next restart.

Amazing, thank you very much for  prompt response - I will switch to the alpha version and monitor the linked issue

if you are using alpha version of integration, it would cache the live stream picture and hold it until next restart.

@fuatakgun are there any specific steps needed to enable this functionality? I have pulled the alpha, specifically the 21032814c82e37e9f39de31841311958e90a8eec and it does not seem to be cached...  Debug log. Any clues?

any way, you can try with v5.2.2?

any way, you can try with v5.2.2?

checked out the v5.2.2 (475bcb0), restarted the home assistant, ended up with the same result (no picture).
Debug logs
I am using following script to start and stop stream:

alias: camera on off
sequence:
  - service: camera.turn_on
    data: {}
    target:
      device_id: 51dae52de6ceb592048e0352ca7dcfdb
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - service: camera.turn_off
    data: {}
    target:
      device_id: 51dae52de6ceb592048e0352ca7dcfdb
mode: single

The video starts and stops as expected.

Can you share your front end YAML card setup? Do you have picture card to render camera image?

Ok, i see, you want to take care of this via automation not on rendering. I need to this about it.

Can you share your front end YAML card setup? Do you have picture card to render camera image?

Sure, here it is:
type: vertical-stack
cards:
  - type: conditional
    conditions:
      - entity: camera.doorbell
        state: idle
    card:
      type: picture-entity
      entity: camera.doorbell
      tap_action:
        action: call-service
        service: camera.turn_on
        service_data: {}
        target:
          entity_id: camera.doorbell
  - type: conditional
    conditions:
      - entity: camera.doorbell
        state: streaming
    card:
      type: custom:webrtc-camera
      ui: true
      url: rtsp://<IP_ADDRESS>:8554/T8222SERIAL
      shortcuts:
        top: 10
        left: 0
        orientation: horizontal
        services:
          - name: Stop
            icon: mdi:record-circle-outline
            service: camera.turn_off
            service_data:
              entity_id: camera.doorbell

Ok, i see, you want to take care of this via automation not on rendering. I need to this about it.

nope, the script is used only just to simulate someone walking in front of my doorbell, which is quite far from my computer :-)

Hopefully, will release a new version tomorrow.
What about rest of the alpha release? Any issues?

Hopefully, will release a new version tomorrow.

No rush, whenever you get a chance :)

What about rest of the alpha release? Any issues?

I only have one other Eufy device (T8410) and it seems to be working with no issues.

should be fixed by now

should be fixed by now

I can confirm that v5.2.3 works, thank you so much !!!


Bug 1228436 - Accounts settings float around for different resolutions

@comzeradd r?

Thanks @karanagarwal17. It works great! :+1:

Thanks @karanagarwal17. It works great! :+1:


Component state leakage

I found an issue with the state of a component in preact, for example:
render(
    <Parent>
        <Child />
    </Parent>,
    document.body
)

class Parent extends Component {
     componentDidMount() {
          this.setState({FUBAR: true})
     }

     render() {
         return this.props.children
     }
}

class Child extends Component {
     render() {
         console.log(this.state) // <-- {FUBAR: true}, not undefined or {}
         return null
     }
}

As you can see, Parent leaks its state to Child because the default state object is reused across all components.

Seems crazy this didn't come up before - maybe it's a regression? What version of preact by the way?

"preact": "7.0.3",
"preact-compat": "3.9.2",

I was able to reproduce it with<EMAIL_ADDRESS>Checked in two different applications. Switching to React fixes the issue:
console.log(this.state) // <-- null

I think the reason why it didn't come up earlier was the missing state initialization, because you usually initialize the state in the constructor or in the class property:
class Parent extends Component {
    state = {} // <-- it works fine, because the default state object is replaced

    componentDidMount() {
         this.setState({FUBAR: true})
    }

     render() {
         return this.props.children
     }
}

class Child extends Component {
     render() {
         console.log(this.state) // <-- ok, returns {}
         return null
     }
}

Is it possible this is related to preact-compat? Which Component class is that?

Hm, it could be, I'm using preact-compat, so it's React.Component in my app.

Ah ok I will scour that repo for a cause.

Do you need a repo to reproduce this issue?

I'm using this: https://jsfiddle.net/developit/rojcvahn/

Can confirm, this only happens in preact-compat.

Same problem here. Surely a preact-compat issue.

Alright, let's prioritize this then, it's just too strange to leave open.

working great 👍


Argument 1 passed to PHPStan\Type\TypeTraverser::mapInternal() must implement interface PHPStan\Type\Type, null given

Larastan Version: 0.5.2 (phpstan 0.12.9)
--level used: 1

Description
Command:
vendor/bin/phpstan analyse --memory-limit=2G

Output (I get 13 like these but they are all the same but for different files):
 ------ -----------------------------------------------------------------------
  Line   Repositories/UserRepository.php
 ------ -----------------------------------------------------------------------
         Internal error: Argument 1 passed to
         PHPStan\Type\TypeTraverser::mapInternal() must implement interface
         PHPStan\Type\Type, null given, called in
         phar:///private/var/www/app/vendor/phpstan/phpstan/phpstan/src/T
         ype/Generic/GenericObjectType.php on line 179
         Run PHPStan with --debug option and post the stack trace to:
         https://github.com/phpstan/phpstan/issues/new
 ------ -----------------------------------------------------------------------

Debug output (vendor/bin/phpstan analyse --memory-limit=2G --debug -v):
/private/var/www/app/app/Repositories/UserRepository.php

In TypeTraverser.php line 45:

  Argument 1 passed to PHPStan\Type\TypeTraverser::mapInternal() must implement interface PHPStan\Type\Type, null given, called in phar:///private/var/www/simulis
  e/vendor/phpstan/phpstan/phpstan/src/Type/Generic/GenericObjectType.php on line 179

In TypeTraverser.php line 45:

  Uncaught TypeError: Argument 1 passed to PHPStan\Type\TypeTraverser::mapInternal() must implement interface PHPStan\Type\Type, null given, called in phar:///pri
  vate/var/www/app/vendor/phpstan/phpstan/phpstan/src/Type/Generic/GenericObjectType.php on line 179 and defined in phar:///private/var/www/app/vendor/p
  hpstan/phpstan/phpstan/src/Type/TypeTraverser.php:45
  Stack trace:
  #0 phar:///private/var/www/app/vendor/phpstan/phpstan/phpstan/src/Type/Generic/GenericObjectType.php(179): PHPStan\Type\TypeTraverser->mapInternal(NULL)
  #1 phar:///private/var/www/app/vendor/phpstan/phpstan/phpstan/src/Type/TypeTraverser.php(52): PHPStan\Type\Generic\GenericObjectType->traverse(Array)
  #2 phar:///private/var/www/app/vendor/phpstan/phpstan/phpstan/src/Type/Generic/TemplateTypeHelper.php(28): PHPStan\Type\TypeTraverser->traverseInternal(Obj
  ect(PHPStan\Type\Generic\GenericObjectType))
  #3 phar:///private/var/www/app/vendor/phpstan/phpstan/phpstan/src/Type/TypeTraverser.php(47): PHPStan\Type\Generic\

Laravel code where the issue was found
I have nu clue since the output marks the full file... how do I debug this better?
Since phpstan is a phar I cannot really start debugging this or to know on which line to look for the thing phpstan is erroring, any guidance here would be appreciated to provide some better info.
Output never mentions larastan however it is since 0.5.2 and 0.5.1 is fine. So I thought to post here first.

Hi,
The error is about generics. So maybe you can share the part of code where you use any Eloquent builder, or Collection. These are the only classes generics are used in Larastan.
Also you can debug PHPStan with XDebug. Just don't forget to pass the --xdebug flag.

I've narrowed it down to this line in a specific error:
return User::query()->orderBy('id')->withoutGlobalScopes();

User is an Eloquent model with a custom builder.
    /**
     * @param \Illuminate\Database\Query\Builder $query
     *
     * @return \App\Models\QueryBuilders\UserBuilder
     */
    public function newEloquentBuilder($query): UserBuilder
    {
        return new UserBuilder($query);
    }
    public static function query(): UserBuilder
    {
        return parent::query();
    }

Exchanging it for that exact query but with another model (without custom builder) removes the error.
I have a reproduction repo with a pretty minimal test case.
git clone https://github.com/stayallive/larastan-467-reproduction.git
cd larastan-467-reproduction
composer install
vendor/bin/phpstan analyse --memory-limit=2G

Ok, thank you.
Please read the upgrade guide. If you use custom builders you have to do the mentioned things.
Please let me know if that solves your problem.

🤦♂ I got halfway doing that but missed the part about:
/**
 * @template TModelClass
 * @extends Builder<TModelClass>
 */

Thanks for the quick responses and helpful comments!

Sure. Glad I could help.


Add initializer command

Adds a command to find the initializer arguments given a type name.
OVERVIEW: Finds information about the initializers of the specified type

USAGE: SwiftInspector initializer --path <path> --name <name> [--enable-type-only] [--disable-type-only]

OPTIONS:
  --path <path>           The absolute path to the file to inspect
  --name <name>           The name of the type to look information of the
                          initializer
  -t, --enable-type-only/--disable-type-only
                          The granularity of the output (default: true)
        Outputs a list of the type names by default. If disabled it outputs the
        name of the parameter and the name of the type (e.g. 'foo,Int
        bar,String')
  -h, --help              Show help information.

Codecov Report

Merging #15 into master will increase coverage by 0.16%.
The diff coverage is 97.22%.

@@            Coverage Diff             @@
##           master      #15      +/-   ##
==========================================
+ Coverage   98.08%   98.25%   +0.16%
==========================================
  Files          24       28       +4
  Lines         994     1200     +206
==========================================
+ Hits          975     1179     +204
- Misses         19       21       +2

Impacted Files
Coverage Δ

...rces/SwiftInspectorCommands/InspectorCommand.swift
100.00% <ø> (ø)

...iftInspectorCommands/Tests/ImportCommandSpec.swift
100.00% <ø> (ø)

...es/SwiftInspectorCommands/InitializerCommand.swift
90.00% <90.00%> (ø)

...urces/SwiftInspectorCore/InitializerAnalyzer.swift
95.77% <95.77%> (ø)

...tInspectorCore/Tests/InitializerAnalyzerSpec.swift
98.76% <98.76%> (ø)

...ources/SwiftInspectorCommands/ImportsCommand.swift
100.00% <100.00%> (ø)

...es/SwiftInspectorCommands/StaticUsageCommand.swift
100.00% <100.00%> (ø)

...spectorCommands/Tests/InitializerCommandSpec.swift
100.00% <100.00%> (ø)

...rces/SwiftInspectorCommands/TypealiasCommand.swift
100.00% <100.00%> (ø)

...SwiftInspectorCore/Tests/ImportsAnalyzerSpec.swift
98.88% <100.00%> (ø)

... and 5 more

Continue to review full report at Codecov.

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


Certificate issue when connecting to secured page

Hi,
SMP shows an error message when connecting to a page which have a broken SSL certificate.
function callback(){}
this.xmlhttp = ActiveXObject('Microsoft.XMLHTTP');
this.xmlhttp.open("GET", URL);
this.xmlhttp.onreadystatechange = callback;
this.xmlhttp.send();

This is not something SMP can control: the dialog is shown by ActiveX object. I'm not sure if this ActiveX object allows to suppress this dialog window. I will post here though if I find any work-arounds for this.

 But the right solution would be to fix my internet box anyway, I'm just too lazy to do it ^^
I tried to take a look myself, and didn't find any way so far

Will be most likely fixed with #23, since it will use more modern WinAPI instead of an old ActiveXObject


Keyword recognition data usage

Hi there, this is just a query around the workings of IntentRecognizer.StartKeywordRecognitionAsync() in the .net SDK.
I'm trying to understand what level of data is transmitted through the azure services.
I'm writing a custom voice activated home automation client, and deploying a console app on the raspberry pi to act as a listener / responder.
I have a LUIS subscription, and am using the AddAllIntents() method.
I assume that the purpose of this approach is to cache the intents locally, and use that to drive intent recognition, is that understanding correct?
Also, I intend to run constant audio recording, while listening for the keyword, so again I assume that loading from the keyword file means that keyword recognition is a local operation, and that transmission of data only really begins at the point of keyword recognition?
I'm not looking for a detailed description of the inner workings of the SDK here, just a general guide on what level of data I'm sending through the services, and what keyword / intent recognition happens locally.
Many thanks.

Hi Barry. Thanks for your inquiry ...
Calling AddAllIntents() method communicates to us that you'll be using all the intents from the LUIS model. This enables two things under the covers:

The speech service will use a pre-built language model to ensure SR accuracy is as good as it can be. This pre-built model will be built from the data you've given to the LUIS service (which you've primarily done to enable the actual act of doing intent recognition and entity extraction).
The speech service will call LUIS (service to service) on your behalf, with the appropriate LUIS model information to allow LUIS to do the actual intent recognition and entity extraction (based on the text the speech service sent to it).

Yes, calling StartKeywordAsync method passing in the keyword model allows the SDK components to locally capture audio data and attempt to determine when a user speaks the keyword. If the SDK components running locally detect that it's highly likely that a user spoke the keyword (based on the model loaded), the SDK will then (and only then) start transmitting audio data from the local device to the speech service in the cloud (so it can recognize the text the user speaks).
Does that answer your question?
Thanks. -- rob


POST /members/{id}/contact

Path: /members/{id}/contact
Method: POST
Auth: member
Parameters:

id={String}

Payload:
{
  phones: [{
    phone: String,
    valid: Boolean
  }],
  socials: {
    facebook: String,
    skype: String,
    github: String,
    twitter: String,
    linkedin: String
  },
  mails: [{
      mail: String,
      personal: Boolean
      valid: Boolean
  }],
}

Response:
{
  id: String,
  phones: [{
    phone: String,
    valid: Boolean
  }],
  socials: {
    facebook: String,
    skype: String,
    github: String,
    twitter: String,
    linkedin: String
  },
  mails: [{
      mail: String,
      personal: Boolean
      valid: Boolean
  }],
}

Notes:
id is an _id field of mongodb.
Status codes:

Code
Rule

404
Member not found

400
Invalid payload

200
Always

Tests:

Bad payload

400 status code

No Match

404 status code

All good

Returns new contact

Closing as because PUT makes more sense. See #139


DL: Add new helper function for gpu_configuration

JIRA: MADLIB-1390
This commit adds a new helper function to query the gpu configuration of
the cluster. The purpose of this function is to list the state of the
cluster w.r.t GPUs, however it is configured. This will be useful in
case of supporting asymmetric clusters.
Also takes in a source param which can be one of 'tensorflow' or
'nvidia'. Defaults to 'tensorflow'.
Example for gpdb
List the state of the cluster, however it is configured:

SELECT * FROM madlib.gpu_configuration();
    gpu_descr     | hostname

-----------------+-------------------------

NVIDIA Tesla P100 | host1

NVIDIA Tesla P100 | host1

Super Duper GPU   | host2

Super Duper GPU   | host2

(4 rows)

Example for postgres
select * from madlib.gpu_configuration();

hostname | gpu_descr

---------+-----------

localhost | NVIDIA Tesla P100

(1 row)

Co-authored-by: Ekta Khanna<EMAIL_ADDRESS>

[x] Add the module name, JIRA# to PR/commit and description.
[x] Add tests for the change.

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/madlib-pr-build/1135/

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/madlib-pr-build/1136/

SELECT * FROM madlib.gpu_configuration();
 hostname |                                        gpu_descr
----------+------------------------------------------------------------------------------------------
 phoenix0 | device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0
 phoenix0 | device: 1, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:05.0, compute capability: 6.0
 phoenix0 | device: 2, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:06.0, compute capability: 6.0
 phoenix0 | device: 3, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:07.0, compute capability: 6.0
 phoenix1 | device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0
 phoenix1 | device: 1, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:05.0, compute capability: 6.0
 phoenix1 | device: 2, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:06.0, compute capability: 6.0
 phoenix1 | device: 3, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:07.0, compute capability: 6.0
 phoenix2 | device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0
 phoenix2 | device: 1, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:05.0, compute capability: 6.0
 phoenix2 | device: 2, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:06.0, compute capability: 6.0
 phoenix2 | device: 3, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:07.0, compute capability: 6.0
 phoenix3 | device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0
 phoenix3 | device: 1, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:05.0, compute capability: 6.0
 phoenix3 | device: 2, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:06.0, compute capability: 6.0
 phoenix3 | device: 3, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:07.0, compute capability: 6.0
 phoenix4 | device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0
 phoenix4 | device: 1, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:05.0, compute capability: 6.0
 phoenix4 | device: 2, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:06.0, compute capability: 6.0
 phoenix4 | device: 3, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:07.0, compute capability: 6.0
(20 rows)

OK
However the below does not work:
CREATE TABLE gpu_resources AS
        SELECT * FROM madlib.gpu_configuration();

NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause. Creating a NULL policy entry.
ERROR:  plpy.SPIError: function cannot execute on segment because it issues a non-SELECT statement  (entry db <IP_ADDRESS>:5432 pid=16886)
DETAIL:
Traceback (most recent call last):
  PL/Python function "gpu_configuration", line 21, in <module>
    with AOControl(False) and MinWarning("error"):
  PL/Python function "gpu_configuration", line 154, in __enter__
PL/Python function "gpu_configuration"
SQL function "gpu_configuration" statement 1

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/madlib-pr-build/1139/

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/madlib-pr-build/1145/

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/madlib-pr-build/1146/

acceptance tests
(1)
tf info
DROP TABLE IF EXISTS host_gpu_mapping;
SELECT * FROM madlib.gpu_configuration('host_gpu_mapping');
SELECT * FROM host_gpu_mapping ORDER BY hostname, gpu_descr;

 hostname |                                        gpu_descr
----------+------------------------------------------------------------------------------------------
 phoenix0 | device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0
 phoenix0 | device: 1, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:05.0, compute capability: 6.0
 phoenix0 | device: 2, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:06.0, compute capability: 6.0
 phoenix0 | device: 3, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:07.0, compute capability: 6.0
 phoenix1 | device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0
 phoenix1 | device: 1, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:05.0, compute capability: 6.0
 phoenix3 | device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0
 phoenix3 | device: 1, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:05.0, compute capability: 6.0
 phoenix3 | device: 2, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:06.0, compute capability: 6.0
 phoenix3 | device: 3, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:07.0, compute capability: 6.0
 phoenix4 | device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0
 phoenix4 | device: 1, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:05.0, compute capability: 6.0
 phoenix4 | device: 2, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:06.0, compute capability: 6.0
 phoenix4 | device: 3, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:07.0, compute capability: 6.0
(14 rows)

OK
(2)
nvidia-smi info
DROP TABLE IF EXISTS host_gpu_mapping_nvidia;
SELECT * FROM madlib.gpu_configuration('host_gpu_mapping_nvidia', -- output table
                                       'nvidia'                   -- source for GPU info
                                       );
SELECT * FROM host_gpu_mapping_nvidia ORDER BY hostname, gpu_descr;

 hostname |                                  gpu_descr
----------+------------------------------------------------------------------------------
 phoenix0 | GPU 0: Tesla P100-PCIE-16GB (UUID: GPU-f2ccc77e-2501-f6ee-4754-069dda256fb2)
 phoenix0 | GPU 1: Tesla P100-PCIE-16GB (UUID: GPU-b1fc40ca-c7c6-bc86-f20f-6e9a62cda3f8)
 phoenix0 | GPU 2: Tesla P100-PCIE-16GB (UUID: GPU-d93bb21b-96f9-7c1d-3bab-cdd92b7bbc9d)
 phoenix0 | GPU 3: Tesla P100-PCIE-16GB (UUID: GPU-2d79c4a8-479e-2f33-39f8-3ba80b63f830)
 phoenix1 | GPU 0: Tesla P100-PCIE-16GB (UUID: GPU-0af6bb1e-5b5b-4988-ad3a-a917e9584702)
 phoenix1 | GPU 1: Tesla P100-PCIE-16GB (UUID: GPU-d824c976-a8aa-ef26-a13c-9a9a7fe86bfd)
 phoenix3 | GPU 0: Tesla P100-PCIE-16GB (UUID: GPU-3681d0b6-1ec6-0453-fd81-29d88e549cd9)
 phoenix3 | GPU 1: Tesla P100-PCIE-16GB (UUID: GPU-d4b1f2e7-b238-ac9a-bbfe-918adeb69472)
 phoenix3 | GPU 2: Tesla P100-PCIE-16GB (UUID: GPU-42a32ef1-a60c-e599-c8cf-0e669111ab6f)
 phoenix3 | GPU 3: Tesla P100-PCIE-16GB (UUID: GPU-1cce09c4-6856-8031-be0b-8e8bbf9a10f3)
 phoenix4 | GPU 0: Tesla P100-PCIE-16GB (UUID: GPU-a71bdc18-fdd5-ba25-617e-19b23cc8e827)
 phoenix4 | GPU 1: Tesla P100-PCIE-16GB (UUID: GPU-f9d13688-7fe6-a029-24d1-985a5659f18f)
 phoenix4 | GPU 2: Tesla P100-PCIE-16GB (UUID: GPU-06a7f54b-c07a-e87a-20d6-09bd99b19531)
 phoenix4 | GPU 3: Tesla P100-PCIE-16GB (UUID: GPU-af3b32f3-8bd9-cb75-a8fb-25253b9da926)
(14 rows)

OK
(3)
get the list of segments on hosts with at least 1 GPU attached:
SELECT * FROM gp_segment_configuration WHERE role='p' AND content>=0 ORDER BY hostname, dbid;

 dbid | content | role | preferred_role | mode | status | port  | hostname | address  | replication_port
------+---------+------+----------------+------+--------+-------+----------+----------+------------------
    2 |       0 | p    | p              | c    | u      | 40000 | phoenix0 | phoenix0 |            70000
    3 |       1 | p    | p              | c    | u      | 40001 | phoenix0 | phoenix0 |            70001
    4 |       2 | p    | p              | c    | u      | 40002 | phoenix0 | phoenix0 |            70002
    5 |       3 | p    | p              | c    | u      | 40003 | phoenix0 | phoenix0 |            70003
    6 |       4 | p    | p              | c    | u      | 40000 | phoenix1 | phoenix1 |            70000
    7 |       5 | p    | p              | c    | u      | 40001 | phoenix1 | phoenix1 |            70001
    8 |       6 | p    | p              | c    | u      | 40002 | phoenix1 | phoenix1 |            70002
    9 |       7 | p    | p              | c    | u      | 40003 | phoenix1 | phoenix1 |            70003
   10 |       8 | p    | p              | c    | u      | 40000 | phoenix2 | phoenix2 |            70000
   11 |       9 | p    | p              | c    | u      | 40001 | phoenix2 | phoenix2 |            70001
   12 |      10 | p    | p              | c    | u      | 40002 | phoenix2 | phoenix2 |            70002
   13 |      11 | p    | p              | c    | u      | 40003 | phoenix2 | phoenix2 |            70003
   14 |      12 | p    | p              | c    | u      | 40000 | phoenix3 | phoenix3 |            70000
   15 |      13 | p    | p              | c    | u      | 40001 | phoenix3 | phoenix3 |            70001
   16 |      14 | p    | p              | c    | u      | 40002 | phoenix3 | phoenix3 |            70002
   17 |      15 | p    | p              | c    | u      | 40003 | phoenix3 | phoenix3 |            70003
   18 |      16 | p    | p              | c    | u      | 40000 | phoenix4 | phoenix4 |            70000
   19 |      17 | p    | p              | c    | u      | 40001 | phoenix4 | phoenix4 |            70001
   20 |      18 | p    | p              | c    | u      | 40002 | phoenix4 | phoenix4 |            70002
   21 |      19 | p    | p              | c    | u      | 40003 | phoenix4 | phoenix4 |            70003
(20 rows)

DROP TABLE IF EXISTS segments_to_use;
CREATE TABLE segments_to_use AS
  SELECT DISTINCT dbid, hostname FROM gp_segment_configuration JOIN host_gpu_mapping_nvidia USING (hostname)
  WHERE role='p' AND content>=0;
SELECT * FROM segments_to_use ORDER BY hostname, dbid;

 dbid | hostname
------+----------
    2 | phoenix0
    3 | phoenix0
    4 | phoenix0
    5 | phoenix0
    6 | phoenix1
    7 | phoenix1
    8 | phoenix1
    9 | phoenix1
   14 | phoenix3
   15 | phoenix3
   16 | phoenix3
   17 | phoenix3
   18 | phoenix4
   19 | phoenix4
   20 | phoenix4
   21 | phoenix4
(16 rows)

OK
LGTM

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/madlib-pr-build/1147/

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/madlib-pr-build/1148/

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/madlib-pr-build/1149/

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/madlib-pr-build/1150/

jenkins retest this please

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/madlib-pr-build/1151/

jenkins retest this please

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/madlib-pr-build/1152/


Add three app links

Added three sample apps (two for Apple Watch and the other one shows how to implement several kinds of persistence approaches).
I added three of them because the list is so small for the time being. Do you prefer that I make a PR for each addition?
Project URL
https://github.com/BalestraPatrick/AppleWatchCalculator
https://github.com/FancyPixel/done-swift
https://github.com/dkhamsing/how-much
Description
Added three distinct sample apps that demonstrate:

how beginners can develop Apple Watch apps
how to interact with Firebase
how to use Realm (the database) to store data
how to use User Defaults to store data

Why it should be included to example-ios-apps (optional)
Checklist

[  ] Only one project/change is in this pull request
[ x ] Addition in chronological order (bottom of category)
[ x ] Supports iOS 9 / tvOS 10 or later
[ x ] Supports Swift 3 or later
[ x ] Has a commit from less than 2 years ago
[ x ] Has a clear README in English

@NSMyself  thanks for PR. Merged!

@NSMyself Please see your name in contributor list here


Modify default index.html (dist folder)

What problem does this feature solve?
I have async middleware. In the first load I wait to load crucial data for the app.
While is loading data it shows Nuxt default index.html page (white background with spinner).
It should be customizable. After all I want to decide what show to client while it waiting.
What does the proposed changes look like?
In nuxt.config.js add:
defaultHtml: 'pathToCustomHtml/index.html'

This feature request is available on Nuxt community (#c9260)

It is possible indeed: https://nuxtjs.org/api/configuration-loading-indicator/
You can also pass to your own loading.html. See: https://stackoverflow.com/questions/53194999/how-can-i-create-a-custom-loading-indicator-in-nuxt-js

@pi0 your right. Sorry I didn't understand properly this property when searching docs. I thought it was related to loading property.
Sorry and thanks!


vendor/ciao: update ciao

This new version of ciao contains changes needed to
hot plug PCI devices on PCI bridges
Short log:
dac598c qemu/qmp: Implement function to hot plug PCI devices
7ce213b qemu: Implement Bridge struct
7dff729 ciao-down: Remove ciao-down
b1bdb97 ciao-controller: as part of workload validation check image/volume
8d84182 ciao-controller: use more concise typed switch
3d7ce05 ciao-controller: rename source files to reflect removal of openstack
e66410a ciao-controller: move and reword compute api to ciao api
6b2d9ac ciao-controller: when deleting tenant also delete from quota service
c77e1a0 ciao-controller: Add support for deleting tenants in quota service
2661955 ciao-controller: Introduce instances API
475d2b5 openstack/compute: unexport ListServersDetails
9cab630 ciao-controller: remove os prefix from attach/detach commands
3304a58 ciao-controller: rename types.BlockData to types.Volume
45f8099 ciao-controller: rename openstack_volume.go
dd1f601 ciao-controller, ciao-cli: move volume APIs to ciao API endpoint
76f9995 openstack/block, ciao-cli: simplify struct used for request
8c3c29d openstack/block: Remove unused structures and defines
b651128 openstack/block, ciao-controller: use types.BlockData in API
f4b2a64 openstack/block: move detailed listing to normal endpoint
93d905f sqlite3db: Work around Go 1.8 conversion difference
167a8d5 ciao-image: Remove ciao-image directory
69619d1 ciao-controller: Remove use of ciao-image datastore
a34c224 ciao-controller: Switch API endpoint over to using datastore
3b842b7 datastore: add functionality to add/update/delete/fetch images
394deb7 datastore: import images data from database into cache
6660e73 datastore: Add database code for storing images into the database
113bcaf Networking: Add support for handling macvtap interfaces
768d90e uuid: Move the uuid package into its own top level directory
b2bc0ab ciao-controller: rename openstack_image.go
111322d ciao-controller: Add images to ciao api links
c1f6dd9 ciao-controller: Remove unused error constants from image service
7f15624 ciao-controller: Remove now unused structures and consts
87496fd ciao-controller, ciao-cli: Remove unused fields from image request
68502f8 ciao-controller: Use types.Image in image API
22e04ab ciao-controller: Remove NoContentImageResponse from the API
324c5d4 ciao-controller: move Image structure to types package
92b0878 ciao-controller: Remove unused image type field and enum
676fa5e ciao-controller: move Visibility enum to types package
b138854 ciao-controller: use single types.ImageState enum
b0aea03 ciao-controller: Import openstack image API as a ciao API
ecabdc7 ciao-controller: Don't update volumes on stats reception
9630057 ciao-launcher: Cleanup if device_add fails
3588f43 ciao-launcher: Fix live attach of volumes with qemu 2.9
9098a98 bat: Run some image BAT tests as non-admin user
7a361db bat: Remove unused bat.UploadImage
96bd26b openstack/block: Remove unused API for getting limits
fb02316 singlevm: Fix storage tests
dd17576 openstack/compute: Remove flavor API
5f764ed ciao-cli: Use workload API for listing workloads
fd08780 ciao-controller: Add API entrypoints for listing workloads
1a26ce2 openstack/compute: Make workload filtering use "workload"
d5cfa99 openstack/compute: put workload ID in details struct
979ab37 bat: Change references to FlavorID to WorkloadID
e89a6f7 openstack/compute: Rename Flavor to WorkloadID in create request
44223dc openstack/compute, bat: standardise on NodeID
c2ab924 openstack/compute: rename OsExtendedVolumesVolumesAttached
3d165fb openstack/compute: Simplify the way we store use IP/MAC addresses
4a30edc openstack/compute: Remove unused fields from ServerDetails struct
ad579e7 openstack/compute: Remove mostly unused Image field
c5eea77 opentstack/compute: Remove unused fields from Addresses struct
Signed-off-by: Julio Montes<EMAIL_ADDRESS>

Coverage remained the same at 65.986% when pulling 7f93fbc4ab407ccab1dd56d10cd8eb5809bdd3ca on devimc:vendor/update_ciao into e3d41a0925a90e5704ad9fe46618da2fbba2726f on containers:master.

Coverage remained the same at 65.986% when pulling 7f93fbc4ab407ccab1dd56d10cd8eb5809bdd3ca on devimc:vendor/update_ciao into e3d41a0925a90e5704ad9fe46618da2fbba2726f on containers:master.

Coverage remained the same at 65.986% when pulling 80834243b3cb64d696f32c73289453950b3f537b on devimc:vendor/update_ciao into 981b57509cbbbde4379c2afd2d64e11732005243 on containers:master.

lgtm

@devimc please rebase this PR

@sboeuf  done

Coverage remained the same at 65.619% when pulling b332097cd01537a6096c842a7826d0cdc058139f on devimc:vendor/update_ciao into 651373671f63e72be86eba066f781ee45fdfc800 on containers:master.


Add anysize patch

Fix for st -e 'nvim' on awesomewm
From issue https://github.com/siduck/st/issues/23

@tuwuna I meant updating the readme for cautioning awesomewm users about the weird gaps behaviour! not adding the patch.


Steps count in dashboard displays 0 even though there are logged steps

This is the C# version of the issue that was fixed for Java earlier this year.  We're using the latest build which I believe is 4.0.3

@Brian-Watson Can you check with 4.1.0-alpha3?

@anshooarora We are using C3 ver 4.1.0 and not able to see the Steps count displayed like in your sample.
Here is ours:

Here is from your site:


Normalize FUNCTION_URI directory

From @scothis on February 20, 2018 16:33
Each function invoker places the function to execute in a different location.
Java: /functions
Node: /functions
Python: /
Shell: /
We should always place functions into an empty directory since it's possible the function name could collide with a legitimate file path.
Copied from original issue: projectriff/riff-cli#50

From @markfisher on February 20, 2018 17:44
maybe /riff?

Not relevant anymore.


Review count error

The review count seems to have no connection to the actual reviews visible

Clean up the data


[Suggestion] Config option to disable glasses on tablet

I would like to add OCGlasses to my server, but I would like to avoid crashes due to issue #92, I was wondering if you could add a config option to disable the component on tablets, forcing you to use a computer.

Try follow mod for remove packet size limit at client
https://github.com/gamerforEA/Minecraft-PacketUnlimiter

Try follow mod for remove packet size limit at client
https://github.com/gamerforEA/Minecraft-PacketUnlimiter


Tests failure

Steps to reproduce:

Clone the repo.
Set up a plain virtual environment venv for the repo with Python 3.6.
Run pip install . (using the [--editable] didn't work and there was some error, so I just removed it)
Run pip install spacy ftfy==4.4.3 and python -m spacy download en -- SUCCESSFUL.
Run pip install pytest -- SUCCESSFUL.
Run python -m pytest -sv tests/ -- FAILURE with error below.

tests/modeling_gpt2_test.py::GPT2ModelTest::test_config_to_json_string PASSED
tests/modeling_gpt2_test.py::GPT2ModelTest::test_default dyld: lazy symbol binding failed: Symbol not found: _PySlice_Unpack
  Referenced from: /Users/XYZ/PycharmProjects/pytorch-pretrained-BERT/venv/lib/python3.6/site-packages/torch/lib/libtorch_python.dylib
  Expected in: flat namespace

dyld: Symbol not found: _PySlice_Unpack
  Referenced from: /Users/XYZ/PycharmProjects/pytorch-pretrained-BERT/venv/lib/python3.6/site-packages/torch/lib/libtorch_python.dylib
  Expected in: flat namespace

Abort trap: 6

In case it helps, these are the packages in my venv after I perform the first 5 steps.
atomicwrites | 1.3.0 | 1.3.0
attrs | 18.2.0 | 18.2.0
boto3 | 1.9.98 | 1.9.98
botocore | 1.12.98 | 1.12.98
certifi | 2018.11.29 | 2018.11.29
chardet | 3.0.4 | 3.0.4
cymem | 2.0.2 | 2.0.2
cytoolz | <IP_ADDRESS> | <IP_ADDRESS>
dill | 0.2.9 | 0.2.9
docutils | 0.14 | 0.14
en-core-web-sm | 2.0.0 |
ftfy | 4.4.3 | 5.5.1
html5lib | 1.0.1 | 1.0.1
idna | 2.8 | 2.8
jmespath | 0.9.3 | 0.9.3
more-itertools | 6.0.0 | 6.0.0
msgpack | 0.5.6 | 0.6.1
msgpack-numpy | <IP_ADDRESS> | <IP_ADDRESS>
murmurhash | 1.0.2 | 1.0.2
numpy | 1.16.1 | 1.16.1
pip | 19.0.2 | 19.0.2
plac | 0.9.6 | 1.0.0
pluggy | 0.8.1 | 0.8.1
preshed | 2.0.1 | 2.0.1
py | 1.7.0 | 1.7.0
pytest | 4.3.0 | 4.3.0
python-dateutil | 2.8.0 | 2.8.0
pytorch-pretrained-bert | 0.6.1 | 0.6.1
regex | 2018.1.10 | 2019.02.20
requests | 2.21.0 | 2.21.0
s3transfer | 0.2.0 | 0.2.0
setuptools | 39.1.0 | 40.8.0
six | 1.12.0 | 1.12.0
spacy | 2.0.18 | 2.0.18
thinc | 6.12.1 | 7.0.1
toolz | 0.9.0 | 0.9.0
torch | 1.0.1.post2 | 1.0.1.post2
tqdm | 4.31.1 | 4.31.1
ujson | 1.35 | 1.35
urllib3 | 1.24.1 | 1.24.1
wcwidth | 0.1.7 | 0.1.7
webencodings | 0.5.1 | 0.5.1
wrapt | 1.10.11 | 1.11.1

Update:
I manually uninstalled PyTorch (torch | 1.0.1.post2 | 1.0.1.post2 in the list above) from my venv and installed PyTorch 0.4.0 (I couldn't find the whl file for 0.4.1 for Mac OS, which is my platform) by running
pip install https://download.pytorch.org/whl/torch-0.4.0-cp36-cp36m-macosx_10_7_x86_64.whl
I then ran the tests and I saw that 25 tests passed.
So I have just a couple questions at this point:

Given that the requirements.txt file states that the expected torch version is >= 0.4.1, and the above observation that 25 tests passed with torch 0.4.0, would all the code in this repo work with 0.4.0?

It is clear that the error described above occurs when using the latest version of torch, specifically torch 1.0.1.post2, but not with 0.4.0. Could you please make the requisite changes to your repo to support 1.0.1.post2?

Thanks!

Update:
Was able to find the whl for 0.4.1, so I uninstalled 0.4.0 from my venv and installed 0.4.1. Ran the tests again and 25 tests passed. So question 1 above is irrelevant now. Could I have an answer for question 2?

Hi Karthik,
On my fresh install with pytorch 1.0.1.post2 (python 3.7) all 25 tests pass without error (also on the continuous integration by the way).
Maybe try to create a clean environment? You don't have to install pytorch prior to pytorch-pretrained-bert, it's a dependency.

Hi Thomas,
I did start off with a clean virtual environment and I didn't install PyTorch prior to pytorch-pretrained-bert because I saw it was a dependency. The only difference I see between what you've described above and what I did is the version of Python: you used 3.7 while I used 3.6. Maybe that has something to do with this?

Tested on a clean python 3.6 install and all the tests pass.
Honestly there is not much more I can do at this stage.
Closing for now. Feel free to re-open if you find something.


Orchestra Pods are utilising memory keep restarting when hitting the limits

Please find the utilisation trend for orchestra pods and the status of the orchestra pods on the command line

@mlbiam I request you to please check this issue.
When we are decribing orchestra pods it is showing below errors:
  Normal   Pulling    12m   kubelet            Pulling image "mckinsey-cngccp-docker-k8s.jfrog.io/openunison-k8s-login-oidc:6e2748ab663d4dd1a2f0039278e05decf8adea5135be16cd0dabedd1946076e4"
  Normal   Pulled     11m   kubelet            Successfully pulled image "mckinsey-cngccp-docker-k8s.jfrog.io/openunison-k8s-login-oidc:6e2748ab663d4dd1a2f0039278e05decf8adea5135be16cd0dabedd1946076e4" in 20.304641249s
  Normal   Created    11m   kubelet            Created container openunison-orchestra
  Normal   Started    11m   kubelet            Started container openunison-orchestra
  Warning  Unhealthy  11m   kubelet            Readiness probe failed: Traceback (most recent call last):
  File "/usr/local/openunison/bin/check_alive.py", line 18, in <module>
    res = urllib2.urlopen(url_to_test,context=ctx).read()
  File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 447, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1248, in https_open
    context=self._context)
  File "/usr/lib/python2.7/urllib2.py", line 1205, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 111] Connection refused>

Please let us know where we can check memory leak or how to debug..
Regards
Shobhit

Is the problem continuing to happen?  How often?
openunison-k8s-login-oidc has been out of support since 12/31/2022.  I'll do my best to help, but if there's a bug that needs to be fixed, it will not go into this container (We supported openunison-k8s-login-oidc for over a year after we moved to openunison-k8s)
How long has openunison been running on this cluster prior to the issues?
What changed prior to the spike in resource utilization?
Are you storing logs?  Are there any errors or Exceptions in the logs for orchestra?
Are you using Prometheus (or something compatible) that can hit OpenUnison's metrics endpoint?  That will give us much better stats as to concurrent users, stack utilization, etc - https://openunison.github.io/knowledgebase/prometheus/
Please provide your values.yaml

Hi @mlbiam ,
Its keep on restarting in few interval of time with reason as error and we observed memory spikes at the same time when it hits its memory limits. We tried to increase limits as well but it is keep on consuming all it limits. Below is the error which we observed in the logs:-
[2023-02-16 10:58:45,991][main] WARN  UrlHolder - Could not process url : ''
java.net.MalformedURLException: no protocol:
	at java.net.URL.<init>(URL.java:645) ~[?:?]
	at java.net.URL.<init>(URL.java:541) ~[?:?]
	at java.net.URL.<init>(URL.java:488) ~[?:?]
	at com.tremolosecurity.config.util.UrlHolder.<init>(UrlHolder.java:125) [unison-sdk-1.0.24.jar:?]
	at com.tremolosecurity.config.util.UnisonConfigManagerImpl.addAppInternal(UnisonConfigManagerImpl.java:733) [unison-server-core-1.0.24.jar:?]
	at com.tremolosecurity.config.util.UnisonConfigManagerImpl.loadApplicationObjects(UnisonConfigManagerImpl.java:634) [unison-server-core-1.0.24.jar:?]
	at com.tremolosecurity.config.util.UnisonConfigManagerImpl.initialize(UnisonConfigManagerImpl.java:427) [unison-server-core-1.0.24.jar:?]
	at com.tremolosecurity.filter.UnisonServletFilter.init(UnisonServletFilter.java:360) [unison-server-core-1.0.24.jar:?]
	at com.tremolosecurity.openunison.OpenUnisonServletFilter.init(OpenUnisonServletFilter.java:118) [open-unison-classes-1.0.24.jar:?]
	at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:111) [undertow-servlet-2.2.12.Final.jar:2.2.12.Final]
	at io.undertow.servlet.core.ManagedFilter.createFilter(ManagedFilter.java:80) [undertow-servlet-2.2.12.Final.jar:2.2.12.Final]
	at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:594) [undertow-servlet-2.2.12.Final.jar:2.2.12.Final]
	at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:559) [undertow-servlet-2.2.12.Final.jar:2.2.12.Final]
	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42) [undertow-servlet-2.2.12.Final.jar:2.2.12.Final]
	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) [undertow-servlet-2.2.12.Final.jar:2.2.12.Final]
	at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:601) [undertow-servlet-2.2.12.Final.jar:2.2.12.Final]
	at com.tremolosecurity.openunison.undertow.OpenUnisonOnUndertow.main(OpenUnisonOnUndertow.java:353) [openunison-on-undertow-1.0.24.jar:?]
[2023-02-16 10:58:46,013][main] INFO  BrokerHolder - Starting KahaDB with path /tmp/amq/unison-mq-local
[2023-02-16 10:58:46,199][main] INFO  BrokerService - Loaded the Bouncy Castle security provider at position: -1
[2023-02-16 10:58:46,202][main] INFO  BrokerHolder - Waiting for broker to start...
[2023-02-16 10:58:46,487][Thread-0] INFO  BrokerService - Using Persistence Adapter: KahaDBPersistenceAdapter[/tmp/amq/unison-mq-local]
[2023-02-16 10:58:47,302][Thread-0] INFO  PListStoreImpl - PListStore:[/tmp/unison-tmp-mq-local] started

We are checking on prometheus possibilities.
Regards
Shobhit

That's a startup warning and can be ignored. What is the interval?  Hourly? Daily?
Also, please provide logs from when the spike happens.
Finally, how long has this cluster been running openunison? Since the version you are running is pretty old, if there is a bug it's likely being triggered by something specific to your environment.

values.yaml for affected one:
================================Deployment_data
liveness_probe_command:
- /usr/local/openunison/bin/check_alive.py
node_selectors: []
pull_secret: jfrog-auth
readiness_probe_command:
- /usr/local/openunison/bin/check_alive.py
- https://<IP_ADDRESS>:8443/auth/idp/k8sIdp/.well-known/openid-configuration
- issuer
resources:
limits:
cpu: 500m
memory: 2.5Gi
requests:
cpu: 200m
memory: 1024Mi
tokenrequest_api:
audience: api
enabled: false
expirationSeconds: 14400
dest_secret: orchestra
enable_activemq: false
hosts:

annotations:

name: certmanager.k8s.io/cluster-issuer
value: letsencrypt
name: kubernetes.io/ingress.class
value: openunison
ingress_name: openunison
ingress_type: nginx
names:
env_var: OU_HOST
name: login-mvp01-stg-us-east-1-aws.cf.platform.mckinsey.cloud
env_var: K8S_DASHBOARD_HOST
name: dashboard-mvp01-stg-us-east-1-aws.cf.platform.mckinsey.cloud
env_var: K8S_API_HOST
name: ou-api-mvp01-stg-us-east-1-aws.cf.platform.mckinsey.cloud
service_name: kube-oidc-proxy-orchestra
secret_name: ou-tls-certificate
image: mckinsey-cngccp-docker-k8s.jfrog.io/openunison-k8s-login-oidc:6e2748ab663d4dd1a2f0039278e05decf8adea5135be16cd0dabedd1946076e4
key_store:
key_pairs:
create_keypair_template:

name: ou
value: MVP01 Stg
name: o
value: Stg
name: l
value: MVP01
name: st
value: North Virginia
name: c
value: US
keys:
create_data:
ca_cert: true
key_size: 2048
server_name: openunison-orchestra.openunison.svc
sign_by_k8s_ca: false
subject_alternative_names:

ou-api-mvp01-stg-us-east-1-aws.cf.platform.mckinsey.cloud
import_into_ks: keypair
name: unison-tls

create_data:
ca_cert: true
delete_pods_labels:

k8s-app=kubernetes-dashboard
key_size: 2048
secret_info:
cert_name: dashboard.crt
key_name: dashboard.key
type_of_secret: Opaque
server_name: kubernetes-dashboard.kubernetes-dashboard.svc
sign_by_k8s_ca: false
subject_alternative_names: []
target_namespace: kubernetes-dashboard
import_into_ks: certificate
name: kubernetes-dashboard
replace_if_exists: true
tls_secret_name: kubernetes-dashboard-certs

create_data:
ca_cert: true
key_size: 2048
server_name: unison-saml2-rp-sig
sign_by_k8s_ca: false
subject_alternative_names: []
import_into_ks: keypair
name: unison-saml2-rp-sig
static_keys:

name: session-unison
version: 1
name: lastmile-oidc
version: 1
trusted_certificates: []
update_controller:
days_to_expire: 10
image: docker.io/tremolosecurity/kubernetes-artifact-deployment:1.1.0
schedule: 0 2 * * *
myvd_configmap: ""
non_secret_data:

name: K8S_URL
value: https://ou-api-mvp01-stg-us-east-1-aws.cf.platform.mckinsey.cloud
name: SESSION_INACTIVITY_TIMEOUT_SECONDS
value: "36000"
name: K8S_DASHBOARD_NAMESPACE
value: kubernetes-dashboard
name: K8S_DASHBOARD_SERVICE
value: kubernetes-dashboard
name: K8S_CLUSTER_NAME
value: mvp01-stg-us-east-1-aws.cf.platform.mckinsey.cloud
name: K8S_IMPERSONATION
value: "true"
name: PROMETHEUS_SERVICE_ACCOUNT
value: system:serviceaccount:monitoring:prometheus-k8s
name: OIDC_CLIENT_ID
value: 0oa7xnn4coSsw1dvD357
name: OIDC_IDP_AUTH_URL
value: https://e52416c3-mckid-us.okta.com/oauth2/v1/authorize
name: OIDC_IDP_TOKEN_URL
value: https://e52416c3-mckid-us.okta.com/oauth2/v1/token
name: OIDC_IDP_LIMIT_DOMAIN
value: ""
name: SUB_CLAIM
value: sub
name: EMAIL_CLAIM
value: email
name: GIVEN_NAME_CLAIM
value: given_name
name: FAMILY_NAME_CLAIM
value: family_name
name: DISPLAY_NAME_CLAIM
value: name
name: GROUPS_CLAIM
value: groups
name: OIDC_USER_IN_IDTOKEN
value: "false"
name: OIDC_IDP_USER_URL
value: https://e52416c3-mckid-us.okta.com/oauth2/v1/userinfo
name: OIDC_SCOPES
value: openid email profile groups
name: OU_SVC_NAME
value: openunison-orchestra.openunison.svc
name: K8S_TOKEN_TYPE
value: legacy
openunison_network_configuration:
activemq_dir: /tmp/amq
allowed_client_names: []
ciphers:

TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
client_auth: none
force_to_secure: true
open_external_port: 80
open_port: 8080
path_to_deployment: /usr/local/openunison/work
path_to_env_file: /etc/openunison/ou.env
quartz_dir: /tmp/quartz
secure_external_port: 443
secure_key_alias: unison-tls
secure_port: 8443
replicas: 1
secret_data:

K8S_DB_SECRET
unisonKeystorePassword
OIDC_CLIENT_SECRET
source_secret: orchestra-secrets-source

thanks for providing the config.  nothing stands out.  Still need to understand:

How long has this cluster been running with openunison?
What changed?
Logs from when the spike occurred

Thanks


[Bug] Docker secrets not working

Summary
I use Docker secrets to mount my database passwords, and the current release (v3.2.1) is not working with them. I'm getting a password prompt, both for MariaDB 10 and Postgres 14. Passing the password as an env var is working as a workaround.
Steps to reproduce

Create a docker-compose.yml similar to the following:

version: '3.7'

services:
  db:
    image: postgres:14
    restart: on-failure:5
    volumes:
      - /srv/test/db:/var/lib/postgresql/data
    secrets:
      - POSTGRES_PASSWORD
    environment:
      POSTGRES_PASSWORD_FILE: "/run/secrets/POSTGRES_PASSWORD"
      POSTGRES_USER: "test"
      POSTGRES_DB: "test"
    networks:
      - backend

  backup:
    image: tiredofit/db-backup:latest
    restart: on-failure:5
    volumes:
      - /srv/test/backups:/backup
    secrets:
      - POSTGRES_PASSWORD
    environment:
      COMPRESSION: "xz"
      DB_TYPE: "pgsql"
      DB_HOST: "db"
      DB_NAME: "test"
      DB_USER: "test"
      DB_PASS_FILE: "/run/secrets/POSTGRES_PASSWORD"
      DB_DUMP_BEGIN: "0001"
      DB_CLEANUP_TIME: "14400"  # 14400 min = 10 days
      ENABLE_CHECKSUM: "false"
    depends_on:
      - db
    networks:
      - backend

networks:
  backend:

secrets:
  POSTGRES_PASSWORD:
    file: /srv/test/POSTGRES_PASSWORD.txt

Run cat mypassword > /srv/test/POSTGRES_PASSWORD.txt to give the DB a password
Run docker-compose up -d to bring everything online
Run docker-compose exec backup backup-now and get prompted to enter a password

What is the expected correct behavior?
Backup should be created.
Relevant logs and/or screenshots
** Performing Manual Backup
2022-04-11.02:38:52 [DEBUG] ** [db-backup] Looking for existence of DB_NAME environment variable
2022-04-11.02:38:52 [DEBUG] ** [db-backup] Detected Manual Mode
2022-04-11.02:38:52 [DEBUG] ** [db-backup] Backup routines started time: 2022-04-11 02:38:52 GMT
2022-04-11.02:38:52 [DEBUG] ** [db-backup] Databases Found: test
2022-04-11.02:38:52 [NOTICE] ** [db-backup] Dumping PostgresSQL database: 'test' and compressing with 'xzip:3' with '16' threads
Password:

(prompt for password causes the container to hang)
Environment

Image version / tag:  Docker image v3.2.1
Host OS: Ubuntu 20.04

Possible fixes
Seems similar to #46 (which was also a report I made 😄). The code has moved around since then, but the changes I made in #47 to fix it are still intact, so I don't think it's the same root cause.
I'm thinking it might be a result of changes for v3, but haven't had the time to deep dive yet.

Might have something, this chunk:
#!/command/with-contenv bash

source /assets/functions/00-container
source /assets/functions/10-db-backup
source /assets/defaults/10-db-backup
PROCESS_NAME="db-backup"
CONTAINER_LOG_LEVEL=DEBUG

bootstrap_variables

The source /assets/defaults/10-db-backup is happening before bootstrap_variables, which means dbpass never gets set. I'm not clear how this is working with environment variables either though, seems like it should be fully broken...

I remember this from a few years ago. I'm still not using secrets, so my apologies on this regression. The lowercase var_names was a holdout from many years back and TBH I can't even remember why we started using them. Anyways, things have changed and they have been stripped entirely from the code. Latest version 3.2.2 should give you results what you are expecting. Let me know the results please.
@ProgrammerPepe The file_env function resides sits in /assets/functions/00-container which is a part of tiredofit/alpine | tiredofit/debian as a base image.

Thanks for the quick response. Unfortunately I still can't get it to work. There is part of my compose file:
 mysql-backup:     image: tiredofit/db-backup:3.2.2     deploy:       mode: replicated       replicas: 1     env_file:       - env-files/backup-mysql.env     environment:       - S3_KEY_ID_FILE=/run/secrets/test_secret     secrets:       - test_secret
And the console output inside the container
`/ # echo $S3_KEY_ID
/ # echo $S3_KEY_ID_FILE
/run/secrets/test_secret
/ # ls /run/secrets/
test_secret
`

It's working now. Many thanks @tiredofit for the fix, and again for the great tool. Still the best I've found. 👏


Writing to SD card fails in diskio_sdmmc: sdmmc_erase_sectors failed (262) (IDFGH-7094)

Environment

Module or chip used:  ESP32-WROVER-I
IDF version: v5.0-dev-2281-ge3c0229d2e
Build System: idf.py
Compiler version: xtensa-esp32-elf-gcc (crosstool-NG esp-2021r2-patch3) 8.4.0
Operating System: Windows

Problem Description
TL;DR
File write operations on SD cards having DISCARD or FULE support fail. This bug was introduced with the commits 964592 and ffdbee
In-depth explanation
My ESP32 is connected to an SD card. The ESP32 performs lots of read and write operations on files on the SD card. Before the commits mentioned above came in, everything was fine. After these commits came in, I noticed that on some types of SD cards errors occur during file write operations. The following error message appears on the serial log output for every failed operation:
E (13146) diskio_sdmmc: sdmmc_erase_sectors failed (262)
I further investigated the bug and found that this error occurs only on some types of SD cards. To find the difference between the cards I wrote the following code to dump the SD card registers:
    sdmmc_host_t host = SDMMC_HOST_DEFAULT();
    sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT();
    esp_vfs_fat_sdmmc_mount_config_t mount_config = {
        .format_if_mount_failed = false,
        .max_files = 10,
        .allocation_unit_size = 0 // auto / equals sector size of 512 bytes
    };
    sdmmc_card_t* card;
    ESP_ERROR_CHECK(esp_vfs_fat_sdmmc_mount("/sd", &host, &slot_config, &mount_config, &card));

    ESP_LOGI(TAG, "SD card info:");
    ESP_LOGI(TAG, "\tBus width (log2): %d", card->log_bus_width);
    ESP_LOGI(TAG, "\tFreq (kHz): %d", card->max_freq_khz);
    ESP_LOGI(TAG, "\tDDR: %d", card->is_ddr);
    ESP_LOGI(TAG, "\tCID: Date %d, MFG_ID %d, Name %s, OEM ID %d, Rev %d, Serial %d", card->cid.date, card->cid.mfg_id, card->cid.name, card->cid.oem_id, card->cid.revision, card->cid.serial);
    ESP_LOGI(TAG, "\tCSD: Capacity %d, Card Common Class %d, CSD version %d, MMC version %d, read block len %d, sector size %d, tr speed %d", card->csd.capacity, card->csd.card_command_class, card->csd.csd_ver, card->csd.mmc_ver, card->csd.read_block_len, card->csd.sector_size, card->csd.tr_speed);
    ESP_LOGI(TAG, "\tCSD: Ease mem state %d, Power class %d, Revision %d, Sec feature %d", card->ext_csd.erase_mem_state, card->ext_csd.power_class, card->ext_csd.rev, card->ext_csd.sec_feature);
    ESP_LOGI(TAG, "\tSCR: bus width %d, erase mem state %d, reserved %d, rsvd_mnf %d, sd_spec %d", card->scr.bus_width, card->scr.erase_mem_state, card->scr.reserved, card->scr.rsvd_mnf, card->scr.sd_spec);
    ESP_LOGI(TAG, "\tSSR: cur_bus_width %d, discard_support %d, fule_support %d, reserved %d", card->ssr.cur_bus_width, card->ssr.discard_support, card->ssr.fule_support, card->ssr.reserved);

I tested two types of SD cards, the SanDisk Ultra doesn't work, the Samsung EVO works fine. Here the is the log output for both cards:
SanDisk Ultra 32GB Class 10:
I (2247) SD Card: SD card info:
I (2247) SD Card:       Bus width (log2): 2
I (2247) SD Card:       Freq (kHz): 40000
I (2267) SD Card:       DDR: 0
I (2277) SD Card:       CID: Date 347, MFG_ID 3, Name SD32G, OEM ID 21316, Rev 133, Serial<PHONE_NUMBER>
I (2297) SD Card:       CSD: Capacity 62333952, Card Common Class 1461, CSD version 1, MMC version 0, read block len 9, sector size 512, tr speed 50000000
I (2347) SD Card:       CSD: Ease mem state 0, Power class 0, Revision 0, Sec feature 0
I (2367) SD Card:       SCR: bus width 5, erase mem state 0, reserved 0, rsvd_mnf 0, sd_spec 2
I (2397) SD Card:       SSR: cur_bus_width 2, discard_support 1, fule_support 1, reserved 0

Samsung EVO 32GB:
I (2057) SD Card: SD card info:
I (2057) SD Card:       Bus width (log2): 2
I (2067) SD Card:       Freq (kHz): 40000
I (2077) SD Card:       DDR: 0
I (2087) SD Card:       CID: Date 290, MFG_ID 27, Name EB1QT, OEM ID 21325, Rev 48, Serial<PHONE_NUMBER>
I (2117) SD Card:       CSD: Capacity 62521344, Card Common Class 1461, CSD version 1, MMC version 0, read block len 9, sector size 512, tr speed 50000000
I (2157) SD Card:       CSD: Ease mem state 0, Power class 0, Revision 0, Sec feature 0
I (2187) SD Card:       SCR: bus width 5, erase mem state 1, reserved 0, rsvd_mnf 0, sd_spec 2
I (2207) SD Card:       SSR: cur_bus_width 2, discard_support 0, fule_support 0, reserved 0

As you can see, the only significant differences are card->ssr.discard_support and card->ssr.fule_support.
Next, I have checked if I can make the error disappear if I disable these flags on the SanDisk Ultra card manually. To do so, I added the following two lines.
    card->ssr.discard_support = 0;
    card->ssr.fule_support = 0;

Doing so the SanDisk Ultra card with discard and fule support works fine now, too.
The last test I did was disabling TRIM support in the fatfs component. So let's go back and remove the above workaround that disabled discard_support and fule_support. Then go to the file esp-idf/components/fatfs/src/ffconf.h and change the line 238 from #define FF_USE_TRIM 1 to #define FF_USE_TRIM 0. Also this step makes the error disappear and both cards work fine.
So I conclude that there must be an issue with the newly introduced function sdmmc_erase_sectors in the file esp-idf/components/fatfs/diskio/diskio_sdmmc.c
Expected Behavior
All file I/O should succeed even with cards that support DISCARD and FULE.

Hi @zinke-ct-video, thanks for reporting this. I am able to reproduce this behavior. Error code 262 signifies ESP_ERR_NOT_SUPPORTED. This error is reported from line 520 of the file components/sdmmc/sdmmc_cmd.c
I see there is a bug in, validating the CMD38 argument. SDMMC_MMC_TRIM_ARG and SDMMC_SD_DISCARD_ARG have the same value 1 causing the wrong condition check and resulting in ESP_ERR_NOT_SUPPORTED.
You have rightly figured out, disabling FF_USE_TRIM does not invoke sdmmc_erase_sectors
I assure, that the error message on the serial log output: E (13146) diskio_sdmmc: sdmmc_erase_sectors failed (262) has no adverse effect on the filesystem or the data integrity.
Please help to replace lines 519-525 of components/sdmmc/sdmmc_cmd.c (sdmmc_erase_sectors) with the folowing snippet and share your observation with SanDisk Ultra 32GB Class 10
if (card->is_mmc) {
      if ((arg == SDMMC_MMC_TRIM_ARG) && (sdmmc_can_trim(card) != ESP_OK)) {
         return ESP_ERR_NOT_SUPPORTED;
      }
      if ((arg == SDMMC_MMC_DISCARD_ARG) && (sdmmc_can_discard(card) != ESP_OK)) {
         return ESP_ERR_NOT_SUPPORTED;
      }
  } else {
      if ((arg == SDMMC_SD_DISCARD_ARG) && (sdmmc_can_discard(card) != ESP_OK)) {
          return ESP_ERR_NOT_SUPPORTED;
      }
  }

@igrr , I see we can replace the line-80 of components/fatfs/diskio/diskio_sdmmc.c  (information instead of errror to avoid panic)
ESP_LOGE(TAG, "sdmmc_erase_sectors failed (%d)", err);
as
ESP_LOGI(TAG, "sdmmc_erase_sectors returned (%d)", err);

Good to hear that it doesn't affect file system integrity. Just out of curiosity ... What's the purpose of these TRIM and DISCARD commands if file system is also fully functional without them? Performance improvement?
As requested I replaced lines 519-525 of components/sdmmc/sdmmc_cmd.c (sdmmc_erase_sectors) with the code from your response and tested the SanDisk Ultra 32GB Class 10 again. The error doesn't occur anymore.
Thank's a lot for the quick reply and fix!

@zinke-ct-video thanks for the confirmation. TRIM/DISCARD will let the FTL (Flash Translation Layer) of the card to mark the sectors for erasing so that GC (garbage colleciton)can erase these sectors in the background to improve the WRITE performance (implementation is specific to card vendor). With this, WRITE operation need not wait for ERASE to complete in certain cases where sectors are marked as dirty but not erased.

Thanks for the explanation.
Yes, I can confirm this. Both card types I am using are working as expected with your patch.

Can you say where you have added the :
card->ssr.discard_support = 0;     card->ssr.fule_support = 0;?

I think I added this line after the call to the esp_vfs_fat_sdmmc_mount(...) function.
But I want to remind you, that commit 0e366db6 fixes the issue. This means that there is no need to use the workaround anymore unless you have any serious reason not to update your ESP-IDF.

I think I added this line after the call to the esp_vfs_fat_sdmmc_mount(...) function. But I want to remind you, that commit 0e366db fixes the issue. This means that there is no need to use the workaround anymore unless you have any serious reason not to update your ESP-IDF.

I know, it has been fixed, however, i am using 128 GB sd card which apparently works fine with the file system just isn't able to be formatted when using SDMMC(currently i am formatting with SPI then switching to MMC for speed) :)

Okay, this sounds like another bug. Maybe you should open another issue to get help formatting the 128 GB SD card?


How can I animate LineChart?

Ho can I animate the Line on start with this sample?
https://github.com/imaNNeoFighT/fl_chart/blob/master/example/lib/line_chart/samples/line_chart_sample2.dart
https://user-images.githubusercontent.com/9454529/212468711-772bed81-73b8-4b94-82ca-443ec4fe757c.MOV

Hi. Unfortunately, we don't have this feature at the moment.

okay thanks

Hi. Unfortunately, we don't have this feature at the moment.

Is there a timeline for this feature? It sounds like this has been discussed before


Some updates and feature improvements for Cargo.toml

Why not set the STM32F407 as default?

My reasoning concerning STM32F407 as default:

ultimately, this crate will support a lot of different STM32F4 models
statistically, only a few users of this crate will use STM32F407 while most users of this crate will use a different MCU
So having STM32F407 as default means most users will need to specify in their dependency:

default-features = false
features = ["stm32f4??"]

while only a few users will benefit of the default and not need to specify anything.
My proposition ensure that all users of the crate will need to specify only:
features = ["stm32f4??"]

This is more consistent and overall less lines for crates users.

Thanks for the reasoning. I fully agree it's the right thing to do. I kinda like the ability to build something without specifying flags instead of spitting out random and incomprehensible error messages like
# cargo build
   Compiling stm32f4 v0.3.2
error: failed to run custom build command for `stm32f4 v0.3.2`
process didn't exit successfully: `/Users/egger/OSS/stm32f4xx-hal/target/debug/build/stm32f4-67b56206c3d192d2/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-link-search=/Users/egger/OSS/stm32f4xx-hal/target/thumbv7em-none-eabihf/debug/build/stm32f4-b2d3ce9c2bd5071d/out

--- stderr
thread 'main' panicked at 'No device features selected', /Users/egger/.cargo/registry/src/github.com-1ecc6299db9ec823/stm32f4-0.3.2/build.rs:30:18
note: Run with `RUST_BACKTRACE=1` for a backtrace.

so that is something we will need to find a way to improve. Patches welcome, hint, hint. ;)
OTOH selecting a default chip doesn't make a lot of sense for the reasons you've explained and the testing needs to happen on all features anyway to make sure we're not breaking stuff. For that reason I've set up Travis-CI yesterday to watch over the buildability with different MCUs selected.

@aurelj I just remembered one reason to have a default target in there...
# cargo publish
    Updating crates.io index
   Packaging stm32f4xx-hal v0.2.3 (/Users/egger/OSS/stm32f4xx-hal)
   Verifying stm32f4xx-hal v0.2.3 (/Users/egger/OSS/stm32f4xx-hal)
    Updating crates.io index
   Compiling semver-parser v0.7.0
   Compiling proc-macro2 v0.4.20
   Compiling unicode-xid v0.1.0
   Compiling rand_core v0.3.0
   Compiling cortex-m-rt v0.6.5
   Compiling vcell v0.1.0
   Compiling cortex-m v0.5.8
   Compiling stm32f4 v0.3.2
   Compiling aligned v0.2.0
   Compiling r0 v0.2.2
   Compiling void v1.0.2
   Compiling nb v0.1.1
   Compiling cast v0.2.2
   Compiling volatile-register v0.2.0
   Compiling rand_core v0.2.2
error: failed to run custom build command for `stm32f4 v0.3.2`
process didn't exit successfully: `/Users/egger/OSS/stm32f4xx-hal/target/package/stm32f4xx-hal-0.2.3/target/debug/build/stm32f4-c8515433fffbd907/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-link-search=/Users/egger/OSS/stm32f4xx-hal/target/package/stm32f4xx-hal-0.2.3/target/thumbv7em-none-eabihf/debug/build/stm32f4-d3176429b53a9a19/out

--- stderr
thread 'main' panicked at 'No device features selected', /Users/egger/.cargo/registry/src/github.com-1ecc6299db9ec823/stm32f4-0.3.2/build.rs:30:18
note: Run with `RUST_BACKTRACE=1` for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: failed to verify package tarball

Caused by:
  build failed

Can't specify features with publish...

Oh, indeed...
Removing "rt" from default features fixes this but uncovers other issues.
Watch for incoming PR fixing this.


Plugin gets installed into iOS platform too

How can we prevent that?

Can you give me more detail about that?

working on a fix right now. Will create a PR

There you go #5

Publish it on v0.8.0, done.

Thanks!
Now we can see if we could transform this plugins API to polyfill the W3C Permission API :)


Letter to Honolulu Mayor to defund HPD

To<EMAIL_ADDRESS>Dear Honolulu City Council,
My name is (your name) and I am a resident of (city). I am writing to demand that the Honolulu City and County adopt a city budget that prioritizes community wellbeing, and redirects funding away from the police.
In 2019, the City and County of Honolulu allocated $295,681,922 to our police. This is compared to just $112 million budgeted for ALL Community Services with only $68.7 million reserved for affordable housing, section 8, rental assistance, special projects and community development. Within the $68.7  million, only $10.2 million was projected to be spent on the Housing First Program, with only $2.5 million to community development rehabilitation centers.
According to lthawaii.gov there are 15,000 homeless in Hawai’i with the state paying an average of $8,327 per hospital visit and an annual average of $51,000 per arrestee at OCCC. By trading the HPD budget of $296 million with the Housing First Project’s $10.2 million, we could house all of them. Further studies show this could reduce the amount of visits to the ER and healthcare centers by 64% and the number of arrests by 61% within the first 2 years thus saving an average of $11,496 per year per person with a total average of $172,440,000 annually. Spending the resources to properly help the homeless community will not only increase their life span and quality of life, but decrease Honolulu crime rates and save our city money.
I demand that the City Council begin meaningfully defunding the Honolulu Police Department and re-allocate those funds to programs proven to more effectively promote a safe and equitable community: community-based mental health services, substance abuse treatment services, affordable housing programs, and more. I demand a budget that reflects the actual needs of Honolulu.
History has shown that police "reform" is not enough. We must take a hard look at the ways that the current system in place fails to serve--and in fact actively harms--our community, and come together to reimagine the role of police in our city.
Thank you for your time,
(Your name)
(Your address)

List of City Councilors here: https://github.com/defund12/defund12.org/issues/89#issuecomment-639194545

Thank you for submitting your city to defund12.org! Your request is now in the queue for review and publishing. We’ll reply here if we have any questions.

Thank you! There’s nothing else I need to add?

Hiya! I'm just going to review this quickly to check all the numbers and grammar, could you link me to the sources you cited in your email, inc the budget?

Yes hi!
I got the 15,000 homeless count here:
https://ltgov.hawaii.gov/homeless-in-hawaii-facts-and-resources/
Money spent on homeless here:
https://www.honolulu.gov/rep/site/ohou/ohou_docs/HousingFirst-Societal-Impacts-Final.pdf
And city budget and spending plans here:
http://www.honolulu.gov/rep/site/bfs/bfs_docs/FINAL_web_corrected_bookmarks_Budget_Book_FY192018-03
07.pdf
Page A-20, Page B-20
Thank you!
On Tue, Jun 9, 2020 at 9:25 PM Rtrott<EMAIL_ADDRESS>wrote:

Hiya! I'm just going to review this quickly to check all the numbers and
grammar, could you link me to the sources you cited in your email, inc the
budget?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/defund12/defund12.org/issues/1177#issuecomment-641788269,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AP447XYZGBLRZACSQHN5XTDRV4YOVANCNFSM4NZ2UNUA
.

Thanks so much! i'll get on this now

@rdeleon0612 did you get the figure $68.7 million by adding up the related funds at the bottom of B-20?

Yes, just the funds I listed
On Tue, Jun 9, 2020 at 10:42 PM Rtrott<EMAIL_ADDRESS>wrote:

@rdeleon0612 https://github.com/rdeleon0612 did you get the figure
$68.7 million by adding up the related funds at the bottom of B-20?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/defund12/defund12.org/issues/1177#issuecomment-641847205,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AP447X7HVWM772G5DH5KQTDRV5BQTANCNFSM4NZ2UNUA
.

So if i'm reading the budget correctly, I don't think we can say with certainty that 68.7 million is ALL that was given to those projects, those number are listing different funds where the money to pay for the community services budget is coming from, so there could well be more money invested into those things within the $112 million Community services budget, if that makes sense?

Hmm makes sense, In the “budget highlights” it does say 10.2M being designated for the housing first program.
And in this source, https://www.civilbeat.org/2020/03/honolulus-2-98-billion-budget-more-rail-funding-and-police-no-tax-increase/ the budgets mentioned just 8.1M for the housing first program

Yep the numbers for the Housing First program checks out!

Should I remove the 68.7 million?

I think so yep! I was going to go through and edit the stats if you'd be comfortable with that?

Oh please! Go ahead! I was struggling trying to make sense of all of it

to<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>;
Dear Mayor Caldwell and the Honolulu City and County Council,
My name is (your name) and I am a resident of Honolulu. I am writing to demand that Honolulu adopts a budget that prioritizes community wellbeing, and redirects funding away from the police.
In 2019, the City and County of Honolulu allocated $295,681,922 to our police. This is compared to just $112 million budgeted for ALL Community Services. Only $10.2 million was projected to be spent on the Housing First Program.
According to lthawaii.gov there are approximately 15,000 homeless people in Hawai’i. By diverting funds from the HPD budget of $296 million to the Housing First Project, we could drastically reduce this number. Further studies show this could reduce the amount of visits to the ER and healthcare centers from these individuals by 64% and the number of arrests by 61% (I have included the source of this data below) Spending the resources to properly help the homeless community will not only increase their life span and quality of life, but decrease Honolulu crime rates and save our city money. This is just one example of how divesting from the police could improve our city.
I demand that the City Council begin meaningfully defunding the Honolulu Police Department and re-allocate those funds to programs proven to more effectively promote a safe and equitable community: community-based mental health services, substance abuse treatment services, affordable housing programs, and more. I demand a budget that reflects the actual needs of Honolulu.
History has shown that police "reform" is not enough. We must take a hard look at the ways that the current system in place fails to serve--and in fact actively harms--our community, and come together to reimagine the role of police in our city.
Thank you for your time,
(Your name)
(Your address)
(your phone number)
Sources : https://www.honolulu.gov/rep/site/ohou/ohou_docs/HousingFirst-Societal-Impacts-Final.pdf

Looks good! What do I do now? Lol

I'll let the developers know it's ready to go up, and they'll change the tag for it and add it to the site as soon as they can! Thank you so much! :)

Thank you so much for your help!
On Tue, Jun 9, 2020 at 11:59 PM Rtrott<EMAIL_ADDRESS>wrote:

I'll let the developers know it's ready to go up, and they'll change the
tag for it and add it to the site as soon as they can! Thank you so much! :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/defund12/defund12.org/issues/1177#issuecomment-641895317,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AP447X7ZB2XWBVVSYVE7LNDRV5KRHANCNFSM4NZ2UNUA
.


cpplint: Make six-compatible for Python3

Upstream version of https://github.com/RobotLocomotion/styleguide/pull/13
This uses six, which may inject additional dependencies on downstream projects.
If so desired, I can rework it to be free of six.

This change is

Hup, just saw #349, which accomplishes what this does without six.
Would be great to see that land. Will leave open until that PR lands or a maintainer closes this issue.

@EricCousineau-TRI : I don't think anyone at Google has time to look at PRs, let alone merge them.
Consider the fork at https://github.com/cpplint/cpplint (also published to Pypi) if you feel like contributing.

@tkruse is the fork active?

@felker : Somewhat. Don't expect much to move on it's own, but if you make a PR, and prod a bit, a new version will be released on pypi.

Gotcha, will file an issue on our side and see if we can update to use the fork for linting - thanks!
(And sorry for the late response!)


Implement Speaker Cards

Build speaker cards like in website :

Api link :  https://sessionize.com/api/v2/kirmfltc/view/Speakers
Tasks :

[x] Speakers page ui
[x] Speakers fetch from api logic

Closing as task successfully implemented


Conditional declaration of globally visible describe/it in runner

Fixes #18505. The var declarations were hiding mocha's own describe/it if present. 🐱

ping @andy-ms for a quick look


[question] - Without writing a custom builder is it possible to turn off pdf generation?

Sometimes it is not desirable to create pdf and I wish if there was a setting to turn off automatic pdf generation. Do you think it is a good feature request?

I would like to turn off automatic PDF generation for many Pylons Project projects. The support burden would be too great for too little benefit, given the HTML docs are more than adequate. Even with PDF generation, using Pyramid as an example, the PDF has several layout problems, especially with code samples.
A related question: Has PDF generation always been a default setting? It seems like it started around January 2015 in most of the Pylons Project projects.

I managed to achieve to disable PDF generation by changing the latex_documents variable in conf.py to this: latex_documents = [].

@davidheijkamp that tip does not work for our repo. A PDF build is still attempted and shows as "Passed", even though it actually fails. https://readthedocs.org/builds/pyramid_cookbook/2947148/ Maybe you have other configuration options.

That build seems to pass, it properly exits after not outputting anything,
which seems like success to me. We're working on adding the ability to
configure output formats as we speak, so hopefully this will be resolved in
the next couple weeks.
On Thu, Jun 11, 2015 at 2:08 AM, Steve Piercy<EMAIL_ADDRESS>wrote:

@davidheijkamp https://github.com/davidheijkamp that tip does not work
for our repo. A PDF build is still attempted and shows as "Passed", even
though it actually fails.
https://readthedocs.org/builds/pyramid_cookbook/2947148/ Maybe you have
other configuration options.
—
Reply to this email directly or view it on GitHub
https://github.com/rtfd/readthedocs.org/issues/947#issuecomment-111052604
.

--
Eric Holscher
Maker of the internet residing in Portland, Oregon
http://ericholscher.com

This was fixed in #1344 - there are now additional checkboxes to turn off PDF/epub in settings.

Yep, indeed. Thanks for pointing this out. Closing this ticket for now.

Thank you!