text:
Category details are suffering from the n+1 problem when requesting category children

What I'm trying to achieve
Using prefetch related as needed while using saleor.graphql.core.fields.PrefetchingConnectionField
What was problems of using graphene-django-optimizer?
Steps to reproduce the problem

Try to execute the GraphQL query, and you will see a lot of django database requests.
query:

{
  categories(first: 10) {
    edges {
      node {
        name
        children (first: 10) {
          edges {
            node {
              name
            }
          }
        }
      }
    }
  }
}

logs:
DEBUG django.db.backends (0.003) SELECT DISTINCT "product_category"."id", "product_category"."private_metadata", "product_category"."metadata", "product_category"."seo_title", "product_category"."seo_description", "product_category"."name", "product_category"."slug", "product_category"."description", "product_category"."description_json", "product_category"."parent_id", "product_category"."background_image", "product_category"."background_image_alt", "product_category"."lft", "product_category"."rght", "product_category"."tree_id", "product_category"."level" FROM "product_category" ORDER BY "product_category"."id" ASC LIMIT 101; args=() [PID:136855:Thread-1]
DEBUG django.db.backends (0.001) SELECT "product_category"."id", "product_category"."private_metadata", "product_category"."metadata", "product_category"."seo_title", "product_category"."seo_description", "product_category"."name", "product_category"."slug", "product_category"."description", "product_category"."description_json", "product_category"."parent_id", "product_category"."background_image", "product_category"."background_image_alt", "product_category"."lft", "product_category"."rght", "product_category"."tree_id", "product_category"."level" FROM "product_category" WHERE "product_category"."parent_id" IN (1, 2, 3, 4); args=(1, 2, 3, 4) [PID:136855:Thread-1]
DEBUG django.db.backends (0.001) SELECT "product_category"."id", "product_category"."private_metadata", "product_category"."metadata", "product_category"."seo_title", "product_category"."seo_description", "product_category"."name", "product_category"."slug", "product_category"."description", "product_category"."description_json", "product_category"."parent_id", "product_category"."background_image", "product_category"."background_image_alt", "product_category"."lft", "product_category"."rght", "product_category"."tree_id", "product_category"."level" FROM "product_category" WHERE "product_category"."parent_id" = 1 ORDER BY "product_category"."id" ASC LIMIT 11; args=(1,) [PID:136855:Thread-1]
DEBUG django.db.backends (0.001) SELECT "product_category"."id", "product_category"."private_metadata", "product_category"."metadata", "product_category"."seo_title", "product_category"."seo_description", "product_category"."name", "product_category"."slug", "product_category"."description", "product_category"."description_json", "product_category"."parent_id", "product_category"."background_image", "product_category"."background_image_alt", "product_category"."lft", "product_category"."rght", "product_category"."tree_id", "product_category"."level" FROM "product_category" WHERE "product_category"."parent_id" = 2 ORDER BY "product_category"."id" ASC LIMIT 11; args=(2,) [PID:136855:Thread-1]
DEBUG django.db.backends (0.001) SELECT "product_category"."id", "product_category"."private_metadata", "product_category"."metadata", "product_category"."seo_title", "product_category"."seo_description", "product_category"."name", "product_category"."slug", "product_category"."description", "product_category"."description_json", "product_category"."parent_id", "product_category"."background_image", "product_category"."background_image_alt", "product_category"."lft", "product_category"."rght", "product_category"."tree_id", "product_category"."level" FROM "product_category" WHERE "product_category"."parent_id" = 3 ORDER BY "product_category"."id" ASC LIMIT 11; args=(3,) [PID:136855:Thread-1]
DEBUG django.db.backends (0.001) SELECT "product_category"."id", "product_category"."private_metadata", "product_category"."metadata", "product_category"."seo_title", "product_category"."seo_description", "product_category"."name", "product_category"."slug", "product_category"."description", "product_category"."description_json", "product_category"."parent_id", "product_category"."background_image", "product_category"."background_image_alt", "product_category"."lft", "product_category"."rght", "product_category"."tree_id", "product_category"."level" FROM "product_category" WHERE "product_category"."parent_id" = 4 ORDER BY "product_category"."id" ASC LIMIT 11; args=(4,) [PID:136855:Thread-1]

What I expected to happen
Is there are way another way to pragmatically prefetch with/without filtering or SQL logic? Is it big overhead?
…
Saleor version: 2.11

The query you posted is a bug. Saleor uses explicit data loaders instead of the optimizer magic. If you look at the git history of the project, you will see that Saleor used to use graphene-django-optimizer, and performance was worse because of the limitations of an automatic tool like the optimizer.

@patrys thanks a lot for your reply

authors: patrys zfazylz


text:
Extend top-level connection resolvers with ability to sort results

I want to merge this change because resolve #4839

Screenshots

Pull Request Checklist

[ ] Privileged views and APIs are guarded by proper permission checks.
[ ] All visible strings are translated with proper context.
[ ] All data-formatting is locale-aware (dates, numbers, and so on).
[ ] Database queries are optimized and the number of queries is constant.
[ ] Database migration files are up to date.
[ ] The changes are tested.
[ ] GraphQL schema and type definitions are up to date.
[ ] Changes are mentioned in the changelog.

Here is the report for 7ae5f63f571e6ed141768ae473b00e4b9e19f4dd (mirumee/saleor @ 4839/add_ability_to_sort_query_results)
Base comparison is 1e5ac3f8875f5e3ba93dfe43c36f72bbfb794f5e.
No differences were found. (click me)

# api.benchmark checkout
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
  add billing address to checkout            	         34	         34	             20
  add shipping to checkout                   	          7	          7	              0
  checkout payment charge                    	         10	         10	              0
  complete checkout                          	          8	          8	              0
  create checkout                            	         50	         50	             24

# api.benchmark homepage
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
  retrieve main menu                         	          5	          5	              0
  retrieve product list                      	          4	          4	              0
  retrieve secondary menu                    	          5	          5	              0
  retrieve shop                              	          2	          2	              0

# api.benchmark product
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
  product details                            	         15	         15	              3
  retrieve product attributes                	          9	          9	              0

# api.benchmark variant
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
  product variant bulk create                	         51	         51	              3
  retrieve variant list                      	         15	         15	              6

# api product sorting attributes
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
  sort product not having attribute data     	         21	         21	              0

source: gharchive/pull-request

authors: django-queries fowczarek

repo: mirumee/saleor

license_type: permissive

license_source: github-api


text:
Mouse Leave Event

There should be a mouseLeave field in booba::Event for tools that do something specific
when the cursor is out of canvas bounds.

Will be.

Resolved

source: gharchive/issue

authors: XDLoLiK mishaglik

repo: mishaglik/Elpidifor-s-legacy

license: WTFPL


text:
image issue - unauthorized

Hello,
After I followed to document and added to docker-compose.yml it shows me this error with the image

✘ connector-wazuh Error Head "https://ghcr.io/v2/misje/opencti-connector-wazuh/manifests/0.1.0": unauthorized                                                                                1.0s
Error response from daemon: Head "https://ghcr.io/v2/misje/opencti-connector-wazuh/manifests/0.1.0": unauthorized
How can I fix the issue?
here's my config

  connector-wazuh:
    image: ghcr.io/misje/opencti-connector-wazuh:0.1.0
    restart: always
    environment:
      # A timezone is needed for datetime tools to work as expected:
      - TZ=UTC
      - USE_TZ=true
      - OPENCTI_URL=http://opencti:8080
      - OPENCTI_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx # Replace with a token from the user you created
      - CONNECTOR_ID=${CONNECTOR_IMPORT_DOCUMENT_ID} # Replace this with a unique ID
      - CONNECTOR_NAME=Wazuh
      - CONNECTOR_SCOPE=Artifact,Directory,Domain-Name,Email-Addr,Hostname,IPv4-Addr,IPv6-Addr,Mac-Addr,Network-Traffic,Process,Software,StixFile,Url,User-Account,User-Agent,Windows-Registry-Key,Windows-Re>
      - CONNECTOR_AUTO=true
      - CONNECTOR_LOG_LEVEL=warning
      - CONNECTOR_EXPOSE_METRICS=true
      - WAZUH_APP_URL=https://wazuh
      - WAZUH_OPENSEARCH_PASSWORD=xxxxxxxxxx # Remember double-$ if password contains $:
      - WAZUH_OPENSEARCH_URL=https://wazuh:9200
      - WAZUH_OPENSEARCH_USERNAME=cti_connector
      - WAZUH_OPENSEARCH_VERIFY_TLS=true
      - WAZUH_TLPS=TLP:AMBER+STRICT
    volumes:
      - /var/cache/wazuh
    links:
      - opencti:opencti
    depends_on:
      - opencti

Hei,
That is interesting. I cannot reproduce this. I assume that docker manifest inspect  ghcr.io/misje/opencti-wazuh-connector:0.1.0 fails similarly? What version of docker are you running (docker version)?

Hey,
It works perfect with this image:
ghcr.io/misje/opencti-wazuh-connector:0.1.0
I wrote before like the one here which is doesn't work:
https://misje.github.io/opencti-wazuh-connector/installation.html
if you note in the link the image is:
ghcr.io/misje/opencti-[connector-wazuh]:0.1.0
The one you wrote here in the command is:
ghcr.io/misje/opencti-[wazuh-connector]:0.1.0
so the document needs to be updated.
Thank you Misje

Ah, now I see it. Good catch. Thank you for pointing it out!

repo: misje/opencti-wazuh-connector


text:
[Request]

Can you add users function and config file to store settings.

Fetching by user profiles was previously available but RedGIFs updated their API a two months ago which made it unavailable.
A config file to store settings does not make sense in this project but rather here.

authors: Rootkit- misobarisic

repo: misobarisic/redgifs-downloader

license: MIT


text:
Correction du script de rattachement d'effectifs d'organismes NON_FIABILISABLES_MAPPING

