Fix discontinuous water runoff

This is likely to be fixed by applying dss to precipitation sources.

We checked that this is already dss'd
applying
Ws_cpy = deepcopy(Y_lnd.Ws)
dss_buffer = ClimaCore.Spaces.create_dss_buffer(Ws_cpy)
ClimaCore.Spaces.weighted_dss!(Ws_cpy, dss_buffer)

resulted in no change (i.e. sum(Y_lnd.Ws .- Ws_cpy) = 0).
Note, most of the grid imprinting is seen over areas which are not integrated over land.

Some discontinuity expected due to 0M instantaneously translating onto the land variables.
There is also additional discontinuity due to plotting (here blown up to show range of [-1e-5, 0] of the same col. integrated rain field, same snapshot (after 100d) using both methods).
ClimaCorePlots (nonconservative interpolation):

ClimaCoreTempestRemap (conservative interpolation to RLL, where a lot of the discontinuity within elements goes away):

Conclusion: rain-derived variables behave within expected bounds. Thanks, @trontrytel, for your thoughts.


make jcenter build work on docker file

for some reason the dependencies were not properly retrieved from jcenter with the id central
this aims to fix broken docker builds: https://hub.docker.com/repository/docker/neicnordic/sda-doa/builds

seems to work: https://hub.docker.com/repository/registry-1.docker.io/neicnordic/sda-doa/builds/e592ce4a-398e-4c61-a5d4-4091fb8fae9d


Use S3 + cloudfront for assets and cached-assets

related to #1072
internal: see https://github.com/huggingface/infra/issues/605#issue-1758616648

keep open


Skip catalog generation dbt docs generate

resolves #6980

Description

Checklist

[x] I have read the contributing guide and understand what's expected of me
[x] I have signed the CLA
[x] I have run this code in development and it appears to resolve the stated issue
[x] This PR includes tests, or tests are not required/relevant for this PR
[ ] I have opened an issue to add/update docs, or docs changes are not required/relevant for this PR
[x] I have run changie new to create a changelog entry

Since I created the original issue, putting in my two cents that I don't love the skip_catalogue_generation name since it does generate a catalog.json (albeit empty)

Hey, thanks for feedback. Sounds good to me. I still haven't made up my mind between renaming it to generate_empty_catalog (or any meaningful alternative) or rework codebase into the case where we skip generation indeed. Would be happy if you have thoughts on that.


什么时候释放测试和训练代码

很好的工作，请问什么时候公开测试和训练代码

Sorry for too late. My mistake.
We plan to release training and testing code soon (probably in September, after the NeurIPS23 results are announced).

Dear @lang25150, we release training&testing codes and pre-trained models.


Current Folder to favorites

What's the Problem?
want to pin network devices to favorites.  Network devices are not listed under network drivers.
there are no other ways to do it
Solution/Idea
Current Folder to favorites
Alternatives
--
Priorities

Capability
Priority

This proposal will allow developers to accomplish W
Must

This proposal will allow end users to accomplish X
Should

This proposal will allow developers to accomplish Y
Could

This proposal will allow end users to accomplish Z
Won't

Files Version
No response
Windows Version
Edition	Windows 11 Pro Version	21H2 Installiert am	05.06.2021 Betriebssystembuild	22000.778 Leistung	Windows Feature Experience Pack 1000.22000.778.0
Comments
No response

You can right click in the network location to add it to the favorites section.

That’s right, but only when devices are listen there. In my case they are not listed

You should be able to right click in the drive itself in a blank area, you don't have to do it from the server.

Ok, will try it

it works. thank you


Title button too big and overlaps certain buttons

it turns out it was the old hide-window-button code i left in my user chrome.css that caused it, changed it to the new one and the issue's gone. Thanks

Ah-ha, good to hear the issue’s gone :D


npx slidev export fails to render images in pdf

See:
git clone git@github.com:inoas/gleam-elixir-phoenix-liveview-counter.git presentation
&& cd presentation/docs/slides/slidev
&& npx slidev export --dark

This includes pngs added via markdown or html tag.


Version 2.7.15 introduced breaking changes about getCurrentScope

Version
2.7.15
Reproduction link
github.com
Steps to reproduce

npm install
2.npm run start
3.Execute the "getCurrentScope "method on the console

What is expected?
The getCurrentScope method returns undefined
What is actually happening?
The getCurrentScope method returns not undefined

The getCurrentScope method returns undefined in version 2.7.14

I traced this line of code to affect this behavior，I'm not sure it's a bug。

There is always an activeEffectScope，Causes watchEffect to bind to an incorrect instance and then be accidentally destroyed


Document Parsing - Consolidate Text Preprocessing

Currently there are three separate files for preprocessing the documentation. Each file has slightly different functionality and requires specific instructions to ensure the preprocessing is done correctly.
Consolidating this to one process while maintaining the same functionality would not only make the code more understandable but also make it more scalable. Allowing for easier improvements that affect all projects and get closer to support for more projects. As currently only the three are supported.

Consolidated most of the process for libc and openssl and these two are the most similar.


Design Store model

[ ] as an actor factor: https://github.com/ckb-js/kuai/issues/4
[ ] default storage layout
[ ] pattern to gather cells
[ ] interfaces

[ ] new(pattern): fetch cells by the specific pattern and initialize a Store model
[ ] destroy(): remove data in the Store model
[ ] duplicate(): create a new Store model from plain cells with the same data
[ ] sync(blockNumber?): load data with pattern defined on initialization at a specific block number
[ ] get(path): get a value at the specific path
[ ] set(path, value): update a value at the specific path
[ ] delete(path): remove key-value pair at the specific path

[ ] metadata of a storage

[ ] schema
[ ] serialization
[ ] how to share/propagate metadata

[ ] lazy evaluation of updates

A rough to-do list of Store model was added to this issue. Other models have their own issues

Contract: https://github.com/ckb-js/kuai/issues/3
Token: https://github.com/ckb-js/kuai/issues/5

We can talk a bit more about details and I'll enrich the to-do list along with the discussion. @janx @homura @felicityin @yanguoyu

Define cell storage struct to gather by the specific pattern.

Define cell storage struct to gather by the specific pattern.

Define cell storage struct to gather by the specific pattern.

Does this mean how to match a pattern with a given cell storage struct?
Take the issues in GitHub as an example
If we are building an issue system on-chain and every issue is stored as a cell, it would be structured as
interface Issue {
  open: boolean
  updated_at: timestamp
  label: Array<string>
  author: User
}

While we can filter cells/issues out by a pattern as is:open sort:updated-desc author:@me

Would the question be what's the default struct of a cell off-chain and corresponding patterns ?

interface Issue {
open: boolean
updated_at: timestamp
labels: Array
author: User
}
Would the question be what's the default struct of a cell off-chain and corresponding patterns ?

Yeah, on the other hand, how to store this information on the chain? Or how to transform these data to bytecode and store them in the cell?

interface Issue {
open: boolean
updated_at: timestamp
labels: Array
author: User
}
Would the question be what's the default struct of a cell off-chain and corresponding patterns ?

Yeah, on the other hand, how to store this information on the chain? Or how to transform these data to bytecode and store them in the cell?

That's the detail we're going to confirm in this issue.

I have designed something about Store like this. Please have a review. @Keith-CY @homura @IronLu233

Schema:

type StorageType = 'json' | 'molecule'
type StorageLoc = 'data' | 'witness'
export const loc = Symbol('loc')

type DataType = 'string' | 'number' | 'boolean'

export interface Schema {
  [field: string]: DataType | DataType[] | { [field: string]: DataType | DataType[] }
  [loc]?: StorageLoc
}

Make assume, a Dapp's scheme is unique. Then we can transfer it to kuai as a parameter.
Let me define a entry class:
class App {
  schema: Schema[]
  storageType: StorageType
  offset: Partial<Record<StorageLoc, number>>
  registerSchema(schema: Schema[], type: StorageType = 'json', offset?: Partial<Record<StorageLoc, number>>) {
    this.schema = schema
    this.storageType = type
    this.offset = offset
  }
  sync(tx: CKBComponents.Transaction) {
    //Get State from tx by S and transfter State to Store by message
    const data = tx.outputsData
    const witness = tx.witnesses
    for (let i = 0; i < data.length; i++) {
      const item = data[i];
      const addStates = []
      const removeStates = []
      const inDataFields = this.schema.filter(v => v[loc] === 'data')
      const inWitnessFields = this.schema.filter(v => v[loc] === 'witness')
      if (inDataFields.length) {
        const offset = this.offset.data || 0
        // Deserialization data by offset and type
      }
      if (inWitnessFields.length) {
        const offset = this.offset.witness || 0
        // Deserialization witness by offset and type
      }
      // send message to actors to sync data
    }
  }
}

Then Dapp developers can transfer schema like this:
const bitSchema: Schema[] = [
  {
    name: 'string',
    version: 'string',
    [loc]: 'data'
  },
  {
    version: 'string',
    [loc]: 'data'
  },
  {
    [loc]: 'witness',
    domain: {
      name: 'string',
      createTime: 'string',
    }
  }
]
const app = new App()
app.registerSchema(bitSchema)
app.start()

Pattern
I design patterns to match data in the chain by fields and match operations or match by RegExp
Avoid the patterns becoming complex, I don't design nest patterns.

export interface PatternItem {
  field: string
  match: {
    op: 'eq' | 'lt' | 'gt' | 'lte' | 'gte' | 'in'
    value: any
  } | RegExp
}

export type Pattern = {
  aggregate: 'OR' | 'AND'
  patterns: PatternItem[]
}[] | PatternItem

I can define a pattern to match AAAAA or match BBBBB
[
  {
    aggregate: 'or',
    patterns: [
      {
        field: 'data.domain',
        match: {
          op: 'in',
          value: 'AAAAA'
        }
      },
      {
        field: 'data.domain',
        match: {
          op: 'in',
          value: 'BBBBB'
        }
      }
    ]
  }
]

Or simply define a pattern
{
        field: 'data.domain',
        match: {
          op: 'in',
          value:  new RegExp('^(A|B){5}$')
        }
}

Store
The Store receives data from the root actor to add or remove data storage by pattern, stores messages in memory, then calculates finally States by messages.
The Store save States by key -> value, the key is the Outpoint to string, value is deserialized from a transaction by a schema.

export class Store<S extends State = State, M extends Message = Message> extends Actor {
  pattern: Pattern;
  protected states: Record<OutPointString, S> = {}
  private messageList: M[] = []

  constructor(pattern: Pattern) {
    super()
    this.pattern = pattern
  }

  // sync from tx or database
  private addState(addStates: Record<OutPointString, S>) {
    this.states = {
      ...this.states,
      ...addStates
    }
  }

  // sync from tx
  private removeState(keys: OutPointString[]) {
    keys.forEach(key => {
      delete this.states[key]
    })
  }

  duplicate() {
    const store =  new Store(this.pattern)
    // copy states and messages
    return store
  }

