text:
plain sqlite3 without s3

I like to have a version that uses the sqlite3/mbtiles files directly from the filesystem.
diff --git a/mbtiles_s3_server/__main__.py b/mbtiles_s3_server/__main__.py
index 9ed03e5..890ee77 100644
--- a/mbtiles_s3_server/__main__.py
+++ b/mbtiles_s3_server/__main__.py
@@ -13,6 +13,7 @@ import sys
 import tarfile
 import tempfile
 import zlib
+import sqlite3

 import gevent
 from gevent.pywsgi import (
@@ -63,9 +64,7 @@ def mbtiles_s3_server(

     mbtiles_dict = {
         (mbtile['IDENTIFIER'], mbtile['VERSION']): {
-            'query': exit_stack.enter_context(sqlite_s3_query(
-                url=mbtile['URL'], get_http_client=get_http_client
-            )),
+            'db_connection': sqlite3.connect(mbtile['URL']),
             'min_zoom': int(mbtile['MIN_ZOOM']),
             'max_zoom': int(mbtile['MAX_ZOOM']),
         }
@@ -136,16 +135,21 @@ def mbtiles_s3_server(

     def get_tile(identifier, version, z, x, y):
         try:
-            mbtiles_sqlite_s3_query = mbtiles_dict[(identifier, version)]['query']
+            db_connection = mbtiles_dict[(identifier, version)]['db_connection']
         except KeyError:
             return Response(status=404)

         tile_data = None
         y_tms = (2**z - 1) - y

-        with mbtiles_sqlite_s3_query(sql, params=(z, x, y_tms)) as (columns, rows):
-            for row in rows:
-                tile_data = row[0]
+        cursor = db_connection.cursor()
+        cursor.execute(sql, (z, x, y_tms))
+        rows = cursor.fetchall()
+        cursor.close()
+
+        if rows:
+            tile_data = rows[0][0]  # Get the tile data from the first row
+

         allows_gzip = 'gzip' in request.headers.get(
             'accept-encoding', '').replace(' ', '').split(',')

This is what I've tried. And my environment setup looks like this inside the mbtiles_s3_server project.
mkdir venv
virtualenv venv/
source venv/bin/activate
pip3 install -r requirements.txt
PORT=8080 \
MBTILES__1__URL=/home/markus/osm/planet.mbtiles \
MBTILES__1__MIN_ZOOM=0 \
MBTILES__1__MAX_ZOOM=14 \
MBTILES__1__IDENTIFIER=planet \
MBTILES__1__VERSION=1.0.0 \
HTTP_ACCESS_CONTROL_ALLOW_ORIGIN="*" \
python3 -m mbtiles_s3_server

that results in an empty browser

Do you have and ideas what went wrong @uktrade ?

Ok, it works, the issue was
 MBTILES__1__IDENTIFIER was set to planet and not to mytiles


text:
DST-381: CYA page updates

Changes made to CYA page:

[x] Include visually hidden text for screen readers
[x] Add Other Addresses in Supply Chain
[x] Update supplier/end user details

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 71.70%. Comparing base (d6a029d) to head (b0a42a9).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #91   +/-   ##
=======================================
  Coverage   71.70%   71.70%
=======================================
  Files          50       50
  Lines        1336     1336
=======================================
  Hits          958      958
  Misses        378      378

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

source: gharchive/pull-request

authors: codecov-commenter morganmaerees

repo: uktrade/report-a-breach

license: MIT

license_type: permissive

license_source: github-api


text:
TP-671 Edit footnotes

Summary
Adds the functionality to edit footnotes
Screenshots
Detail page

Edit page

Confirmation page

Record on index page

Codecov Report

Merging #265 (6947cf0) into master (2a8f9e2) will decrease coverage by 0.05%.
The diff coverage is 56.75%.

@@            Coverage Diff             @@
##           master     #265      +/-   ##
==========================================
- Coverage   62.39%   62.33%   -0.06%
==========================================
  Files         190      190
  Lines       11808    11856      +48
  Branches      916      924       +8
==========================================
+ Hits         7368     7391      +23
- Misses       4281     4306      +25
  Partials      159      159

Impacted Files
Coverage Δ

footnotes/forms.py
50.00% <36.58%> (-50.00%)
:arrow_down:

footnotes/views.py
79.48% <80.64%> (+1.22%)
:arrow_up:

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

quotas/business_rules.py
28.92% <0.00%> (-1.66%)
:arrow_down:

geo_areas/business_rules.py
35.63% <0.00%> (+4.59%)
: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 2a8f9e2...6947cf0. Read the comment docs.

Double brackets are only needed for escaping brackets in a f-string.
On Thu, 25 Mar 2021 at 17:41, Stuart Axon @.***> wrote:

@.**** commented on this pull request.
In footnotes/urls.py
https://github.com/uktrade/tamato/pull/265#discussion_r601708849:

api_router = routers.DefaultRouter()
api_router.register(r"footnotes", views.FootnoteViewSet)
api_router.register(r"footnote_types", views.FootnoteTypeViewSet)
-footnote_detail = r"^footnotes/(?P<footnote_type__footnote_type_id>[A-Z0-9]{2,3})(?P<footnote_id>[0-9]{3}|[0-9]{5})/"
-footnote_description_detail = r"^footnotes/(?P<described_footnote__footnote_type__footnote_type_id>[A-Z0-9]{2,3})(?P<described_footnote__footnote_id>[0-9]{3}|[0-9]{5})/"
+detail = fr"(?P<footnote_type__footnote_type_id>{FOOTNOTE_TYPE_ID_PATTERN})(?P<footnote_id>{FOOTNOTE_ID_PATTERN})"
+description_detail = r"(?P<described_footnote__footnote_type__footnote_type_id>[A-Z0-9]{2,3})(?P<described_footnote__footnote_id>[0-9]{3}|[0-9]{5})/"
Do the number parameters need double bracketing here, i.e. {2,3} needs to
be {{2,3}} ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/uktrade/tamato/pull/265#discussion_r601708849, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAIS6THU2C3MN32KBV7CGLTFNYU5ANCNFSM4ZZAUGKQ
.

--
Communications with the Department for International Trade may be
automatically logged, monitored and/or recorded for legal purposes.

authors: DIT-CJWaszczuk andyhd codecov-io

repo: uktrade/tamato


text:
RT-501: Using url_route to identify active menu instead of url_name to factor…

Using url_route to identify active menu instead of url_name to factor in nested routes

Codecov Report

:exclamation: No coverage uploaded for pull request base (develop@1393695). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             develop     #218   +/-   ##
==========================================
  Coverage           ?   97.59%
==========================================
  Files              ?       69
  Lines              ?     4453
  Branches           ?        0
==========================================
  Hits               ?     4346
  Misses             ?      107
  Partials           ?        0

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 1393695...4c0e233. Read the comment docs.

authors: codecov-commenter dev-digital

repo: uktrade/update-supply-chain-information


text:
Docstrings

🚀 Feature Request

Applies to all packages best let's standardize and generate consistent docstrings for all our code. I would recommend Google's python docstring style guide.
https://google.github.io/styleguide/pyguide.html#s3.8.1-comments-in-doc-strings
🔈 Motivation

Standardization of code and documentation to make everything understandable.
🛰 Alternatives

There's sphinx (reStructuredText) or numpy/scipy styles as well. I don't have a huge preference but let's just pick one.
📎 Additional context

Docstrings are all consistent

source: gharchive/issue

authors: GraysonBellamy ULibrady

repo: ulfsri/pyAlicat


text:
Spring boot 2 fails to start

I have recently updated to the current spring boot 2 release and updated to 2.0.0 for the jasypt spring boot starter. I am not seeing what I could be doing wrong to cause the below issue.
[main] DEBUG com.ulisesbocchio.jasyptspringboot.configuration.EnableEncryptablePropertiesBeanFactoryPostProcessor - Application Event Raised: ApplicationFailedEvent
10:58:41.888 [main] ERROR org.springframework.boot.SpringApplication - Application run failed

Please try new release 2.1.0

I'm having this issues as well. I use 2.10:
10:25:45.638 [background-preinit] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Log4j2LoggerProvider
10:25:45.643 [background-preinit] INFO org.hibernate.validator.internal.util.Version - HV000001: Hibernate Validator 6.0.7.Final
10:25:45.654 [background-preinit] DEBUG org.hibernate.validator.internal.engine.resolver.TraversableResolvers - Found javax.persistence.Persistence on classpath containing 'getPersistenceUtil'. Assuming JPA 2 environment. Trying to instantiate JPA aware TraversableResolver
10:25:45.655 [background-preinit] DEBUG org.hibernate.validator.internal.engine.resolver.TraversableResolvers - Instantiated JPA aware TraversableResolver of type org.hibernate.validator.internal.engine.resolver.JPATraversableResolver.
10:25:45.657 [background-preinit] DEBUG org.hibernate.validator.internal.engine.resolver.TraversableResolvers - Unable to load or instantiate JPA aware resolver org.hibernate.validator.internal.engine.resolver.JPATraversableResolver. All properties will per default be traversable.
10:25:45.661 [background-preinit] DEBUG org.hibernate.validator.internal.xml.ValidationXmlParser - Trying to load META-INF/validation.xml for XML based Validator configuration.
10:25:45.662 [background-preinit] DEBUG org.hibernate.validator.internal.xml.ResourceLoaderHelper - Trying to load META-INF/validation.xml via TCCL
10:25:45.663 [background-preinit] DEBUG org.hibernate.validator.internal.xml.ResourceLoaderHelper - Trying to load META-INF/validation.xml via Hibernate Validator's class loader
10:25:45.663 [background-preinit] DEBUG org.hibernate.validator.internal.xml.ValidationXmlParser - No META-INF/validation.xml found. Using annotation based configuration only.
10:25:45.814 [background-preinit] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded expression factory via original TCCL
10:25:45.816 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as ValidatorFactory-scoped message interpolator.
10:25:45.816 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.engine.resolver.TraverseAllTraversableResolver as ValidatorFactory-scoped traversable resolver.
10:25:45.816 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider.
10:25:45.817 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider.
10:25:45.817 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory.
10:25:46.152 [main] DEBUG com.ulisesbocchio.jasyptspringboot.configuration.EnableEncryptablePropertiesBeanFactoryPostProcessor - Application Event Raised: ApplicationFailedEvent

authors: ajaxon ravika-mdosl ulisesbocchio

repo: ulisesbocchio/jasypt-spring-boot

license: mit

license_source: bigquery


text:
UL-6797 add intent endpoint documentation

Intent documentation

sorry, i'm the slowest reviewer in the world, approved now ;)

authors: FranziAndFinn juan-caballero

repo: ultimateai/public-api


text:
Nested AndroidSlidingUpPanel

Hi there,
Just wondered whether there was any experience / inherent caveat in nesting panels, for instance in a nested fragment.  I'm getting some peculiar behaviour where the nested Panel is unreachable by Id (findViewById returns null).   In addition to which, Closing the nested panel, closes the outer panel also.  Can I assume it's just not built for this scenario?
Thanks

I think the requirement I have is a bit different. I want to put a sliding panel inside of one sliding panel. Something like this:
<com.sothree.slidinguppanel.SlidingUpPanelLayout
    xmlns:sothree="http://schemas.android.com/apk/res-auto"
    android:id="@+id/sliding_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="bottom"
    sothree:umanoPanelHeight="68dp"
    sothree:umanoShadowHeight="4dp">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:text="Main Content"
        android:textSize="16sp" />

    <include layout="@layout/another_sliding_panel"
</com.sothree.slidinguppanel.SlidingUpPanelLayout>

and in the file "another_sliding_panel" there is another com.sothree.slidinguppanel.SlidingUpPanelLayout

I share you my code and hope is is work for your case.
`<com.sothree.slidinguppanel.SlidingUpPanelLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:sothree="http://schemas.android.com/apk/res-auto"
android:id="@+id/sliding_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom"
sothree:umanoFadeColor="@android:color/transparent"
sothree:umanoOverlay="true"
sothree:umanoPanelHeight="68dp"
sothree:umanoParallaxOffset="100dp"
sothree:umanoScrollableView="@+id/sliding_layout_child"
sothree:umanoShadowHeight="4dp">
<!-- Instrument info -->
<com.sothree.slidinguppanel.SlidingUpPanelLayout
    android:id="@+id/sliding_layout_child"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="bottom"
    sothree:umanoFadeColor="@android:color/transparent"
    sothree:umanoOverlay="true"
    sothree:umanoPanelHeight="168dp"
    sothree:umanoParallaxOffset="100dp"
    sothree:umanoShadowHeight="4dp">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/red"
        android:text="aaaaaaaaaaaaa" />

    <TextView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/green"
        android:text="bbbbbbbbbbbbbbb" />

</com.sothree.slidinguppanel.SlidingUpPanelLayout>
<!-- ORDER TICKET -->
<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/blue">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:gravity="top|left"
        android:text="This is order ticket top" />

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:gravity="bottom|right"
        android:text="This is order ticket bottom" />
</RelativeLayout>

</com.sothree.slidinguppanel.SlidingUpPanelLayout>
`

repo: umano/AndroidSlidingUpPanel


text:
uui-input: throws warnings when running without ShadowDOM

Which exact UI Library version are you using? For example: 1.0.1 - don't just write v1.
1.5.0
Bug summary
In Umbraco V13, we had to disable the Shadow DOM for the time being in the uui-input component to make autofill and password managers work in Chromium browsers. However, this throws a warning that a duplicate #input ID is detected (one for each time you show the component on the page).
The question is if we can first of all make sure the uui-input can run without a ShadowDOM, and second of all avoid using ID's in the inner template (or allow a custom ID) just in case.
This issue is seen on the new login screen of Umbraco 13: https://github.com/umbraco/Umbraco-CMS/issues/15089
Specifics
No response
Steps to reproduce
This scenario can be replicated by extending UUIInputElement:
import { UUIInputElement } from '@umbraco-ui/uui';
import { customElement } from 'lit/decorators.js';

@customElement('umb-login-input')
export class UmbLoginInputElement extends UUIInputElement {
  protected createRenderRoot() {
    return this;
  }
  static styles = [...UUIInputElement.styles];
}

Include uui-input two times on a page with disabled ShadowDOM

Expected result / actual result
No response

This can be avoided locally by overwriting the getFormElement method as well as removing the id on firstUpdated, but ideally it would be possible to change the id:
import { UUIInputElement } from '@umbraco-ui/uui';
import { customElement } from 'lit/decorators.js';

@customElement('umb-login-input')
export class UmbLoginInputElement extends UUIInputElement {

  protected firstUpdated() {
    const innerInput = this.querySelector('input')
    innerInput?.removeAttribute('id');
  }

  protected getFormElement(): HTMLElement {
    const formElement = this.querySelector('input');

    if (!formElement) {
      throw new Error('Form element not found');
    }

    return formElement;
  }

  protected createRenderRoot() {
    return this;
  }

  static styles = [...UUIInputElement.styles];
}


text:
Js diagram drawing library

Description
This pull request is to show a basic implementation of the JointJS library to render UML class models in the umpleonline web site.
A new diagram type is added in order to display the JointJS rendering. A keyboard short-cut (ctrl-j) will also enable the option. Zooming of the view is also possible by simultaneously pressing the control key while scrolling the mouse to swiping a touchpad (touchpad tested with OSX).
Tests
No behaviour tests have been added to control the new diagram type.

Thanks for all the suggestions kevin. I think Marc can consider these pretty easily

JavaScript is a strange beast, no problem.

repo: umple/umple


text:
"image/jxl" content-type is ignored

Repro: curl -s https://tinystash.undef.im/upload/file -H app-id:w3crapcli -H content-type:image/jxl --data-binary @IMG_20240813_144015_DRO.jxl
Resulting URL returns application/octet-stream content-type.

Thanks for the report.
Fixed, new uploads will respect image/jxl and image/jxr media types, for existing uploads media type can be overridden via the mt= query parameter (that is, https://tinystash.undef.im/il/<tiny_id>.jxl?mt=image/jxl)

repo: un-def/tinystash


text:
[Feature]: Distribute the Server and Agent on two PCs

Description

Automate the distribution of the Server and the Agent over two PCs.

Definition of Done
No response

We tried to use docker swarm. https://docs.docker.com/engine/swarm/swarm-tutorial/#open-protocols-and-ports-between-the-hosts
However, we were unable to open our machien ports. We tried it wit ufw and iptables. Both did not work.

Port status can be checked with sudo ufw status verbose and sud nmap -p- localhost

If you want to start a docker swarm, docker can not run in a rootless mode. Instead you have to use:
sudo docker swarm init --advertise-addr <your-ip-address>
So far, our concept expects the agent to run on the swarm manager pc, because we include local files with volume mounts.
As soon as your docker swarm init you will be presented with a command that has to be executed on another node pc, to add this pc to your docker swarm.
To deploy a docker-compose.yml with specified services, use sudo docker deploy -c docker-compose.yml <your-stack-name>.

If you want to deploy a service on a specific node, the easiest way is to label that node and constrain the deployment in the docker-compose.yml.
docker node update --label-add manager=true <your-node-id-or-name>
services:
  agent:
    build:
      context: ../
      dockerfile: build/docker/agent/Dockerfile
      args:
        - USER_UID=${DOCKER_HOST_UNIX_UID:-1000}
        - USER_GID=${DOCKER_HOST_UNIX_GID:-1000}
    image: my_custom_agent_image:latest
    deploy:
      placement:
        constraints:
          - node.labels.manager == true
    init: true
    tty: true

everything after deploy is new.

[ ] How do we mount local files if we deploy on any node?
[ ] Our "self-build" images throw the error that we do not provide an image name.

server rendering offscreen:

https://github.com/carla-simulator/carla/issues/225

SDL_VIDEODRIVER=offscreen SDL_HINT_CUDA_DEVICE=0 ./CarlaUE4.sh

https://carla.readthedocs.io/en/0.9.5/carla_headless/

So far, the first attempt with SDL did not work.

We tried to create a shared volume for the paf23 folder and the x11 folder.
sudo docker volume create --driver local --opt type=none --opt device=/tmp/.x11-unix --opt o=bind --sharing all x11

A docker node stays in a docker swarm after a PC restart.

We think about using the manual solution using ssh to start the carla server on a remote pc.

Our latest error: sh: 1: xdg-user-dir: not found

We currently use https://www.portainer.io/ to get an overview of our docker images in a local web browser.

Docker PAF23 Swarm 2024-06-17
[[Docker Swarm]], [[2024-06-17]]
https://github.com/una-auxme/paf23/issues/260

docker swarm needs root priviliges, because it modifiys the network. It is not possible to run docker swarm with [[docker rootless]].

docker swarm init creates a local docker swarm

docker swarm leave --force leaves the docker swarm as the docker swarm manager and shuts down the docker swarm.

docker swarm join-token <worker/manager> creates a join command to join the exisitng swarm as a manger or as a worker.

[ ] I don't know if each manager needs to have a worker to execute any commands.

Error response from daemon: This node is already part of a swarm. suggests that each init creates a manager, but the manager is also a worker.

If you want to enable file sharing, you need to run a docker container

created a new docker-compose file with only the simulator.

Run new docker-compose file as normal user.

luttkule@imech156-u:~/git/paf23$ docker compose -f build/docker-compose.swarm.yml up
WARN[0000] /home/luttkule/git/paf23/build/docker-compose.swarm.yml: `version` is obsolete
[+] Running 1/0
 ✔ Container build-carla-simulator-1  Created                                                                             0.0s
Attaching to carla-simulator-1
carla-simulator-1  | sh: 1: xdg-user-dir: not found
carla-simulator-1 exited with code 1

The following suggests, that the server always outputs the Error is always there carla-simulator-1  | sh: 1: xdg-user-dir: not found. However, the service starts and keeps running.
luttkule@imech156-u:~/git/paf23$ b5 run
b5 1.4.1
Found project path (/home/luttkule/git/paf23)
Found Taskfile (Taskfile)
Found config (config.yml, config.local.yml)
Config files ending in ".yml" are deprecated, please use ".yaml" instead
Executing task run

non-network local connections being added to access control list
WARN[0000] /home/luttkule/git/paf23/build/docker-compose.yml: `version` is obsolete
WARN[0000] /home/luttkule/git/paf23/build/docker-compose.nvidia.yml: `version` is obsolete
[+] Running 6/6
 ✔ Container paf23-flake8-1           Recreated                                                                           0.1s
 ✔ Container paf23-mdlint-1           Created                                                                             0.0s
 ✔ Container paf23-roscore-1          Recreated                                                                           0.2s
 ✔ Container paf23-carla-simulator-1  Recreated                                                                           0.2s
 ✔ Container paf23-agent-1            Recreated                                                                           0.2s
 ✔ Container paf23-comlipy-1          Recreated                                                                           0.1s
Attaching to agent-1, carla-simulator-1, comlipy-1, flake8-1, mdlint-1, roscore-1
comlipy-1          | ⧗    input: .
comlipy-1          | ⚠    scope may not be empty [scope-empty]
comlipy-1          | ✖    subject may not be empty [subject-empty]
comlipy-1          | ✖    type may not be empty [type-empty]
comlipy-1          |
comlipy-1          | ✖    found 2 problems, 1 warnings
comlipy-1          | ⓘ    Help: https://gitlab.com/slashplus-build/comlipy
comlipy-1 exited with code 1
carla-simulator-1  | sh: 1: xdg-user-dir: not found
flake8-1 exited with code 0
carla-simulator-1  | 4.26.2-0+++UE4+Release-4.26 522 0
carla-simulator-1  | Disabling core dumps.
mdlint-1 exited with code 0
agent-1            |
agent-1            | ========= Preparing RouteScenario_0 (repetition 0) =========
agent-1            | > Loading the world

However, if I run the server isolated, then the simulator exits.
luttkule@imech156-u:~/git/paf23$ docker compose -f build/docker-compose.swarm.yml up
[+] Running 1/0
 ✔ Container build-carla-simulator-1  Created                                                                             0.0s
Attaching to carla-simulator-1
carla-simulator-1  | sh: 1: xdg-user-dir: not found
carla-simulator-1 exited with code 1

Using https://carla.readthedocs.io/en/latest/build_docker/ to run the simplest docker image pssible
https://carla.readthedocs.io/en/latest/adv_rendering_options/#off-screen-mode
docker run --privileged --gpus all --net=host -e DISPLAY=$DISPLAY carlasim/carla:latest /bin/bash ./CarlaUE4.sh does successfully run the simulator.
The following file is successfully executed with docker compose -f build/docker-compose.carla-server.yaml up
services:
  carla-simulator:
    image: ghcr.io/una-auxme/paf23:leaderboard-2.0
    command: /bin/bash ./CarlaUE4.sh quality-level=Low -resx=800 -resy=600 -nosound -world-port=2000
    environment:
      - DISPLAY=${DISPLAY}
    privileged: true
    network_mode: host
    deploy:
      resources:
        reservations:
          devices:
          - capabilities: ["gpu"]

Now I will create a swarm and try to launch the script there.
docker stack deploy -c build/docker-compose.carla-server.yaml carla_stack

docker stack deploy -c build/docker-compose.carla-server.yaml carla_stack services.carla-simulator.deploy.resources.reservations Additional property devices is not allowed

This https://stackoverflow.com/questions/72029582/docker-compose-returns-error-about-property-devices-when-trying-to-enable-gpu/72691651#72691651 brought me here:
https://gist.github.com/RafaelWO/290b764e88933b0c0769b6d2394fcad2

https://forums.docker.com/t/manage-gpus-in-a-docker-swarm/107277
https://gist.github.com/coltonbh/374c415517dbeb4a6aa92f462b9eb287

luttkule@imech156-u:~/git/paf23$ docker info
Client: Docker Engine - Community
 Version:    26.1.4
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.14.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.27.1
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 19
  Running: 0
  Paused: 0
  Stopped: 19
 Images: 34
 Server Version: 26.1.4
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: active
  NodeID: ot72phbz2fb5kfah74wks6ddn
  Is Manager: true
  ClusterID: v4ik2hj8hmnvh9eh9aw4qiifc
  Managers: 1
  Nodes: 1
  Data Path Port: 4789
  Orchestration:
   Task History Retention Limit: 5
  Raft:
   Snapshot Interval: 10000
   Number of Old Snapshots to Retain: 0
   Heartbeat Tick: 1
   Election Tick: 10
  Dispatcher:
   Heartbeat Period: 5 seconds
  CA Configuration:
   Expiry Duration: 3 months
   Force Rotate: 0
  Autolock Managers: false
  Root Rotation In Progress: false
  Node Address: 137.250.121.22
  Manager Addresses:
   137.250.121.22:2377
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: d2d58213f83a351ca8f528a95fbd145f5654e957
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.5.0-35-generic
 Operating System: Ubuntu 22.04.4 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 32
 Total Memory: 62.69GiB
 Name: imech156-u
 ID: 9607a169-1a3f-41ad-907c-cfb96adc63b2
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Solutions to Enable Swarm GPU Support

Both solutions need to follow these steps first:

Install nvidia-container-runtime. Follow the steps here. Takes <5 minutes.
Update /etc/docker/daemon.json to use nvidia as the default runtime.

{
  "default-runtime": "nvidia",
  "runtimes": {
    "nvidia": {
      "path": "nvidia-container-runtime",
      "runtimeArgs": []
    }
  }
}

Restart the docker daemon on each node sudo service docker restart. Confirm the default runtime is nvidia with docker info.

Successful update of the runtime

luttkule@imech156-u:~/git/paf23$ docker info
Client: Docker Engine - Community
 Version:    26.1.4
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.14.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.27.1
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 19
  Running: 1
  Paused: 0
  Stopped: 18
 Images: 34
 Server Version: 26.1.4
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: active
  NodeID: ot72phbz2fb5kfah74wks6ddn
  Is Manager: true
  ClusterID: v4ik2hj8hmnvh9eh9aw4qiifc
  Managers: 1
  Nodes: 1
  Default Address Pool: 10.0.0.0/8
  SubnetSize: 24
  Data Path Port: 4789
  Orchestration:
   Task History Retention Limit: 5
  Raft:
   Snapshot Interval: 10000
   Number of Old Snapshots to Retain: 0
   Heartbeat Tick: 1
   Election Tick: 10
  Dispatcher:
   Heartbeat Period: 5 seconds
  CA Configuration:
   Expiry Duration: 3 months
   Force Rotate: 0
  Autolock Managers: false
  Root Rotation In Progress: false
  Node Address: 137.250.121.22
  Manager Addresses:
   137.250.121.22:2377
 Runtimes: io.containerd.runc.v2 nvidia runc
 Default Runtime: nvidia
 Init Binary: docker-init
 containerd version: d2d58213f83a351ca8f528a95fbd145f5654e957
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.5.0-35-generic
 Operating System: Ubuntu 22.04.4 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 32
 Total Memory: 62.69GiB
 Name: imech156-u
 ID: 9607a169-1a3f-41ad-907c-cfb96adc63b2
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Update your /etc/docker/daemon.json

On each node!

Get your GPU-UUID with nvidia-smi -a.
{
  "runtimes": {
    "nvidia": {
      "path": "/usr/bin/nvidia-container-runtime",
      "runtimeArgs": []
    }
  },
  "default-runtime": "nvidia",
  "node-generic-resources": [
    "NVIDIA-GPU=<GPU-UUID>"
    ]
}

Cannot find a compatible vulkan device or driver. Try updating your video driver to a more recent version and make sure your video card supports Vulkan.

To test the local connection, we used a pip install of the carla python api, upgraded pip, install pygame and numpy and then we were able to connect to the carla client/world and we loaded a new world.
(.venv) luttkule@auxme-imech039:~/git/carla-conncection-test$ python
Python 3.8.10 (default, Nov 22 2023, 10:22:35)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import carla
>>> client = carla.Client('localhost', 2000)
>>> world = client.get_world()
WARNING: Version mismatch detected: You are trying to connect to a simulator that might be incompatible with this API
WARNING: Client API version     = 0.9.14
WARNING: Simulator API version  = abd96a94
>>> client.load_world('Town05')
<carla.libcarla.World object at 0x7f1b37f728c0>
>>>

sudo docker run -d -p 8000:8000 -p 9443:9443 --name portainer \

--restart=always
-v /var/run/docker.sock:/var/run/docker.sock
-v portainer_data:/data
portainer/portainer-ce:latest

When you get the following error in your docker service:
sh: 1: xdg-user-dir: not found
No protocol specified
error: XDG_RUNTIME_DIR not set in the environment.
No protocol specified
error: XDG_RUNTIME_DIR not set in the environment.
No protocol specified
error: XDG_RUNTIME_DIR not set in the environment.

Remember to use:
sudo xhost +local:

Using the carla python api from a second pc does work without major and changing the client argument from 'localhost' to the server host ip-address is sufficient. Only a slight python-api version mismatch is reported.

We used a new docker image based on 'ubuntu:focal', upgraded pip and installed carla as a pip package. We were able to replicate a connection.

Next: try to use ssh to launch CarlaUE4.sh natively and rewirte compose file to connect to ssh pc.

./CarlaUE4.sh -RenderOffScreen

https://docs.docker.com/compose/multiple-compose-files/extends/

b5 uses config files:

build/config.yml
build/config.local.yml

This helps to add gpu support defined in build/docker-compose.nvidia.yml whenever a gpu was available during the install process.
This is likely defined in the task file of b5 for the install task build/Taskfile.
https://github.com/una-auxme/paf23/blob/a890f26e780a202779ac72a4ac80ed263351dec7/build/Taskfile#L38-L59
install:gpu-support()'  check for docker-nvidiaand runs the next tasknvidia:enable`
https://github.com/una-auxme/paf23/blob/a890f26e780a202779ac72a4ac80ed263351dec7/build/Taskfile#L75-L79
This enables build/templates/config.nvidia.yml.jinja2 which is a b5 specific config file to override compose files with nvidia and extends exisiting docker-compose.yml with a docker-compose.nvidia.ymlfile to add gpu support with
build/docker-compose.nvidia.yml
https://github.com/una-auxme/paf23/blob/a890f26e780a202779ac72a4ac80ed263351dec7/build/docker-compose.nvidia.yml#L1-L28


text:
Add WASM compile target

@unageek @Chris00 considering that Rust seems to be growing in popularity, which many people now use to compile for Web browser use (with WASM byte code), it seems like it would be useful to have your library compile to WASM. I mention this because there is an open issue before the WASM community to add instructions which accelerate floating-point operations sensitive to rounding mode. The community has made it clear that they want to see concrete use cases before doing so, however. Your library seems like a good example, especially considering that it already has 13 stars and 2 forks. I can provide more details if you're interested. Otherwise, feel free to close this issue.

I am not sure what you are suggesting. It is not possible to port the crate to WASM, since, as you said, non-default rounding modes are not supported at the moment.

@KloudKoder, you are of course welcome to point them to this library in order to motivate the introduction of rounding mode operations.  And let us know if they adopt them! 😁

@unageek @Chris00 Thanks both of you for replying. Let me see if I can offer a better explanation of what's at stake here.
First of all, it's correct that under Rust, even unsafe Rust, you can't compile interval code to WASM because you need all 4 basic rounding modes (not just nearest-or-even). The WASM proposal is to add instructions like "multiply 32-bit floats and round toward negative infinity" or "subtract 64-bit floats and chop toward zero". The only way to do this in WASM at the moment is via incredibly slow and complicated floating-point emulation.
If this proposal happens, we'll suddenly have cross-platform analog security for the Web. Right now, we have cross-platform code for the Web that's not analog-secure (that being normal WASM floating-point). We also have analog-secure code that's not cross-platform (that being hardware-customized interval libraries).
By all reasonable standards of engineering safety, using intervals in 2022 should be as easy as using floating-point in 1982. But it's not because there's this chicken-and-egg between the compiler writers (who don't want to add interval support because it's hardly ever used) and the app programmers (who can't use interval support unless they're willing to go hardware-specific, which is usually a nonstarter). Fingers point in both directions, and nothing gets done. After so many wasted years, it's time to actually solve the problem.
And so, a year ago, I proposed all this to the WASM community. The compressed version of what happened is this: They said "OK, we can see that intervals are useful. And we're also convinced that emulation is nonperformant. But we don't want to add these instructions unless you can summon somebody who can show that they have an actual interest in running interval arithmetic on the Web, or creating some sort of library for that purpose."
If you would like to see your library running in WASM, and be the very first to do so and start claiming market share, then you should care about this. But if it really doesn't matter to you, then OK, it doesn't, and I'll move on.
So what if you actually care? I can't just point at your project and say "Look at them! They said they care!" I would need one of you to go over to the WASM proposal page here on Github and briefly explain why you have an interest in seeing this happen. They'd probably ask you a few questions about what your library does and why someone might want to use it on the Web. I have no business speaking for either them, or you. My business is to make cross-platform analog security happen ASAP because the world would be a lot better if it existed.
I'm listening if you have questions.

This shouldn't be a difficult decision. Let's drive this to a close one way or the other. There's no reason to keep this issue open in the hopes that someone else will fix the problem. If I can clear up some confusion or point you to more information, let me know.

Personally, I'm a bit torn out between “it would be nice to have WASM support” as it would allow to make interactive computer assisted proofs available on the web (interesting for colleagues and students) and the fact that I'm unlikely to write such an app in the near future (due to time constraints).

@Chris00 I understand your point, but the main task at hand doesn't necessitate you actually writing WASM code anytime soon. (Now that I think about it, the title of this issue should probably be more about preparation for a WASM port than the actual port itself. Sorry if that was confusing.) Under the current circumstances, you can't even contemplate doing a port, performantly. If the instructions become available, you will be able to tweak your existing unsafe Rust code (unsafe because it's necessarily hardware dependent) with the new WASM instructions in order to make it compile for the Web. Then you can start attracting developers (for example for the proof application you mentioned). But you don't need to do that right now. This is just about making it possible.
Eventually, one would hope that Rust would just create a native interval type (which they can't presently do for exactly this same reason), but you don't need to care about that because you could offer interval support to Rust developers as soon as your tweaked library gets done.
I'd probably use it myself. It's always amazed me how one could create a brand new language (like Rust or Julia) in the 21st century and still not consider analog security important enough to nativize. Using intervals should be trivial. Probably they just didn't think of it. Oops.

Let me close the issue. I am willing to port the crate to WASM once relevant instructions are available.

Great. @KloudKoder I can then chime in to assert there are people with interest in having directed rounding in WASM.

@KloudKoder I suppose you do not mind that I'm saying I come to the issue because you contacted us?

@Chris00 @unageek Of course, all honest discussion is legitimate. There's nothing wrong with explaining how you learned of the WASM proposal.
I also think your idea about enabling automated proof checking is just brilliant. As it stands today, you literally cannot verify that f(x) is equivalent to g(x) in WASM, short of full-blown symbolic proof capabilities that aren't really mature yet. With intervals, you can at least show via many sample points that they appear to be equivalent. You can't do even that much with floating-point, however, because it's impossible to show that all the higher-order terms are at least consistent to within some tolerance. Anyways, this is worth bringing up as well.
And now, without further ado, I would like to invite both of you to comment with complete freedom at the relevant issue below. If you have ideas on how best to implement the proposal, that would be welcome discussion as well.
https://github.com/WebAssembly/design/issues/1456

@Chris00 @unageek You still there? If so, where are we with this? Perhaps you're not getting notifications because this is a closed issue.

I've been reading the comments in the mentioned discussion.  As I understand it, they are not interested solely in someone eventually using the directed rounding modes but, understandably, they want to collaborate with people who will use the feature to assert its correctness and efficiency,  @unageek Are you willing to implement the port to WASM while they develop the feature? If so, I can help testing it on code I wrote.  Note that there is also already a (not so efficient and stripped down) port of Inari to WASM.  Maybe we should involve its author?

Are you willing to implement the port to WASM while they develop the feature?

Once instructions are available in core::arch::wasm32, yes!

Note that there is also already a (not so efficient and stripped down) port of Inari to WASM.

Well, I'm concerned about the crate since it is not a valid implementation of IA.

@Chris00 @unageek Guys, you really ought to be paying attention to
https://github.com/WebAssembly/design/issues/1456
Decisions are being made which will affect the implementation of Inari on WASM. Please chime in if you don't like something about it.

authors: Chris00 KloudKoder unageek

repo: unageek/inari


text:
Implementação em MK Docs do Perfis de Usuário

Esta issue está relacionada à melhoria da documentação do projeto e à implementação de perfis de usuário para tornar a documentação mais personalizada e relevante para os nossos usuários.

[x] Configurar o ambiente de desenvolvimento local com MK Docs.
[x] Procurar por implementações de grupos dos semestres passados.
[x] Implementar nosso perfil de usuário.
[x] Fazer o commit da documentação.

Essa issue foi repassada para o integrante José


text:
Stream encrypted chunks to temp file

Currently, chunks are streamed into the desired output path and integrity is verified after the finalize method.

To prevent misuse (unauthenticated data must never be used), stream bytes to temp file
Conclude finalization and then move bytes to destination

implemented. Future feature: pass custom tmp directory.

repo: unbekanntes-pferd/dracoon-python-api


text:
updates Gradle wrapper to version 2.4

Sorry about the lack of description, there.  This Pull is just a humble attempt to update the Gradle wrapper for the project.

Thanks!

authors: Dispader unbroken-dome

repo: unbroken-dome/gradle-testsets-plugin


text:
footer icon change

footer icon change

facing build issue, created new PR: https://github.com/undp/design-system/pull/270

repo: undp/design-system


text:
🛑 Piped API is down

In 0fa4407, Piped API (https://pipedapi.unforest.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Piped API is back up in 95b552a after 7 minutes.

repo: unforest/uptime


text:
🛑 Piped API is down

In 2071be2, Piped API (https://pipedapi.unforest.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Piped API is back up in e9db6f4 after 20 minutes.


text:
🛑 Piped is down

In 212c4ca, Piped (https://piped.unforest.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Piped is back up in 444c5f4 after 24 minutes.


text:
🛑 SearXNG is down

In a1f1420, SearXNG (https://searxng.unforest.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: SearXNG is back up in 7225d0c after 41 minutes.


text:
🛑 Nitter is down

In 1859a06, Nitter (https://nitter.unforest.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Nitter is back up in dcd2be9 after 34 minutes.


text:
🛑 Piped API is down

In 5159361, Piped API (https://pipedapi.unforest.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Piped API is back up in b47414a after 11 minutes.


text:
🛑 Piped API is down

In c38a405, Piped API (https://pipedapi.unforest.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Piped API is back up in c035f5a after 5 minutes.


text:
Allow installing extensions, other than from chrome store

Description
ungoogled-chromium should allow custom system- and user-level extensions
Who's implementing?

[X] I'm willing to implement this feature myself

The problem
One of the primary mechanisms, that allow google to exert control over the chrome ecosystem, is via its chrome store.
e.g. it's easy to predict that manifest-v2 extensions will vanish from chrome store, despite still being able to run when re-enabling manifest-v2
Extensions will always be part of a modern browser experience, so with the main option for extensions being chrome store, users are currently still at the mercy of google, despite running ungoogled-chromium.
It is important to not conflate auto-installing extensions from chrome store, with running custom - possibly local-built - extensions.
Possible solutions
There are several delivery mechanisms, that could allow running UC with custom extensions:

chrome policy

unclear how to override per-user
potentially complex impl

search path env-var - this is already proposed https://github.com/ungoogled-software/ungoogled-chromium/pull/2753
hardcode search path: chromium already supports loading extensions from /usr/share/chromium/extensions, so just customizing that path could already be enough

this seems to have been guix' approach, before switching to env-var
less possibility for user to override / customize behavior

command line flag

potentially complex impl

more complex extension management, declarative or otherwise

would have to be built in the first place, probably not within UC
would still have to bottom out at a simple mechanism in UC

Resolution of a previous issue seems to suggest, that custom extensions are already possible, because guix already packages extensions for ungoogled-chromium: https://github.com/ungoogled-software/ungoogled-chromium/issues/1281#issuecomment-743410205
However, deeper investigation reveals, that this is possible due to guix patching UC for this: https://issues.guix.gnu.org/44335
This kind of downstream inconsistency is exactly what we should avoid.
Alternatives
Manage the extension directory in the user profile

Doesn't really have a story for auto-updates
No system-level extensions / user might destroy and recreate their profile / user might run multiple profiles

Host an update manifest
see https://github.com/NeverDecaf/chromium-web-store#if-you-are-a-chrome-extension-developer

even higher barrier of entry for regular user

Additional context
One of the primary reasons for google to only allow auto-install from chrome-store is ostensibly to make it harder for vendors to pre-load malicious extensions. However:

It's still plenty easy to do for a bad actor (see Alternatives)
In a free system, this becomes a non-issue, since the whole system is under direct control of the user

References

PR implementing an extensible extension search path: https://github.com/ungoogled-software/ungoogled-chromium/pull/2753
nixpkgs PR for env-var approach: https://github.com/NixOS/nixpkgs/pull/188086
previous issue https://github.com/ungoogled-software/ungoogled-chromium/issues/1281 seems to have somewhat conflated custom with auto-installed exts
guix issue about the env-var approach: https://issues.guix.gnu.org/44335
a nixpkgs issue about auto-installing extensions: https://github.com/NixOS/nixpkgs/issues/158449

out of scope for this, but could still be enabled

Justification
I opened this issue for multiple reasons:

contributing.md says that "larger" contributions should have associated issues
there seems to be some confusion on whether this is for just nixos, and the original PRs seem to have some convoluted history. so this is an attempt at reasoning through this from first principle
it doesn't really fit with nixpkgs per se, because it would be substantial new behavior for UC

No, this is not happening until it gets decided in nixpkgs upstream.

In what way is nixpkgs to be considered upstream to this?
What decision should be taken by nixpkgs and how would it influence UC?

(https://github.com/ungoogled-software/ungoogled-chromium/pull/2753#issuecomment-2188115010)
I am not convinced that installing extensions declaratively or externally or however is not possible without modifying the source code.
with my nixpkgs chromium maintainer hat on I would like to support declarative extensions management without carrying patches for chromium or ungoogled-chromium.
with my ungoogled-chromium maintainer hat on I don't want us to carry packages that I'm not convinced help downstream packaging or users.
From what I can tell chromium tries to load extensions from these locations currently:

/usr/share/chromium/extensions
~/.config/chromium/Default/Extensions (thats where chromium installs them when using NeverDecaf's chromium-web-store extension; I assume thats true in vanilla chromium for the normal webstore as well)
~/.config/chromium/Default/External Extensions which Michael Adlers' Extension Downloader uses

with my nixpkgs chromium maintainer hat on Given that, it seems clear to me what we can do in nixpkgs: Support installing extensions via /usr/share/chromium/extensions just like we already support enterprice policies for example which already apply globally.
For modifying files in the user's home directory we'll have to use home-manager, there the extension management should conceptually be the same as for Visual Studio Code (which also only supports the default profile currently, by the way).

First off, would you mind elaborating how your response answers my two questions you quoted, @networkException? What kind of decision are you looking for in nixpkgs, and how could it change the situation for ungoogled-chromium? With your UC-maintainer hat on, how would it be different from the decision, that's already been made in guix?

with my nixpkgs chromium maintainer hat on Given that, it seems clear to me what we can do in nixpkgs: Support installing extensions via /usr/share/chromium/extensions just like we already support enterprice policies for example which already apply globally.

That sounds like a solution to this, however, we don't have /usr/share in nixos, and we won't introduce it just for UC, right? Enterprise policies work, because we still have /etc. You can't install extensions from there, only download from chrome store, like programs.chromium.extensions does. So can you elaborate on how specifically to do this, when you say we can already do this? Are you thinking of introducing a mount namespace?

with my ungoogled-chromium maintainer hat on I don't want us to carry patches that I'm not convinced help downstream packaging or users.

What would it take to convince you?
To answer a few other of your points:

Ad ~/.config: As I said, let's please try to leave  home-directory poking out of the solution space. chromium already supports /usr/share/chromium/extensions, and it has a real impact when that path is not usable.
Ad vscode: On a surface level this looks like a good point, however

Its solution of poking around in ~/.config also has drawbacks, and I have seen real-world breakage from it
All versions of vscode I've looked at, still provide direct access to marketplace, which alleviates the need for extension management to a large degree
vscode doesn't seem to support a system extensions folder at all
vscode provides an --extensions-dir flag, which would already enable this use case

That sounds like a solution to this, however, we don't have /usr/share in nixos, and we won't introduce it just for UC, right? Enterprise policies work, because we still have /etc. You can't install extensions from there, only download from chrome store, like programs.chromium.extensions does. So can you elaborate on how specifically to do this, when you say we can already do this? Are you thinking of introducing a mount namespace?

with my nixpkgs chromium maintainer hat on:
I did not have that on my radar, but NixOS not having a global /usr/share is subject for a patch like [this] to adjust to somewhere in /etc.

Ad ~/.config: As I said, let's please try to leave home-directory poking out of the solution space. chromium already supports /usr/share/chromium/extensions, and it has a real impact when that path is not usable.

I disagree, the home directory is a perfectly fine place to manage per-user extensions

All versions of vscode I've looked at, still provide direct access to marketplace, which alleviates the need for extension management to a large degree

I don't know how this is relevant here but mine doesn't, for example, I choose to not let VSCode access the internet

with my ungoogled-chromium maintainer hat on:
In conclusion I don't see how patching ungoogled-chromium is nessesarry. I will close this issue as Michael Adlers' Extension Downloader is already working for the goal of this issue from my perspective.
with my nixpkgs chromium maintainer hat on:
For NixOS, where other plumbing is required, there seem to be good options for installing extensions declaratively: In the user's home directory using home-manager and system wide with normal NixOS Modules.
I think a good way forward is to prototype the system wide extensions first, allowing new packages and modules changes to happen at once. Then home-manager can leverage the newly added packages for their implementation. This is especially important since the packages are likely going to need to carry some metadata (as chromium hunspell dictionary packages do).

I now agree that my real goal is system-wide extensions, which UC already supports, so OK by me.

authors: bendlas networkException

repo: ungoogled-software/ungoogled-chromium


text:
Enh/enable sort for banner index, section index, and section pages

Fixes #153

Enabled sorting for banner index page, section index page and section page

@dannyparsons kindly check and let me know.

repo: unicef/iogt


text:
Use proper content scripts

In an effort to help get firefox a working plugin again, I took a stab at resolving some of the "injecting 3rd party libraries" problems.
I removed the content scope runner hack, but content scripts run in a sandbox so I also had to add some dependencies as part of the extension:

jQuery 1.4.4 - Using an old version since drupal.org uses it and I don't want to break anything
jQuery.once.js
Drupal.js - Needs the Drupal global object and the attachBehaviors function. This is a temporary stop gap until it can be refactored in #155

I was able to build extensions for Firefox, Chrome and Safari. I tested them very minimally but it appears to be working correctly.
I think the check on https://dreditor.org/ to see if the extension is installed already or not is broken now though. I verified that the

 element gets added but the button still says it's not installed.
This would fix #215 and #156.

This is a good start, for sure. Thanks!!
My only hesitation is the comment @sun made here https://github.com/unicorn-fail/dreditor/issues/155#issuecomment-44039906
The reason we're currently using Drupal.behaviors is because it's actually tying into's d.o's native Drupal.behaviors system (because the script was actually injected into d.o's DOM and was allowed to interactive with d.o's JS.
I'm not sure if we actually need that or not (my memory on the existing plugins is absent ATM since I haven't worked on the code in a while). If not... we might as well create a proper Dreditor namespace with event handling (#155) with this PR too.
I know that extensions are sandboxed, but this issue about "injecting 3rd party libraries" doesn't mean we cannot still inject something into the DOM (which is allowed). The reason why the current content script injection is a hack is because it's dumping the entire extension script into the DOM (which is generally frowned upon, especially by a.m.o).
If we do need Drupal.behaviors, then we can still inject a small script that only binds to Drupal.behaviors and then triggers a custom event to the sandboxed extension script. This allows us to control exactly what's happening and "convert" it to whatever Dreditor namespaced event API that's created.
See: http://stackoverflow.com/questions/21731635

I agree with all that. Copying Drupal.behaviors was the smallest/quickest change to get it working again.
I'm even less familiar with the plugins than you. I could "fix" the Drupal.behaviors so that it's functionally the same (reloading on ajax, etc) and ties in with d.o. That wouldn't require intimate knowledge of everything, puts stuff back in a working state, and is one step closer to a firefox release. But it's not the ideal code.
Or skip all that and go for #155. I don't know what a new plugin API looks like, or how long it'd take to refactor everything.
If the first option is acceptable, that's something I could do.

I'd rather not "copy" any portion of drupal.js into Dreditor (even if it's for a temporary workaround). It just leads to additional technical debt and ultimately doesn't really solve the problem mentioned above about tying into d.o's behavior events.

In all reality this PR kind of has to work in tandem with #155 or, essentially, replace it trying to achieve the same goal. I don't think doing one before the other in separate PRs will work. We have to keep the code fully functional in case a release needs to be made. Any PR regarding this stuff will, unfortunately, likely be a massive rewrite.

I can confirm that the plugins rely on at least one part of Drupal.behaviors, and that's rerunning them when some content has been changed via AJAX. The easiest way to test is to change the project on an issue and it will reload the entire new comment section. Many of the plugins (patch.name.suggestion, form.sticky, issue.summary.template) need to be rerun to work correctly.
The docs for all three browsers said to use the postMessage() API to communicate between the content script and the page. I created a small library that injects a script and sends a message back to dreditor when Drupal.attachBehaviors() gets called. Then I was able to rerun the plugins.
Again, I did the smallest change to get re-running plugins, which was keeping the copied Drupal behaviors. But this is a lot closer to being functionally equivalent to the old content scope runner method.

I followed the observer pattern to create a small plugin manager. I also converted one plugin as an example.
All plugins register themselves, so the execution order can be set alphabetically the way it is now, or a new file just for registrations can be used to set the order.
The notify() functionality makes it easy to add new plugin calls as they're needed, but if a rigid API is preferable it can be changed after all the plugins get converted (since right now, I'm not sure the init/bind is enough).
If this is the right track, I can convert all the plugins and remove the Drupal.* namespace (I don't think there's a need to switch to Dreditor.* since content scrips are sandboxed).

I will have to take a look at this next weekend (swamped with client work right now).

Cool, thanks for being responsive

Performance regression on long issues (this one has 119 comments https://www.drupal.org/node/2301317), this is just a reminder for me.

I'm still interested in continuing, if I'm on the right track.

Yes, the comments above need to be addressed.
Also, is it possible for you to [re-]base this off of the newly created 2.x branch?

Rebased on 2.x over at https://github.com/unicorn-fail/dreditor/pull/287

authors: markcarver rocketeerbkw

repo: unicorn-fail/dreditor


text:
feat: Implement email verification for API v2

Resolves #87 and #107
Implements operations VerifyEmail, ResendEmailVerification and updates the Register operation to send an email verification email if email verification is enabled. Also implements an email service client that uses auth system v2 EmailServiceV2.
Sending an email when resetting the user's password has been temporarily disabled, it will be re-enabled in a separate PR which implements sending a password reset email through EmailServiceV2

LGTM! Nice work 😃

authors: kzalys seanjparker


text:
Watson Speech to Text

首页:
https://github.com/watson-developer-cloud/speech-javascript-sdk
安装
bower install watson-speech --save
bower install fetch --save

STT有N多拿来就用的例子,照着抄就行了:
https://watson-speech.mybluemix.net/

核心代码如下:
// speech to text
var stream;
$('#btnTranscribeAndPlay').click(function () {

  fetch('https://watson-speech.mybluemix.net/api/speech-to-text/token').then(function (response) {
    return response.text();
  }).then(function (token) {

    var containerId = createSpeech2TextOutputContainer();

    stream = WatsonSpeech.SpeechToText.recognizeFile({
      token: token,
      file: document.querySelector('#audiofile').files[0],
      play: true, // play the audio out loud
      outputElement: '#'+ containerId // CSS selector or DOM Element (optional)
    });

    stream.on('error', function (err) {
      console.log(err);
    });

  }).catch(function (error) {
    console.log(error);
  });

});

$('#btnStop').click(function () {
  if (stream) {
    stream.stop();
  }
});

当然会出现跨域问题, chrome中搜索CORS下载了一个叫Moesif Origin & CORS Changer的插件,将插件变成on的状态, 问题解决.
编辑声音文件.
从voa english随便下载一段mp3, 用quicktime player打开, Ctrl + T 将文件trim成13s的样子, 保存成.m4a格式的文件, 然后用itunes打开, 将其另存为mp3文件. 搞定!
参考: Converting m4a to mp3 in iTunes
bluemix的笔记见: https://github.com/uniquejava/blog/issues/76

..
上面这段代码是照着官方示例抄的. API的详细参数见: https://www.ibm.com/watson/developercloud/speech-to-text/api/v1/#recognize_sessionless_nonmp12
比如可以指定 model参数改变语言(默认是英文)

repo: uniquejava/blog


text:
demo_recog_engine.c leaks unmasked rfc4733 DTMF input

I know it is just a demonstration module, but this is an issue I think is worthy of reporting here rather than the forums.
In plugins/demo-recog/src/demo_recog_engine.c, in demo_recog_stream_write() there is the code:
		if(recog_channel->recog_request) {
			if((frame->type & MEDIA_FRAME_TYPE_EVENT) == MEDIA_FRAME_TYPE_EVENT) {
				if(frame->marker == MPF_MARKER_START_OF_EVENT) {
					apt_log(RECOG_LOG_MARK,APT_PRIO_INFO,"Detected Start of Event " APT_SIDRES_FMT " id:%d",
						MRCP_MESSAGE_SIDRES(recog_channel->recog_request),
						frame->event_frame.event_id);
				}
				else if(frame->marker == MPF_MARKER_END_OF_EVENT) {
					apt_log(RECOG_LOG_MARK,APT_PRIO_INFO,"Detected End of Event " APT_SIDRES_FMT " id:%d duration:%d ts",
						MRCP_MESSAGE_SIDRES(recog_channel->recog_request),
						frame->event_frame.event_id,
						frame->event_frame.duration);
				}
			}
		}

If you receive DTMF digits as rfc2833/rfc4733 input, they arrive as events. The log code above will log DTMF input events even when conf/logger.xml is set as:
  <masking>COMPLETE</masking>
Any plugin that follows the example from the demo recognizer will leak  rfc2833/rfc4733 DTMF data in the logs even when the system is configured for user input to be masked.
As an example, I entered the DTMF digit sequence 87654321. I have masking set to complete. My unimrcp log shows:
2020-10-22 13:47:28:651839 10508 [INFO]   Detected Start of Event <cc1b347f96dcc84d@speechrecog> id:8
2020-10-22 13:47:29:451433 10508 [INFO]   Detected Start of Event <cc1b347f96dcc84d@speechrecog> id:7
2020-10-22 13:47:30:251464 10508 [INFO]   Detected Start of Event <cc1b347f96dcc84d@speechrecog> id:6
2020-10-22 13:47:30:881451 10508 [INFO]   Detected Start of Event <cc1b347f96dcc84d@speechrecog> id:5
2020-10-22 13:47:31:831466 10508 [INFO]   Detected Start of Event <cc1b347f96dcc84d@speechrecog> id:4
2020-10-22 13:47:32:721474 10508 [INFO]   Detected Start of Event <cc1b347f96dcc84d@speechrecog> id:3
2020-10-22 13:47:33:541462 10508 [INFO]   Detected Start of Event <cc1b347f96dcc84d@speechrecog> id:2
2020-10-22 13:47:34:351517 10508 [INFO]   Detected Start of Event <cc1b347f96dcc84d@speechrecog> id:1

Sensitive data is supposed to be masked using apt_log_data_mask() first and only then passed to the logger.

Yes. My suggestion is that before writing to the log, frame->event_frame.event_id must be masked. The demo code in demo_recog_engine.c does not show this correctly. Similarly, there is some debug logging code in mpf_dtmf_detector.c that also logs unmasked event_id.
apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "Out-of-band digit [%d] arrived", frame->event_frame.event_id);
The issue is that when using RFC4733/RFC2833 DTMF, frame->event_frame.event_id represents user input and must be masked to protect sensitive data.
Presently, the sample demo_recog_engine.c logs these events without masking at APT_PRIO_INFO and mpf_dtmf_detector.c logs these events without masking at APT_PRIO_DEBUG level.
I just tested again. I DTMF entered 87654321. I have logger.xml set as
  <priority>DEBUG</priority>
  <masking>COMPLETE</masking>

My logs show:
2020-10-26 09:06:46:790567 05660 [DEBUG]  Wait for Messages [MRCPv2-Agent-1] timeout [599999]
2020-10-26 09:06:47:345583 04528 [DEBUG]  Out-of-band digit [8] arrived
2020-10-26 09:06:47:345583 04528 [DEBUG]  Signal Message to [MRCP Server] [0x1e03abc3cf0;3;4]
2020-10-26 09:06:47:345583 05064 [DEBUG]  Process Message [MRCP Server] [0x1e03abc3cf0;3;4]
2020-10-26 09:06:47:345583 05064 [INFO]   Process START-OF-INPUT Event <27b975c9116cec4b@speechrecog> [10]
2020-10-26 09:06:47:345583 05064 [DEBUG]  Signal Message to [MRCPv2-Agent-1] [0x1e0696ce0e0;1;0]
2020-10-26 09:06:47:346603 05064 [DEBUG]  Wait for Messages [MRCP Server]
2020-10-26 09:06:47:346603 05660 [DEBUG]  Process Poller Wakeup [MRCPv2-Agent-1]
2020-10-26 09:06:47:346603 05660 [DEBUG]  Process Message [MRCPv2-Agent-1] [0x1e0696ce0e0;1;0]
2020-10-26 09:06:47:346603 05660 [INFO]   Generated Message Header [114 bytes]
MRCP/2.0 114 START-OF-INPUT 10 IN-PROGRESS
Channel-Identifier: 27b975c9116cec4b@speechrecog
Input-Type: dtmf

2020-10-26 09:06:47:346603 05660 [DEBUG]  Send MRCPv2 Data 10.11.104.231:11544 <-> 10.11.40.50:60263 [114 bytes]

2020-10-26 09:06:47:346603 05660 [DEBUG]  Wait for Messages [MRCPv2-Agent-1] timeout [599443]
2020-10-26 09:06:47:435576 04528 [DEBUG]  duration: [0], state: [DETECTOR_STATE_ACTIVITY_TRANSITION], level: [1907]
2020-10-26 09:06:47:575601 04528 [DEBUG]  duration: [210], state: [DETECTOR_STATE_INACTIVITY], level: [0]
2020-10-26 09:06:48:195579 04528 [DEBUG]  Out-of-band digit [7] arrived
2020-10-26 09:06:48:305585 04528 [DEBUG]  duration: [0], state: [DETECTOR_STATE_ACTIVITY_TRANSITION], level: [1982]
2020-10-26 09:06:48:445584 04528 [DEBUG]  duration: [230], state: [DETECTOR_STATE_INACTIVITY], level: [0]
2020-10-26 09:06:49:055608 04528 [DEBUG]  Out-of-band digit [6] arrived
2020-10-26 09:06:49:175589 04528 [DEBUG]  duration: [0], state: [DETECTOR_STATE_ACTIVITY_TRANSITION], level: [1945]
2020-10-26 09:06:49:315620 04528 [DEBUG]  duration: [240], state: [DETECTOR_STATE_INACTIVITY], level: [0]
2020-10-26 09:06:49:815616 04528 [DEBUG]  Out-of-band digit [5] arrived
2020-10-26 09:06:49:845596 04528 [DEBUG]  duration: [0], state: [DETECTOR_STATE_ACTIVITY_TRANSITION], level: [1927]
2020-10-26 09:06:49:985594 04528 [DEBUG]  duration: [150], state: [DETECTOR_STATE_INACTIVITY], level: [0]
2020-10-26 09:06:50:517396 04528 [DEBUG]  Out-of-band digit [4] arrived
2020-10-26 09:06:50:705609 04528 [DEBUG]  duration: [0], state: [DETECTOR_STATE_ACTIVITY_TRANSITION], level: [1848]
2020-10-26 09:06:50:845600 04528 [DEBUG]  duration: [310], state: [DETECTOR_STATE_INACTIVITY], level: [0]
2020-10-26 09:06:51:635600 04528 [DEBUG]  Out-of-band digit [3] arrived
2020-10-26 09:06:51:785604 04528 [DEBUG]  duration: [0], state: [DETECTOR_STATE_ACTIVITY_TRANSITION], level: [1883]
2020-10-26 09:06:51:925605 04528 [DEBUG]  duration: [270], state: [DETECTOR_STATE_INACTIVITY], level: [0]
2020-10-26 09:06:52:475641 04528 [DEBUG]  Out-of-band digit [2] arrived
2020-10-26 09:06:52:585615 04528 [DEBUG]  duration: [0], state: [DETECTOR_STATE_ACTIVITY_TRANSITION], level: [1880]
2020-10-26 09:06:52:725607 04528 [DEBUG]  duration: [230], state: [DETECTOR_STATE_INACTIVITY], level: [0]
2020-10-26 09:06:53:145592 04528 [DEBUG]  Out-of-band digit [1] arrived

Notice that the log messages for "Out-of-band digit [x] arrived" show my unmasked DTMF input.

Agree that the detected digits must be masked, if masking is enabled. Not sure, though, whether using apt_log_data_mask() would make sense for logging a single digit. Instead, apt_log_masking_get() can be used to check whether masking is enabled and replace the digit with a '*' sign.

Or simply do not log those lines if any masking is enabled.
    if(recog_channel->recog_request && APT_LOG_MASKING_NONE == apt_log_masking_get()) {
      if((frame->type & MEDIA_FRAME_TYPE_EVENT) == MEDIA_FRAME_TYPE_EVENT) {
        if(frame->marker == MPF_MARKER_START_OF_EVENT) {
          apt_log(RECOG_LOG_MARK,APT_PRIO_INFO,"Detected Start of Event " APT_SIDRES_FMT " id:%d",
            MRCP_MESSAGE_SIDRES(recog_channel->recog_request),
            frame->event_frame.event_id);
        }
        else if(frame->marker == MPF_MARKER_END_OF_EVENT) {
          apt_log(RECOG_LOG_MARK,APT_PRIO_INFO,"Detected End of Event " APT_SIDRES_FMT " id:%d duration:%d ts",
            MRCP_MESSAGE_SIDRES(recog_channel->recog_request),
            frame->event_frame.event_id,
            frame->event_frame.duration);
        }
      }
    }

We started our custom plug-in by copying demo_recog_engine.c. We never  questioned that logging code and never bothered to remove it. Of course, we are now doing a careful security and PII data review and I was surprised to stumble on my DTMF keys showing up in the logs.

authors: achaloyan michaelplevy

repo: unispeech/unimrcp


text:
about "Uniswap V3: Router 2"  support

Hello author, after several days of exploration, I finally learned how to use this source code, great code!  and I change the code to support EIP-1559 ,It's worked ok

But I used this code swap,It's show  "Uniswap V3: Router" ,Manual swap on https://app.uniswap.org/#/swap It's show "Uniswap V3: Router 2"
Does this project support this "Uniswap V3: Router 2"? Is it possible to switch to "Uniswap V3: Router 2"？I used on optimism .
"V3 does not support setting this route?" I don't know if I understand it correctly

You could switch to using the Uniswap V3 Router02, as long is supports the same functions as Router01 (should be the case), by updating the address at https://github.com/uniswap-python/uniswap-python/blob/master/uniswap/uniswap.py#L179

repo: uniswap-python/uniswap-python


text:
Improve availability of the documentation

Is your feature request related to a problem? Please describe.
Currently, the documentation seems to only be available as markdown files in the github repository. This is not very user friendly.
Describe the solution you would like
I think it would be a good idea to host the documentation as a static website.
Additional context
I opened a PR that proposes a solution with mkdocs https://github.com/unitycatalog/unitycatalog/pull/32

Thanks again for getting this one started @fpgmaas.
I am working on restructuring the docs a bit and hopefully we can go live with the first version of the docs on docs.unitycatalog.io soon!

@MrPowers What are the next steps here?

@monamohan - we're working on some CNAME issues right now and need to build a GitHub Action to release the docs on command.  Hopefully we can get this done soon 😄

This is done!  https://docs.unitycatalog.io/

authors: MrPowers fpgmaas monamohan

repo: unitycatalog/unitycatalog


text:
launching from explorer tries to open project with wrong version

this project https://github.com/Unity-Technologies/FPSSample
opens with unity 5.x, but should be:
m_EditorVersion: 2018.3.0b4

didnt happen again

repo: unitycoder/UnityLauncher


text:
ResolutionFailedException not serializable

Hi
I have a Web Performance and Load Test Project where I use Unity 4.0.1. When I execute a load test I get an error that ResolutionFailedException is not serializable. I downloaded the source code , added [Serializable] to the constructor, compiled and used the dll as a reference instead and it worked fine. Would it be possible to add it to the code?
BR Stefan

There are more that hundred classes and constructors. Which one are you talking about?

Hi Eugene, thanks for the quick feedback :) What I meant was that the ResolutionFailedException class needs to be serializable, i.e.
[Serializable]
[SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors",
Justification = "The standard constructors don't make sense for this exception, as calling them will leave out the information that makes the exception useful in the first place.")]
    public partial class ResolutionFailedException : Exception
{....

Sorry for the confusion.
BR Stefan

btw, this is the error message that I get:
Test Error	TestError	7	Unit Test Adapter threw exception:
Type 'Microsoft.Practices.Unity.ResolutionFailedException' in assembly 'Microsoft.Practices.Unity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=6d32ff45e0ccc69f' is not marked as serializable..

Good question, it has to be related to the way Microsoft runs loadtests. I am able to execute the code separately (outside a load test) without serialization but when I put it in a load test it fails.

I am unable to patch 4.0.1. The original signing certificate is lost and anything I release has to be in 5.0.0.
It will be a while before I do 5.0.0 so you are better off with your local copy for now. But I'll add these in v5.

Thanks :)

Fixed in Unity.Abstractions v2.0.0-beta1

authors: ENikS stefanbie

repo: unitycontainer/unity


text:
$fetch type-safety for calling other Nitro endpoints

Describe the feature
Hey! It might be a far fetch, but sometimes, one nitro endpoint calls another one via $fetch (e.g. a Nuxt server route calling an API endpoint). Would it be possible to achieve $fetch type-support here too?
Opening in this repo instead of the nuxt framework repo because it could be supported for all nitro setups.
https://stackblitz.com/edit/unjsnitroissues646?file=routes%2Findex.ts,routes%2Fabout.ts

Additional information

[ ] Would you be willing to help implement this feature?

This should work already. Would you give an example of it not working?

Yes, sure! StackBlitz attached, tested locally.

It seems to be working in latest nitro

please feel free to reopen if can reproduce.

authors: danielroe manniL pi0

repo: unjs/nitro


text:
fix(modules): pass alias directly to jiti

🔗 Linked issue
fix https://github.com/unjs/nitro/issues/2029

❓ Type of change

[ ] 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
[x] 🐞 Bug fix (a non-breaking change that fixes an issue)
[x] 👌 Enhancement (improving an existing functionality like performance)
[ ] ✨ New feature (a non-breaking change that adds functionality)
[ ] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description
Hi :wave: this PR pass alias directly to jiti() which will use pass it down to the now fixed resolvePath() of mlly

📝 Checklist

[x] I have linked an issue or discussion.
[ ] I have updated the documentation accordingly.

jiti is now correctly resolving both alias and modules !


text:
fix(node-cluster): default number of workers

🔗 Linked issue

❓ Type of change

[ ] 📖 Documentation (updates to the documentation or readme)
[x] 🐞 Bug fix (a non-breaking change that fixes an issue)
[ ] 👌 Enhancement (improving an existing functionality like performance)
[ ] ✨ New feature (a non-breaking change that adds functionality)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

📝 Checklist

[ ] I have linked an issue or discussion.
[ ] I have updated the documentation accordingly.

Thanks!


text:
[FEATURE] Show template values

Is your feature request related to a problem? Please describe.
I need a way to get defined values for a specific template.
It happened to me that I created a project with "zh" while the supposed language meant to be "zh_cn".
$ memsource project template create -f value -c uid --name "SOMETHING" --template-id SOMENUMBER --target-langs ja fr zh_cn
This API call gives that information:
https://cloud.memsource.com/web/docs/api#operation/getProjectTemplate
Describe the solution you'd like
$ memsource project template show --template-id SOMENUMBER -f value -c targetLangs
Describe alternatives you've considered
Additional context

Assigning to @ludekjanda

The feature has been added with this commit: https://github.com/unofficial-memsource/memsource-cli-client/commit/7bd00d1377e6a01d23f29641cb759f59430dc8ff
Wiki link: https://github.com/unofficial-memsource/memsource-cli-client/wiki/Memsource-Template#template-show

authors: ludekjanda zerodayz


text:
UnPoller - API Key (Early Access)

Hi,
Is there any plan to introduce the API Key functionality that's currently available for Unifi?
I've got a DMP and try as I might, I get a 403 forbidden on the local API, nothing works...been trying on and off for months.

Has anyone actually managed to get UnPoller to connect to a Dream Machine Pro?
Tried the 443 firewall rule that people have posted before, to no avail.
Really want to get this working and I'm happy to work with anyone who can spend a bit of time helping? :)
Thanks to anyone who can help
Danny

Is there any plan to introduce the API Key functionality that's currently available for Unifi?

We don't have plans at the moment, but we could always make them at some point.

Has anyone actually managed to get UnPoller to connect to a Dream Machine Pro?

Hundreds of folks.

Really want to get this working and I'm happy to work with anyone who can spend a bit of time helping?

First thing to try is to use your username and password in the config. Might be a problem with the unpoller user. In the past we had an issue where a special character in the password would never work.

The error indicates the provided user does not have access to the API.

Thanks for the update @ghTravis. Are you using a Dream Machine Pro as your controller?

Thanks for the update @ghTravis. Are you using a Dream Machine Pro as your controller?

yes, UDMP SE though.

Is there any plan to introduce the API Key functionality that's currently available for Unifi?

We don't have plans at the moment, but we could always make them at some point.

Has anyone actually managed to get UnPoller to connect to a Dream Machine Pro?

Hundreds of folks.

Really want to get this working and I'm happy to work with anyone who can spend a bit of time helping?

First thing to try is to use your username and password in the config. Might be a problem with the unpoller user. In the past we had an issue where a special character in the password would never work.

Great news on the API Key functionality. I'm happy to be an early adopter/tester to support this if/when you choose to implement it :)
I also encountered numerous issues with InfluxDB so spent a couple of hours fixing those (permissions, buckets etc) that the Docker image didn't seem to configure via docker-compose

I currently don't have this feature myself, when it's GA then let's add a note here to look at this again.

authors: dannyleeuk davidnewhall ghTravis platinummonkey

repo: unpoller/unpoller


text:
About UnslothTrainer

after the gradient accumulation fix, I tried to continue the pre-trained Llama 3.2 3B model for my datasets but got these issues when training. Does anyone have a solution?
from unsloth import unsloth_train
trainer_stats = unsloth_train(trainer)

/usr/local/lib/python3.10/dist-packages/unsloth_zoo/training_utils.py:196: FutureWarning: `torch.cuda.amp.GradScaler(args...)` is deprecated. Please use `torch.amp.GradScaler('cuda', args...)` instead.
  float16_scaler = torch.cuda.amp.GradScaler()
==((====))==  Unsloth - 2x faster free finetuning | Num GPUs = 1
    \   /|    Num examples = 2,500 | Num Epochs = 1
O^O/ \_/ \    Batch size per device = 2 | Gradient Accumulation steps = 8
\        /    Total batch size = 16 | Total steps = 312
 "-____-"     Number of trainable parameters = 982,515,712
  0%|          | 1/312 [00:25<2:13:19, 25.72s/it]0, 2.5521
  4%|▎         | 11/312 [02:27<1:00:48, 12.12s/it]10, 2.2398
  7%|▋         | 21/312 [04:28<58:10, 12.00s/it]20, 2.2377
 10%|▉         | 31/312 [06:29<55:54, 11.94s/it]30, 2.1703
 13%|█▎        | 41/312 [08:33<55:08, 12.21s/it]40, 2.2717
 16%|█▋        | 51/312 [10:34<53:04, 12.20s/it]50, 2.1472
 20%|█▉        | 61/312 [12:37<51:23, 12.29s/it]60, 2.099
 23%|██▎       | 71/312 [14:40<49:20, 12.28s/it]70, 2.2203
 26%|██▌       | 81/312 [16:42<47:00, 12.21s/it]80, 2.0887
 29%|██▉       | 91/312 [18:46<45:33, 12.37s/it]90, 2.1831
 32%|███▏      | 101/312 [20:48<42:44, 12.16s/it]100, 2.1756
 36%|███▌      | 111/312 [22:51<41:39, 12.43s/it]110, 2.1127
 39%|███▉      | 121/312 [24:52<37:45, 11.86s/it]120, 2.0503
 42%|████▏     | 131/312 [26:54<36:43, 12.17s/it]130, 2.1249
 45%|████▌     | 141/312 [28:56<35:01, 12.29s/it]140, 2.1993
 48%|████▊     | 151/312 [30:58<32:48, 12.23s/it]150, 1.9419
 50%|█████     | 156/312 [31:59<31:53, 12.26s/it]
---------------------------------------------------------------------------
StopIteration                             Traceback (most recent call last)
[<ipython-input-11-7a9b0bd5dae9>](https://localhost:8080/#) in <cell line: 4>()
      2
      3 # trainer_stats = trainer.train()
----> 4 trainer_stats = unsloth_train(trainer)

4 frames
[/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py](https://localhost:8080/#) in _next_index(self)
    618
    619     def _next_index(self):
--> 620         return next(self._sampler_iter)  # may raise StopIteration
    621
    622     def _next_data(self):

StopIteration:

Oh I had not seen this new trainer code yet ... Okay lets try that ...Thank buddy.

Observation: It is just as slow as 'trainer' -- 5-6 hour eta for 280 step train.

Thanks GUYS ... You guys do good work.

@danielhanchen Thank you for your reply I haven't rechecked but when I run a trainer requires me to API of wandb
Is it still ok if I disable it?
wandb.init(mode="disabled")

wandb: WARNING The `run_name` is currently set to the same value as `TrainingArguments.output_dir`. If this was not intended, please specify a different run name by setting the `TrainingArguments.run_name` parameter.

@Vital1162 Oh sorry just fixed it - see https://github.com/unslothai/unsloth/issues/1153 ie
I updated all training notebooks - please edit the TrainingArguments part by adding report_to = "none". For example:

    args = TrainingArguments(
        per_device_train_batch_size = 2,
        gradient_accumulation_steps = 4,
        ...
    ),

should be edited to:

    args = TrainingArguments(
        per_device_train_batch_size = 2,
        gradient_accumulation_steps = 4,
        ...
        report_to = "none", # Use this for WandB etc
    ),

authors: CurtiusSimplus Vital1162 danielhanchen

repo: unslothai/unsloth