Nous avons quelques organismes (4 au 13/03) qui sont identifiés comme non fiabilisables a cause du mapping.
https://cfas.apprentissage.beta.gouv.fr/metabase/question/435-liste-organismes-non-fiabilisable-mapping
Pour chacun de ces organismes nous avons bien corrigé et fiabilisé les couples, souci : les effectifs de ces organismes devraient être rattachés à l'organisme fiabilisé.
TODO : Corrigé le script d'application de la fiabilisation pour déplacer les effectifs liés aux organismes non fiabilisés mapping et les relier à l'organisme fiable lié (sur la base de l'UAI commune et aller chercher le SIRET du bon couple)

[x] Fonction de traitement des organismes NON_FIABILISABLE_MAPPING
[x] Fonction de récupération de l'organisme FIABLE rattaché à un organisme NON_FIABILISABLE_MAPPING via son UAI
[x] Déplacement de tous les effectifs de l'organisme NON_FIABILISABLE_MAPPING vers le FIABLE
[x] Gestion des doublons
[x] Liste excel des contacts des organismes non fiabilisables mapping
[x] Suppression auto des organismes et des effectifs / dossiersApprenants lié aux organismes NON_FIABILISABLE_MAPPING

Refacto Fiab

[x] Corriger le updateDossiersApprenantAndOrganismesFiabilise en updatant les effectifs
[x] Vérifier que les nouveaux couples à fiabiliser disparaissent
[x] Vérifier les suppression de non fiabilisables cas ou pas de fiable retrouvé

Après vérification de mon coté plus aucun organisme identifiés comme non fiabilisables a cause du mapping.
https://cfas.apprentissage.beta.gouv.fr/metabase/question/435-liste-organismes-non-fiabilisable-mapping

repo: mission-apprentissage/flux-retour-cfas


text:
Draw mode of Bridge Or Gap symbol not 2525C compliant

The "BRIDGE OR GAP" symbol from the 2525C spec requires: "The two sides must be parallel"
When drawing one of these symbols in EMP (in draw mode), there are 4 points that are editable by the user. The user can move these points around so that the two side of the symbol are no longer parallel. The draw mode for this symbol should restrict the user's edits to keep the sides being parallel.

Raju - This is the editor for super auto shapes that I implemented for Cesium. This editor was replaced by the editor in the core that is not handling the perpendicular for block tasks. take a look to the   markerCallbacks.dragHandlers.onDrag function for how to calculate perpendicular position for control point for index =2.
_.prototype.startDrawingSuperAutoShape = function (options)
{
var options = copyOptions(options, defaultSurfaceOptions);
options.scale = 4.0;
var _self = this;
var scene = this._scene;
var primitives = this._scene.primitives;
var dragging = false;
var beforeDraggingCartesian = undefined;
var tooltip = this._tooltip;
var firstPoint;
var azimuth = 0;
var markers;
var isDrawingRectangleShapePicked = false;
var dWidth = 5000;
var centerPosition;
var markerCallbacks = {};
var oRenderedGraphic;
var oRectangle;
var oCoordVerticalOneCLL;
var oCoordverticalTwoCLL;
var oCoordHorizontalCLL;
var oDrawItem = options.item;
var oProperties = oDrawItem.properties || {};
var oModifiers = oProperties.modifiers || {};
var dSectorDistance;
markerCallbacks.dragHandlers = {};
oDrawItem.properties = oProperties;
oDrawItem.id = options.id;
var renderGraphic = function ()
{
//setTimeout($.proxy(function ()
//{
try
{
var oRenderModifiers = emp.helpers.copyObject(oModifiers);
var oExtent = this.empCesium.getExtent();
var sExtents = oExtent.west.toDeg() + "," + oExtent.south.toDeg() + "," + oExtent.east.toDeg() + "," + oExtent.north.toDeg();
var sCoordinates = cesiumEngine.utils.convertCartographicsToSECRendererCoordsString([oCoordVerticalOneCLL, oCoordverticalTwoCLL, oCoordHorizontalCLL]);
var centerCartographic = oCoordVerticalOneCLL.midpointTo(oCoordverticalTwoCLL);
var azimuth = centerCartographic.getAzimuth(oCoordVerticalOneCLL);
var oMaterial;
var oRenderData;
var cartographics = [oCoordVerticalOneCLL, oCoordverticalTwoCLL, oCoordHorizontalCLL];
azimuth = azimuth.toRad();
            //azimuth = Cesium.Math.PI_OVER_TWO - azimuth;

            oRenderModifiers[emp.typeLibrary.utils.milstd.StringModifiers.LINE_COLOR] = EmpCesiumConstants.selectionProperties.COLOR_HEX;
            //oRenderModifiers[emp.typeLibrary.utils.milstd.Modifiers.DISTANCE] = [dWidth]; // asigne back to oModifiers@@
            //oRenderModifiers[emp.typeLibrary.utils.milstd.Modifiers.AZIMUTH] = [azimuth.toDeg()]; // asigne back to oModifiers@@

            //oRenderData = sec.web.renderer.SECWebRenderer.RenderSymbol(oDrawItem.coreId, oDrawItem.name, "", oDrawItem.symbolCode, sCoordinates, "clampToGround", this.empCesium.getScale(), sExtents, oRenderModifiers, EmpCesiumConstants.MultiPointRenderType.CANVAS, _self.empCesium.drawData.standard);
            oRenderData = sec.web.renderer.SECWebRenderer.RenderSymbol2D(oDrawItem.coreId, oDrawItem.name, "", oDrawItem.symbolCode, sCoordinates, this.empCesium.canvas.width, this.empCesium.canvas.height, sExtents, oRenderModifiers, EmpCesiumConstants.MultiPointRenderType.CANVAS, _self.empCesium.drawData.standard);
            if (oRenderData && (typeof (oRenderData) === 'string'))
            {
                new emp.typeLibrary.Error({
                    level: emp.typeLibrary.Error.level.CATASTROPHIC,
                    message: "RenderSymbol2D return: " + oRenderData
                });
                return;
            }
            oMaterial = new _self.empCesium.ImageMaterialProperty();
            oMaterial.image = oRenderData.image;
            oMaterial.transparent = true;

            // oRectangle = Cesium.Rectangle.fromDegrees(oRenderData.west.x, oRenderData.south.y, oRenderData.east.x, oRenderData.north.y);
            if (!Cesium.defined(oRenderData.west) || !Cesium.defined(oRenderData.south) || !Cesium.defined(oRenderData.east) || !Cesium.defined(oRenderData.north))
            {
                oRectangle = Cesium.Rectangle.fromCartographicArray(cartographics);
            }
            else
            {
                oRectangle = Cesium.Rectangle.fromDegrees(oRenderData.west.x, oRenderData.south.y, oRenderData.east.x, oRenderData.north.y);
            }

            if (oRenderedGraphic)
            {
                oRenderedGraphic.rectangle.material.image = oRenderData.image;
                _self.empCesium.viewer.dataSourceDisplay.update(Cesium.JulianDate.fromDate(new Date()));
            }
            else
            {
                oRenderedGraphic = new _self.empCesium.Entity({
                    id: oDrawItem.id,
                    selectable: true,
                    show: true,
                    rectangle: {
                        coordinates: getLatestRectangleCallbackProperty,
                        material: oMaterial
                    }
                });
                oRenderedGraphic.featureId = oDrawItem.featureId;
                oRenderedGraphic.coreId = oDrawItem.coreId;
                oRenderedGraphic.overlayId = oDrawItem.overlayId;
                oRenderedGraphic.symbolCode = oDrawItem.symbolCode;
                oRenderedGraphic._editMode = true;
                oRenderedGraphic.featureType = EmpCesiumConstants.featureType.ENTITY;
                oRenderedGraphic = _self.empCesium.viewer.entities.add(oRenderedGraphic);
            }
            _self.muteHandlers(false);
        }
        catch (e)
        {
            console.log("startDrawingSuperAutoShape - renderGraphic() error: " + e);
        }
    }.bind(this);

      _self.empCesium.currentMultiPointEditorRenderGraphicFuction = renderGraphic;

    var getLatestRectangleCallbackProperty = new Cesium.CallbackProperty(function getRectangle(time, result)
    {
        return Cesium.Rectangle.clone(oRectangle, result);
    }, false);
    this.startDrawing(
            function ()
            {
                if (oRenderedGraphic)
                {
                    _self.empCesium.viewer.entities.remove(oRenderedGraphic);
                }
                if (markers)
                {
                    markers.remove();
                }
                mouseHandler.destroy();
                //tooltip.setVisible(false);
            }
    );
    markerCallbacks.drawEnd = function (positions)
    {
        console.log("1976 markerCallbacks.drawEnd used ");
        options.callbacks.onDrawUpdate({positions: [oCoordVerticalOneCLL, oCoordverticalTwoCLL, oCoordHorizontalCLL], properties: oProperties, indices: []});
    };
    markerCallbacks.drawUpdate = function (positions)
    {
        //ojo index????
        console.log("1982 markerCallbacks.drawUpdate used ");
        options.callbacks.onDrawUpdate({positions: [oCoordVerticalOneCLL, oCoordverticalTwoCLL, oCoordHorizontalCLL], properties: oProperties, indices: []});
    };
    markerCallbacks.onDrawStart = function (positions)
    {
        console.log("1987 markerCallbacks.onDrawStart used ");
        options.callbacks.onDrawStart({positions: [oCoordVerticalOneCLL, oCoordverticalTwoCLL, oCoordHorizontalCLL], properties: oProperties, indices: []});
    };
    markerCallbacks.dragHandlers.onDrag = function (data)// (index, position)
    {
        var value;
        if (data.index === 0)
        {
            var oldCenterCartographic = oCoordVerticalOneCLL.midpointTo(oCoordverticalTwoCLL);
            var oldBearing = oCoordverticalTwoCLL.bearingTo(oCoordVerticalOneCLL);// degrees
            var horizontalDist = oldCenterCartographic.distanceTo(oCoordHorizontalCLL);
            var oldBearingTwoToThree = oCoordverticalTwoCLL.bearingTo(oCoordHorizontalCLL);// degrees
            var previousHeight = oCoordVerticalOneCLL.height;
            oCoordVerticalOneCLL = data.position;
            oCoordVerticalOneCLL.height = previousHeight;
            var newCenterCartographic = oCoordVerticalOneCLL.midpointTo(oCoordverticalTwoCLL);
            var newBearing = oCoordverticalTwoCLL.bearingTo(oCoordVerticalOneCLL);// degrees
            var deltaBearing = oldBearing - newBearing;
            var distOneToTwo = oCoordVerticalOneCLL.distanceTo(oCoordverticalTwoCLL);
            var distTwoToThree = Math.hypot(distOneToTwo / 2, horizontalDist);
            previousHeight = oCoordVerticalOneCLL.height;
            oCoordHorizontalCLL = oCoordverticalTwoCLL.destinationPoint(oldBearingTwoToThree - deltaBearing, distTwoToThree);
            oCoordHorizontalCLL.height = previousHeight;
        }
        else if (data.index === 1)
        {
            var oldCenterCartographic = oCoordVerticalOneCLL.midpointTo(oCoordverticalTwoCLL);
            var oldBearing = oCoordVerticalOneCLL.bearingTo(oCoordverticalTwoCLL);// degrees
            var horizontalDist = oldCenterCartographic.distanceTo(oCoordHorizontalCLL);
            var oldBearingOneToThree = oCoordVerticalOneCLL.bearingTo(oCoordHorizontalCLL);// degrees
            var previousHeight = oCoordverticalTwoCLL.height;
            oCoordverticalTwoCLL = data.position;

            oCoordverticalTwoCLL.height = previousHeight;
            var newCenterCartographic = oCoordVerticalOneCLL.midpointTo(oCoordverticalTwoCLL);
            var newBearing = oCoordVerticalOneCLL.bearingTo(oCoordverticalTwoCLL);// degrees
            var deltaBearing = oldBearing - newBearing;
            var distOneToTwo = oCoordVerticalOneCLL.distanceTo(oCoordverticalTwoCLL);
            var distOneToThree = Math.hypot(distOneToTwo / 2, horizontalDist);
            previousHeight = oCoordHorizontalCLL.height;
            oCoordHorizontalCLL = oCoordVerticalOneCLL.destinationPoint(oldBearingOneToThree - deltaBearing, distOneToThree);
            oCoordHorizontalCLL.height = previousHeight;
        }
        else if (data.index === 2)
        {
            //width or top control point
            var oNewCoordHorizontalCLL = data.position;
            var centerCartographic = oCoordVerticalOneCLL.midpointTo(oCoordverticalTwoCLL);
            var bearing = centerCartographic.bearingTo(oCoordHorizontalCLL); // degrees
            var zeta = centerCartographic.bearingTo(oNewCoordHorizontalCLL); // degrees
            var zeta = 90 - zeta;
            zeta = zeta.toRad();
            var dist = centerCartographic.distanceTo(oNewCoordHorizontalCLL);
            var dAdyacentDistance = Math.abs(dist * Math.cos(zeta));
            if (oNewCoordHorizontalCLL.longitude <= centerCartographic.longitude && oCoordHorizontalCLL.longitude >= centerCartographic.longitude)
            {
                // detect when the direction control point (block task) crosses the top of the T. When crossing the
                // bearing changes sign (bearing from true north)
                bearing += 180;
            }
            else if (oNewCoordHorizontalCLL.longitude >= centerCartographic.longitude && oCoordHorizontalCLL.longitude <= centerCartographic.longitude)
            {
                // detect when the direction control point (block task) crosses the top of the T. When crossing the
                // bearing changes sign (bearing from true north)
                bearing += 180;
            }
            var previousHeight = oCoordverticalTwoCLL.height;
            oCoordHorizontalCLL = centerCartographic.destinationPoint(bearing, dist);
            oCoordHorizontalCLL.height = previousHeight;
        }
        renderGraphic();
        updateMarkers();
        //  LatLon.prototype.midpointTo = function (point)
        //var westPoint = value.west;
        //var eastPoint = value.east;
        options.callbacks.onDrawUpdate({positions: [oCoordVerticalOneCLL, oCoordverticalTwoCLL, oCoordHorizontalCLL], properties: oProperties, indices: [data.index]});
    };
    markerCallbacks.dragHandlers.onDragEnd = function (data)
    {
        options.callbacks.onDrawUpdate({positions: [oCoordVerticalOneCLL, oCoordverticalTwoCLL, oCoordHorizontalCLL], properties: oProperties, indices: [data.index]});
    };
    function updateMarkers()
    {
        var centerCartographic;
        var width, height;
        //var corners = getExtentCorners(oRenderedGraphic.rectangle);
        // create if they do not yet exist
        if (!Cesium.defined(markers))
        {
            if (oCoordVerticalOneCLL && oCoordverticalTwoCLL && oCoordHorizontalCLL)
            {
                markers = new _.BillboardGroup(_self, defaultBillboard);
                markers.addBillboard(oCoordVerticalOneCLL.toCartesian(), markerCallbacks, "right"); // index == 0
                markers.addBillboard(oCoordverticalTwoCLL.toCartesian(), markerCallbacks, "left"); // index == 1
                markers.addBillboard(oCoordHorizontalCLL.toCartesian(), markerCallbacks, "width"); // index== 2
                _self._editedSurface = {};
                _self._editedSurface._editMarkers = markers;
                ////_editedSurface._editMarkers._orderedBillboards
            }
            //dWidth = height;// confusing but the height of a reactanglew is interpreseted as the width in the mil std spc.
            //oRenderedGraphic.centerCartographic = centerCartographic;
        }
        else
        {
            if (oCoordVerticalOneCLL && oCoordverticalTwoCLL && oCoordHorizontalCLL)
            {
                var cpCoodinates = [oCoordVerticalOneCLL.toCartesian(), oCoordverticalTwoCLL.toCartesian(), oCoordHorizontalCLL.toCartesian()];
                markers.updateBillboardsPositions(cpCoodinates);
            }
        }
        for (var markerIndex = 0; markerIndex < markers._orderedBillboards.length; ++markerIndex)
        {
            markers._orderedBillboards[markerIndex].eyeOffset = cesiumEngine.utils.getEyeOffsetControlPoint(_self.empCesium.viewer.camera.positionCartographic.height, _self.lastCameraHeight);
        }
        _self.lastCameraHeight = _self.empCesium.viewer.camera.positionCartographic.height;
        markers.setOnTop();
        _self.empCesium.viewer.dataSourceDisplay.update(Cesium.JulianDate.fromDate(new Date()));
    }
    ;
    var mouseHandler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
    mouseHandler.setInputAction(function (movement)
    {
        if (Cesium.defined(movement.position))
        {
            var pickedObject = scene.pick(movement.position);
            var isDrawingRectangleShapePicked = false;
            if (Cesium.defined(pickedObject) && Cesium.defined(pickedObject.primitive) && Cesium.defined(pickedObject.primitive.id) && (pickedObject.primitive.id === options.id))
            {
                //primitive case
                isDrawingRectangleShapePicked = true;
            }
            else if (Cesium.defined(pickedObject) && Cesium.defined(pickedObject.id) && Cesium.defined(pickedObject.id.id) && typeof (pickedObject.id.id) === "string" && pickedObject.id.id === options.id)
            {
                // entity case ?
                isDrawingRectangleShapePicked = true;
            }
            if (isDrawingRectangleShapePicked)
            {
                //markers.getBillboard(0).
                dragging = this.empCesium.editorFeatureDraggingEnable;
                beforeDraggingCartesian = scene.camera.pickEllipsoid(movement.position, ellipsoid);
                scene.screenSpaceCameraController.enableRotate = false;
                scene.screenSpaceCameraController.enableTranslate = false;
                scene.screenSpaceCameraController.enableZoom = true;
                scene.screenSpaceCameraController.enableTilt = true;
                scene.screenSpaceCameraController.enableLook = true;
                //scene.screenSpaceCameraController.inertiaSpin =  0;
                //scene.screenSpaceCameraController.inertiaTranslate =  0;
                //markers.getBillboard(0).enableRotation(false);
                //tooltip.setVisible(false);
            }
        }
    }.bind(this), Cesium.ScreenSpaceEventType.LEFT_DOWN);
    // Now wait for start
    mouseHandler.setInputAction(function (movement)
    {
        var indices;
        if (Cesium.defined(movement.position))
        {
            var oMousePos = scene.camera.pickEllipsoid(movement.position, ellipsoid);
            var pickedObject = scene.pick(movement.position);
            if (pickedObject && (pickedObject.primitive instanceof Cesium.Billboard))
            {
                // If the Dblclick happened over a Billboard or the collection ignore it.
                return;
            }

            if (oMousePos)
            {
                oMousePos = oMousePos.clone();
                if (!oRenderedGraphic)
                {
                    // create the rectangle
                    var currentExtent = this.empCesium.getExtent();
                    var centerCartographic = Cesium.Rectangle.center(currentExtent);
                    var widthCurrentView = currentExtent.height; //radians
                    oMousePos = Cesium.Ellipsoid.WGS84.cartesianToCartographic(oMousePos);
                    widthCurrentView = Cesium.Math.toDegrees(widthCurrentView); //degrees
                    widthCurrentView = widthCurrentView * emp.geoLibrary.getMetersPerDegAtLat(Cesium.Math.toDegrees(centerCartographic.latitude)); // meters
                    dSectorDistance = Math.round(widthCurrentView / 4.0);
                    oCoordVerticalOneCLL = oMousePos.destinationPoint(0, dSectorDistance / 2);
                    oCoordverticalTwoCLL = oMousePos.destinationPoint(180, dSectorDistance / 2);
                    oCoordHorizontalCLL = oMousePos.destinationPoint(90, dSectorDistance);

                    oCoordVerticalOneCLL.height = (oCoordVerticalOneCLL.height < 0) ? 0 : oCoordVerticalOneCLL.height;
                    oCoordverticalTwoCLL.height = (oCoordverticalTwoCLL.height < 0) ? 0 : oCoordverticalTwoCLL.height;
                    oCoordHorizontalCLL.height = (oCoordHorizontalCLL.height < 0) ? 0 : oCoordHorizontalCLL.height;

                    renderGraphic();
                    updateMarkers();
                    //tooltip.setVisible(false);
                    indices = cesiumEngine.utils.fillArrayWithNumbers(3);
                    options.callbacks.onDrawStart({
                        positions: [oCoordVerticalOneCLL, oCoordverticalTwoCLL, oCoordHorizontalCLL],
                        properties: oProperties,
                        indices: indices
                    });
                    options.callbacks.onDrawUpdate({positions: [oCoordVerticalOneCLL, oCoordverticalTwoCLL, oCoordHorizontalCLL], properties: oProperties, indices: indices});
                }
                if (typeof options.callbacks.onDrawUpdate === 'function')
                {
                    //options.callbacks.dragHandlers.drawUpdate({positions: [extent.centerCartesian], width: extent.widthMeters, height: extent.heightMeters, azimuth: extent.rotation});
                    //options.callbacks.onDrawUpdate({positions: [extent.centerCartesian], width: extent.widthMeters, height: extent.heightMeters, azimuth: extent.rotation});
                    options.callbacks.onDrawUpdate({positions: [oCoordVerticalOneCLL, oCoordverticalTwoCLL, oCoordHorizontalCLL], properties: oProperties, indices: []});
                }
            }
        }
    }.bind(this), Cesium.ScreenSpaceEventType.LEFT_CLICK);
    mouseHandler.setInputAction(function (movement)
    {
        var position = movement.endPosition, indices;
        if (Cesium.defined(position))
        {
            if (!oRenderedGraphic)
            {
                return;
                //tooltip.setVisible(true);
                //tooltip.showAt(position, "
Click to start drawing rectangle
");
            }
            else
            {
                var cartesian = scene.camera.pickEllipsoid(position, ellipsoid);
                if (cartesian && dragging)
                {
                    var deltaCartesian = new Cesium.Cartesian3();
                    deltaCartesian = Cesium.Cartesian3.subtract(beforeDraggingCartesian, cartesian, deltaCartesian);
                    var deltaX = deltaCartesian.x;
                    var deltaY = deltaCartesian.y;
                    var deltaZ = deltaCartesian.z;
                    var oCoordVerticalOneCXY = oCoordVerticalOneCLL.toCartesian();
                    oCoordVerticalOneCXY.x -= deltaX;
                    oCoordVerticalOneCXY.y -= deltaY;
                    oCoordVerticalOneCXY.z -= deltaZ;
                    var previousHeight = oCoordVerticalOneCLL.height;
                    oCoordVerticalOneCLL = Cesium.Ellipsoid.WGS84.cartesianToCartographic(oCoordVerticalOneCXY);
                    oCoordVerticalOneCLL.height = previousHeight;
                    var oCoordverticalTwoCXY = oCoordverticalTwoCLL.toCartesian();
                    oCoordverticalTwoCXY.x -= deltaX;
                    oCoordverticalTwoCXY.y -= deltaY;
                    oCoordverticalTwoCXY.z -= deltaZ;
                    previousHeight = oCoordverticalTwoCLL.height;
                    oCoordverticalTwoCLL = Cesium.Ellipsoid.WGS84.cartesianToCartographic(oCoordverticalTwoCXY);
                    oCoordverticalTwoCLL.height = previousHeight;
                    var oCoordHorizontalCXY = oCoordHorizontalCLL.toCartesian();
                    oCoordHorizontalCXY.x -= deltaX;
                    oCoordHorizontalCXY.y -= deltaY;
                    oCoordHorizontalCXY.z -= deltaZ;
                    previousHeight = oCoordHorizontalCLL.height;
                    oCoordHorizontalCLL = Cesium.Ellipsoid.WGS84.cartesianToCartographic(oCoordHorizontalCXY);
                    oCoordHorizontalCLL.height = previousHeight;
                    renderGraphic();
                    updateMarkers();
                    beforeDraggingCartesian = cartesian;
                    indices = cesiumEngine.utils.fillArrayWithNumbers(3);
                    if (typeof options.callbacks.onDrawUpdate === 'function')
                    {
                        options.callbacks.onDrawUpdate({positions: [oCoordVerticalOneCLL, oCoordverticalTwoCLL, oCoordHorizontalCLL], properties: oProperties, indices: indices});
                    }
                    //tooltip.setVisible(false);
                }
                else if (cartesian && !dragging)
                {
                    // tooltip.setVisible(false);
                    //tooltip.showAt(position, "
Drag control points to change rectangle extent

Click again to finish drawing
");
                }
                _self.empCesium.viewer.dataSourceDisplay.update(Cesium.JulianDate.fromDate(new Date()));
            }
        }
    }.bind(this), Cesium.ScreenSpaceEventType.MOUSE_MOVE);
    mouseHandler.setInputAction(function (movement)
    {
        var position = movement.position;
        if (Cesium.defined(position))
        {
            if (!oRenderedGraphic)
            {
                return;
            }
            else
            {
                var cartesian = scene.camera.pickEllipsoid(position, ellipsoid);
                if (cartesian)
                {
                    _self.stopDrawing();
                    if (typeof options.callbacks.onDrawEnd === 'function')
                    {
                        options.callbacks.onDrawEnd({positions: [oCoordVerticalOneCLL, oCoordverticalTwoCLL, oCoordHorizontalCLL], properties: oProperties, indices: []});
                    }
                }
            }
        }
    }.bind(this), Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
    mouseHandler.setInputAction(function (movement)
    {
        if (dragging)
        {
            var delayUnlockingMapTimeOut = setTimeout(function ()
            {
                scene.screenSpaceCameraController.enableRotate = true;
                //screenSpaceCameraController.inertiaSpin = enable? 0.9:0;
                // screenSpaceCameraController.inertiaTranslate =  enable? 0.9:0;
                scene.screenSpaceCameraController.enableTranslate = true;
                scene.screenSpaceCameraController.enableZoom = true;
                scene.screenSpaceCameraController.enableTilt = true;
                scene.screenSpaceCameraController.enableLook = true;
            }.bind(this), 70);
        }
        dragging = false;
    }.bind(this), Cesium.ScreenSpaceEventType.LEFT_UP);

    if (this.empCesium.defined(options.item.originFeature))
            // if (options.item.hasOwnProperty('originFeature'))
                    // if (options.item.hasOwnProperty('originFeature') && (options.item.originFeature instanceof emp.typeLibrary.Feature))
                    {
                        // editing existing
                        oDrawItem.symbolCode = oDrawItem.originFeature.data.symbolCode;
                        var cartographics = cesiumEngine.utils.convertGeoJsonCoordToCartographicList(oDrawItem.originFeature.data);
                        oCoordVerticalOneCLL = cartographics[0];
                        oCoordverticalTwoCLL = cartographics[1];
                        oCoordHorizontalCLL = cartographics[2];
                        //oCoordVerticalOneCLL = new Cesium.Cartographic(oDrawItem.originFeature.data.coordinates[0][0].toRad(), oDrawItem.originFeature.data.coordinates[0][1].toRad(), 0);
                        //oCoordverticalTwoCLL = new Cesium.Cartographic(oDrawItem.originFeature.data.coordinates[1][0].toRad(), oDrawItem.originFeature.data.coordinates[1][1].toRad(), 0);
                        //oCoordHorizontalCLL = new Cesium.Cartographic(oDrawItem.originFeature.data.coordinates[2][0].toRad(), oDrawItem.originFeature.data.coordinates[2][1].toRad(), 0);
                        oProperties = emp.helpers.copyObject(oDrawItem.originFeature.properties);
                        oModifiers = oProperties.modifiers || {};
                        oModifiers = emp.typeLibrary.utils.milstd.convertStringsToModifiers(oModifiers);
                        oProperties.modifiers = oModifiers;
                        renderGraphic();
                        updateMarkers();
                        options.callbacks.onDrawStart({positions: [oCoordVerticalOneCLL, oCoordverticalTwoCLL, oCoordHorizontalCLL], properties: oProperties, indices: []});
                        // options.callbacks.onDrawUpdate({positions: [oCoordVerticalOneCLL, oCoordverticalTwoCLL, oCoordHorizontalCLL], properties: oProperties, indices: []});

                    }
            else if (this.empCesium.drawData.coordinates && this.empCesium.drawData.coordinates.length === 3)
            {
                // new draw with 3 coordinates required included
                var cartographics = this.empCesium.drawData.coordinates, indices;
                oCoordVerticalOneCLL = cartographics[0];
                oCoordverticalTwoCLL = cartographics[1];
                oCoordHorizontalCLL = cartographics[2];
                oProperties = emp.helpers.copyObject(oDrawItem.properties);
                oModifiers = oProperties.modifiers || {};
                oModifiers = emp.typeLibrary.utils.milstd.convertStringsToModifiers(oModifiers);
                oProperties.modifiers = oModifiers;
                renderGraphic();
                updateMarkers();
                indices = cesiumEngine.utils.fillArrayWithNumbers(3);
                options.callbacks.onDrawStart({positions: [oCoordVerticalOneCLL, oCoordverticalTwoCLL, oCoordHorizontalCLL], properties: oProperties, indices: indices});
                //options.callbacks.onDrawUpdate({positions: [oCoordVerticalOneCLL, oCoordverticalTwoCLL, oCoordHorizontalCLL], properties: oProperties, indices: indices});

            }
            else if (this.empCesium.drawData.coordinates && this.empCesium.drawData.coordinates.length === 1)
            {
                // new draw with just one location of block task  included
                // create the super auto shape
                var currentExtent = this.empCesium.getExtent();
                var centerCartographic = Cesium.Rectangle.center(currentExtent);
                var widthCurrentView = currentExtent.height; //radians
                var clickedPosition = this.empCesium.drawData.coordinates[0];
                widthCurrentView = Cesium.Math.toDegrees(widthCurrentView); //degrees
                widthCurrentView = widthCurrentView * emp.geoLibrary.getMetersPerDegAtLat(Cesium.Math.toDegrees(centerCartographic.latitude)); // meters
                dSectorDistance = Math.round(widthCurrentView / 4.0);
                oCoordVerticalOneCLL = clickedPosition.destinationPoint(0, dSectorDistance / 2);
                oCoordverticalTwoCLL = clickedPosition.destinationPoint(180, dSectorDistance / 2);
                oCoordHorizontalCLL = clickedPosition.destinationPoint(90, dSectorDistance);
                renderGraphic();
                updateMarkers();
                indices = cesiumEngine.utils.fillArrayWithNumbers(3);
                //tooltip.setVisible(false);
                options.callbacks.onDrawStart({
                    positions: [oCoordVerticalOneCLL, oCoordverticalTwoCLL, oCoordHorizontalCLL],
                    properties: oProperties,
                    indices: indices
                });
                // options.callbacks.onDrawUpdate({positions: [oCoordVerticalOneCLL, oCoordverticalTwoCLL, oCoordHorizontalCLL], properties: oProperties, indices: indices});

            }
            else
            {
                //waiting for the user to pick location of feature.
                oModifiers = emp.typeLibrary.utils.milstd.convertStringsToModifiers(oModifiers);
                oProperties.modifiers = oModifiers;
            }

            this.muteHandlers(false);
        };

Fixed in version 2.9.2-SNAPSHOT

authors: alberto-acevedo michaeltk3 rsupnekar

license_source: bigquery


text:
Logging bug

Fixed logging to work properly in the MC (Issue #80).  Now both MPFMC logging entries and entries originating in the Kivy code are contained in the same log file.  The default Kivy logging code has been overridden.
Also fixed a sound library priority issue (couldn't diagnose what was happening without logging functioning properly).

Coverage decreased (-0.06%) to 70.621% when pulling 504d0f4693f88e92f87ea5c11f31bfa08e34a684 on logging-bug into 35f0b277c0bfaf4e87e046af3579d7eff8f6fd3f on dev.

Coverage decreased (-0.06%) to 70.621% when pulling c189a069013e16157523b819b2d694aa5f1afc9f on logging-bug into 35f0b277c0bfaf4e87e046af3579d7eff8f6fd3f on dev.

Coverage decreased (-0.06%) to 70.621% when pulling c189a069013e16157523b819b2d694aa5f1afc9f on logging-bug into 35f0b277c0bfaf4e87e046af3579d7eff8f6fd3f on dev.

Coverage decreased (-0.1%) to 70.588% when pulling a51c0e81ab4e969bb61384ffad490310c97cc8b3 on logging-bug into 35f0b277c0bfaf4e87e046af3579d7eff8f6fd3f on dev.

Coverage decreased (-0.2%) to 70.528% when pulling 5bcf3098ce05e0c29569591f87f560aa2e99c3b4 on logging-bug into 35f0b277c0bfaf4e87e046af3579d7eff8f6fd3f on dev.

Coverage decreased (-0.2%) to 70.496% when pulling 534718e2ab667f069dac16645d1a8f6f0c1b3895 on logging-bug into 35f0b277c0bfaf4e87e046af3579d7eff8f6fd3f on dev.

Coverage decreased (-0.2%) to 70.528% when pulling 9d2b7adcd738b778f278a71023d3d6f804c850bc on logging-bug into 35f0b277c0bfaf4e87e046af3579d7eff8f6fd3f on dev.

authors: coveralls qcapen

repo: missionpinball/mpf-mc

license: mit


text:
Please provide a head start for cli/api context-history management, suggestion provided here.

Hello. I just signed up for Mistral api, it is very exciting.
And at docs.mistral.ai/
I saw the provided code for connecting with the api is not so verbose; one block of the curl.
It may be helpful for your python-using users to have a user-friendly way to get started with the AI
and the longer road of managing context history. So
Here is a colab for basic history management and recording. Sorry it is very crud but,
please use it if people find it useful.
https://github.com/lineality/simple_mistral_api_context_history_manager
You are very important, thank you for your work.

Sorry, I cannot tell if the file on github saved correctly, a colab link is here:
https://colab.research.google.com/drive/1cRQNH0JrM9IkiOgOy9kQijUSEtwlYNj1

Thanks so much for the example. Would you be interested in submitting your example to our cookbook? It'd be great for our cookbook: https://github.com/mistralai/cookbook

authors: lineality sophiamyang

repo: mistralai/client-python


text:
Release Version 1.0.0

This PR updates the Mistral AI client to version 1.0.0, which introduces significant changes to improve usability and consistency. The major changes include:

Unified Client Class: The MistralClient and MistralAsyncClient classes have been consolidated into a single Mistral class. This simplifies the API by providing a single entry point for both synchronous and asynchronous operations.

Method Names and Structure: The method names and structure have been updated for better clarity and consistency. For example, client.chat is now client.chat.complete for non-streaming calls, and async_client.chat is now client.chat.complete_async for async non-streaming calls.

Message Changes: The ChatMessage class has been replaced with a more flexible system. You can now use the SystemMessage, UserMessage, AssistantMessage, and ToolMessage classes to create messages.

A migration guide is available in the MIGRATION.md file. If you have any questions or need assistance, please don't hesitate to ask.
Note: This is a major version update, so it may require some changes to your existing code. Please test the new version thoroughly before deploying it in a production environment.

Looks good!
Is there anyway to check the version of the installed mistralai package? mistralai.__version__ isn't working for me.

authors: GaspardBT marklysze


text:
vagrant package --vagrantfile --include not working when used with AWS

Hi,
The vagrant package command adds the new vagrantfile and the new include directory.  But the embedded vagrantfile never executes because no "include" directive is in the new Vagrantfile.
For example, here is the structure of my *.box file after calling "vagrant package --vagrantfile
> tree .
├── Vagrantfile
├── box-disk1.vmdk
├── box.ovf
├── include
│   ├── _Vagrantfile
│   └── serverspec
│       ├── datadev_spec.rb
│       └── spec_helper.rb
└── metadata.json

If the provider is 'virtualbox', the top Vagrantfile will have this content:
Vagrant::Config.run do |config|
  # This Vagrantfile is auto-generated by `vagrant package` to contain
  # the MAC address of the box. Custom configuration should be placed in
  # the actual `Vagrantfile` in this box.
  config.vm.base_mac = "0800278C8B43"
end

# Load include vagrant file if it exists after the auto-generated
# so it can override any of the settings
include_vagrantfile = File.expand_path("../include/_Vagrantfile", __FILE__)
load include_vagrantfile if File.exist?(include_vagrantfile)

However, if the provider is 'aws' the directory and files will be exactly the same as above, except that the Vagrantfile will contain:
Vagrant.configure("2") do |config|
  config.vm.provider "aws" do |aws|
    aws.region_config "us-east-1", ami: "ami-f00000"
  end
end

The "include_vagrantfile" is missing.
version info:
Mac OS X (darwin14.1.0)

> vagrant version
Installed Version: 1.7.2
Latest Version: 1.7.2

> vagrant plugin list
vagrant-aws (0.6.0)
vagrant-awsinfo (0.0.8)
vagrant-centos7_fix (0.0.1)
vagrant-nuke (0.0.4)
vagrant-s3auth (1.0.3)
vagrant-serverspec (1.0.1)
vagrant-share (1.1.3, system)

Thanks,
-T

+1. This is a pretty big bug and takes away an enormous amount of utility around packaging your own boxes. I know we're supposed to use Packer now (which doesn't appear to suffer this same problem), but  still.

Just got bit by this myself.

authors: drcraig gamename glennmcclements

repo: mitchellh/vagrant-aws


text:
homedepot.com

need some help with this videos wont play
https://www.homedepot.com/p/SteamFast-Canister-Steam-Cleaner-SF-275/100645493

As I'm in Germany I was not able to access it without a VPN. When I was on the page, I also was not able to start nor play the video with a computer without any direct blocking scheme.

Ok maybe vid are broken on this website

authors: funilrys xxcriticxx


text:
Rename package to remix-auth-supabase?

To be consistent with other strategy packages
Official packages:

https://github.com/sergiodxa/remix-auth-form
https://github.com/sergiodxa/remix-auth-github
https://github.com/sergiodxa/remix-auth-github
https://github.com/sergiodxa/remix-auth-token

Community packages:

https://github.com/danestves/remix-auth-auth0
https://github.com/pbteja1998/remix-auth-email-link
https://github.com/pbteja1998/remix-auth-google
https://github.com/juhanakristian/remix-auth-microsoft
https://github.com/Andreychik32/remix-auth-steam

Also publish it as remix-auth-supabase?

Seems a good idea, what do you think @MichaelDeBoey ?
I'm following this, in case of, to update all demo published :D

I think the request makes sense! Consistency goes a long way for ease-of-usage.
I'll see what I can do later today 🚀

Once it's consistent, it will also be easier to discover imo.
People can just guess the package name of the supabase strategy that way

Let's hope this will help people to find the right package as NPM's renaming / deprecation / unpublishing policy is little rougher than renaming the repo on github 😁
But you'll notice I've updated the github repo, package.json and current examples (sorry @rphlmr 😬 ) and you can find the new published 3.0.1 version here
I'll check to see if there are any other places where it needs updating but I think we caught it early. Thanks @MichaelDeBoey 👍

don't worry @MichaelDeBoey  all example are already updated :D

authors: MichaelDeBoey mitchelvanbever rphlmr


text:
collection metadata download will not download empty metadata tags

I'm noticing that state of publication is not present for various collections. As such, it isn't included as part of the csv download.

This seems like a very old issue. Can we close it?

I'm closing this. Please re-open if it's still an issue.

authors: cindyloo dsjen

repo: mitmedialab/MediaCloud-Web-Tools


text:
open har file error with charles

Steps to reproduce the problem:

I use mitmdump and har_dump.py to convert the file to har,but when Iopen it with charles,it,s error,
MalformedJson:Use JsonReader.setLenient(true) to accept malformed JSON

Mitmproxy: 3.0.3
Python:    3.5.2
OpenSSL:   OpenSSL 1.1.0g  2 Nov 2017
Platform:  Linux-2.6.32-431.el6.x86_64-x86_64-with-centos-6.5-Final

the har_dump.py is
https://github.com/mitmproxy/mitmproxy/blob/master/examples/complex/har_dump.py
Any other comments? What have you tried so far?
System information

the dump file is as follow link
https://send.firefox.com/download/3f8be846da/#UzMW099RgcYaG-J2uDbUkg

Hi,
I created a HAR file using har_dump.py and loaded it successfully by Charles Proxy.
Also the dump file link is expired, if you provide a new link I will test with that as well and revert.

the dump file can be download as follow:
http://pan.zhangwei.wiki/dump

dump.zip

@kira0204 the file has upload in 4th floor! please help me!

Hi @coderzhw, sorry for the slow response. I converted your flows to a har file using har_dump.py, loaded it successfully with Charles. The HAR file can be found here https://files.fm/u/6592asxe. If your HAR file differ from this, please share the file with us so that we might understand what is the problem.

@kira0204  your har file can be open with charles ,can you tell me whice version of your mitproxy and what command you use tou convert?
mitmdump -ns har_dump.py -r srcfile -w dstfile.har
is this command right?

I have solved it ,thank you !

repo: mitmproxy/mitmproxy


text:
requestheaders addon event problem

I wrote an addon which implements both requestheaders and request addon events. Sometimes I receive None value from flow.request.host property in requestheaders. Same property in request event returns correct value. This problem does not appear for flow.request.path property.
System information
Mitmproxy: 4.0.1
Python:    3.6.3
OpenSSL:   OpenSSL 1.1.0h  27 Mar 2018
Platform:  Linux-3.16.0-6-amd64-x86_64-with-debian-8.9

Do you have an example URL, or a dump file that you can upload?
Do you see any error messages in the eventlog?

Here my output log.

192.168.3.193:59083: clientconnect
::ffff:192.168.3.193:59083: Set new server address: my-remote-site:443
::ffff:192.168.3.193:59083: serverconnect
-> ('my-remote-site', 443)
my_addon_1 http_connect flow.request.host=[my-remote-site], flow.request.pretty_host=[None].
::ffff:192.168.3.193:59083: Establish TLS with server
::ffff:192.168.3.193:59083: ALPN selected by server: -
::ffff:192.168.3.193:59083: Establish TLS with client
::ffff:192.168.3.193:59083: ALPN for client: b'http/1.1'
my_addon_2 requestheaders flow.request.host=[None], f.request.path=[/]
::ffff:192.168.3.193:59083: request
-> Request(GET /)
my_addon_2 request flow.request.host=[my-remote-site], f.request.path=[/]

I have two addons, my_addon_1 and my_addon2, first implementing http_connect event and second one implementing requestheaders e request. You will see logs with addon name, event name and properties.

We just merged a brand new protocol implementation - if you can repeat the problem with the latest version from git-master, please re-open this issue.

authors: Gigiarum Kriechi


text:
Display current status for each mode

Description
In this PR, I've updated the Capture Tab to display the current status for each mode. The CaptureSetup.tsx component was slightly modified to consolidate all mode-related information within the Capture Tab. The Flows Tab now simply shows a message when no flows are available, directing users to the Capture Tab for detailed information. Refers to #7063
https://github.com/user-attachments/assets/cce77b1e-7ad6-4e49-b903-871b6ef792ba
Checklist

[ ] I have updated tests where applicable.
[ ] I have added an entry to the CHANGELOG.

@mhils first draft, let me know what you think :)

@mhils I've adjusted the local description and created a dedicated component for the mode status :)


text:
Adding product subsystem apis

Pre-Flight checklist

[X] Testing

[X] Code is tested

What are the relevant tickets?
#305
What's this PR do?
Adds in the REST API for Product retrieval (and adds the scaffolding for that)
How should this be manually tested?
Use the standard DRF API explorer (go to /api/v0/products, etc.) once at least one Product has been created (via dj-admin)
pytest tests should also pass

Codecov Report

Merging #337 (045f7fe) into main (76a075b) will increase coverage by 0.06%.
The diff coverage is 96.87%.

@@            Coverage Diff             @@
##             main     #337      +/-   ##
==========================================
+ Coverage   91.61%   91.68%   +0.06%
==========================================
  Files         223      227       +4
  Lines        6549     6613      +64
  Branches      537      549      +12
==========================================
+ Hits         6000     6063      +63
  Misses        464      464
- Partials       85       86       +1

Impacted Files
Coverage Δ

main/urls.py
78.57% <ø> (ø)

ecommerce/serializers.py
92.59% <92.59%> (ø)

ecommerce/factories.py
100.00% <100.00%> (ø)

ecommerce/urls.py
100.00% <100.00%> (ø)

ecommerce/views/v0/__init__.py
100.00% <100.00%> (ø)

courses/models.py
89.91% <0.00%> (+0.40%)
:arrow_up:

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 76a075b...045f7fe. Read the comment docs.

c1c06dd2674f4011825462737faa58a10e46ad39 updates the wording in a handful of places for clarity and fixes some logic errors in the product filtering code (which was trying to filter on programs rather than program runs).

authors: codecov-commenter jkachel

repo: mitodl/mitxonline


text:
populate additional_waffle_flags for QA and Production edxapp environments

Description/Context
With the move to dockerized edxapp, we added functionality to set and maintain waffle flag configurations automatically but we never completed the configuration for doing so in any environments higher than QA. Complete that work.
Plan/Design
see: https://github.com/mitodl/ol-infrastructure/blob/main/src/ol_infrastructure/applications/edxapp/Pulumi.applications.edxapp.xpro.CI.yaml#L7-L17
Ensure that the default flags are correct and still applicable in each environment as well.

So, every time we want to make a permanent change to a waffle flag, we should open an issue to have it added it to these Pulumi files?

authors: Ardiea pdpinch

repo: mitodl/ol-infrastructure


text:
Deprecate and remove APIs

When making Flask 1.0, could you remove some old APIs?
ex, module, *_session().

EDIT by @untitaker:

[ ] remove deprecate flask.ext see #1135
[x] remove modules, see #1204 and #861
[ ] *_session()
[ ] Allow all objects in JSON, see #673, #1177, #248, #170, #510
[x] deprecate request.json, see #1206 and #1204

:+1:

:+1:  for Allow all objects in JSON

https://github.com/mitsuhiko/flask/pull/1291 just got merged, and after doing most of the API breakages, I'd like to make some sort of alpha for Flask 1.0.

Would it make sense to remove the deprecated Flask.modules property, too?

Thought it was already removed! PRs welcome.
On 20 June 2015 18:06:30 CEST, Adrian notifications@github.com wrote:

Would it make sense to remove the deprecated Flask.modules property,
too?

Reply to this email directly or view it on GitHub:
https://github.com/mitsuhiko/flask/issues/1182#issuecomment-113786731

#1510

where’s the alpha? people start believeing flask is dead

"Allow all objects in json" should be checked, it was fixed in #1671

deprecate flask.ext

I marked this as fixed by #1484.

Working on this in the pycon sprint

In regards to the removal or deprecation of the *_session methods, can you elaborate on why those should be deprecated or removed? I searched the code base and they don't seem to be deprecated already. So It appears we need to do that first. I also looked around with @davidism at the pycon sprints and we could not figure out why they needed to be removed or deprecated, or why.

#1849 removed send_file name guessing

@untitaker did you add the "remove *_session" task?  What were you referring to?

I meant make_null_session, open_session and save_session in Flask class.
session_interface is recommended way.
But I notice they aren't marked as deprecated for now.
So we can't remove them. How about start deprecating?

authors: SkiftCreative ThiefMaster avilaton davidism flying-sheep jeffwidman merqurio methane untitaker

repo: mitsuhiko/flask


text:
logging compat should keep record format strings.

For tools like Sentry to aggregate the same log message together, it is important that the information not be lost what the message was without format strings. The logging compat handler however did exactly that by calling record.getMesage() and creating a logbook.LogRecord with the final formatted message from logging.
The only thing that record.getMessage() does besides a % operation is to force the message to a string if it isn't one. Since logbook has the same behaviour itself, this should be a non-problematic replacement.

Eh. I screwed this up.
I missed completely that the problem here is a lack of compatibility between the %s format strings used by logging and the {} strings used by logbook.

I solved this problem now by making the logging compat handler create subclassed LogRecord instances.
It required a small change in the LogRecord class, but I think it's worth it.

Thanks for contributing!

repo: mitsuhiko/logbook


text:
Why are PartialOrd, PartialEq, Ord, Eq not implemented?

Hi,
why are these traits are not implemented for the Sha1 or Digest types?

I don't think there is a good reason. Could be added.

I'd love to submit a PR, maybe today evening!

Would be cool!

Well... now I know! We cannot derive them because [u8; 64] does not allow deriving them.
I could implement this, although I'm not sure I'd be able to implement a fast algorithm here.

authors: matthiasbeyer mitsuhiko


text:
[BUG] Errror when sending follow-ups

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
I am using morphic.sh website as a search engine for browser omnibar. Custom search engine string that I use is https://www.morphic.sh/search?q=%s. When I send my query via this CSE, browser correctly renders an answer. But if I need to clarify and submit a follow-up question, I get an error:

Note:

if I navigate to morphic.sh normally and start a chat via main page input field, this behavior does not reproduce
if I am logged out of morphic.sh, the behavior does not reproduce, all works fine
if after getting the initial answer I manually refresh the page before submitting a follow-up question, there is also no error
after getting this error I can find my chat in chat history and select it, there is nothing wrong with the chat, it loads and I can send follow-up questions normally without getting any errors.

Expected Behavior
The error does not occur. There is no need to manually force-refresh page for follow-ups to work.
Steps To Reproduce

Log into morphic.sh (I used google OAuth if that matters)
In browser's address field put https://www.morphic.sh/search?q=sometext and press enter
Wait for the morphic.sh page to render and the answer to fully load.
Scroll to the bottom of the page, find follow-up input field, write anything and submit
The error page is shown

Environment
- OS: Win11
- Browser: Edge 126.0.2592.61

Anything else?
No response

@alexey-kudryavtsev
Thanks to your detailed description of the bug, I was able to reproduce it easily. I've fixed it.
If you have any feedback, please feel free to let me know.

authors: alexey-kudryavtsev miurla

repo: miurla/morphic


text:
Inconsistent rest_intro

I'm not sure what the aim of this part of the table is, but the endpoint method(POST) is inconsistent with the example method(PUT).

Sorted

authors: ProbablePrime SReject

repo: mixer/developers


text:
Feature Request: functionality to get promise on mixpanel.track()

Can we have a functionality to get a promise for track events?
mixpanel.track(event_name, params)
  .then( success => {
      // Can Do if anything required.
  })
  .catch( error => {
      // Need to do some actions if things are not getting tracked.
  });

hi @Spark-Cybel , when you call track, the event only gets saved in the local storage, not really means it is tracked in Mixpanel. Please see the reason below. If the status of the event being tracked or not is important to you. We'd recommend calling the ingestion API directly. Please check this doc https://developer.mixpanel.com/reference/track-event
To preserve battery life and customer bandwidth, the Mixpanel SDK doesn't send the events you record immediately. Instead, it sends batches to the Mixpanel servers every 60 seconds while your application is running, as well as when the application transitions to the background. You can call flush() manually if you want to force a flush at a particular moment.

authors: Spark-Cybel zihejia

repo: mixpanel/mixpanel-react-native


text:
Exclude sudo error message from stdout

When pty is allocated and host name is not set, the error message "sudo: unable to resolve host" is injected into stdout and it brings unexpected behavior.
So exclude this error message from stdout.

Released as v2.44.3.

repo: mizzy/specinfra


text:
[MJMLError] EmptyMJMLError

Hi,
I got this error while trying to use : $ mjml -w index.mjml

[MJMLError] EmptyMJMLError : Null element found in mjmlElementParser

I try this one, and it's work without error : $> mjml -r index.mjml
I took this code for the test :
<mj-body>
  <mj-section>
    <mj-column>
      <mj-text>Hi sexy!</mj-text>
    </mj-column>
  </mj-section>
</mj-body>

Version mjml : 1.2.1

Hey @JacquelinClement !
I can't manage to reproduce your error, do you have anything else that might have influenced the watch ?

Here is a screen of the complete error :

Maybe the vhost can affect the watch ?

It shouldn't. Basically, the watch is just a function that renders the file on each save. If the -r works the -w should work normally. What happens when you provide another code sample ?

Same code other commande :
$ mjml -r .clement.mjml -o clement.html

And watch with an other code (this code https://mjml.io/try-it-live/newsletter) into the file clement.mjml :
$ mjml -w clement.mjml

What version of Node are you using ?

Node version 4.3.2 :)

I just ran on the same issue. I have some mjml template rendering with the -w flag that first throws the following warning:
Warning: validateDOMNesting(...): <tr> cannot appear as a child of <td>. See Section > td > MJMLElement > MJMLColumnElement > tr.
And after that if I add an space anywhere I get the error
Error: [MJMLError] EmptyMJMLError: Null element found in mjmlElementParser     at MJMLError.Error (native)     at new MJMLError (/usr/lib/node_modules/mjml/lib/Error.js:24:85)     at Object.mjmlElementParser (/usr/lib/node_modules/mjml/lib/documentParser.js:24:13)     at documentParser (/usr/lib/node_modules/mjml/lib/documentParser.js:64:22)     at mjml2html (/usr/lib/node_modules/mjml/lib/mjml2html.js:49:52)     at /usr/lib/node_modules/mjml/lib/cli.js:81:12
I'm using node v0.12.10 btw

@llekn does it happen with the same MJML input file?

@arnaudbreton Yes, it happens with the same. The first time I get the warning and, if I add a space (in an irrelevant place of course, like between tags) MJML fails to compile it.
The funny thing is that erasing the space makes everything to work great again...

Can you confirm that's still happening on MJML 2 ?

Hi,
Just updated to mjml v2.0.0 and tried the example that @JacquelinClement gave, and got the following:
TypeError: Cannot read property 'length' of undefined
    at documentParser (/usr/lib/node_modules/mjml/node_modules/mjml-core/lib/parsers/document.js:97:11)
    at MJMLRenderer.parseDocument (/usr/lib/node_modules/mjml/node_modules/mjml-core/lib/MJMLRenderer.js:109:45)
    at new MJMLRenderer (/usr/lib/node_modules/mjml/node_modules/mjml-core/lib/MJMLRenderer.js:76:12)
    at /usr/lib/node_modules/mjml/node_modules/mjml-cli/lib/client.js:107:12

Am I doing something wrong? Using node v0.12.13 on Ubuntu 14.04 btw

Hi !
Can you try on node > 4 ?

Mmmm... Updated to node v4.4.3 and got the same error

Node v5.10.1
mjmv v2.0.0
<mjml background-color="#F9F9F9">
  <mj-body>

    <mj-section>
      <mj-text>abc</mj-text>
    </mj-section>
  </mj-body>
</mjml>

mjml -w input.mjml -o output.html
Warning: Please upgrade your MJML markup to add a <mjml> root tag, <mj-body> as root will no longer be supported soon, see https://github.com/mjmlio/mjml/UPGRADE.MD
TypeError: Cannot read property 'length' of undefined
    at documentParser (/usr/local/lib/node_modules/mjml/node_modules/mjml-core/lib/parsers/document.js:97:11)
    at MJMLRenderer.parseDocument (/usr/local/lib/node_modules/mjml/node_modules/mjml-core/lib/MJMLRenderer.js:109:45)
    at new MJMLRenderer (/usr/local/lib/node_modules/mjml/node_modules/mjml-core/lib/MJMLRenderer.js:76:12)
    at /usr/local/lib/node_modules/mjml/node_modules/mjml-cli/lib/client.js:107:12

@gonchs you need an opening  to match your closing

We'll push a fix for mjml watch really soon, I belive this will fix your issue @gonchs ( don't forget to wrap you section with a mj-container

Can you test this in 2.0.2 ? Thanks !

authors: GuillaumeBadi JacquelinClement arnaudbreton g0ddish gonchs iRyusa llekn

repo: mjmlio/mjml


text:
Mj-column borders w/ border-radius are not rendering correctly

Describe the bug
When setting borders on an mj-column the border radius is not being rendered correctly, it simply shows the borders w/ square corners instead
To Reproduce
This can be seen in the 'try it live' editor by adding a column w/ the below code
<mj-column background-color="pink" border-left="2px solid magenta" border-radius="40px">...

renders

Expected behavior
The border radius property should be being applied to both the background and borders
Possible solution
Set border-collapse on the preceding table to 'separate' instead of the default 'collapse'
[class*=mj-column] > table {
    border-collapse: separate;
}

This is a "known" issue but this is used for compatibility issue. If you really need this just apply it as you did.
We won't really fix this as some desktop client misbehave with border-collapse set to separate.

authors: iRyusa jeissler


text:
Forwarded email does not retain columns

Describe the bug
Forwarded email does not retain columns, they change to rows instead.
To Reproduce
Steps to reproduce the behavior:

Create a file with this MJML code:

<mjml>
  <mj-body>
    <mj-section>
      <mj-column>
        <mj-text font-size="20px" color="#F45E43" font-family="helvetica">1</mj-text>
      </mj-column>
      <mj-column>
        <mj-text font-size="20px" color="#F45E43" font-family="helvetica">2</mj-text>
      </mj-column>
      <mj-column>
        <mj-text font-size="20px" color="#F45E43" font-family="helvetica">3</mj-text>
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>

Render it to HTML by using https://mjml.io/try-it-live
Send the HTML - columns are OK.
Forward the message - columns are no more, rows appear instead.

Expected behavior
Forwarded message should be consistent with the original and retain columns.
MJML environment (please complete the following information):

OS: Windows
MJML Version 4.9.3
MJML tool used https://mjml.io/try-it-live

Email sending environment(for rendering issues):

Sending via Debian Apache2 Server with PHP
Forwarding via gmail.com

Affected email clients (for rendering issues):

Email Client gmail.com
OS: Windows
Browser Google Chrome

Screenshots
Original message:

Forwarded message:

Forwarding email alter the HTML, there's nothing we can do about this

authors: esamo iRyusa


text:
Columns displaying as rows in Gmail (among other clients)

Columns are displaying as rows in Gmail on desktop:

Expected:

They also showed up as columns on outlook.com but that's not nearly as much a concern. Yahoo and AOL performed as expected (using Litmus).
I'm on osx 10.12.3, Chrome 58.0.3. I'm using MJML version 3.3.1. (Also went and tested in Safari and Firefox). Tested both 2 and 3 columns.
I copied this code straight out of one of the prewritten templates after having trouble getting one of ours to work, just as a sanity check. Reduced down to the important part for clarity.
<mjml>
  <mj-head>
    <mj-attributes>
      <mj-class name="footer-text" align="center" color="#ffffff" font-family="Ubuntu, Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif" font-size="15px" padding="0 25px" />
      <mj-link padding="0 35px" font-weight="bold" font-size="12px" />
    </mj-attributes>
  </mj-head>
  <mj-body>
    <mj-container background-color="#d2eeff">

      <mj-section background-color="#4b525c">
        <mj-column width="33%" vertical-align="top">
          <mj-image src="http://191n.mj.am/img/191n/3s/x09.png" alt="Best companies for your flights" width="30px" padding="10px 25px">
          </mj-image>
          <mj-text mj-class="footer-text">

              BEST COMPANIES FOR YOUR FLIGHTS

          </mj-text>
        </mj-column>
        <mj-column width="33%">
          <mj-image src="http://191n.mj.am/img/191n/3s/xsw.png" alt="Insurances included" width="29px" padding="10px 25px">
          </mj-image>
          <mj-text mj-class="footer-text">

              INSURANCES INCLUDED

          </mj-text>
        </mj-column>
        <mj-column width="33%" vertical-align="top">
          <mj-image src="http://191n.mj.am/img/191n/3s/xsx.png" alt="Hotels best selection" width="31px" padding="10px 25px">

          </mj-image>
          <mj-text mj-class="footer-text">

              HOTELS BEST SELECTION

          </mj-text>
        </mj-column>
      </mj-section>
    </mj-container>
  </mj-body>
</mjml>

Hello, first, I'd like to give some context: MJML is mobile-first. This means that, by default, without any responsive style, an email coded with MJML has a mobile layout. Then, we're adding responsive styles with the fluid-hybrid method, so the layout can "spread" on desktop viewports. We think this is the best approach (versus desktop-first), mainly for two reasons:

Support for responsive styles is much better on desktop email clients and webmails (mostly opened on desktop) than on mobile email clients
In the case an email client doesn't enable support responsive styles, it's more acceptable to show a mobile layout on a desktop than a desktop layout on a mobile (which would be hardly readable and require to zoom in or scroll horizontally)

About Outlook.com: the only way to target this client is to use the [owa] selector. However, OWA doesn't enable to differentiate between their mobile and their desktop client, so we chose to always display the mobile layout (see the second point just above)
About Gmail: Gmail rolled out an update adding support for responsive styles a few months ago. If you're seeing the mobile layout on Gmail, there are two options:

The version of Gmail in which the email is read doesn't support responsive styles (see in the Litmus post linked)
You're sending the email through a service that alters the HTML and break the styles. You can try using Putsmail (without checking Move my CSS inline when I click Send Email)

In the case of your example, most of users will actually see the email as a desktop layout, with columns side by side.
Now you have the full picture, feel free to comment or ask any remaining question you might have. As we can't do anything about those 2 problems, I will close the issue.

I have the same issue in gsuite. If i open the mailing, the columns are correct. After i clicked „loading images“ the columns break into rows. When i leave the mailing to inbox and go back to it, the columns with images are back. seems like a bug in gmail/gsuite.

@ngarnier Thanks for you detailed and thorough response. First thing I did was check how it looked when I pasted the same exact HTML into Putsmail, and voila, everything came out perfectly in Gmail. It's unfortunate that Mailchimp is doing whatever it's doing that alters the email but I'm going to look into it and see if there's a fix.
Thanks for all the work y'all do, it's very much appreciated!
@shauste I'd recommend checking by sending from Putsmail as well to make sure your errors don't stem from the same as mine (sending service alters the HTML and break the styles).

No worries @wallawe, thanks for the feedback and great to hear you found the cause of the issue. You're actually not the first one to report that Mailchimp messes with the HTML. One user shared on the MJML Slack that it happens only when creating a template in Mailchimp, but not when you create a template and paste the html code directly in the campaign. Maybe you can try this?

@ngarnier I just wanted to follow up with my findings here for anyone else that comes across this issue with Mailchimp. Your suggestion that it only happens when creating a template is correct. The reason for this (I think) is that when you're creating a campaign and paste it there, it defaults to NOT inline styles:

This options doesn't exist when creating a template.
I'm going to check with their support and see if they can shed any further light on this issue.

Any workaround for this? I'm also using MailChimp.

Doesn't the workaround of @wallawe work for you @dubstrike?

HI @wallawe - I can't see this menu in Mailchimp. I am creating my own custom template and copying the flat HTML in. So I'm guessing that's the reason.
I was wondering, did Mailchimp get back to you and let you know how to use inline styles? Currently I can't get columns to work in Gmail, which is pretty much a deal breaker for my emails!
Thanks for any help

hey @pauldcollins, it's been awhile since I was working on this so I don't remember what I did for creating custom templates from scratch - but I can tell you I reached out to mailchimp support and they were unable to help much at all.
IIRC, your best bet is gong to be creating a campaign and pasting your custom code in there, unchecking the box as I mentioned instead of just creating a plain template if that makes sense.

Hi @wallawe - thanks for your quick reply.
That does make more sense now, appreciate you clarifying. The bit I missed was that you had to go into the campaign and paste it in directly - I was still trying to create a new template.
Thanks again

Just adding here that the "inline css" option is checked by default in braze/appboy. Same solution: unchecking it solves broken responsive emails templates.

authors: dubstrike ngarnier pauldcollins shauste vgrafe wallawe


text:
Add additional show settings to markdown generator

Is your feature request related to a problem? Please describe.
There are certain circumstances where I only want to embed the args/returns, and no title/description/etc.
Describe the solution you'd like
The main concept here is the ability to enable/disable rendering for all major blocks.
Expand the current set of show settings (currently only show_root_heading and show_source) to also include the following:

show_title
show_description
show_parameters
show_returns
show_raises

... and for classes:

show_method_title
show_method_description
show_bases

A nice to have bonus feature would be the ability to globally change these default values.
Describe alternatives you've considered
Could alternatively develop a use_template="path_to_template.html" variable that allows the user to select their own Jinja template for that one specific include tag to use.
This would require additional documentation as to what context variables are accessible within the jinja context.
I wouldn't advise doing this though, as it seems unnecessarily complex for most people who just wanna hide basic stuff without changing the core rendering behavior.
Additional context
N/A

This is probably more relevant on the handler-level, e.g. mkdocstrings-python if you're talking about python, rather than mkdocstrings. Since that's the cog in the wheel that handles the rendering into html.
@pawamoy Would you accept a PR in mkdocstrings-python for this? I'm thinking of an approach like:

make the python handler accept all these new "show" config options, default will be True for all.
modify base templates for docstrings/ to only render if kind == "Parameters" and show_parameters

Should be simple enough to implement, the only thing is that we'll be introducing a ton of new config options.

Yes, I would accept such a PR :rocket:
Indeed that's quite a lot of options. I'm not yet sure how I would like to handle the growing number of options in the future (nest them? keep them flat? factorize them somehow?), so I suggest we don't lose time waiting, and we'll see later if we need to reorganize them or not :slightly_smiling_face:

On the bright side they're basically invisible settings in user land.
Even if the amount of parameters increase in the future, it's probably pretty rare to see occasions where users will modify a substantial amount of them at once.
Being able to globally change the defaults would be nice though.

Cool cool, I'll get on it 🚀

Not a global override, but rather a global default settings change.
For example, perhaps 90% of the time I don't want show_bases, but there might be specific occasions where it's needed.

Yep, should be possible, if I understand u correctly. We'll expose the option globally (i.e,. you'll set show_bases: false in mkdocs.yml), then specify show_bases: true in the autodoc specification where you want to show base. For precise control.

Even if the amount of parameters increase in the future, it's probably pretty rare to see occasions where users will modify a substantial amount of them at once.

What worries me a bit is more the maintenance (and deprecation periods that will ensue if we reorganize options), more than the list being long in users' configs. But as I said, I'll see that later :slightly_smiling_face:

Implemented in https://github.com/mkdocstrings/python/pull/56, thanks @thatlittleboy and @Archmonger!

authors: Archmonger pawamoy thatlittleboy

repo: mkdocstrings/mkdocstrings

license: ISC


text:
Cursor.fast_executemany with SQL Server temporary table mis-handles Unicode under Python3

The Cursor.fast_executemany feature introduced in 4.0.18/19 does not seem to handle Unicode characters correctly under Python3 when working with a SQL Server temporary table. The test code
import pyodbc
import sys
print('Python version ' + sys.version)
print('pyodbc version ' + pyodbc.version)

conn_str = (
    r'DRIVER=ODBC Driver 11 for SQL Server;'
    r'SERVER=(local)\SQLEXPRESS;'
    r'DATABASE=myDb;'
    r'Trusted_Connection=yes;'
)
cnxn = pyodbc.connect(conn_str, autocommit=True)
crsr = cnxn.cursor()
crsr.fast_executemany = False

crsr.execute("CREATE TABLE #tmp (id INT IDENTITY PRIMARY KEY, txt NVARCHAR(1))")

params = [('Ώ',), ('π',), ('α',)]
crsr.executemany("INSERT INTO #tmp (txt) VALUES (?)", params)

print(crsr.execute("SELECT txt FROM #tmp ORDER BY id").fetchall())

works as expected, producing
C:\Users\gord\PycharmVirtualenvs\py3pyodbc\Scripts\python.exe C:/Users/gord/PycharmProjects/py3pyodbc_test/main.py
Python version 3.6.2 (v3.6.2:5fd33b5, Jul  8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)]
pyodbc version 4.0.19
[('Ώ', ), ('π', ), ('α', )]