  handle(message: M) {
    switch (message.type) {
      case 'add-state':
        // if match pattern
        this.addState(message.data)
        break;
      case 'remove-state':
        // if match pattern
        this.removeState(message.data)
        break;
      default:
        break;
    }
  }

  get(path: StataPath) {
    if (path.path) {
      return this.states[path.key][path.path]
    }
    return this.states[path.key]
  }
  set(path: StataPath, value: any) {
    if (path.path) {
      this.states[path.key][path.path] = value
    }
    this.states[path.key] = value
  }

  remove(path: StataPath) {
    if (path.path) {
      delete this.states[path.key][path.path]
    }
    delete this.states[path.key]
  }

  finalize() {
    this.messageList.forEach(message => {
      this.handle(message)
    })
    return this.states;
  }
}

I have designed something about Store like this. Please have a review. @Keith-CY @homura @IronLu233

Schema:

type StorageType = 'json' | 'molecule'
type StorageLoc = 'data' | 'witness'
export const loc = Symbol('loc')

type DataType = 'string' | 'number' | 'boolean'

export interface Schema {
  [field: string]: DataType | DataType[] | { [field: string]: DataType | DataType[] }
  [loc]?: StorageLoc
}

Make assume, a Dapp's scheme is unique. Then we can transfer it to kuai as a parameter. Let me define a entry class:
class App {
  schema: Schema[]
  storageType: StorageType
  offset: Partial<Record<StorageLoc, number>>
  registerSchema(schema: Schema[], type: StorageType = 'json', offset?: Partial<Record<StorageLoc, number>>) {
    this.schema = schema
    this.storageType = type
    this.offset = offset
  }
  sync(tx: CKBComponents.Transaction) {
    //Get State from tx by S and transfter State to Store by message
    const data = tx.outputsData
    const witness = tx.witnesses
    for (let i = 0; i < data.length; i++) {
      const item = data[i];
      const addStates = []
      const removeStates = []
      const inDataFields = this.schema.filter(v => v[loc] === 'data')
      const inWitnessFields = this.schema.filter(v => v[loc] === 'witness')
      if (inDataFields.length) {
        const offset = this.offset.data || 0
        // Deserialization data by offset and type
      }
      if (inWitnessFields.length) {
        const offset = this.offset.witness || 0
        // Deserialization witness by offset and type
      }
      // send message to actors to sync data
    }
  }
}

Then Dapp developers can transfer schema like this:
const bitSchema: Schema[] = [
  {
    name: 'string',
    version: 'string',
    [loc]: 'data'
  },
  {
    version: 'string',
    [loc]: 'data'
  },
  {
    [loc]: 'witness',
    domain: {
      name: 'string',
      createTime: 'string',
    }
  }
]
const app = new App()
app.registerSchema(bitSchema)
app.start()

Pattern
I design patterns to match data in the chain by fields and match operations or match by RegExp
Avoid the patterns becoming complex, I don't design nest patterns.

export interface PatternItem {
  field: string
  match: {
    op: 'eq' | 'lt' | 'gt' | 'lte' | 'gte' | 'in'
    value: any
  } | RegExp
}

export type Pattern = {
  aggregate: 'OR' | 'AND'
  patterns: PatternItem[]
}[] | PatternItem

I can define a pattern to match AAAAA or match BBBBB
[
  {
    aggregate: 'or',
    patterns: [
      {
        field: 'data.domain',
        match: {
          op: 'in',
          value: 'AAAAA'
        }
      },
      {
        field: 'data.domain',
        match: {
          op: 'in',
          value: 'BBBBB'
        }
      }
    ]
  }
]

Or simply define a pattern
{
        field: 'data.domain',
        match: {
          op: 'in',
          value:  new RegExp('^(A|B){5}$')
        }
}

Store
The Store receives data from the root actor to add or remove data storage by pattern, stores messages in memory, then calculates finally States by messages.
The Store save States by key -> value, the key is the Outpoint to string, value is deserialized from a transaction by a schema.

export class Store<S extends State = State, M extends Message = Message> extends Actor {
  pattern: Pattern;
  protected states: Record<OutPointString, S> = {}
  private messageList: M[] = []

  constructor(pattern: Pattern) {
    super()
    this.pattern = pattern
  }

  // sync from tx or database
  private addState(addStates: Record<OutPointString, S>) {
    this.states = {
      ...this.states,
      ...addStates
    }
  }

  // sync from tx
  private removeState(keys: OutPointString[]) {
    keys.forEach(key => {
      delete this.states[key]
    })
  }

  duplicate() {
    const store =  new Store(this.pattern)
    // copy states and messages
    return store
  }

  handle(message: M) {
    switch (message.type) {
      case 'add-state':
        // if match pattern
        this.addState(message.data)
        break;
      case 'remove-state':
        // if match pattern
        this.removeState(message.data)
        break;
      default:
        break;
    }
  }

  get(path: StataPath) {
    if (path.path) {
      return this.states[path.key][path.path]
    }
    return this.states[path.key]
  }
  set(path: StataPath, value: any) {
    if (path.path) {
      this.states[path.key][path.path] = value
    }
    this.states[path.key] = value
  }

  remove(path: StataPath) {
    if (path.path) {
      delete this.states[path.key][path.path]
    }
    delete this.states[path.key]
  }

  finalize() {
    this.messageList.forEach(message => {
      this.handle(message)
    })
    return this.states;
  }
}

number in JavaScript is obscure and error-prone because it has a limit, maybe decimal, big number, big decimal are more clear;
Schema could be recursive, as [field: string]: Schema so each field would have a loc attribute to specify whether it's in data or witness.
Why is sync method receiving a transaction. If it's updated by a transaction, there would be a series of updates during a block;

number in JavaScript is obscure and error-prone because it has a limit, maybe decimal, big number, big decimal are more clear;

It's a good suggestion, I will update it later.

Schema could be recursive, as [field: string]: Schema so each field would have a loc attribute to specify whether it's in data or witness.

I think we should make the loc at the outermost. If loc is in recursive data, the data object maybe have some fields that will save in witness. Like this, it may make it confusing.
const bitSchema: Schema[] = [
  {
    name: 'string',
    version: 'string',
    [loc]: 'data',
    domain: {
      [loc]: 'witness',
      name: 'string',
      createTime: 'string',
    }
  }
]

Why is sync method receiving a transaction. If it's updated by a transaction, there would be a series of updates during a block;

It should sync from a block, I just described how it will deserialize from a transaction.

I see the design was updated 2 days ago, is it ready for review again?


Add flag to control drawing of gizmo #9643

Objective
The AabbGizmo provides an easy way to view the bounding box of an entity but in order to hide that gizmo is to remove the component entirely.
Fixes #9643
Solution
Added a flag draw that controls whether the gizmo will be drawn.

This PR does what it's supposed to do, but I'm not convinced we need two ways to control the gizmo being displayed

What is the other way of controlling the visibility? Adding and removing the component every time?


Added a quiet flag to suppress the output of _pull_if_necessary.

I could not find a way to suppress the output of container.run when the image was not found.

That's a good point. I'll think about it. Adding a functionnality that is not in the CLI must be done carefully. They have a very good user experience, and python-on-whales aims to ride on this very good UX


Update printers.md

Add defmt-print
Reorder them to put the most important implementations up top and qemu-run at the bottom
Update note, removing mention of the defmt feature, which is now unnecessary

bors r+


Transparent Embeded

Hi there,
hope you are all well,
I would love some help, if you could please assist 🙏

would like to know how to embed this fluid simulation inside another website,

I would like it in a 400x400 px area at the bottom
Needs to be TRANSPARENT and not interfere with the website underneath

Prechoosing a paths to animate, instead of the mouse

A circle path, spiral path (with params)
a figure 8 (infinity) path, custom path, trace outline, etc
trigger to switch paths or params

I'd use this to animate the current state of a live digital assistant, I currently have a nice animation in place, but would love to upgrade it to This project, as it is simply gorgeous
Thanks a lot and all the best!

您好，我已经收到你的信件！我会及时阅读并作出回应！


Handling EXIF Image Orientation

Firstly, thanks for the great plugin! However I've noticed a small issue; When loading an image in with EXIF orientation, everything works as expected until the "getDataURL" method is called. The generated image does not crop correctly and the rotation of the cropped image is incorrect.
Below I've provided screen shots of the chosen crop area and the image generated by "Get Data URL (JPG)". The image was taken on an iPad in portrait mode.

The white area in the generated image only seems to happen when a crop is taken near the bottom the image.
Thanks

Having the same issue. Anybody found a workaround for this issue?

Maybe it is more easy to handle the EXIF Orientation on the server-side.

