Implement distinct()

This implementation of distinct() is simple and natural: call distinct() on all QuerySets of a QuerySetSequence.

This implementation of distinct() is simple and natural: call distinct() on all QuerySets of a QuerySetSequence.

I think that this doesn't handle cases where:

There are multiple QuerySet instances of the same type (you shouldn't really need to use QuerySetSequence for this anyway, but you can).
A values() or values_list() call is made which causes the results to not be distinct, something like:

>>> qss = QuerySetSequence(Book.objects.all(), Article.objects.all())
>>> qss = qss.values("pk")
>>> qss = qss.distinct()
>>> list(qss)
???

I'm not sure what the expected behavior in this case even really is, but I think you'd want [1, 2, 3], not [1, 2, 3, 1, 2, 3].

There are multiple QuerySet instances of the same type (you shouldn't really need to use QuerySetSequence for this anyway, but you can).

Agreed, I don't think there's any value at all in supporting this use case neither.

A values() or values_list() call is made which causes the results to not be distinct

That's still possible with set(qss.values("pk")), the point of this distinct() implementation is just to allow filtering on m2m relations which otherwise would result in duplicated rows.

The point of this distinct() implementation is just to allow filtering on m2m relations without duplicating rows, but any way other than defining distinct on the QSS would also work for us.

I don't think that this matches the definition of distinct() for a normal QuerySet. I'll need to re-read the docs though and see what they say.

I found this:

And I was surprised myself because I thought the abstraction would be a bit at a higher level, but actually it seems logic that calling qs.distinct() means SELECT DISTINCT. If that's fine for the moment, it won't prevent anyone from contributing an implementation in Python in the future if they feel strongly about having QSS with different QS of the same model - as long as performance don't become disastrous which I would expect to be the case, not you ?

But I can add support for querysets of the same type easily, would you want to merge if I added like 4-5 SLOCS to make distinct() remove any duplicate result from any queryset that shares the model with a former queryset ? I have no use for that but if you do I will be more than happy to do it for you for free ;)

A decent interim might be to just raise an exception if any of the QuerySet instances are of the same time? At least the behavior will be clear. 😄

Done! Thank you so much @clokep :heart:

Thanks! 👍


Potential Sunrise/Sunset Discrepancy

Astroplan documentation claims that 150 grid points should be accurate to within ~1 minute. I have been playing around with it, and at least for this week at Keck Observatory, the sunset and sunrise times appear to be discrepant with the sunset time provided by Keck and other sources by ~10 minutes. I have tried running with n_grid_points = 1000 (should be highly accurate) and the discrepancy still exists. There are different ways of defining the sunset moments --- but both a horizon choice of 0 deg and -0.8333 deg are discrepant (0 more discrepant). Here is the code I've run
k = Observer.at_site('Keck', pressure=0.6/1.03*u.bar)
time = Time('2023-10-14 00:00:00')+10*u.hr # in utc
astroplan_sunset = k.sun_set_time(time=time,horizon=-0.8333*u.deg, which='previous',n_grid_points=1000)

(I've tried different choices of atmospheric pressure but none make a major difference).
In this example, (with a reference time at midnight hawaii time) the quoted sunset time is
2023-10-13 18:00:25

On the other hand, several other sources quote discrepant times:

Keck Observatory: 18:09
Airmass.org: 18:10:17
timeanddate.com: 18:08

I am concerned because these three times are consistent with one another to within ~1-2 minutes, which is quite different than the astroplan time. (Note that the discrepancy is larger if a 0 deg horizon is used). Airmass.org uses the altitude of the observatory in question, timeanddate does not. I do not know what source Keck's own page is using.
Any advice on this? As a note, I have tried using the underlying astropy code directly to compute it myself, and I get a similar 10 minute offset:
delta_midnight = np.linspace(-12,12,300)*u.hr
obs_times = midnight+delta_midnight
frame = AltAz(obstime=obs_times,location=site)
sun = get_body('sun',obs_times).transform_to(frame)
sundown_ind, = np.where( sun.alt.to(u.deg) < -0.83*u.deg)
sundown_right = obs_times[sundown_ind[0]]
sundown_left = obs_times[sundown_ind[0]-1]
sunset = sundown_left+((sundown_right-sundown_left)/2.0)
sunrise_left = obs_times[sundown_ind[-1]]
sunrise_right = obs_times[sundown_ind[-1]+1]
sunrise = sunrise_left + ((sunrise_right-sunrise_left)/2.0)

Where above I attempt my own grid (here of 300, but I've tried any number of grid points).
So yeah, not sure what is going on --- would appreciate any advice!

timeanddate.com shows 18:00 for tonight (the 12th) and 17:59 for the night of the 13th for Maunakea, whichn is accurate.
Where do you see 18:08 for timeanddate and what Keck page are you looking at to get 18:09?

Keck page is here: http://mkwc.ifa.hawaii.edu/forecast/mko/
For dateandtime --- good catch in that I had it set to honolulu by accident; using mauna kea as the location, it reports 18:02 pm for tonight, so that one is actually reasonably consistent.
For airmass.org, here is a page with settings tuned to Keck on 10/13: https://airmass.org/chart/obsid:keck/date:2023-10-13/object:ngc 1052/ra:40.269994/dec:-8.255764

airmass is doing their own thing with notes here that I unfortunately don't have the time to go through: https://airmass.org/notes
I suspect MKWC is showing the times for Honolulu (UH-Manoa) as well but we'd have to ask to find more.

FYI, @joshwalawender also did some accurate calculations for Keck a number of years back. Hopefully things haven't regressed since then :)
https://github.com/astropy/astroplan/issues/242

@wtgee Thanks for this link, I hadn't seen it!
Based on perusing that issue, it looks like my discrepancy is most likely the same thing Josh found, which is that while astroplan is accounting for refraction, the apparent horizon itself is not taken into account (which Josh does explicitly in the example). I will try that out too and see how it goes!

Closing issue, feel free to re-open if you still think there is a problem or want to post some results. Cheers.


Modify "Add Metadata" on heatmap to be more obvious

Description

The Add Metadata text is now always showing.
Plus icon has been made slightly bigger.
Spacing has been increased.
Icon, text, and line have a hover state of primary blue.

Notes
The plus icon's blue hover state is created by applying a filter to the svg. See:

https://semisignal.com/using-fecolormatrix-to-dynamically-recolor-icons-part-1-single-color-icons/
https://alistapart.com/article/finessing-fecolormatrix/

Tests

Verified that heatmap behaves as expected when zooming in/out and metadata columns are added or removed.
Verified that the Add Metadata text and icon are not present when the heatmap is downloaded as an svg or png.

@j-x-han Can you verify that the text and icon are removed once we download as SVG and PNG?

A few more comments!

so glad to see this T_T!!


setPermanentCookieJson is deprecated, but why?

deprecation message says to use defaultCookieJson, but it seems that you'd
reimplement setPermanentCookieJson then, as defaultCookieJson doesn't set anything?
{-# DEPRECATED setPermanentCookieJson "Use defaultCookieJson instead" #-}
setPermanentCookieJson :: (MonadJSM m, HasJSContext m, ToJSON v) => DOM.Document -> Text -> Maybe v -> m ()
setPermanentCookieJson d k = setPermanentCookie d <=< defaultCookieJson k

I think that the deprecation should be removed, or clarified.

My guess is that
setPermanentCookie d <=< defaultCookieJson k
--vs
setPermanentCookieJson d k

didn't justify it's seat in the namespace since the implementation is hardly longer than the name.

But you're right that the deprecation message is confusing.

the setPermanentCookieJson is however quite handy, and it's natural "inverse" of getCookieJson.

the setPermanentCookieJson is however quite handy, and it's natural
"inverse" of getCookieJson.

I agree
On Tue, 18 Jun 2019 at 13:40, Oleg Grenrus<EMAIL_ADDRESS>wrote:

the setPermanentCookieJson is however quite handy, and it's natural
"inverse" of getCookieJson.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/obsidiansystems/rhyolite/issues/66?email_source=notifications&email_token=ABYWSRU4I6KBQKQN4244HWTP3EMYDA5CNFSM4HZBLJY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX7M4WA#issuecomment-503238232,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABYWSRQHYH2LKANCR6DR35DP3EMYDANCNFSM4HZBLJYQ
.

Fixed via 997c4e210305cca29035f11d4a9806887f62d11a


Unable to run MAFFT during refine

I installed truvari with "pip install git+https://github.com/acenglish/truvari@a8dbd3066f7572e9b7487c470485de34930eee12" to output the error message:
Command:
truvari bench -f /homes2/yangao/data/HG002/00ref/GRCh38_GIABv3_no_alt_analysis_set_maskedGRC_decoys_MAP2K3_KMT2C_KCNJ18.fasta --includebed /homes2/yangao/data/HG002/02benchmark_truth_set/T2T_v1.1/sawfish_bench/GRCh38_HG2-T2TQ100-V1.0_stvar.benchmark_1_22.bed -o /homes2/yangao/data/HG002/sniffles/pacbio_sniffles_paper/sniffles_withTRF_truvari_sawfish_devlop -b /homes2/yangao/data/HG002/02benchmark_truth_set/T2T_v1.1/sawfish_bench/GRCh38_HG2-T2TQ100-V1.0.SV.vcf.gz -c /homes2/yangao/data/HG002/sniffles/pacbio_sniffles_paper/sniffles_withTRF_hiphased.vcf.gz --passonly --pick ac --dup-to-ins

truvari refine -m '--auto --thread 16' -f /homes2/yangao/data/HG002/00ref/GRCh38_GIABv3_no_alt_analysis_set_maskedGRC_decoys_MAP2K3_KMT2C_KCNJ18.fasta --regions /homes2/yangao/data/HG002/sniffles/pacbio_sniffles_paper/sniffles_withTRF_truvari_sawfish/candidate.refine.bed --recount --use-region-coords --use-original-vcfs --align mafft /homes2/yangao/data/HG002/sniffles/pacbio_sniffles_paper/sniffles_withTRF_truvari_sawfish_devlop

The error message in refine step:
...
2024-12-17 12:41:07,916 [INFO] Setting up regions
2024-12-17 12:41:08,024 [INFO] 4228 --regions reduced to 4228 after intersecting with 189 from --includebed
2024-12-17 12:41:08,024 [INFO] Extending the regions by 100 bases
2024-12-17 12:41:10,044 [INFO] 3354 regions to be refined
2024-12-17 12:41:10,058 [INFO] Preparing regions
2024-12-17 12:41:10,120 [INFO] Extracting haplotypes
2024-12-17 12:41:11,791 [INFO] Harmonizing variants
2024-12-17 12:41:17,218 [ERROR] Unable to run MAFFT
2024-12-17 12:41:17,218 [ERROR] stderr: nthread = 16
nthreadpair = 16
nthreadtb = 16
ppenalty_ex = 0
stacksize: 8192 kb
generating a scoring matrix for nucleotide (dist=200) ... done
Gap Penalty = -1.53, +0.00, +0.00
=========================================================================
=========================================================================
===
=== Alphabet 'i' is unknown.
=== Please check site 179 in sequence 4.
===
=== To make an alignment that has unusual characters (U, @, #, etc), try
=== % mafft --anysymbol input > output
===
=========================================================================
=========================================================================
Illegal character i

2024-12-17 12:41:26,415 [ERROR] Unable to run MAFFT
2024-12-17 12:41:26,415 [ERROR] stderr: outputhat23=16
treein = 0
compacttree = 0
stacksize: 8192 kb
generating a scoring matrix for nucleotide (dist=200) ... done
=========================================================================
=========================================================================
===
=== Alphabet 'i' is unknown.
=== Please check site 114 in sequence 4.
===
=== To make an alignment that has unusual characters (U, @, #, etc), try
=== % mafft --anysymbol input > output
===
=========================================================================
=========================================================================
Illegal character i

2024-12-17 12:41:27,092 [ERROR] Unable to run MAFFT
2024-12-17 12:41:27,093 [ERROR] stderr: outputhat23=16
...

Sorry, I clicked close on this, but you can reopen this ticket if you find more information and need further assistance.

For sequences in the VCF file, there is no i.
But there is <INS> for some imprecise variant records.
Is this a potential reason?

I have finished the refine step without error using the VCF removing those imprecise variant records.
So, although I am not 100% sure, I think it was caused by  (Alphabet 'i' )  (Alphabet 'p' ) in the variant sequence column for some imprecise variant records, where the actual variant sequence is not available.

Yeah, that's probably it. Truvari refine only works on sequence resolved SVs. And checking my code I think it's likely that my filter in truvari phab (the harmonizing tool) to exclude symbolic ALTs (e.g. <INS>) might have an error. The simplest solution would be to exclude symbolic ALTs from your VCF before running truvari bench.
Truvari v5 is in progress, so I'll fix the filtering code. The next release will also automatically attempt to resolve some symbolic ALTs (similar to this), but that procedure still won't apply to <INS>.

OK, sounds good! I will filter them out for my current project.
Thank you!

The filter works on BNDs, so you don't have to. But in general yes I'd remove those because truvari won't handle them.

Got it, thanks!


sphinx-autobuild: init at 2020.9.1

Addresses  #109564
Motivation for this change
Package seems to be missing albeit useful.
Be mindful, this is my first contribution to nixpkgs. I build the package locally in my shell.nix setup but it isn't exactly straightforward for me to test my patch in nixpkgs for some reason. I tried to produce a diff that looks like other Python package definitions.
Things done

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

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

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

You need to add an entry to python top level file.

I added it to pkgs/top-level/python-packages.nix

You need to add an entry to python top level file.

I added it to pkgs/top-level/python-packages.nix

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 109565 run on x86_64-darwin 1

3 packages built:

python37Packages.sphinx-autobuild
python38Packages.sphinx-autobuild
python39Packages.sphinx-autobuild

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 109565 run on x86_64-darwin 1

3 packages built:

python37Packages.sphinx-autobuild
python38Packages.sphinx-autobuild
python39Packages.sphinx-autobuild

This is a semi-automatic executed nixpkgs-review which is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 109565 run on x86_64-linux 1

3 packages built:

python37Packages.sphinx-autobuild
python38Packages.sphinx-autobuild
python39Packages.sphinx-autobuild

This is a semi-automatic executed nixpkgs-review which is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 109565 run on x86_64-linux 1

3 packages built:

python37Packages.sphinx-autobuild
python38Packages.sphinx-autobuild
python39Packages.sphinx-autobuild

Please do not add fixup commits. GitHub does not always resolve them correctly.

Please do not add fixup commits. GitHub does not always resolve them correctly.


Error in loading LWIP in AWS instance.

I'm running a piece of code on my local machine, which runs fine, however I just Archive the node_modules and the node-code for the server to run, but it gives me the following error -
at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17) at require (module.js:380:17)
at /var/task/node_modules/lwip/lib/Image.js:3:22
at Object.<anonymous> (/var/task/node_modules/lwip/lib/Image.js:15:3)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)

Any idea what is causing this?
@EyalAr Thanks for creating this repo, however what is the memory footprint for these functions?

Is that the full error?


Support for global ~/.molecule.yml File

It would be nice if we could define some defaults in a global ~/.molecule.yml or similar file, that would be merged with every project specific molecule.yml.
E.g. for setting some defaults for the ansible raw_ssh_args in a single / central place

I like this. Lemme see what I can do to get this in quickly.

Actually - you can put some global defaults in ~/.config/molecule/config.yml. This config file has a lower priority than the local project config, but a higher priority than the package defaults. Hope this helps!

@kireledan sweet, exactly what i was looking for! will give it a try :)


Agent tags config are not handled correctly

Output of the info page (if this is a bug)
Hostnames
  =========
    hostname: ****************
    socket-fqdn: localhost
    socket-hostname: ****************
    host tags:

    hostname provider: os
    unused hostname providers:
      aws: not retrieving hostname from AWS: the host is not an ECS instance, and other providers already retrieve non-default hostnames
      configuration/environment: hostname is empty
      gce: unable to retrieve hostname from GCE: Get http://<IP_ADDRESS>/computeMetadata/v1/instance/hostname: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

Describe what happened:
I am not sure if this actually an issue or I missed something in the documentation. but according to
https://github.com/DataDog/datadog-agent/blob/257945c4f568411454f89d666f4dbed7eeac6e63/pkg/config/config_template.yaml#L64
tags should be listed in the yaml config as list
# tags:
#   - environment:dev
#   - <TAG_KEY>:<TAG_VALUE>

To fix it config should be as string
# tags:
#   - "environment:dev"
#   - "<TAG_KEY>:<TAG_VALUE>"

However, this wouldn't work and will generate a list of whitespace
Describe what you expected:
I expected the tags to be assigned correctly However no tags were added.
Steps to reproduce the issue:
Additional environment details (Operating System, Cloud provider, etc):

Hey @abebars thanks for reaching out here! Could you paste your config for the tags list here as well so we can take a look at it? Otherwise, feel free to create a support ticket for a quick response.

Hey @DylanLovesCoffee Here's a sample of the not working tags
tags:
- cloud_provider:aws
- aws:ec2
- role:app
- availability-zone:us-east-1b
- instance-type:t2.medium
- vpc-name: vpc-name
- env:dev

to make this work i just have to quote them to be treated as strings not Yaml Key-Value, Here's a working one
tags:
- "cloud_provider:aws"
- "aws:ec2"
- "role:app"
- "availability-zone:us-east-1b"
- "instance-type:t2.medium"
- "vpc-name: vpc-name"
- "env:dev"

FWIW, this is broken when using helm as well.  When I follow the directions and pass in the same values, the agent picks up "[" and "]" and passes them up as part of the tags. This makes things sucky.
From the helm chart values.yaml
  ## List of tags to attach to every metric, event and service check collected by this Agent.
  ##
  ## Learn more about tagging: https://docs.datadoghq.com/tagging/
  #
  # tags:
  #   - <KEY_1>:<VALUE_1>
  #   - <KEY_2>:<VALUE_2>

My values:
  clusterName: redacted
  tags:
    - environment:redacted1
    - env:redacted2

What the agent sees:
  "host-tags": {
    "system": [
      "[environment:redacted1",
      "env:redacted2]",
      "cluster_name:redacted"
    ]
  },


[Backport - Newton] Change default console to novnc

This commit does the following:

Add nova_console_type: novnc into the osa default variable file
Make the necessary changes in maas for the console check to support
both novnc and spice
Change the rpc_support role to conditionally include the spice-specific
bit
Add an f5 'pool part' in the f5-config.py script for the novnc console
type

Connects https://github.com/rcbops/u-suk-dev/issues/131
(cherry picked from commit 5be24a69104bf1f4268e63e1638bf6d2b8868b97)

@rcbops/support-feedback Please look this over before we merge it. I would like to have a signoff before I move forward with the backports for this one.
Also, would a backport to mitaka suffice?

recheck_all

recheck_xenial


NotificationService.GetNotifications throw Sequence contains more than one element

i have a problem.i'm try build a docker image ,i build image in win10 docker desktop，than push docker hub.now i pull  it from docker hub and run  at win10 docker desktop ,it has no problem.but when i run it at centos7 use the same way , i login in and trying to admin .it throw an System.InvalidOperationException.The following is the log information.

by the way ,English is not my native language, I don't know if you can understand what I mean.
I hope to get your help or provide some suggestions.thanks very much !

OMG，I make a mistake.This exception will be generated in the old version, but the new version does not have this problem. The reason why this problem occurs is that my image tag is latest, and my local image has not been cleared, causing me not to run the old version.


Filter questions based on tags and Single/Multiple choice

Clicking on a tag with a question description should filter out other questions with those tags and show only those.
Also maybe we can have another field in question description, which says multiple and can have value True/False. There should be a way to filter out questions which have single/multiple correct options.

Instead of creating derivative information about True/False, why not filter by count? In any case, this can be done within the frontend easily, particularly, if you retrieve just the tags and the multiple choice status for all questions, and then just filter in the frontend itself.

Also, another thing I've noticed is that the questions get cached, and if changed by someone else, they don't get updated. Ideally, you want to updated the question cache every time someone views that question by clicking on the pager.

Creating another issue for the last comment.

Also, can you filter by the question title? I think all this filtering could be handled in the frontend.


Error page Design

A custom error page design irrespective of the url.

Can I propose a design @M-ZubairAhmed ?

I may have read this incorrect and designed a 404 webpage... have a look.

Looks good, can you replace React logo with something else :-P

@M-ZubairAhmed LOL :D True, @bhansa maybe we can use coderplex logo in between. But tbh I don't think we need to have a logo in the 404 :3

I thought of it @duttakapil, but it would look redundant since it's in header as well as page.

That's true. We should come up with something more interesting

Here's some inspiration : https://www.canva.com/learn/404-page-design/

Please go ahead and send a pr

Is this still in WIP? Please close this, if the issue has been resolved.


Refactor/ota 2798/rename provisioning

Depends on https://github.com/advancedtelematic/aktualizr/pull/1220.

Passes oe-selftest except for the test_aktualizr_fullostree ptest as expected. Ready for review.


INavigationFilter implementations should not repeat queries

We noticed some "repeated" queries when generating some test pages.
As the system has to build menus, if the same menu is configured in more places in the page (e.g. in more than one widget in different zones) some providers will repeat the queries they use to fetch the relevant information.
The "culprits" we found so far are:

DefaultMenuProvider that fetches again the list of MenuParts
https://github.com/OrchardCMS/Orchard/blob/610b3c4f53ce9a4bdbe26a5a095bd606bfabc811/src/Orchard.Web/Core/Navigation/Services/DefaultMenuProvider.cs#L9

TaxonomyNavigationProvider that fetches again the list of terms.
https://github.com/OrchardCMS/Orchard/blob/610b3c4f53ce9a4bdbe26a5a095bd606bfabc811/src/Orchard.Web/Modules/Orchard.Taxonomies/Navigation/TaxonomyNavigationProvider.cs#L16

Both this situations can be fixed easily by memorizing the results of the first pass.
A PR for this is coming.

They are different/unrelated.
This one is at a "higher level", in a sense. These providers should be repeating operations they don't need.
The other issue is deeper, and I think it should be handled transparently from whatever modules are doing.

In OC these menus are cached on the page itself, using fragment caching.


Scaling  MacawView is not affected by layer.anchorPoint

Why is that? Is node have other anchorePoint?

Hello @bwdowikowski, MacawView's scene is not affected by layer's parameters. Scale transformation is implemented by applying transformation matrix to the scene.

Hi @vhailor13, do you think is it a worth adding feature?

Not really, you can manipulate scene directly using transformation matrix and adjust it for a special anchor point. Maybe the good solution will be to add a simple interface for such matrix generation.

A simple wrapper would be for such matrix would be nice.

@vhailor13 by writing

transformation matrix and adjust it for a special anchor point

you meant adjusting dx and dy in scale func or some other func?

You can use combination of existing methods: http://math.stackexchange.com/questions/5805/scaling-at-an-arbitrary-point-and-figuring-out-the-distance-from-origin
It should be looking something like:
someNode.place = Transform 		.move(dx: -1.0 * anchorPoint.x, dy: -1.0 * anchorPoint.y) 		.scale(sx: scaleX, sy: scaleY), 		.move(dx: anchorPoint.x, dy: anchorPoint.y)

I did try it but without luck.
My handle pinch looks like this
dynamic func handlePich(recognizer: UIPinchGestureRecognizer) {
    guard let view = recognizer.view as? SVGView else { return }
    let scale = Double(recognizer.scale)
    recognizer.scale = 1
    let anchor = recognizer.location(in: view)

    view.node.place = Transform
                    .move(dx: -1.0 * anchor.x.double, dy: -1.0 * anchor.y.double)
                    .scale(sx: scale, sy: scale)
                    .move(dx: anchor.x.double, dy: anchor.y.double)
}

So I'm assuming that I should change Transform to view.node.place and final code should be
dynamic func handlePich(recognizer: UIPinchGestureRecognizer) {
    guard let view = recognizer.view as? SVGView else { return }
    let scale = Double(recognizer.scale)
    recognizer.scale = 1
    let anchor = recognizer.location(in: view)

    view.node.place = view.node.place
                    .move(dx: -1.0 * anchor.x.double, dy: -1.0 * anchor.y.double)
                    .scale(sx: scale, sy: scale)
                    .move(dx: anchor.x.double, dy: anchor.y.double)
}

But the results are still not as I expected. Am I doing it ok?

My bad, working solution is:
https://gist.github.com/vhailor13/080770c0c553cfba8951fbd6c40cbdc1

Uhh sorry  @vhailor13 for such late answer. That is working like a charm. Do you think this should be in the tutorial or better into separated method?


Generate speech from Text

Hello I am currently looking into this code and came up with a question
Is there a specific part that I can put in desired text to synthesize speech upon the text??
What I only see is a process of random sampling
Thank you

@pineville17 it is in progress