Process finished with exit code 0

but when I enable the new feature with crsr.fast_executemany = True I get
C:\Users\gord\PycharmVirtualenvs\py3pyodbc\Scripts\python.exe C:/Users/gord/PycharmProjects/py3pyodbc_test/main.py
Python version 3.6.2 (v3.6.2:5fd33b5, Jul  8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)]
pyodbc version 4.0.19
[('?', ), ('p', ), ('a', )]

Process finished with exit code 0

SQL Profiler shows the following
exec sp_describe_undeclared_parameters N'INSERT INTO #tmp (txt) VALUES (@P1)'
exec sp_prepare @p1 output,N'@P1 varchar(255)',N'INSERT INTO #tmp (txt) VALUES (@P1)',1
exec sp_execute 1,'?'
exec sp_execute 1,'p'
exec sp_execute 1,'a'

Notice that the parameter type is mis-identified as varchar(255) when it really should be nvarchar(1).

Update: The same test with a permanent table does not reproduce the issue. Perhaps this is a limitation of sp_describe_undeclared_parameters when working with temporary tables.

Perhaps this is a limitation of  sp_describe_undeclared_parameters  when working with temporary tables.

Yes, it appears that the SP does not support temporary tables. Running the call manually after creating the temp table results in an "invalid object name" error.
Note that this would succeed if you use an older ODBC driver, like SQL Server (SQLSRV32.DLL), since it does not use that SP to implement SQLDescribeParam --- it uses the deprecated-but-working FMTONLY instead.