First, thanks for an outstanding plug-in!!!  I poked around to see if there was a client-side library I could use to do the EXIF correctio.  There are a couple of JS EXIF readers (like https://github.com/jseidelin/exif-js), and I think I can use that info, load the image into a canvas, rotate the image in the canvas, and then get the data.  I'll play around with this more and post any luck I have.
In the meantime, for .NET land, I put together a c# static method (which I wired up to a WebAPI, but you can use it with WCF or whatever).  You'll need to add a project reference to System.Drawing (and add namespaces to your class for System.Drawing, System.Drawing.Imaging and System.Text).
        /// <summary>
        /// Removes EXIF rotation from an image
        /// </summary>
        /// <param name="URI"></param>
        /// <returns></returns>
        public static string RemoveEXIFRotation(string URI)
        {
            // Decode the URI information
            string base64Data = Regex.Match(URI, @"data:image/(?<type>.+?),(?<data>.+)").Groups["data"].Value;
            byte[] binData = Convert.FromBase64String(base64Data);

            using (var stream = new MemoryStream(binData))
            {
                Bitmap bmp = new Bitmap(stream);

                if(Array.IndexOf(bmp.PropertyIdList, 274) > -1)
                {
                    var orientation = (int) bmp.GetPropertyItem(274).Value[0];
                    switch(orientation)
                    {
                        case 1:
                            // No rotation required.
                            return URI;
                        case 2:
                            bmp.RotateFlip(RotateFlipType.RotateNoneFlipX);
                            break;
                        case 3:
                            bmp.RotateFlip(RotateFlipType.Rotate180FlipNone);
                            break;
                        case 4:
                            bmp.RotateFlip(RotateFlipType.Rotate180FlipX);
                            break;
                        case 5:
                            bmp.RotateFlip(RotateFlipType.Rotate90FlipX);
                            break;
                        case 6:
                            bmp.RotateFlip(RotateFlipType.Rotate90FlipNone);
                            break;
                        case 7:
                            bmp.RotateFlip(RotateFlipType.Rotate270FlipX);
                            break;
                        case 8:
                            bmp.RotateFlip(RotateFlipType.Rotate270FlipNone);
                            break;
                    }
                    // This EXIF data is now invalid and should be removed.
                    bmp.RemovePropertyItem(274);
                }

                ImageCodecInfo jgpEncoder = ImageCodecInfo.GetImageDecoders().First(x => x.FormatID == ImageFormat.Jpeg.Guid);

                // Create an Encoder object based on the GUID
                // for the Quality parameter category.
                System.Drawing.Imaging.Encoder myEncoder = System.Drawing.Imaging.Encoder.Quality;

                // Create an EncoderParameters object.
                // An EncoderParameters object has an array of EncoderParameter
                // objects. In this case, there is only one
                // EncoderParameter object in the array.
                EncoderParameters myEncoderParameters = new EncoderParameters(1);

                EncoderParameter myEncoderParameter = new EncoderParameter(myEncoder, 100L);
                myEncoderParameters.Param[0] = myEncoderParameter;

                using(MemoryStream output = new MemoryStream(binData.Length))
                {
                    bmp.Save(output, jgpEncoder, myEncoderParameters);
                    output.Position = 0;
                    int len = (int) output.Length;
                    byte[] results = new byte[len];
                    output.Read(results, 0, len);

                    return string.Format("data:image/jpg;base64,{0}", Convert.ToBase64String(results));
                }
            }
        }

Thank you @jasonterando .

Thanks  @jasonterando .  I'm new to jQuery and html5 but I am also having trouble with exif orientation.  Could please provide an example of where you put the code to call your web service and processed the response ?

Did you guys look further into using exif-js?

If you're getting an image from the user, you can use https://github.com/blueimp/JavaScript-Load-Image to get it into the correct orientation before using cropper:
        $('#yourFileInput').on('change', function(e) {
            e.preventDefault();
            e = e.originalEvent;
            var target = e.dataTransfer || e.target,
                file = target && target.files && target.files[0],
                options = {
                    canvas: true
                };

            if(!file) {
                return;
            }

            loadImage.parseMetaData(file, function(data) {

                // Get the correct orientation setting from the EXIF Data
                if (data.exif) {
                    options.orientation = data.exif.get('Orientation');
                }

                // Load the image from disk and inject it into the DOM with the correct orientation
                loadImage(
                    file,
                    function(canvas) {
                        var imgDataURL = canvas.toDataURL();
                        var $img = $('<img>').attr('src', imgDataURL);
                        $('body').append($img);

                        // Initiate cropper once the orientation-adjusted image is in the DOM
                        $img.cropper();
                    },
                    options
                );
            });
        });

@bbrooks nice work,you saved my day,awesome plugin.

I encountered the same problem with iOS devices while I was adapting the Crop Avatar example to my own purposes, but I solved it on the PHP side.  In cropper.php, in the setFile function, starting at line 54, there is this block:
if ($result) {
    $this -> src = $src;
    $this -> type = $type;
    $this -> extension = $extension;
    $this -> setDst();
} else {
    $this -> msg = 'Failed to save file';
}

To this, I incorporated a solution to this problem as described on StackExchange by user462990.  So that whole block now reads:
if ($result) {

	$exif = exif_read_data($src);
	if (!empty($exif['Orientation'])) {
		$imageToRotate = imagecreatefromjpeg($src);
		switch ($exif['Orientation']) {

			case 3:
				$imageToRotate = imagerotate($imageToRotate, 180, 0);
				break;

			case 6:
				$imageToRotate = imagerotate($imageToRotate, -90, 0);
				break;

			case 8:
				$imageToRotate = imagerotate($imageToRotate, 90, 0);
				break;

		}
		imagejpeg($imageToRotate, $src, 90);
	}

	$this -> src = $src;
	$this -> type = $type;
	$this -> extension = $extension;
	$this -> setDst();

} else {
	 $this -> msg = 'Failed to save file';
}

This works for me.

@dekortage If the user rotate the image with cropper on browser side, and you rotate it again on server side, then what will happen?

I am using exif-js to determine orientation and rotate initially in browser. Server uses data from cropper. Here is my code. Note that there any 1-8 orientations in exif.
      EXIF.getData img.get(0), () ->
        orientation = EXIF.getTag(this, "Orientation")
        # console.log "orientation", orientation

        img.cropper
          strict: false
          aspectRatio: 1.47
          crop: (e) ->
            $("#photo_offset").val(JSON.stringify(e))

        # rotate according to orientation
        switch orientation
          when 2
            img.cropper('scale', -1, 1) # Flip horizontal
          when 3
            img.cropper('scale', -1)
          when 4
            img.cropper('scale', 1, -1)
          when 5
            img.cropper('scale', -1, 1)
            img.cropper('rotate', -90)
          when 6
            img.cropper('rotate', 90)
          when 7
            img.cropper('scale', 1, -1)
            img.cropper('rotate', -90)
          when 8
            img.cropper('rotate', -90)

        $(".rotate-left").off("click")
        $(".rotate-left").on "click", (e) ->
          e.preventDefault()
          e.stopPropagation()
          img.cropper('rotate', 90)

On server I'm using ruby-on-rails and carrierwave to handle uploads. Code uses Rmagick. Here is code. It extracts x,y,w,h,rotate,scale values that cropper sends to server. strip! removes exif info.
    manipulate! do |img|
      Rails.logger.debug "[PHOTO] offset: #{model.photo_offset.pretty_inspect}".yellow
      x, y, w, h, rotate, scaleX, scaleY = model.photo_offset.values_at("x", "y",
        "width", "height", "rotate", "scaleX", "scaleY").map { |v| v.to_f.round(2) }

      crop = "#{w}x#{h}!+#{x}+#{y}"
      Rails.logger.debug "[PHOTO] crop: #{crop.inspect}".green

      # img.auto_orient!
      img.flip! if scaleY == -1
      img.flop! if scaleX == -1
      img.rotate!(rotate) if rotate.present? && !rotate.zero?
      img.crop!(x,y,w,h)
      img.strip!

      img = yield(img) if block_given?
      img
    end

Blog post about exif rotations: http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto/
and there is link to example images which may be used to test:
https://github.com/recurser/exif-orientation-examples
I don't have any problems with this example images, however MacOs guys complains so the code is not 100% complete.
HTH

@fengyuanchen -- it seems to work fine in my limited testing.  The client side previews fine, and the transformations are sent up to the server as if the image is oriented correctly.  It's just that the server uploads the image at a 90° angle before applying the cropping/transformations.  The server just needs to reorient the file back to what the user saw client-side, before applying the server-side transformations/cropping.
However, I would definitely welcome more extensive inquiry/experimentation into this.

If the problem is that sometimes the image rendered to a canvas is correctly orientated and sometimes it isn't, then given an image with width X and height Y then can't we determine which is longest and store that as L then render the image to a canvas of size LxL, then check pixels X,L and Y,L to see which way round the image has been rendered, then rotate and crop the area as required, giving us the correct outcome in all cases?

@MarcusJT What about a square image?

Ha! Good point... damn...

Get exif orientation with exif-js
new FileReader for new Image
Create canvas
context.transform and context.drawImage
Get rotated image from canvas

$('#file').change(function () {
	var file = this.files[0];

	EXIF.getData(file, function () { // 1. exif-js
		var ex = EXIF.getTag(file, 'Orientation');
		var ori = ex ? ex : 1; // set undefined to 1
		reader(file, ori);
	});
});

function reader(file, ori) {
	var reader = new FileReader(); // 2. FileReader

	reader.onload = function (e) {
		var img = new Image();
		img.onload = function () {
			if (ori === 1 || ori === 3) {
				var w = this.width;
				var h = this.height;
			} else {
				var h = this.width;
				var w = this.height;
			}

			if (ori === 1) {
				var img0 = img; // normal image
			} else {
				var canvas = document.createElement('canvas'); // 3. canvas
				var ctx = canvas.getContext('2d');

				if (ori === 3) { // 4. transform, drawImage
					ctx.transform(-1, 0, 0, -1, w, h);
					ctx.drawImage(img, 0, 0, w, h);
				} else if (ori === 6) {
					ctx.transform(0, 1, -1, 0, w, 0);
					ctx.drawImage(img, 0, 0, h, w);
				} else {
					ctx.transform(0, -1, 1, 0, 0, h);
					ctx.drawImage(img, 0, 0, h, w);
				}

				var img0 = canvas.toDataURL(); // 5. get image
			}

			$('body').append('<img id="image">');
			$('#image').prop('src', img0).one('load', function () {
				$(this).cropper();
			});
		}
		img.src = e.target.result;
	}
	reader.readAsDataURL(file);
}

@rern really great thanks! I used your solution about an hour ago. What I discovered is that in iOS (Chrome and Safari) the orientation is correct, without any workaround but if you try on Chrome desktop with a photo taken with an iPhone (with exif) it will generate the issue. This is is a per-browser issue. I will add more details as soon as I can.

You can try the Loader to translate Exif Orientation by canvas and get a pure image for Cropper.

@50bbx - I've tried Chrome on Windows 10. iPhone photos display correctly.
(IE < 10 not support dataView, the solution will not do the trick there.)
BTW I've updated the code, switch out exif-js for a handy function from stackoverflow. May be It's small enough for @fengyuanchen to consider including it in his wonderful code.

@rern Sorry, you are right, I was using half of your solution and half of edbond. I see the image correctly rotated now. The problem is I only see a very small piece. This is the result:

as you can see it is just the upper left corner of the image. I think the base64 conversion from the canvas doesn't work correctly. I also inspected the element with chrome and the image is not hidden fullsize in the cropper: it appears the image has been cropped by the rotation process in the reader function. I didn't change anything, except from where I append the image.

@fengyuanchen I've tried, I've used precisely @bbrooks solution but it was so slow I had to revert my changes. I'm sorry I cannot provide that code anymore. But I simply copied and pasted that solution in my code (that is pretty straight forward and doesn't do anything complex nor strange)

@50bbx - You're right. My bad. There're some flaw in the code. It's been corrected.

As of v2.2.0, the Cropper will read the Exif Orientation information and override it to its default value: 1. This may fix this problem.