Yes, it appears that the [sp_describe_undeclared_parameters] SP does not support temporary tables.

Bummer. It seems to me that a common usage case would be to

create a #temporary table,
upload a big bunch of rows to that table, and then
MERGE those rows into an existing permanent table.

Given that we already know the column types when we create the #temporary table, perhaps we can specify them explicitly using .setinputsizes (instead of implicitly relying on SQLDescribeParam) once #280 gets sorted out ...?

As a workaround, you can use a global (i.e. ## prefix)  instead of local temporary table. sp_describe_undeclared_parameters seems to work in that case, at least for your example.

You may also try the preview of the next msodbcsql driver, and set  ColumnEncryption=Enabled in your connection string or DSN, which should also work around the issue with the SP.

Should we close this?

@v-chojas - I see that #280 has been closed because "the functionality is included in the parameter array refactoring". Will that refactoring offer any benefit for this issue, e.g., using .setinputsizes as suggested in my earlier comment?

@v-chojas

You may also try the preview of the next msodbcsql driver, and set ColumnEncryption=Enabled in your connection string or DSN

Now that "ODBC Driver 17 for SQL Server" has been officially released, I tried your suggestion and it seems to be working fine. I have added a tip to the Wiki.

authors: gordthompson mkleehammer v-chojas

repo: mkleehammer/pyodbc


text:
L2O Code

Hi, can you provide the L2O code in your paper?

Hi @yikuanglancheng, thank you for your interest in our work! I haven't had the time to clean up the L2O code yet. In the meantime, the code is already available in the supplementary material of the paper in OpenReview: https://openreview.net/attachment?id=oO6FsMyDBt&name=supplementary_material.
Please let me know if you have any further questions.

authors: mkofinas yikuanglancheng

repo: mkofinas/neural-graphs


text:
Brush Paste as new Image and copy/paste to New File leaves remaining anomalous brush piece

See image for details

The anomaly went away when I picked another tool, in this case when I used the line tool and drew something - it removed the imaginary layer with the partial brick --


text:
証明書を更新する

目的

12/9 に証明書の期限が迫っているので，更新を行う

期待結果

dev環境の証明書が更新されていること

毎回の問題にはなっているが、証明書更新の際にデプロイしているnginxのコンテナ内のフロントエンドの資材と、certbotに渡しているフロントエンドの資材に差分があり、証明書更新に時間がかかっている。

12/8 証明書更新済みのため，closeします

repo: mktkhr/stamp-iot


text:
Detect haptics?

Is there a way to detect if your device has haptics? Getting a persistent warning on Simulator when using this library which I would like to avoid.

Possibly related; I'd like to offer the user the option to enable/disable haptics. But I'd only like to show this toggle in the UI if their device actually supports haptics.
So I'm wondering if there's currently a way to detect if the device supports haptics?

I´m so sorry. The library just remained a while and i lost track. Did you find a solution for this condition? @nickmcmillan

@mkuczera no I didn't end up solving it. It'd still be a nice to have though.

authors: jacdx mkuczera nickmcmillan

repo: mkuczera/react-native-haptic-feedback


text:
Characters drop above 19200

hi
I found this through my team-mate Roberto.
I wanted to test it to see if we could use it in tutorials for our CLI.
I'm testing with one of my sketches which communicates over Serial with a Python script at 115200 and have a lot of dropped characters so I started at 9600 and went gradually up. 19200 was fine but at 38400 it was failing again.
Interesting project, I'll test the library next 👍

Hi @ubidefeo,
First of all, thanks a lot for taking the interest in Cereal!
I couldn't recreate the issue you are having, one possibility is that you started your Cereal monitor with wrong baud settings. Please check the following image and make sure that your baud settings on the Arduino matches the baud rate of your monitor.

You can set the baud rate either using command line argument like this: arduino-cereal --baud=38400. Your other option is to use cereal.config.json as described in the readme. Status bar on the top, always shows your current setting.
Here's also code that I used to generate the image above, so you can try and replicate my results:
int i = 0;

void setup() {
  Serial.begin(38400);
}

void loop() {
  Serial.println("line: " + String(i++, DEC));
}

Note: I did notice an unrelated bug, where in certain cases new line character get's eaten up and two lines are printed together on same line. I am looking into fixing this.

@mladenilic
I have of course launched it properly and kept the same baudrate in the sketch, otherwise I'd have the weirdest output 😁
New line characters seem to be the ones which get dropped often at speeds higher than 19200 (on my MBP15 i9 32GB), but I had one instance of a line completely disappearing.
Happy I might have helped you finding the bug.
I'll watch the repo, so I can follow the development 😃

Hi @ubidefeo,
I've released v1.0.3, fixing the issues with monitor sometimes eating up or doubling line breaks. You can update with npm update -g arduino-cereal.
Please try again and let me know if this fixes the issue. If you are still getting issues with output, couple you please share a code snippet that I could you to recreate the issue.
Thanks! :)

hey @mladenilic
it works great at 115200 now :)
I push a lot of data through and it didn't flinch, only every now and then some characters overlap the bottom line.

Any chance you can add a setting for the column split?
I'd love to have something like percentage for the left column which would also support 0 in order to make it disappear and 100 to remove the right column :)
Thanks for the fast iteration
ubi

Hey @ubidefeo,
Glad to hear it worked! I haven't had a chance to look into the issue with the long, single line outputs. I'll open new issue to track that one.
I have released v1.1. It includes an input panel, to allow sending data to the board (Still have to update readme). This release also includes options to disable variables or input panel. You can do this using config file.
{
 // ...

  "theme": {

    "modules": {
      "variables": {
        "enabled": false
      },

      "input": {
        "enabled": false,
      }
    }
  }
}

I wasn't sure about allowing users to control width of the variables panel, reducing the width of it below the default value would most probably cause the layout to break in case variable names are too long or range variables are used.
Also, there is no option to disable monitor panel. Let me know if you see a use case where disabling a monitor panel would make sense.
Thanks!

nice tip :)
I'd disable the monitor in case I only want to use the lib to watch variables,
but to be honest I see hiding the first panel more useful than the second :)
nice job
u.

authors: mladenilic ubidefeo

repo: mladenilic/arduino-cereal