Not fixed on 2.2.4 =(

@kaynz If your browser supports Typed Array (iOS Safari 8.4+), then this issue may be fixed since  Cropper v2.2.0.

Reference: http://caniuse.com/TypedArrays

@fengyuanchen thanks for the quick answer. I am using iOS Safari 9, which supports Typed Array.

@kaynz Then I don't know why. Sorry!

@fengyuanchen I just set checkOrientation to false and now it is working on iOS Safari. Any ideas?

@kaynz Are you using the latest version (v2.2.4)?

@fengyuanchen yes.

@kaynz Do you catch any error in the console?.

I also set checkOrientation to false, and it fixes the issue on iOS Safari, but broke on desktop browsers.  See my comment here: https://github.com/fengyuanchen/cropper/issues/509#issuecomment-172633656

@mjvestal I followed your suggested changes by commenting out those lines, and I also set checkOrientation to false in my options, but I'm still having issues. Basically, when I choose to take a photo from my camera, on FIRST file load the width is distorted. When I then choose to take different photo, there the new photo that loads isn't distorted.

@every2ndcountsxc You can build the dist files from master branch on your computer and try it again:
git clone https://github.com/fengyuanchen/cropper.git
cd cropper
npm install
gulp release

Thanks @fengyuanchen but I don't believe "trying again" is a helpful solution.
I do, however, think my issue is something separate from the main issue(s) in this thread.
Using your own demo on my iPhone 6 (iOS9), I imported a file by taking a photo with the camera. This is the result:

As you can see, the image is distorted, as if the file reader was expecting a landscape image.
When I originally thought my problem was just a matter of me not implementing the plugin correctly, I'm now realizing that there is something going on with the way the mobile device is interpreting the image from the camera.
Thoughts on how to solve this? Thanks!

@every2ndcountsxc, the thing that works for me is NOT setting checkOrientation to false + commenting out those lines

@mjvestal thank you. That was the kind of solution I was looking for. Works like a charm. Cheers!

In the first image on this post, there is a button 'Get data URL' which I assume puts the dataurl string into the text box also shown in the image. I'm looking for sample code to get this as I haven't been able to acquire the canvas dataurl string in javascript (my javascript knowledge is lacking a a little, I'm a dot net developer)
Can anybody provide the snippet of javascript that creates dataurl?

@fengyuanchen I think @mjvestal is right, may be you should remove the 2 lines he mentioned from the code (if statement after //modern browsers). by the way thank you @mjvestal.

@Win10Developer I shouldn't be answering here since it's not the best place to ask, but here it is:
$('#imgid').cropper({
    //your other options
    crop: function(e) {
         $('"textid").val($('#imgid').cropper('getCroppedCanvas').toDataURL("image/jpeg"));
   }
});

@fengyuanchen
with "checkOrientation: false" i have the same problem like @every2ndcountsxc
the image i rotated but now it's quiet compressed.
with "checkOrientation: true" and version 2.2.5 the image is still not in the right direction.. :/
+1 for fixing this...
PS.: really nice plugin  :+1:

@fengyuanchen
i built the latest version like you described, the image is now rotated like it should, but my wrapper has now at the top and at the button space (see image)
The space would be because the browser did not rotate the image in the img-tag (but took its width+height from there)... any ideas?

Hi, everyone, please provide your iOS and Safari version here once you need to comment here.

iOS 9.2.1 on iPhone 5S

I'm using iOS 9.2 on an iPhone 62. All images that I add to the cropper via selecting the "Take Photo" option are rotated incorrectly. Although, if the image is added via an already existing image, using the "Photo Library" option, the image is the correct rotation.
Here is are screenshots of me using the "Take Photo" option:

Can confirm that the following fixed iPhone uploads rotating for me:
rotatable: true
checkOrientation: true

And commenting out
https://github.com/fengyuanchen/cropper/blob/master/src/js/utilities.js#L53-L55

Can also confirm that the fix from @samrayner works well on Safari. Thanks for sharing.

@samrayner's solution only seems to work some of the time. I believe it does not work for images that were taken as landscape. Unfortunately, there are still many issues with the cropper and image orientation.

@fengyuanchen - Any progress on this?

After weeks of debugging, I have found that @bbrooks solution with the Javascript-Load-Image plugin is the best solution. It may be slightly slower (since it is converting to base64 along with reading meta data), yet it is basically bulletproof. Have tested it in many versions of iOS, Chrome and Firefox, and all the images that used to be rotated incorrectly, wrong aspect ratio and image squished now work perfectly as expected. Thanks @bbrooks!

@bbrooks why I use requireJS to load this 'JavaScript-Load-Image' all.min.js, I can't get loadImage.parseMetaData method from the callback function. When I use a html script tag to load it, then loadImage will have such method loadImage.parseMetaData?

Hi,
I am also facing this problem.
I experienced the exact same symptoms as many other issues on the repo (90deg left-rotated image, inverted height-width aspect ratio / distortion, depending on options, external workaround tried, etc.)
In my case I develop an hybrid (Cordova-based) iOS app, so I use this plugin within a UIWebView (not Safari).
Therefore the IS_SAFARI browser sniffing test was not catching up the WebView behaving like on Safari.
Adding an extra platform sniffing test (to detect iPhone / iPad / iPod) and OR'ing it with IS_SAFARI solved the issue for me.

Hi @ghybs can you say how you did the test for the other things? I have the same problem

@ghybs Could you create a pull request?

Hi,
As for detecting the UIWebView, for now I just detect an iOS device:
http://stackoverflow.com/questions/4460205/detect-ipad-iphone-webview-via-javascript
This is not bullet proof in the case of a Web App, as I guess people could still use another browser on an iOS device.
Hopefully this already covers most cases.
I will try to make a PR when I have time.

I was having this problem, I did what @samrayner  suggested and worked perfectly.

I've mete this problem
http://stackoverflow.com/questions/41002081/fengyuanchen-cropper-typeerror-url-createobjecturl-is-not-a-function

fixed this using  @bbrooks thanks

var img0 = canvas.toDataURL(); // 5. get image
@rern  add mime type like
canvas.toDataURL('image/jpeg');
in ortder not to have big size


[BUG] After entering credentials I get an "Unexpected Error"

Describe the bug
After entering credentials I get an "Unexpected Error"
Account type

[ ] Installer
[ ] DIY / DHZ
[x] Home Owner (This integration is not (fully) functional with a home owner account!)

Envoy

[x] Metered with CTs installed

[ ] Metered without CTs

[ ] Standard

FW version: D8.2.4225 (5eea92)

Amount of micro inverters connected: 23

Home Assistant

Version: 2024.8.1

Additional context
Was working on last HA build from July 2024.

Upgraded Envoy HACS integration & Upgraded HA to latest. Than issue started with connection from enphase_envoy_installer to envoy
Removed integration and added from scratch.
Envoy IP is automatically detected. After entering credentials I get an "Unexpected Error"
I can login to the envoy using the same credentials.

Relevant snippet of Home Assistant error log.
This error originated from a custom integration.
Logger: custom_components.enphase_envoy.config_flow
Source: custom_components/enphase_envoy/config_flow.py:181
integration: Enphase Envoy (Installer) (documentation, issues)
First occurred: 10:03:28 AM (2 occurrences)
Last logged: 10:10:35 AM
Unexpected exception
Traceback (most recent call last):
File "/config/custom_components/enphase_envoy/config_flow.py", line 181, in async_step_user
envoy_reader = await validate_input(self.hass, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/enphase_envoy/config_flow.py", line 53, in validate_input
await envoy_reader.get_data()
File "/config/custom_components/enphase_envoy/envoy_reader.py", line 1176, in get_data
await self.init_authentication()
File "/config/custom_components/enphase_envoy/envoy_reader.py", line 1038, in init_authentication
await self._get_enphase_token()
File "/config/custom_components/enphase_envoy/envoy_reader.py", line 971, in _get_enphase_token
self._token = await self._fetch_owner_token_json()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/enphase_envoy/envoy_reader.py", line 937, in _fetch_owner_token_json
raise EnlightenError("Could not Authenticate via Enlighten")
custom_components.enphase_envoy.envoy_reader.EnlightenError: Could not Authenticate via Enlighten

Update:
After unchecking the box that this is just a home-owner account the login works and the integration seems to be working now.


Resnet 18

Hello @tamerthamoqa
May I ask what is the reason you choose ResNet 18 for training? From my understanding, the more data we have, the deeper network we can use. For VGGFace2, it is about 3M images, therefore, I think ResNet 50 will be a better choice isn't it ?

Hello glmanhtu,
It is mainly to be able to test the effect of large batch sizes on the training since large batch sizes tend to improve results with Triplet Loss and for the training time not to be too long as I am using my own PC for the training experiments. Even with a ResNet-18 the training time for 10 thousand training iterations with the current training settings takes around 2 hours and 50 minutes on a TITAN RTX with an additional 50 minutes for the triplet generation process with 16 python processes on an overclocked 9900-KF CPU. A ResNet-34 model would take a little more than double the training time for the same amount of iterations and would require a lower batch size to be able to be fit into the GPU's memory.
From earlier experiments I haven't noticed much difference between LFW results for different CNN architectures like the ResNet-18 and ResNet-34, but I haven't compared two difference architectures that have both finished a large amount of "epochs" so far. So it might be the case that a larger model would eventually achieve better performance.
I might do an experiment with a ResNet-34 model once I finish my current experiment with the ResNet-18, but I can't promise anything since I really need my PC for other things.

I see, however, people find that using a large batch size is not always give you a better performance,

It has been observed in practice that when using a larger batch there is a significant degradation in the quality of the model, as measured by its ability to generalize https://arxiv.org/pdf/1609.04836.pdf

Therefore, I think, decrease your batch size is one way to improve the performance of your model

While this is true for most deep learning tasks. From what I have seen from previous experiments with Triplet Loss it seems that large batch sizes are necessary when it comes to Metric Learning methods like Triplet Loss, keep in mind that not all the triplets in the batch would be used in training as they need to meet a specific criteria to be valid e.g: semi-hard negative selection.
However, from what I have seen from Face Recognition model training loss functions, they appear to use large batch sizes. the FaceNet paper that presented the Triplet Loss method used a batch size of 1800 though I don't remember if it was 1800 total images per batch or 1800 triplets. And ArcFace which is considered the current state of the art method used a batch size of 512 in the paper.
It seems Metric Learning methods benefit from larger batch sizes, but I am not sure if that is also the case in Natural Language Processing.

Interesting,
Thanks


Compose version 3?

Any plans to update support for Docker Compose 3?
I'm at the point where I need to work with Docker Swarm and I much prefer to use the Stack deploying from within Portainer than outside of it, and I'm hamstrung with only version 2 support. =)

Its something that is requested a lot in this discussion  so we would very much like to. Currently it would require a lot of work as we would either have to fork Libcompose (the binary we use for compose that is depreciated) and maintain this ourselves or switch to bundling the the compose binary. As such, it is not in the immediate plans so there is no timeframe on this.
Recently however, Docker published a roadmap including rewriting compose in go, which would make it easier for us to implement I believe. At the point this is released we could begin to reconsider compose v3 support and assign resources to it. Note: his is likely to be months away though.
I am going to close this as I believe I have answered your question.

@itsconquest An interesting thing that I noticed while messing with all of this; trying to use anything above v2 for a regular stack (no swarm) gives the usual error due to lack of v3 support; however, in the same stack area on a swarm machine, trying to use v2 gives an error:

and changing it to version: '3' solves it. Very odd, lol.

@itsconquest also, just curious, how many active developers are there on the Portainer team? (active software devs that work on the coding itself)

and changing it to version: '3' solves it. Very odd, lol.

This is expected behaviour. Swarm doesn't support v2 stack files.

@STaRDoGG we have a small, self-funded, team of developers that work on Portainer and our paid extensions. We want a much larger team, however revenue from extensions and support subscriptions only covers 1/5th of development costs as it stands today, so until revenue increases, the team will remain small.

@ncresswell Ah I see, that's why I was curious. I am somewhat interested in joining the team (if spots were available of course) but unfortunately I can't afford to work for free any more these days. Not saying I'd be looking for big bucks and health insurance and all that, lol, but just something to cover time spent on it.
From what I can tell though, there's only 3-4 devs?

Email me directly on<EMAIL_ADDRESS>


chore(deps): upgrade dev dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-dev-dependencies-k8s-25-main" workflow

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 3625

Questions ?
Please refer to the Backport tool documentation


Support infinite responses in bodyWrapper

Fixes #245.

Coverage: 94.825% (-0.2%) from 95.034% when pulling b3b99ff9cce822f3f5fba3baff4ff4c2fd67aabd on chunweii:infinite-bodywrapper into 14a00a3ae462b88b4ea58791c67111dc7b5bfe80 on gavv:master.

Thanks a lot for PR!
Big work and I think the code is correct.
bodyWrapper was an intricate piece from the beginning...
I pushed a follow-up commit with an attempt to refactor it a bit: 73a652152dc0ef830a58b50f4e62e05295d792d1
What I changed:

added comments

renamed "origReader" to "httpReader" and "cancelFunc" to "httpCancelFunc", to make it clear that they correspond to original HTTP response

renamed "currReader" to "memReader" and "origBytes" to "memBytes", to make it clear that they correspond to in-memory storage

refactored Read: now it explicitly states three cases: rewinds are disabled, reading from HTTP; rewinds are enabled, reading from HTTP; reading from memory

when Read is reading from memory, it now returns cached error only after reading the whole body, for more strict emulation of original response

renamed "readNext" to "httpReadNext" and "readFull" to "httpReadFull", to make it clear that they read from HTTP

Rewind now resets reader only when it makes sense

in httpReadNext, we now correctly handle the case when when error is returned, but n > 0; in this case we should still append bytes to memory

in httpReadFull is refactored a bit

I renamed TestBodyWrapper_InfiniteResponses to TestBodyWrapper_Memory, because it does not actually test infinite responses, but instead tests how response is stored into memory in various cases

I reworked TestBodyWrapper_PartialRead so that it actually requests more bytes than returned (request 10, got 4), otherwise reads were not really partial

A few more follow-up commits:

70e3c1bb7a84f01b3e6ab31c5deb920d768ca507 - expand comments
e3afff44614b363f85e7ace05cfdc331d9464bb8 - bug fix
fa46eaa934b5d735084ff87e67bddb6347692ee1 - expand tests

In addition, I created a few new issues for expanding tests even further:

https://github.com/gavv/httpexpect/issues/377
https://github.com/gavv/httpexpect/issues/378
https://github.com/gavv/httpexpect/issues/380

One more: https://github.com/gavv/httpexpect/issues/381


Not work with Royal Clima

ac freedom work fine, but not code
broadlinkac2mqtt    | {"level":"error","error":"read udp <IP_ADDRESS>:34487-><IP_ADDRESS>:80: i/o timeout","time":"2023-08-17T22:08:23Z","caller":"/go/src/broadlinkac/app/app/webClient/client.go:43","message":"Failed to read the response"}
broadlinkac2mqtt    | {"level":"error","error":"read udp <IP_ADDRESS>:34487-><IP_ADDRESS>:80: i/o timeout","input":{"Command":101,"Payload":"RTRS5/ku2pWDRJMINe+abftpLcNwuQRDrFzWP7tTrfoIgUyn+M9BcQAyjlcMO4bJTQVwhEmjieKa4QRUNqBb3dwCwWGvEyXofhmw99HOBo0=","Mac":"ec0baee44a79"},"device":"ec0baee44a79","time":"2023-08-17T22:08:23Z","caller":"/go/src/broadlinkac/app/app/service/service.go:666","message":"failed to send a command"}
broadlinkac2mqtt    | {"level":"error","error":"read udp <IP_ADDRESS>:34487-><IP_ADDRESS>:80: i/o timeout","input":{"Mac":"ec0baee44a79"},"time":"2023-08-17T22:08:23Z","caller":"/go/src/broadlinkac/app/app/service/service.go:140","message":"failed to send command"}
broadlinkac2mqtt    | {"level":"error","error":"read udp <IP_ADDRESS>:34487-><IP_ADDRESS>:80: i/o timeout","device":"ec0baee44a79","time":"2023-08-17T22:08:23Z","caller":"/go/src/broadlinkac/app/main.go:156","message":"Failed to Auth device ec0baee44a79. Reconnect in 3 seconds..."}

Hello!
Your device uses tcp. My application supports only udp.
Unfortunately, I do not have information about the message format for your air conditioners, if there was information, I would be happy to add support.


refactor: Refactors connection management

This PR introduces the following modifications:

creates a connection object
refactors other modules
updates unittests, documentation and labeler accordingly

Codecov Report

Merging #7 (f3c69a1) into main (f3f6240) will increase coverage by 0.86%.
The diff coverage is 97.36%.

Additional details and impacted files

@@            Coverage Diff             @@
##             main       #7      +/-   ##
==========================================
+ Coverage   93.42%   94.28%   +0.86%
==========================================
  Files           4        5       +1
  Lines          76      105      +29
==========================================
+ Hits           71       99      +28
- Misses          5        6       +1

Impacted Files
Coverage Δ

ghapi_client/connection.py
96.29% <96.29%> (ø)

ghapi_client/__init__.py
100.00% <100.00%> (ø)

ghapi_client/exceptions.py
77.77% <100.00%> (+2.77%)
:arrow_up:

ghapi_client/pulls.py
95.12% <100.00%> (+0.25%)
:arrow_up:

ghapi_client/reviews.py
95.83% <100.00%> (-0.33%)
:arrow_down:


fix missing Bertish in docs

Codecov Report

Merging #74 (e5d4312) into main (0f8f635) will decrease coverage by 0.18%.
The diff coverage is n/a.

:exclamation: Current head e5d4312 differs from pull request most recent head c065673. Consider uploading reports for the commit c065673 to get more accurate results

@@            Coverage Diff             @@
##             main      #74      +/-   ##
==========================================
- Coverage   92.27%   92.08%   -0.19%
==========================================
  Files          48       48
  Lines        2148     2148
==========================================
- Hits         1982     1978       -4
- Misses        166      170       +4

Impacted Files
Coverage Δ

src/hearth/modules/__init__.py
100.00% <ø> (ø)

src/hearth/vision/utils.py
93.75% <0.00%> (-6.25%)
:arrow_down:

src/hearth/callbacks/monitors.py
94.59% <0.00%> (-2.71%)
:arrow_down:

src/hearth/metrics/metrics.py
96.61% <0.00%> (-1.70%)
:arrow_down:

src/hearth/callbacks/learning_rate.py
97.67% <0.00%> (-1.17%)
:arrow_down:

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 0f8f635...c065673. Read the comment docs.


langchain, community: Found problems in calling openai

Description:
Problems found during use:

OpenAI requires that the last message can only be user or tool
error info

openai.BadRequestError: Error code: 400 - {'chat_id': '', 'message': 'last message role must be user or tool', 'stream': False, 'error_code': 0, 'refer_blocks': None}

OpenAI's call_tools may return a function without a name
trace info

https://smith.langchain.com/public/b8f96ad1-1c14-4846-95b6-bd129ba72a03/r

There is no need to merge. I believe the official has a better solution.

Can you post a full reproducible example?
I suspect something else is going on. The agent scratchpad should be getting formatted into tool messages, so we shouldn't need additional human messages.
From your LangSmith trace, the input query should be after the system message and before the AIMessage tool calls. It looks like there is no human message following the system message, so unclear how the model should know what tool calls to generate.


feat: add database versions

Closed as there isn't really any reason to add this yet. May be worth adding in the future though.

they are changing/stabilising soon


Caret problems in sum-input field in Daedalus 0.9.0 (<IP_ADDRESS>8 MacOS)

Hi! I have three problems to report with the caret in the Send field in latest Daedalus. I think this problem is quite critical, since it easily may result in people sending a wrong amount of coins.
You can find videos and detailed descriptions here: https://imgur.com/a/i71Fb
Short description:

When some digits are put in, and then removed with backspace - leading zero becomes actual part of new input.
When a digit immediately following the order-comma is removed - caret jumps one digit back.
When the whole input is selected with Cmd+A (Or mouse!) and one new digit is typed in - caret is placed before this digit, so any next input is misplaced.

Yikes.

@vantuz-subhuman this issue has been resolved.


Simplify Getting Started with Foyle and RunMe

We want to simplify getting started with Foyle and RunMe.
Enable Learning by default

[ ] Simplify logging per #211
[ ] Update default Foyle Config to do learning
[ ] Update the Foyle and RunMe docs based on learning be enabled by default

Simplify configuration options

[ ] Update RunMe Docs Foyle Address has been removed

https://github.com/stateful/vscode-runme/commits/main/
RunMe 3.7.3 Should be using the Connect protocol so we can update the docs to remove that. The PR is pending in stateful/docs.runme.dev#453
We are waiting on RunMe 3.7.4 to include the changes to LogEvents via Foyle API rather than RunMe logging. So we can't make the docs update about learning yet.

#240 completes the doc updates on the Foyle site.


[ENH] Gaussian Filter Transformer

Reference Issues/PRs
Implement Gaussian filter asked in #1920 (which is now fully completed).
What does this implement/fix? Explain your changes.
Add a new transformation, named GaussSeriesTransformer which use SciPy gaussian_filter1d
Does your contribution introduce a new dependency? If yes, which one?
No, but we add another SciPy usage.
Any other comments?
Code is based on previous work DFTSeriesTransformer. I don't think I've forgotten anything, but there may still be references to the DFT as I started by copying _dft.py and test_dft.py.
PR checklist

For all contributions

[x] I've added myself to the list of contributors. Alternatively, you can use the @all-contributors bot to do this for you.
[x] The PR title starts with either [ENH], [MNT], [DOC], [BUG], [REF], [DEP] or [GOV] indicating whether the PR topic is related to enhancement, maintenance, documentation, bugs, refactoring, deprecation or governance.

For new estimators and functions

[x] I've added the estimator to the online API documentation.
[x] (OPTIONAL) I've added myself as a __maintainer__ at the top of relevant files and want to be contacted regarding its maintenance. Unmaintained files may be removed. This is for the full file, and you should not add yourself if you are just making minor changes or do not want to help maintain its contents.

sigma
ordre=0
order=1
order=2

0.1

0.5

1

2

5

10

great, thanks. The fails are unrelated all will be fixed by #2249

great, thanks for doing these, it would be really nice to have a notebook including all these nice graphs you have drawn

Yes, good idea.


txn: Async apply for prewrites of async commit transactions

What problem does this PR solve?
Problem Summary: This PR tries to reduce more latency of async commit transactions by making their prewrites return response once it finishes raft commit.
What is changed and how it works?
Bases on #8499 and adds a more callback committed_cb that invokes after committing and before applying.
Check List
Tests  (TODO)

Unit test
Integration test
Manual test (add detailed scripts or steps below)

Side effects
Release note

No release note.

/run-integration-common-test

/release

/release

/release

/release

/release

/release

/release

/release

I'll continue adding more tests for it, maybe in further PRs

@sticnarf @youjiali1995 @gengliqi PTAL if  you have time. Thanks!

test_pipelined_pessimistic_lock seems to hang forever.

@sticnarf Ahhhhh, that's because I changed the logic of pilelined pessimistic lock and the sending response operation is now not scheduled to the scheduler thread, so one of the tests is invalidated.
@youjiali1995 I think I need you opinion about if I should do this...

@sticnarf Ahhhhh, that's because I changed the logic of pilelined pessimistic lock and the sending response operation is now not scheduled to the scheduler thread, so one of the tests is invalidated.
@youjiali1995 I think I need you opinion about if I should do this...

I'm OK with it. I will benchmark it when I'm free.

PTAL thanks

@MyonKeminta Sorry I need some more time...

That's fine. Thank you.

/merge


Use unix domain socket

Changed from a fixed network socket to use unix domain socket

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Pankaj Mandal seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

PR title and description should be clearer to the work being done.
As per the story for this work, we should be adding a CLI option to  enable this behavior and specify the file path for the unix domain socket.
You need to follow the instructions in the box https://github.com/pachyderm/pachyderm/pull/9143#issuecomment-1657651437 to enable checkin.

PR title and description should be clearer to the work being done.
As per the story for this work, we should be adding a CLI option to enable this behavior and specify the file path for the unix domain socket.
You need to follow the instructions in the box #9143 (comment) to enable checkin.

will do that.

I have signed the CLA but used the hpe email. I hope that is acceptable.

Do you perhaps need: https://stackoverflow.com/questions/14771172/http-over-af-unix-http-connection-to-unix-socket
On Python, the library requests-unixsocket exists for that purpose, using the non-standard scheme http+unix://%2Fpath%2Fto%2Fsocket/url-path –
Jean Hominal
Mar 6, 2020 at 17:32

@keramosg could you please review.

Closing this as we decided to use pycurl in preference to requests-unixsocket


"Unable to import parser secrets from secret.py"

With;

up to date Arch Linux x86_64
Python 3.9.6
git cloned into a temporary directory
.env file filled with known good values as per instructions :

Running "pipenv run tconnectsync" from one directory above "main.py", results in "Error: the command tconnectsync could not be found within PATH or Pipfile's [scripts]."
Also, the error message "Unable to import parser secrets from secret.py" is returned, no matter what combination of arguments I put after "python3 main.py", even just "-h", during initial testing. secret.py exists in the second tconnectsync directory (one below main.py), and attributes are the same as all other .py files (-rw-r--r--).
Probably unrelated, but I had to manually 'pip install arrow' to get to this point.
Let me know what other troubleshooting data you might need.
Thanks

Would you mind running secret.py -- with pipenv run python3 tconnectsync/secret.py -- to see if it properly prints out all of the environment variables without any errors?
Beyond that I'd just make sure the .env file is in the same folder as main.py. You should be able to run pipenv run tconnectsync so long as you're in the same folder as main.py, which has the Pipfile containing the "[scripts]" section in it.

I struggled with this for a while actually until I realized the issue on my side anyway.
While listed in the Pipfile, python-dotenv didn't seem to install for whatever reason and caused the Secret.py to throw the above mentioned error.
I just ran the below line in my CMD and all is well now!
pip install python-dotenv

Glad you got it working, maybe you were bypassing the Pipenv virtual environment itself somehow, assuming that pip installing dotenv globally fixed the problem?
I'll close this issue since it seems resolved

@skmerten , installing python-dotenv seems to have fixed the issue, data is flowing now.
@jwoglom maybe add this to instructions / dependency lists?

@RGwenHovey I have python-dotenv in the Pipfile -- when setting up the pipenv environment do you see any messages about installing that dependency?

I also had the same issues.
Had to pip install arrow and some other modules manually , and afterwards I got the "Unable to import parser secrets from secret.py" error. After running pip install python-dotenv that error got fixed, but now I am getting the following error.
Traceback (most recent call last):
File "main.py", line 83, in
main()
File "main.py", line 79, in main
added = process_time_range(tconnect, nightscout, time_start, time_end, args.pretend)
File "C:\elye\tconnectsync\tconnectsync\process.py", line 33, in process_time_range
ciqTherapyTimelineData = tconnect.controliq.therapy_timeline(time_start, time_end)
File "C:\elye\tconnectsync\tconnectsync\api_init_.py", line 30, in controliq
self.ciq = ControlIQApi(self.email, self.password)
File "C:\elye\tconnectsync\tconnectsync\api\controliq.py", line 24, in init
self.login(email, password)
File "C:\elye\tconnectsync\tconnectsync\api\controliq.py", line 32, in login
soup = BeautifulSoup(initial.content, features='lxml')
File "C:\Python38\lib\site-packages\bs4_init.py", line 243, in init
raise FeatureNotFound(
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?
Any advice? should I open a separate ticket?

@ElyeM  I also had that same issue too. Installing the following dependency fixed that for me:
pip install lxml
@jwoglom in pipenv, I didn't receive any errors or warnings when installing the dependencys but it still seemed to miss a few.

Thanks, works now.

Interesting -- not sure why this is happening given that the dependencies are listed in the Pipfile. Given that the packages necessary to install manually seem to vary a bit, I'm not sure whether there's any good steps I could place in the instructions for now.  I will re-open the issue in case others run into the same problem and are looking for a solution.

@jwoglom
I appreciate your time on that! Exciting. I will definitely give that a try and let you know what I find.
I'm actually running it out of a Raspberry pi 4 that auto runs when plugged in. I have conflicting issues between multiple pipenv's I have been slacking on resolving so a fresh start  via a pip installation sounds good to me.


Resolve boxed or primitive types to a common type in knownBindings

@jaysonacosta can this be closed because #41 was merged? (FYI, GitHub will close issues automatically when you merge a PR if you write "fixes #X" in the PR description.)


Switch from skeuomorph to ScalaPB for protobuf srcgen

This is the first step towards Scala 3 support for Mu.

Add a dependency on the ScalaPB sbt-protoc plugin
Implement a custom protoc plugin to generate the Mu service trait

Use ScalaPB's standard functionality to generate the message classes, and our custom plugin for the Mu service

Extend the scripted test to verify the generated code
Remove the skeuomorph-based protobuf source generator
Split the sbt plugin's muSrcGen task into more granular tasks so we can re-use parts of it for both Avro and protobuf srcgen
Conditionally enable either our source generator (used only for Avro now) or ScalaPB, depending on the value of muSrcGenIdlType
Add sbt-buildinfo because it's required for the protoc plugin

The next step will be to extend the protoc plugin to generate the service trait's companion object, containing all the helper methods that are currently macro-generated.
This branch will not build in CI yet because it depends on https://github.com/higherkindness/mu-scala/pull/1442

It looks like my refactoring of the sbt tasks has broken something. Looking into the failing test now.

I've been on a bit of a journey with sbt but this is now ready for another review.
Sorry the diff has become pretty large. It's mostly test boilerplate added in the final commit, so you might want to skip that commit and focus on 08fd193.

Yes, we should document the packaging behaviour on the microsite.


Missing methods vs IdentityModel

IdentityModel 1.9.2 had ProtocolHelperExtensions & HashStringExtensions methods.  Now IdentityModel2 does not seem to have those?  Have these methods been moved to another project?

I just didn't port them over because they did not seem to be used very often.
What exactly are you doing with these?

I am using these to generate verifer challenge for native app security with Pkce. Thanks. For now, i reverted back to 1.x.x version.


Can't resolve 'encoding'

I have this issue

warn ./node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in 'D:\magic-link\magic\node_modules\node-fetch\lib'

Import trace for requested module:
./node_modules/node-fetch/lib/index.js
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>./app/api/login/route.ts
Im usign import nextjs 13.4 with api router.
import {headers} from "next/headers";
import {Magic} from "@magic-sdk/admin";

import {setLoginSession} from "@/lib/auth";

export async function POST(req: Request, res: Response) {
  const magic = new Magic(process.env.MAGIC_SECRET_KEY);

  const didToken = headers().get("authorization")?.substring(7);

  const metadata = await magic.users.getMetadataByToken(didToken!);

  await setLoginSession(res, metadata);

  return new Response(JSON.stringify({done: true}), {status: 200});
}

What should I do?

Hi @guillermouzner , thank you for posting this issue.
Would you please let us know which SDK and version you are using and which method call throws this error?
Thank you!

Hi!, sure:
"@magic-sdk/admin": "^1.10.0",
"magic-sdk": "^18.2.0",

And got this warning in console:

In app/login/page.tsx i call this method:
import {Magic} from "magic-sdk";

async function onSubmit(data: FormData) {
  setIsLoading(true)

  const magic = new Magic(process.env.NEXT_PUBLIC_MAGIC_PUBLISHABLE_API_KEY!);

  const didToken = await magic.auth.loginWithMagicLink({email: data.email.toLowerCase()});

  const res = await fetch("/api/login", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      Authorization: "Bearer " + didToken,
    },
    body: JSON.stringify({email: data.email.toLowerCase()}),
  });

  setIsLoading(false)
}

And in api/login/route.ts:
import {headers} from "next/headers";
import {Magic} from "@magic-sdk/admin";

import {setLoginSession} from "@/lib/auth";

export async function POST() {
  const magic = new Magic(process.env.MAGIC_SECRET_KEY);

  const didToken = headers().get("authorization")?.substring(7);

  const metadata = await magic.users.getMetadataByToken(didToken!);

  const token = await setLoginSession(metadata);

  const cookie = serialize("tokenAuth", token, {
    maxAge: 100 * 100 * 100,
    httpOnly: true,
    secure: process.env.NODE_ENV === "production",
    path: "/",
    sameSite: "lax",
  });

  return new Response(JSON.stringify({done: true}), {
    status: 200,
    headers: {"Set-Cookie": cookie},
  });
}

Thank you, I see you state you are calling your own function called onSubmit, but would you tell me which Magic method call is throwing the error? Is it the Magic instantiation or the login call?

const magic = new Magic(process.env.NEXT_PUBLIC_MAGIC_PUBLISHABLE_API_KEY!);
const didToken = await magic.auth.loginWithMagicLink({email: data.email.toLowerCase()});

Its in Magic instantiation in api folder
const magic = new Magic(process.env.MAGIC_SECRET_KEY);

Hi there, have you solved the problem yet?

Hi @guillermouzner  @E0han
Would you kindly refer to our Magic + NextJS guide and let me know if it helps resolves this issue for you? We recently updated that guide so it should help guide you to the resolution, as there may be an error in your implementation.
Please let us know if it is helpful or not!

I am closing this thread now that it is stale. The guide linked in my previous comment should be helpful for anyone else facing a similar issue.

Same issue here -- something going on w/magic and nextjs + vercel

Hi @sharpsteelsoftware, I resolved this issue by installing encoding as a devDependency.


[request] Check file contents as well as file extensions

Hi, I was wondering if it's on the roadmap to add rules to check for secrets in source code. So far the "part" in the rules only accepts filename, path and extension.
If it isn't, would you be open to a pull request which would add this functionality?
Thanks

I've modified Gitrob to scan for file contents! Just look into my forks. It works pretty well including number of regular expressions to search for all kinds of secrets.
If someone helps me with some code beautifications I'd file a pull request.


RuntimeError: Cannot run the event loop while another loop is running

Describe the bug
The following exception occurs when you run the sapientml sample code in a Jupyter notebook in a Windows environment.

RuntimeError: Cannot run the event loop while another loop is running

Here is the code to run in Jupyter
https://github.com/sapientml/sapientml#run-automl
Environment (please complete the following information):

SapientML Version: [e.g. 0.4.12.post0]

https://pypi.org/project/nest-asyncio/
import nest_asyncio
nest_asyncio.apply()

Optionally the specific loop that needs patching can be given as argument to apply, otherwise the current event loop is used

I assume that the current event loop above refers to the Jupyter notebook event loop.
Therefore, the following message might have been output because you tried to start a new event loop on Jupyter's own event loop.

RuntimeError: Cannot run the event loop while another loop is running

Because nest_aysncio.apply() allows you to optionally specify a loop, we assume that patching an event loop for Windows will result in the same state as not running on a Jupyter notebook.
Specific fixes include:
loop = asyncio.ProactorEventLoop()
nest_asyncio.apply(loop)

Non-Windows environments also use asyncio.get_event_loop(), which is deprecated in 3.12.
I think we should change it to use asyncio.new_event_loop().


[Frontend] Support for chat completions input in the tokenize endpoint

Related: #5054 (https://github.com/vllm-project/vllm/pull/5054#issuecomment-2195039364)
Example:
$ curl -H "Authorization: Bearer token-abc123" -H "Content-Type: application/json" -d '{"model":"meta-llama/Meta-Llama-3-8B-Instruct","prompt":"test"}' http://localhost:8000/tokenize
{
  "count": 1,
  "max_model_len": 8192,
  "tokens": [1985],
}

$ curl -H "Authorization: Bearer token-abc123" -H "Content-Type: application/json" -d '{"model":"meta-llama/Meta-Llama-3-8B-Instruct","messages":[{"role":"user","content":"Hi"}]}' http://localhost:8000/tokenize
{
  "count": 11,
  "max_model_len": 8192,
  "tokens": [128000,128006,882,128007,271,13347,128009,128006,78191,128007,271]
}

$ curl -H "Authorization: Bearer token-abc123" -H "Content-Type: application/json" -d '{"model":"meta-llama/Meta-Llama-3-8B-Instruct","tokens":[128000,128006,882,128007,271,13347,128009,128006,78191,128007,271]}' http://localhost:8000/detokenize
{
  "prompt": "<|begin_of_text|><|start_header_id|>user<|end_header_id|>\n\nHi<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n"
}

Hmm, I think we can move this to a new file since it's not really a part of OpenAI's Chat or Completions API.

/ready


Fix for static XML data source

Fix for #2748. Also see #2749 for reference.

I am afraid that, somehow, posted values are treated differently from saved values. (Only valid XML gets saved, so in case of invalid XML the posted value must be returned to the backend form element.)
Or is invalid XML treated differently from valid XML?
Case 1: valid XML
<data>
  <item>&</item>
</data>

Saved value:
    public $dsParamSTATIC = '<data>
  <item>&</item>
</data>';

Value in the backend form (HTML):
<textarea name="fields[static_xml]" rows="12" cols="50" class="code" placeholder="<static>content</static>"><data>
<item>&amp;</item>
</data></textarea>

Case 2: invalid XML
<data>
  <item>&&</item>
</data>

Nothing gets saved in this case.
Value in the backend form (HTML):
<textarea name="fields[static_xml]" rows="12" cols="50" class="code" placeholder="<static>content</static>"><data>
<item>&&</item>
</data></textarea>

Thanks @michael-e I'll dig deeper on this issue.

Unfortunately, removing the call to General::sanitize (when creating the Widget::Textarea) does not help at all with my issue.

I think I've fixed it by NEVER changing the value in the $fields array.
I've removed the sanitize call, which would double escape things.
Valid XML gets saved. Invalid XML is returned to the browser AS IS. The invalid value does not change in the textbox, which is what we want amirite ?

Check 409f000c924477a094118517666923025cff52bc

@nitriques' pr-2750 branch looks good to me, test-wise. It does what I expect.
Still, I would like to be sure that @jensscherbl has no concerns.

Great

409f000 is perfect.

Thanks @jensscherbl

Merged as d2c9b62789


fix(dependencies): upgrade @carbon/icons-react

The latest version contains IE11/Edge fix.
Fixes #1624.
Changelog
Changed

Upgrade @carbon/icons.

@asudoh I think CI fails because the snapshot changes with the new style prop 👍

@joshblack Thank you for pointing it out!


Filters with parentheses not working since 3.3.1

Description:
Filters with parentheses not working since 3.3.1. It last worked in 3.3.0.
Affected Product Version:
3.3.1 through at least 3.3.10
OS, DB, other environment details and versions:
Tested on MacOS 10.14.6.
Steps to reproduce:
For example:
GET /Users?filter=name.familyName eq "Mort" and (emails co "example.com")
generated the following error response:
{ "schemas" : [ "urn:ietf:params:scim:api:messages:2.0:Error" ], "scimType" : "invalidValue", "detail" : "Not a valid attribute name/uri", "status" : "400" }
During step-by-step debugging, the issue is occurring in FilterTreeManager.java, when the code there is trying to find a matching attribute name for "(emails", instead of the expected "emails".

Moved to  5.12.0-M15 since this fix is not yet moved to product-is. Need to bump the Charon version in scim component since the Charon is effected to product-is via the scim component

Verified in staging environmentt and this Issue is fixed.


Improve code quality in main.py

Improve code quality in main.py

Add type hints to function parameters and return values
Reorganize imports according to PEP 8 guidelines
Extract git user info functionality into separate functions
Improve error handling and messages
Enhance docstrings for functions
Ensure consistent naming conventions
Refactor large functions for better readability and maintainability

please add me to contributors I want to help on this . I am also working on similar project : https://github.com/LangGraph-GUI/CrewAI-GUI

please add me to contributors I want to help on this . I am also working on similar project : https://github.com/LangGraph-GUI/CrewAI-GUI with @HomunMage
Hi @hemangjoshi37a ,

Please don't @ me in other projects.

ok no problem


sync 2.2.0 to master

 Here is an overview of what got changed by this pull request:

Issues
======
+ Solved 2
- Added 5

See the complete overview on Codacy

 Here is an overview of what got changed by this pull request:

Issues
======
+ Solved 2
- Added 5

See the complete overview on Codacy


Completed Build

Not sure where to put feedback/comments. Maybe a feedback section in the wiki?
Overview
On balance, this went well. I'd recommend purchasing at least 2x the number of ribbon cables you anticipate since they're extremely easy to puncture when working the excess into the case-area recess. Further, I think V2 of the model could do away with the strut supporting the upper ring on the (looking directly-on) left-hand side. There's enough flex in the print that without it you can easily slip the camera underneath. In terms of camera-module sizing, I found nail clippers work extremely well. I found a pair with a curved blade that allowed me to match the corner of the camera module PCB to the case housing.
Total time (including a re-order of camera module + ribbon cables after breakage) was 4 weeks from inception to completion.
Glamour Shots

Very cool. Thank you for sharing, Cooper!

Hey @cooperpellaton - I'm just about to send the print to the chap with a 3d printer to print. You mentioned the strut (and I'm a complete beginner here). Is it possible to send a picture/a model file of what you mean?! I'll definitely give it a go!
Thanks
Geoff.

@tillycatcat if you look in the 3D print where the camera module should go there are 2 struts that support the upper ring. If, looking head one, you remove the left strut, the structural integrity should be fine and you should be able to get the camera inside more easily.

I'm in the process of building one myself and have noticed that the ribbon cable pokes out the back where the original white cap with the Apple logo is supposed to go. Is it safe to bend the cable to get the cap on or did you leave it without the cap on?

@grantland I had to bend the cable very close to the connector, which isn't ideal, but doesn't seem to have caused any issues so far.

@grantland I used this cable and had no problems with it being too long. It did, however, have to bent in order for it to fit into the printed recess.

I've gone through a few cables now trying to figure out the exact point where to bend it. I wonder if the cable will withstand a fold?

I punctured one cable when bending but that was due to applying too much force with a pair of tweezers. I think as long as you don't overly force it then there won't be any problems.

I'm going to have another crack at this soon. Has anyone got a picture of the bend at the camera module?

Looks stunning! @cooperpellaton I'm curious, I'm curious about buying a completed build - would you be interested in building one and selling it?

@austriker27 I'd be open to doing it, however, I'd caution you that the cost will likely be prohibitively expensive. Do feel free to email me.

@cooperpellaton yeah i figure it won't be cheap but I'm still curious. What's your email?

@austriker27 see my website linked in my bio.


current_password is not being validated while changing password

Hello,
I am using Rails 5, Devise 4.3.0 and devise_token_auth 0.1.42.
I want to allow user to change his password on separate view. This view contains current_password, password and password_confirmation.
So, as per requirement, it should check current_password before updating the password. I've also set following as suggested in config file:
config.check_current_password_before_update = :password
But it's not working. It's throwing error unknown attribute 'current_password' for User.
To get rid of this error, I used this: attr_accessor :current_password
Now, when I try to update password, it's being updated but not validating current_password. If I enter wrong current_password, it's updating new password.
Any help on this would be highly appreciable.
Thanks :)

+1

Please use update_with_password.
Might be help you by this codes.
Sorry, I was not try the problem.

@shashi-we Think you might be using the wrong entrypoint to change user password the way you described. You should use registrations#update

I'm having exactly the same problem as @shashi-we.
initializers/devise_token_auth:
config.check_current_password_before_update = :password
application_controller:
devise_parameter_sanitizer.permit(:account_update, keys: %i[name tin current_password])
model:
attr_accessor :current_password
Then I do this request:
PUT /auth/password which uses devise_token_auth/passwords#update
I get a 200 ok, regardless of sending the current_password or not. Im not sure this is the expected behaviour. Is it? Should we really just use the registrations#update? And if so why do we have the devise_token_auth/passwords#update method?

I belive passwords#update handles tokenized password reset only. It should be used when user forgets password.
For changing the password with the current one, I recommend using registrations#update.

@rodrigovcortezi got it! That makes sense.
I was doing a POST: /auth/password to recover password and a PATCH: /auth/password to change the password when the user was logged in. I got confused because the passwords#update, (with a PATCH: /auth/password), requires a valid access-token, so i thought this was the right way to change the password. However, now I believe you were right. You should use registrations#update to change the password and passwords#update to recover it.
Thank you very much.


Stereo Instancing broken on 3DTextShader

Currently it only renders in the one eye... It looks like this was likely broken with this commit: https://github.com/Microsoft/HoloToolkit-Unity/commit/9f6530459af5875577bb1b6807d2b653229d1662

I can take a look at this later today unless anyone else wants to tackle it sooner.

My apologies, I'll look into this as well.

I'd argue that stereo instancing was never implemented.

@thebanjomatic, are you sure it's not that their using stereo rendering in the player settings?

I filed this originally on behalf of @jessemcculloch who wasn't on github at the time. Perhaps he can let you know if this is still an issue for him and how to reproduce if it is.

If you change it to single pass rendering it will also break a lot of the
shaders at run time, and they will only render on the left eye,
On Wed, Jun 21, 2017 at 3:05 PM, Adam Hines<EMAIL_ADDRESS>wrote:

I filed this originally on behalf of @jessemcculloch
https://github.com/jessemcculloch who wasn't on github at the time.
Perhaps he can let you know if this is still an issue for him and how to
reproduce if it is.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/HoloToolkit-Unity/issues/551#issuecomment-310175542,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABnmpwoM_-GI4tvPKrxqrHlvQHwKuHOzks5sGWmXgaJpZM4MVlyP
.

--
Charles Poole
Mathematician at Large.
http://www.isstudios.net http://www.isstudios.net
If you have no critics, you’ll likely have no success.

Malcolm X

For a quick work around you can change the shader of the material to GUI/Text Shader. I'm not sure of all the ramifications, but it fixed the single eye rendering issue in some recent prototypes.
It would be nice to see if the 3DTextShader needs to be updated and how to update it properly. We created it to fix z-sorting issues with the previous default text shader.

I just created a pull request to fix the shader. #904
The built-in TextShader does not properly z short, so text will show up through other 3D geometry. The HoloToolkit/3DTextShader is still the way to go.


Refactor/remove private dns zone

This PR was already opened from my fork but we need to use branches directly in the upstream.
Which issue this PR addresses:

This PR corresponds to the task Identify and implement POC of the code to introduce Clean Architecture.
What this PR does / why we need it:

This PR does not represent the direct and exact application of Clean Architecture as it would be very difficult due to the nature and complexity of the project but instead, it moves in the right direction to improve the health of the codebase to have something more similar to Clean Architecture.
I have performed a presentation talking about key topics of these PR changes and about some principles that can help the Design of the project in the long term to have a shape more similar to Clean Architecture improving what we have today.
The other PR is also part of the same task. Using both PRs I presented key topics that move the direction of the design towards Clean Architecture.
This PR contains > 1 commit so it is easier to navigate and understand. The idea is to squash them when merging but right now I want it that way in case I need to refer to a particular step in the presentation.
Test plan for issue:

Unit tests exist and new ones created. I performed small steps in each commit to not mess up things.
Is there any documentation that needs to be updated for this PR?

N/A.

Optional detailed explanation (covered in the demo):
Problems in pkg/cluster/removeprivatednszone.go
First block of code

Notes:

Usage of anonymous functions:

Not easy to read and maintain.
Can't be independently tested.
Can't be reused.

Reinstantiation of already computed variable (m.configcli.ConfigV1().DNSes()).

Second block of code

Notes:

We can identify clear chunks/blocks of code: get objects and perform business logic.
We identify the narrow scope of some variables: mcps, machineCount and nodes.

Third block of code

Notes:

We see the narrow scope of v and the business logic performed using it.
We find the same chunk of code (line 105 - 120) exactly as before. DRY.

Fourth block of code

Notes:

We lost track about where zones is coming from.
We just iterate over zones and trigger some side effects.
No business logic, it is delegated to azure.ParseResourceID(...).

Problems:

Function too large to understand in a single "quick" (overview) read.

Mix of type of work in one single function/component.

Access data (get from external components).
Perform business logic.
Trigger side effects.
Why is it defined in the manager struct (of the cluster package)?

Improvement process

After the first refactor commit("refactor: split in narrow functions and remove duplication", commit ID: cbf7):

IMHO we have performed a big improvement:

The main function of the file is easy to follow and understand in a quick look.
We went from one function with 128 LOC to now having functions that are around 20 LOC each of them.
Each function has its own responsibility, no mix of "tasks" as before.
We have removed duplication of code.
We have improved out ability to break our component into other subcomponents (structs/interfaces/functions) to me moved away.

But we still have some problems with the actual code:

We have, clusterVersionIsAtLeast4_4 and validateMachineConfigPoolsAndGetCounter which both perform business logic and at the same time write things into a logger entry. We are forced to do that because we don't treat "cluster version < 4.4, not removing private DNS zone" as an error.
If when given the condition if v.Lt(version.NewVersion(4, 4)) { it created an error with the above message, we would be able to treat all the branches inside this function as errors, and we would simply return that error and handle it appropiately outside this function. Doing that, we would be able to move the "write" part outside the function.
The same happens with the function validateMachineConfigPoolsAndGetCounter, the original code doesn't treat as errors the fact that we are entering the "ifs", it simply writes it to the logger. Returning an error with those messages would be a lot better, we would get rid of the logger parameter in the function. The caller would be responsible to handle the error as "it" wants, so we wouldn't force anyone to write anywhere the error message (because now we have conceptually an error, but we don't use the errors capabilities of Go).
Another option would be to pass a Writer interface in the function signature and implement the interface in the manager struct of the cluster to be able to pass it to the function.

We are overloading too much the *manager type of the cluster package. It would be a lot better to break that huge manager struct into multiple structs and move all the DNS/networking thing to a different struct or to an existing component/package. Single Responsibility Principle

After the refactor commit("refactor: move functions from cluster package to net package", commit ID: 89be):

We have moved everything related to DNS/network/etc to the pkg/util/net package as it is the responsibility of that package to handle that type of things.
We extract m.doc.OpenShiftCluster.Properties.ClusterProfile.ResourceGroupID to a variable
We still have two problems:

clusterHasSameNumberOfNodesAndMachineConfigPools and validateMachineConfigPoolsAndGetCounter do not treat errors as such (original code was like this) they return a boolean to check from the caller if anything went wrong.
the above functions receive the log as parameter, forcing the function to write to I/O even if we don't want (and passing a nil argument will cause a panic).

Let's fix the previous problems removing the logger as a parameter and returning errors instead of booleans and handling the errors properly from the caller.

After the last refactor commit("refactor: remove log in parameters and rename functions", commit ID: 0636):

We have removed the dependency of the logger parameter and we are treating errors as such.
We still don't modify the behavior of our outermost function *manager.removePrivateDNSZone() as it always returns nil (as the original version). It could be tempting to return the errors instead of nil, but this is a refactor and we don't know the implications this change could have, so it is not 100% safe to do so.
The function ClusterVersionIsGreaterThan4_3 has been renamed and refactored to not treat as an error the fact that the version is less than 4.3, this is something the caller should decide.

Update:
I needed to update pkg/cluster/removeprivatednszone.go (rebase master) due to this PR.
So the function now returns an error and a boolean. It is curious that in the previous PR we just return one of the errors (cv, err) and for the other one (v, err) we just log it but return nil. Strange, but I want to keep the same behavior in the refactoring.

/azp run ci

/azp run ci

/azp run e2e

/azp run ci

/azp run ci,e2e


As a Developer, I would like more information over task restarts

Pain point:
Apps that fail repeatedly will restart silently, preventing the development team from understanding what the instability is, or that there even is one.
Steps to reproduce:
Run an app in Marathon that isn't persistent. Watch Marathon proceed to flap that app.
Work-around:
At this time, the only workaround is to watch the DCOS/Marathon UI or logs for restarts. This is quite laborious.
Description
An app definition is basically the JSON configuration for running your apps. It is what you send to the apps end-point in the REST API (https://mesosphere.github.io/marathon/docs/rest-api.html#apps) or what gets created if you use "New App" in the user interface. Tasks are the instances of the app definition. If your app definition has "instances" set to three, Marathon will try to start three instances that conform to this app definition.
So let's say you create an app "/internal-reporting-tool" for which "instances" is set to three at 11:00am (I'll use a time resolution of minutes for demonstration only.). Let's say that at 11:10am we have the following tasks running:
task1) started at 11:00am, therefore it has a life time of 10min at 11:10am
task2) started at 11:01am, therefore it has a life time of 9min at 11:10 am
task3) started at 11:05am, therefore it has a life time of 5min at 11:10 am
Bi) Last time of update would be 11:00am
Bii) The average life time of the tasks would be (10min+9min+5min)/3 = 8 min.
Biii) The median life time would be 9min (take the middle value: https://en.wikipedia.org/wiki/Median).
If you create an app definition with 100 instances and after 30min your tasks have a average life time of 3min, they either took a long time to get started (that is a problem) or the were a lot of task failures so the tasks had to be restarted (that would be a problem).
Thus, you can use this metrics as general indicators for problems.
As another alternative, you can feed the events from Marathon (https://mesosphere.github.io/marathon/docs/rest-api.html#event-stream) about your applications into a metrics collector such as graphite to have some history about failures.

There is one thing that makes this information insufficient for determining the stability of an app: scaling.
Let's say your app ran for two days. All tasks kept running. Now we scale up to triple the tasks. Our average task life time is now very short with respect to the last start of the app and could misleadingly suggest that our app is very unstable.
The information is still valuable, though. In the app overview it would make sense to expose the last major app configuration/restart event like e.g.:

“last manual restart 10min ago”
“last scaling 5min ago”
“last config change 5 days 3 min ago”

Note: This issue has been migrated to https://jira.mesosphere.com/browse/MARATHON-3571. For more information see https://groups.google.com/forum/#!topic/marathon-framework/khtvf-ifnp8.

Note: This issue has been migrated to https://jira.mesosphere.com/browse/MARATHON-3571. For more information see https://groups.google.com/forum/#!topic/marathon-framework/khtvf-ifnp8.


Adding more information to the permission denied error

Awesome! That will help. Did you check the original parse.com messages?


Update php-riot-api.php

Its my first pull request, i hope i clicked the right buttons ;)
Everything i did was moving the updateLimitqueue so it checks first, if the request is cached.
That made my script execute in 0.04 sec instead of 35 sec
I hope i didnt miss anything out like unexpected bugs as a result of that little change

changed caching with Supericy's implementation


Add a part to documentation about Overleaf write permission.

Add a section to documentation telling users not to give coauthors write permission on Overleaf, but rather on GitHub, not to break sync.

Added the fixes keyword to the wrong commit message and tried to fix it by rebasing. It all works now.


replay ID copying

please don't allow users to copy the # Symbol when copying the replay ID from a replay in the online vault
you never need it unless you want to trigger a bot in aeolus
might as well remove that Symbol altogether imo since the button under the replay ID even spells copy replay id so it's not hard to figure out what that number means

will keep the number for bot interaction