text:
Dreamcoder OCaml binary edits

This is a variety of edits we need to make in order to properly benchmark the OCaml code - e.g. inserting timing checks in the right places, logging intermediate results, etc.
We'll be using this fork of dreamcoder: https://github.com/mlb2251/stitch_dreamcoder

[x] remove the verbose mode print statement that blows up the log files
[x] add a json config field for which directory to use for compressionMessages/
[x] have it also save the final invention / grammar / frontiers somewhere even when it doesnt accept it as an improvement so that we can analyze whether stitch does the same stuff even in those cases -> actually since we're analyzing topK that subsumes this
[x] topK: make a version of the binary that just takes the json, adds a new "topK" toplevel field with the topK frontiers instead, and uses those in restrict during the worker thread stuff instead of using the other thing
[x] insert timing checks in the right places? Or call getrusage?
[ ] decide how to handle memory checks.  split up binary into multiple parts so can do memory checks separately?

Disabled verbose mode but enabled writing compression messages during the un-timed part of the loop for a fair comparison. Added all timing checks.

The topK binary change has been merged into stitch_dreamcoder/icml_2021_supplement.

add a json config field for which directory to use for compressionMessages/

Also merged into stitch_dreamcoder/icml_2021_supplement.

decide how to handle memory checks. split up binary into multiple parts so can do memory checks separately?

Can I help with this somehow? I'm busy after the group meeting today but could discuss it tomorrow if you wanna bounce some ideas off me

This is out of date but see the actual https://github.com/mlb2251/stitch_dreamcoder repo for the changes we made, closing this issue


text:
[Bug] Android app crashing/error with all models

🐛 Bug
Every model downloaded either complains download not complete, try to redownload, or when it is downloaded again or doesn't make that complaint, throws this error:
MLCChat failed
Stack trace:
org.apache.tvm.Base$TVMError: TVMError: Function vm.builtin.paged_attention_kv_cache_create_reduced(0: runtime.ShapeTuple, 1: int64_t, 2: int64_t, 3: int64_t, 4: int64_t, 5: int, 6: double, 7: double, 8: runtime.NDArray, 9: runtime.PackedFunc, 10: runtime.PackedFunc, 11: runtime.PackedFunc, 12: runtime.PackedFunc, 13: runtime.PackedFunc, 14: runtime.PackedFunc, 15: runtime.PackedFunc, 16: runtime.PackedFunc, 17: runtime.PackedFunc, 18: runtime.PackedFunc) -> relax.vm.AttentionKVCache expects 19 arguments, but 18 were provided.
Stack trace:
File "/Users/kartik/mlc/tvm/include/tvm/runtime/packed_func.h", line 1908
at org.apache.tvm.Base.checkCall(Base.java:173)
at org.apache.tvm.Function.invoke(Function.java:130)
at ai.mlc.mlcllm.ChatModule.reload(ChatModule.java:46)
at ai.mlc.mlcchat.AppViewModel$ChatState$mainReloadChat$1$2.invoke(AppViewModel.kt:648)
at ai.mlc.mlcchat.AppViewModel$ChatState$mainReloadChat$1$2.invoke(AppViewModel.kt:646)
at ai.mlc.mlcchat.AppViewModel$ChatState.callBackend(AppViewModel.kt:548)
at ai.mlc.mlcchat.AppViewModel$ChatState.mainReloadChat$lambda$3(AppViewModel.kt:646)
at ai.mlc.mlcchat.AppViewModel$ChatState.$r8$lambda$CXL6v4mjTu_Sr5Pk2zFDcus0R-8(Unknown Source:0)
at ai.mlc.mlcchat.AppViewModel$ChatState$$ExternalSyntheticLambda2.run(Unknown Source:8)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)

To Reproduce
Steps to reproduce the behavior:

install app
download any model (error log provided from attempt to run gemma-2b-q416_1
tap the chat icon to the right of model name

Expected behavior
Text chat with a language model
Environment

Platform (e.g.
Android 13
Samsung z flip 3 5g
Installed from Android apk package release at
https://github.com/mlc-ai/binary-mlc-llm-libs/releases/download/Android-08052024/mlc-chat.apk

Additional context
App attempts to initialize chat but throws the error either immediately after initialize or when interacting with the input box.

I have the exact same issue on a Galaxy A54 running Android 14.

Hi @DesolateIntention, I can chat with Gemma-2-2b-it-q4f16_1-MLC on the Samsung S23. Could you please try uninstall first and then reinstalling the app? If the issue persists, could you provide a log for debugging? Thanks.

I have the same problem

I have the same problem on my vivox100

@DesolateIntention @seabodylibra
First of all try clear Mlc Chat app data and cache, uninstall app and reboot phone.

@richcb @DesolateIntention @seabodylibra
First of all try clear Mlc Chat app data and cache, uninstall app and reboot phone.

@richcb @DesolateIntention @seabodylibra First of all try clear Mlc Chat app data and cache, uninstall app and reboot phone.

I have done this. App now crashes at Initialize toast. Does not go far enough to get an error log

I have additionally cleared ram/closed all background apps, restarted phone again.
I will try again with another model and/or newest apk release if there is one newer

@DesolateIntention @seabodylibra
First of all try clear Mlc Chat app data and cache, uninstall app and reboot phone.

Thank you for your explanation.I am encountering the exact same issues which the author posted earlier. Only Llama 2 and Llama 3 work, while all other models fail to initialize, leading to frequent crashes. I've also tried clearing the app data, cache,
uninstalling, rebooting, and closing background apps, but the problem persists. Are there any updates or fixes available for this issue?

authors: BlindDeveloper DesolateIntention mengshyu richcb seabodylibra

repo: mlc-ai/mlc-llm


text:
Does CodeCarbon provide the emissions per process?

Hello,
Sorry this is not really an issue but I wanted to ask if there are different experiments running on the server, will codecarbon return the emissions for the whole server or just for my experiment with my Process ID? and is it a feature you might add in the future?
Thanks :)

vict0rsch - I know that per-process emissions is a trick that Scaphandre, a somewhat similar project written in Rust uses.
I've documented how it works below:
https://github.com/hubblo-org/scaphandre/blob/main/docs_src/explanations/how-scaph-computes-per-process-power-consumption.md
I'm not too familiar with the codecarbon codebase yet, so I'm not sure how the energy figures are pulled from the RAPL and other chips.
If you're able to read figures from the scaphandre binary I think this would provide per process level figures as outlined, but I think you'd need to:
a) introduce the scaphandre binary into the package
b) figure out how to read data from it
If you could point me to the class responsible for reading RAPL readings, I'd be up for at least writing some docs on how it might work as a potential piece of work later in the year, and trying to raise some funding to pay for dev time to implement it.

Thanks @mrchrisadams for this documentation, I have an open PR to use CPU load to estimate a per process emissions : https://github.com/mlco2/codecarbon/pull/316

authors: DLfreak benoit-cty mrchrisadams