text:
➕ Add a Women Tech or Stem Pioneer to API JSON File. Good for Beginners.

➕ Add a Women Tech or Stem Pioneer to API JSON File.

Go to File /api/techwomen.json
Add the following fields to array:

name
known-for
Bio

Summary
Origin
DOB
DOD

Fields
Legacy
Tags
url
media
img_path
img_width

⚠ Note:
Before adding entry ctrl + f  or cmd + f to search for person and make sure there is not an entry for that person in the json file. You CANNOT enter same person if you do your PR will not be merged to main.
Example Entry: (Name, Known-for, Bio, Fields, Legacy, Tags, Media/Img]
      "name": "Ada Lovelace",
        "known_for": "First Computer Programmer",
        "Bio": {
            "Summary": "The daughter of famed poet Lord Byron, Augusta Ada Byron, Countess of Lovelace — better known as \"Ada Lovelace\" — showed her gift for mathematics at an early age. She translated an article on an invention by Charles Babbage, and added her own comments. Because she introduced many computer concepts, Lovelace is considered the first computer program",
            "Orgin": "London, England",
            "DOB": "10 December 1815",
            "DOD": "27 November 1852"
        },
        "Fields": [
            {
                "Computing": [
                    "Programming",
                    "Algorithims"
                ]
            }
        ],
        "Legacy": "Lovelace's contributions to the field of computer science were not discovered until the 1950s. Her notes were reintroduced to the world by B.V. Bowden, who republished them in 'Faster Than Thought - A Symposium on Digital Computing Machines'. Since then, Ada has received many posthumous honors for her work.",
        "Tags": [
            "Tech Pioneer",
            "Women in Tech",
            "Computer Programming"
        ],
        "url": "https://www.britannica.com/biography/Ada-Lovelace",
        "media": "https://www.britannica.com/biography/Ada-Lovelace/images-videos",
        "image_path": "https://cdn.britannica.com/22/23622-050-E60DC899/Ada-King-countess-Lovelace-Alfred-Edward-Chalon-circa-1838.jpg",
        "image_width": "150"

Good Websites for Research:

Biography - https://www.biography.com/
Britannica - https://www.britannica.com/
Computer History Museum - https://www.computerhistory.org/
Famous Scientists - https://www.famousscientists.org/

See Project Repo for more information

Thanks for Contributing! 👏

Open for more contributions!


text:
Generate better cut lines for less-rectangular maps

E.g.

There was some rasterio function that had a densify_edges argument? You should be able to use that when converting back to image coordinates from geospatial coordinates to have a better curve.

You may want to use transform_geom instead of transform_bounds:
https://rasterio.readthedocs.io/en/latest/api/rasterio.warp.html#rasterio.warp.transform_geom

Concise:
# Create a cutline in image coordinates
proj_bounds = Polygon.from_bounds(*transform_bounds(CRS.from_epsg(4326), profile['crs'], *bounds))
cutline = transform(lambda x,y,z=None: list(inv_geotransform * (x,y)), proj_bounds).wkt

You probably still want to use transform_geom instead of transform_bounds though.

Full example:
with rasterio.open('AK_Ruby_361345_1951_250000_geo.tif') as ds:
    profile = ds.profile
    geotransform = profile['transform']
    inv_geotransform = ~geotransform
    # Create a cutline in image coordinates
    proj_bounds = Polygon.from_bounds(*transform_bounds(CRS.from_epsg(4326), profile['crs'], *bounds))
    cutline = transform(lambda x,y,z=None: list(inv_geotransform * (x,y)), proj_bounds).wkt
    # Apply cutline
    with WarpedVRT(ds, cutline=cutline) as vrt:
        out_profile = vrt.profile
        data = vrt.read()
        out_profile['driver'] = 'GTiff'
        out_profile['nodata'] = 0
        with rasterio.open('clipped.tif', 'w', **out_profile) as dst:
            dst.write(vrt.read())

source: gharchive/issue

repo: kylebarron/usgs-topo-tiler

license: MIT

license_type: permissive

license_source: github-api


text:
Website not found? sqlc.dev

Website not found? https://sqlc.dev/

Fixed!

authors: frederikhors kyleconroy

repo: kyleconroy/sqlc


text:
Backtrack interval is extremely diffucult to adjust with Unexpected keyboard

Version 4.18.0
When trying to set the backtrack interval with the Unexpected Keyboard, the cursor is invisible (well it always is) and the cursor is basically at the hours side so input is basically impossible.
Although it is quite unusable in general, even being buggy with the Android Keyboard.
https://github.com/kylecorry31/Trail-Sense/assets/50755746/f4ab98ed-3c1b-4826-8932-b991ff584be0

@JacksonChen666 I'm sorry you are having issues with Trail Sense. Oddly enough, I can't reproduce this issue on my Pixel 5A (stock) or emulator (stock) - but I can on my phone that runs GrapheneOS. Are you using a custom ROM as well?
The intended behavior is that it works like the timer apps on most phones - when I press a number key, it always adds to the right and pressing the back key removes the rightmost number.

@JacksonChen666 thanks, I plan on pushing the new release of Trail Sense later this week, and I'll include the fix for this.


text:
Change cipher to 128bit.

Hi.
I'm using this docker as VPN for My phone and battery drain is very noticeable (around 30%) so I'm willing to test weaker cipher to compare results, but I can't seem to change cipher to AES-128-CBC. I'm using docker composer version. I tried manually change in openvpn.conf and ovpn_env.sh whit config regeneration command in terminal whit no luck.
What am I doing wrong?

Hi!
Select any of the specific additional options you want to use
-C    A list of allowable TLS ciphers delimited by a colon (cipher).

I tried adding command to  "--cipher AES-128-CBC" to composer, but still log show that  AES-256-GCM cipher is in use.  AES-128-CBC shows up in all config files, but log still shows AES-256-GCM.
openvpn    | Thu Mar 28 10:42:46 2019 baaluciitis/89.254.143.97:55972 SENT CONTROL [baaluciitis]: 'PUSH_REPLY,block-outside-dns,dhcp-option DNS 1.1.1.1,dhcp-option DNS 1.0.0.1,comp-lzo no,route 192.168.255.0 255.255.255.0,topology net30,ping 30,ping-restart 60,ifconfig 192.168.254.5 192.168.254.6,peer-id 2,cipher AES-256-GCM' (status=1) openvpn    | Thu Mar 28 10:42:46 2019 baaluciitis/89.254.143.97:55972 Data Channel: using negotiated cipher 'AES-256-GCM'

Got it working by adding "--ncp-ciphers AES-128-CBC" to docker-compose.yml.

hi - got the same problem,
what do you mean by adding "--ncp-ciphers AES-128-CBC" to docker-compose.yml.
that is no .yml content.
i expect something like :
environment:
- ncp-ciphers AES-128-CBC
which does not do the job.
can you please show how its done

Got it working by adding "--ncp-ciphers AES-128-CBC" to docker-compose.yml.

hi - got the same problem,
what do you mean by adding "--ncp-ciphers AES-128-CBC" to docker-compose.yml.
that is no .yml content.
i expect something like :
environment:

ncp-ciphers AES-128-CBC

which does not do the job.
can you please show how its done

authors: domi-a kasinjsh zelbeinstein

repo: kylemanna/docker-openvpn

license: mit

license_source: bigquery


text:
Handle Service Bindings in SM client and get Service Instances in API

#442

/test pull-btp-manager-build

source: gharchive/pull-request

authors: szwedm ukff

repo: kyma-project/btp-manager


text:
Extensibility: Setting tabs dynamically with the Tabs widget

Description
The Tabs widget currently displays all tabs with names that must be specifically provided. This means you have to specify the exact name for each tab and describe the exact number of tabs you want. A nice improvement will be that you can choose to set also the tabs dynamically, like a template that will be filled for each tab.
Reasons
Our custom resources can have very long lists with double to triple digit entries, which are separated by specific name. So we want to have a separate tab based on the different separator name and in each tab to have a children widget which can be, for example, table, containing all the necessary information we want to expose.

/reopen
We still could use this feature. :)

/reopen

authors: VaskoBozhurski tnykd

repo: kyma-project/busola


text:
Rewrite Luigi's navigation footer

Description
Changes proposed in this pull request:

Added a Footer component with the same logic as it is in Luigi
Added a feature flag to switch between Luigi and React navigation

Related issue(s)
See #1939

/retest

/retest

/retest

/retest

/retest

/test pre-busola-integration-test-k3s-cluster

/test pre-busola-integration-test-k3s-cluster

/test pre-busola-integration-test-k3s-cluster

/test pre-busola-integration-test-k3s-cluster

/test pre-busola-integration-test-k3s-cluster

/test pre-busola-integration-test-k3s-cluster

authors: Lyczeq mrCherry97 wchrapka


text:
Implement updated metadata view

Description
Changes proposed in this pull request:

adjust metadata view to desings
adjust part of resources views

Related issue(s)
https://github.com/kyma-project/busola/issues/2753

/test all

/test all

/retest

/retest

/retest

/retest

/retest

/retest

/retest

/retest

/retest

/retest

/retest

retest

/retest

authors: akucharska dbadura


text:
[WIP] add e2e test for aws

Description
add e2e-aws TestDefinition

...
...
...

Related issue(s)

@life0215 : If you need support on getting this Spinnaker pipelie flying, please contact @ksputo . He worked also on this topic.

/test pre-master-control-plane-gke-integration

/test pre-master-control-plane-gke-provisioner-integration

Hi, @ksputo  and Team
Can you help review this PR? Did some test on dev landscape, looks OK.

/retest

repo: kyma-project/control-plane


text:
Move build pipeline and tests to github actions and ADO

Description
There is a way to build images using reusable workflow from test-infra.
Examples:

https://github.com/dekiel/test-infra/blob/main/.github/workflows/test-out-org.yml
https://github.com/kyma-project/test-infra/blob/main/.github/workflows/pull-build-oidc-token-verifier.yml

Remember about permissions. Example:
: https://github.com/dekiel/test-infra/blob/ada722b56dc5617e15a569241ab4c423fa00b88b/.github/workflows/test-out-org.yml#L12C1-L15C1
Reasons
Prow infrastructure is going to be shutdown and all Kyma teams are asked to migrate.
Acceptance criteria
Builds:

[x] busola-local build is moved to GithubActions
https://github.com/kyma-project/busola/pull/2971
https://github.com/kyma-project/busola/pull/2972
https://github.com/kyma-project/busola/pull/2974
https://github.com/kyma-project/busola/pull/2976
[x] remove from test-infra:
https://github.com/kyma-project/test-infra/pull/11027
[x] busola-web build is moved to GithubActions
https://github.com/kyma-project/busola/pull/3124
[ ] remove from test-infra
[x] busola-backend build is moved to GithubActions
https://github.com/kyma-project/busola/pull/3124
[ ] remove from test-infra
[x] kyma-dashboard-dev build is moved to GithubActions
https://github.com/kyma-project/kyma-dashboard/pull/308
https://github.com/kyma-project/kyma-dashboard/pull/314
https://github.com/kyma-project/kyma-dashboard/pull/317
https://github.com/kyma-project/kyma-dashboard/pull/328
https://github.com/kyma-project/kyma-dashboard/pull/327
https://github.com/kyma-project/kyma-dashboard/pull/357
[x] kyma-dashboard-dev URL to the registry is adjusted
https://github.com/kyma-project/kyma-dashboard/pull/355
[ ] remove from test-infra
[x] kyma-dashboard-stage build is moved to GithubActions
https://github.com/kyma-project/kyma-dashboard/pull/355
[ ] remove from test-infra
[x] kyma-dashboard-prod build is moved to GithubActions
https://github.com/kyma-project/kyma-dashboard/pull/355
https://github.com/kyma-project/kyma-dashboard/pull/357
[ ] remove from test-infra

Tests:

[x] busola-integration-namespace
https://github.com/kyma-project/busola/pull/2981

[x] remove from test-infra
https://github.com/kyma-project/test-infra/pull/11171

[x] busola-integration-cluster
https://github.com/kyma-project/busola/pull/3033

[x] remove from test-infra
https://github.com/kyma-project/test-infra/pull/11268

[x] busola-lighthouse
https://github.com/kyma-project/busola/pull/3033

[x] remove from test-infra
https://github.com/kyma-project/test-infra/pull/11268

[x] kyma-dashboard-integration
https://github.com/kyma-project/kyma-dashboard/pull/340

[x] remove from test-infra
https://github.com/kyma-project/test-infra/pull/11268

[x] kyma-dashboard-smoke-stage
https://github.com/kyma-project/kyma-dashboard/pull/345

[x] remove from test-infra
https://github.com/kyma-project/test-infra/pull/11268

[x] kyma-dashboard-smoke-prod
https://github.com/kyma-project/kyma-dashboard/pull/345

[x] remove from test-infra
https://github.com/kyma-project/test-infra/pull/11268

[x] workflow for checking if there is any changes in extensibility and extensions/statics/wizards.yaml should be regenerated
https://github.com/kyma-project/kyma-dashboard/pull/336

Settings:

[ ] all build jobs are added as required in repo settings
[ ] Tide is settled as unmanaged for busola and kyma-dashboard repo
[ ] Automerge is set
[ ] Passing all of the checks to merge is set

I would also remove the duplicate images:

https://github.com/kyma-project/kyma-dashboard/blob/main/Dockerfile.local
https://github.com/kyma-project/kyma-dashboard/blob/main/Dockerfile.local.builder
and leave the one without builder.

tide and auto-merge need to be done as follow-up, after removing tide

authors: dbadura mrCherry97 pbochynski

repo: kyma-project/kyma-dashboard


text:
🛑 senoshaidodelasmanos.love is down

In d3a2052, senoshaidodelasmanos.love (https://senoshaidodelasmanos.love) was down:

HTTP code: 0
Response time: 0 ms

Resolved: senoshaidodelasmanos.love is back up in 6206519 after 18 minutes.

repo: kyryl-bogach/upptime


text:
Add kakarot zkEVM to upcoming L2s

This PR adds Kakarot zkEVM as an upcoming L2 list.

Added kakarot to layers2 index.ts and added the logo


text:
Adding the content with statistics and showcase

[x] Adding the statistics with the necessary pictures
[x] Adding the content with proper description
[x] Run all the commands
[X] Checked all the errors

Adding the statistics

authors: Haneefa-Shaik cristobal-lopez


text:
add generate io json helper function

https://www.loom.com/share/bfc3073a230b44ffa9761f3edfa3f9d2

To what extent are we leaning into the CWL nomenclature for scattering here vs. in golang? I recall we simplified things quiet a bit there and distinguished between "paired" and "element-wise"

The go client only does cross product.

repo: labdao/plex


text:
Arthur

Memperbarui beberapa

Mantab

authors: AdamArthurF labkomers

repo: labkom-mipa-uns/si-labkom-new


text:
RETRO: RuntimeError: stack expects each tensor to be equal size, but got [2, 32] at entry 0 and [1, 32] at entry 29

Hi,
Running the exact code on github for deepmind's retrieval transformer - RETRO,  getting the following error:
RuntimeError: stack expects each tensor to be equal size, but got [2, 32] at entry 0 and [1, 32] at entry 29
Could you please help me with this? I used the same dataset as in the code.

just had to pop out the len(s[2]) !=1 element from s[2] in database.py

Can you please provide the full error?

I am having same issue while running train.py. Here's the full detailed error:
Load data...[DONE]	2.39ms
Tokenize...[DONE]	29.36ms
Build vocabulary...[DONE]	0.62ms
Load BERT tokenizer...[DONE]	340.26ms
Load BERT model...[DONE]	882.21ms
Load index...[DONE]	69.50ms
2024-06-25 11:59:59.603955: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-06-25 11:59:59.604002: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-06-25 11:59:59.605299: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-06-25 11:59:59.611551: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-06-25 12:00:00.750669: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
No labml server url specified. Please start a labml server and specify the URL. Docs: https://github.com/labmlai/labml/tree/master/app
retro_small: 706e157632ea11ef989a0242ac1c000c
[clean]: "cleanup notebooks"
116:  Train:   5%  88,760ms   loss.train:  3.71168  88,760ms  0:00m/  0:47m  Traceback (most recent call last):
File "/content/annotated_deep_learning_paper_implementations/labml_nn/transformers/retro/train.py", line 225, in
train()
File "/content/annotated_deep_learning_paper_implementations/labml_nn/transformers/retro/train.py", line 213, in train
trainer()
File "/content/annotated_deep_learning_paper_implementations/labml_nn/transformers/retro/train.py", line 134, in call
for i, (src, tgt, neighbors) in monit.enum('Train', self.dataloader):
File "/usr/local/lib/python3.10/dist-packages/labml/internal/monitor/iterator.py", line 84, in next
next_value = next(self._iterator)
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py", line 631, in next
data = self._next_data()
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py", line 675, in _next_data
data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.10/dist-packages/labml_nn/transformers/retro/dataset.py", line 131, in getitem
neighbors = torch.stack([torch.stack([self.tds.text_to_i(n) for n in chunks]) for chunks in s[2]])
RuntimeError: stack expects each tensor to be equal size, but got [2, 32] at entry 0 and [1, 32] at entry 31

authors: Zahin112 mocarsha vpj


text:
bugfix: add node failure

close #2389
cluster status might be overwriten by inappropriate usage

test:
1 master, 1 node before test.
add nodes failure and  then delete nodes that failed to join cluster.
root@lmaster:~/cf# sealos add --nodes 192.168.64.10
2023-01-13T09:56:38 info start to scale this cluster
2023-01-13T09:56:38 info Executing pipeline JoinCheck in ScaleProcessor.
2023-01-13T09:56:38 info checker:hostname [192.168.64.8:22 192.168.64.10:22]
2023-01-13T09:56:38 info checker:timeSync [192.168.64.8:22 192.168.64.10:22]
2023-01-13T09:56:38 info Executing pipeline PreProcess in ScaleProcessor.
2023-01-13T09:56:45 error Applied to cluster error: failed to init runtime: cluster image kubernetes version cannot be empty
Error: failed to init runtime: cluster image kubernetes version cannot be empty
failed to init runtime: cluster image kubernetes version cannot be empty
root@lmaster:~/cf# sealos delete --nodes 192.168.64.10
are you sure to delete these nodes? Yes [y/yes], No [n/no] : y
2023-01-13T09:57:19 info start to scale this cluster
2023-01-13T09:57:19 info Executing pipeline DeleteCheck in ScaleProcessor.
2023-01-13T09:57:19 info checker:hostname [192.168.64.8:22 192.168.64.10:22]
2023-01-13T09:57:20 info checker:timeSync [192.168.64.8:22 192.168.64.10:22]
2023-01-13T09:57:20 info Executing pipeline PreProcess in ScaleProcessor.
2023-01-13T09:57:27 error Applied to cluster error: failed to init runtime: cluster image kubernetes version cannot be empty
Error: failed to init runtime: cluster image kubernetes version cannot be empty
failed to init runtime: cluster image kubernetes version cannot be empty

bugfix:
root@lmaster:~/cf# sealos add --nodes 192.168.64.10
2023-01-13T09:57:30 info start to scale this cluster
2023-01-13T09:57:30 info Executing pipeline JoinCheck in ScaleProcessor.
2023-01-13T09:57:30 info checker:hostname [192.168.64.8:22 192.168.64.10:22]
2023-01-13T09:57:31 info checker:timeSync [192.168.64.8:22 192.168.64.10:22]
2023-01-13T09:57:31 info Executing pipeline PreProcess in ScaleProcessor.
2023-01-13T09:57:38 info Executing pipeline PreProcessImage in ScaleProcessor.
2023-01-13T09:57:38 info Executing pipeline RunConfig in ScaleProcessor.
2023-01-13T09:57:38 info Executing pipeline MountRootfs in ScaleProcessor.
2023-01-13T09:58:05 info Executing pipeline Bootstrap in ScaleProcessort/s)
192.168.64.10:22:  INFO [2023-01-13 09:58:06] >> check root,port,cri success
192.168.64.10:22: Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /etc/systemd/system/containerd.service.
192.168.64.10:22:  INFO [2023-01-13 09:58:07] >> Health check containerd!
192.168.64.10:22:  INFO [2023-01-13 09:58:07] >> containerd is running
192.168.64.10:22:  INFO [2023-01-13 09:58:07] >> init containerd success
192.168.64.10:22: Created symlink /etc/systemd/system/multi-user.target.wants/image-cri-shim.service → /etc/systemd/system/image-cri-shim.service.
192.168.64.10:22:  INFO [2023-01-13 09:58:08] >> Health check image-cri-shim!
192.168.64.10:22:  INFO [2023-01-13 09:58:08] >> image-cri-shim is running
192.168.64.10:22:  INFO [2023-01-13 09:58:08] >> init shim success
192.168.64.10:22: 127.0.0.1 localhost
192.168.64.10:22: ::1 localhost ip6-localhost ip6-loopback
192.168.64.10:22: * Applying /etc/sysctl.d/10-console-messages.conf ...
192.168.64.10:22: kernel.printk = 4 4 1 7
192.168.64.10:22: * Applying /etc/sysctl.d/10-ipv6-privacy.conf ...
192.168.64.10:22: net.ipv6.conf.all.use_tempaddr = 2
192.168.64.10:22: net.ipv6.conf.default.use_tempaddr = 2
192.168.64.10:22: * Applying /etc/sysctl.d/10-kernel-hardening.conf ...
192.168.64.10:22: kernel.kptr_restrict = 1
192.168.64.10:22: * Applying /etc/sysctl.d/10-magic-sysrq.conf ...
192.168.64.10:22: kernel.sysrq = 176
192.168.64.10:22: * Applying /etc/sysctl.d/10-network-security.conf ...
192.168.64.10:22: net.ipv4.conf.default.rp_filter = 2
192.168.64.10:22: net.ipv4.conf.all.rp_filter = 2
192.168.64.10:22: * Applying /etc/sysctl.d/10-ptrace.conf ...
192.168.64.10:22: kernel.yama.ptrace_scope = 1
192.168.64.10:22: * Applying /etc/sysctl.d/10-zeropage.conf ...
192.168.64.10:22: vm.mmap_min_addr = 32768
192.168.64.10:22: * Applying /usr/lib/sysctl.d/50-default.conf ...
192.168.64.10:22: kernel.core_uses_pid = 1
192.168.64.10:22: net.ipv4.conf.default.rp_filter = 2
192.168.64.10:22: net.ipv4.conf.default.accept_source_route = 0
192.168.64.10:22: sysctl: setting key "net.ipv4.conf.all.accept_source_route": Invalid argument
192.168.64.10:22: net.ipv4.conf.default.promote_secondaries = 1
192.168.64.10:22: sysctl: setting key "net.ipv4.conf.all.promote_secondaries": Invalid argument
192.168.64.10:22: net.ipv4.ping_group_range = 0 2147483647
192.168.64.10:22: net.core.default_qdisc = fq_codel
192.168.64.10:22: fs.protected_hardlinks = 1
192.168.64.10:22: fs.protected_symlinks = 1
192.168.64.10:22: fs.protected_regular = 1
192.168.64.10:22: fs.protected_fifos = 1
192.168.64.10:22: * Applying /usr/lib/sysctl.d/50-pid-max.conf ...
192.168.64.10:22: kernel.pid_max = 4194304
192.168.64.10:22: * Applying /etc/sysctl.d/99-cloudimg-ipv6.conf ...
192.168.64.10:22: net.ipv6.conf.all.use_tempaddr = 0
192.168.64.10:22: net.ipv6.conf.default.use_tempaddr = 0
192.168.64.10:22: * Applying /usr/lib/sysctl.d/99-protect-links.conf ...
192.168.64.10:22: fs.protected_fifos = 1
192.168.64.10:22: fs.protected_hardlinks = 1
192.168.64.10:22: fs.protected_regular = 2
192.168.64.10:22: fs.protected_symlinks = 1
192.168.64.10:22: * Applying /etc/sysctl.d/99-sysctl.conf ...
192.168.64.10:22: * Applying /etc/sysctl.d/k8s.conf ...
192.168.64.10:22: net.bridge.bridge-nf-call-ip6tables = 1
192.168.64.10:22: net.bridge.bridge-nf-call-iptables = 1
192.168.64.10:22: net.ipv4.conf.all.rp_filter = 0
192.168.64.10:22: * Applying /etc/sysctl.conf ...
192.168.64.10:22: net.ipv4.ip_forward = 1
192.168.64.10:22: Firewall stopped and disabled on system startup
192.168.64.10:22:  INFO [2023-01-13 09:58:09] >> init kube success
192.168.64.10:22:  INFO [2023-01-13 09:58:09] >> init rootfs success
2023-01-13T09:58:09 info Executing pipeline Join in ScaleProcessor.
2023-01-13T09:58:09 info [192.168.64.10:22] will be added as worker
2023-01-13T09:58:09 info start to get kubernetes token...
2023-01-13T09:58:09 info start to join 192.168.64.10:22 as worker
2023-01-13T09:58:09 info start to copy kubeadm join config to node: 192.168.64.10:22
192.168.64.10:22: 2023-01-13T09:58:10 info domain apiserver.cluster.local:10.103.97.2 append success
192.168.64.10:22: 2023-01-13T09:58:11 info domain lvscare.node.ip:192.168.64.10 append success
2023-01-13T09:58:11 info registry auth in node 192.168.64.10:22
192.168.64.10:22: 2023-01-13T09:58:11 info domain sealos.hub:192.168.64.8 append success
2023-01-13T09:58:11 info run ipvs once module: 192.168.64.10:22
192.168.64.10:22: 2023-01-13T09:58:12 info Trying to add route
192.168.64.10:22: 2023-01-13T09:58:12 info success to set route.(host:10.103.97.2, gateway:192.168.64.10)
2023-01-13T09:58:12 info start join node: 192.168.64.10:22
192.168.64.10:22: W0113 09:58:12.519218  139821 initconfiguration.go:120] Usage of CRI endpoints without URL scheme is deprecated and can cause kubelet errors in the future. Automatically prepending scheme "unix" to the "criSocket" with value "/run/containerd/containerd.sock". Please update your configuration!
192.168.64.10:22: [preflight] Running pre-flight checks
192.168.64.10:22:       [WARNING FileExisting-socat]: socat not found in system path
192.168.64.10:22:       [WARNING SystemVerification]: missing optional cgroups: blkio
192.168.64.10:22: [preflight] Reading configuration from the cluster...
192.168.64.10:22: [preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
192.168.64.10:22: W0113 09:58:12.637308  139821 utils.go:69] The recommended value for "healthzBindAddress" in "KubeletConfiguration" is: 127.0.0.1; the provided value is: 0.0.0.0
192.168.64.10:22: [kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
192.168.64.10:22: [kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
192.168.64.10:22: [kubelet-start] Starting the kubelet
192.168.64.10:22: [kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...
192.168.64.10:22:
192.168.64.10:22: This node has joined the cluster:
192.168.64.10:22: * Certificate signing request was sent to apiserver and a response was received.
192.168.64.10:22: * The Kubelet was informed of the new secure connection details.
192.168.64.10:22:
192.168.64.10:22: Run 'kubectl get nodes' on the control-plane to see this node join the cluster.
192.168.64.10:22:
2023-01-13T09:58:26 info succeeded in joining 192.168.64.10:22 as worker
2023-01-13T09:58:27 info start to sync lvscare static pod to node: 192.168.64.10:22 master: [192.168.64.8:6443]
192.168.64.10:22: 2023-01-13T09:58:27 info generator lvscare static pod is success
2023-01-13T09:58:27 info succeeded in scaling this cluster
2023-01-13T09:58:27 info
      ___           ___           ___           ___       ___           ___
     /\  \         /\  \         /\  \         /\__\     /\  \         /\  \
    /::\  \       /::\  \       /::\  \       /:/  /    /::\  \       /::\  \
   /:/\ \  \     /:/\:\  \     /:/\:\  \     /:/  /    /:/\:\  \     /:/\ \  \
  _\:\~\ \  \   /::\~\:\  \   /::\~\:\  \   /:/  /    /:/  \:\  \   _\:\~\ \  \
 /\ \:\ \ \__\ /:/\:\ \:\__\ /:/\:\ \:\__\ /:/__/    /:/__/ \:\__\ /\ \:\ \ \__\
 \:\ \:\ \/__/ \:\~\:\ \/__/ \/__\:\/:/  / \:\  \    \:\  \ /:/  / \:\ \:\ \/__/
  \:\ \:\__\    \:\ \:\__\        \::/  /   \:\  \    \:\  /:/  /   \:\ \:\__\
   \:\/:/  /     \:\ \/__/        /:/  /     \:\  \    \:\/:/  /     \:\/:/  /
    \::/  /       \:\__\         /:/  /       \:\__\    \::/  /       \::/  /
     \/__/         \/__/         \/__/         \/__/     \/__/         \/__/

                  Website :https://www.sealos.io/
                  Address :github.com/labring/sealos
                BuildVersion: latest-

root@lmaster:~/cf# kubectl get nodes
NAME      STATUS   ROLES           AGE   VERSION
lmaster   Ready    control-plane   96m   v1.24.0
node1     Ready    <none>          95m   v1.24.0
node2     Ready    <none>          24s   v1.24.0

+1

repo: labring/sealos


text:
Clang format integration

I loaded a new page and lost all my notes so I'm not going to re-type it all >.<
Suffice to say, clang-format is supported in VS2017 (v6.0) and VS2019 (v7.0). I added the files necessary to uphold the coding conventions documented in CONVENTIONS.md as close as possible. Deviations are commented and commented out for when using the tool in later VS versions.
This will be especially helpful with tabs and brace styles.
See VS blog: https://devblogs.microsoft.com/cppblog/clangformat-support-in-visual-studio-2017-15-7-preview-1/ for more info.

I was reviewing this branch. The changes made to the file proj/vs2017/NAS2D.vcxproj.filters are lost in the noise. I suspect the original file had Windows specific line endings. Github is likely forcing those line endings over to Linux style. Maybe it would be better to try and separate the commit into one that only applies the line ending change and one that applies the meat of the change to the filters file.
I think Dan has had good success with does2unix to complete this in the past. https://waterlan.home.xs4all.nl/dos2unix.html
I am very guilty of making others clean up my line ending commits in the past. :|

I checked into this briefly. The Visual Studio project and filter files were both using CRLF (Windows style) line endings. When this change was made, the filter file was converted to LF (Linux style) line endings.
I suspect it was done automatically by the Git configuration. You may need to adjust Git settings to make the commit without it getting auto converted. (If you undid the change with dos2unix, or rather unix2dos, it might be redone by Git unless settings are changed).
Some references:
https://help.github.com/en/articles/dealing-with-line-endings
https://stackoverflow.com/questions/170961/whats-the-best-crlf-carriage-return-line-feed-handling-strategy-with-git
There are some strong opinions on this issue, and no real consensus. I prefer the version control system not make silent automatic conversions on me, though I understand there can be some practical implications of this when working with Visual Studio. I believe Visual Studio can handle LF endings just fine for project and filter files, so you're free to convert if you want.
As Brett has said, it's strongly preferred to convert line endings separately in their own commit. This is to keep functional changes from getting lost in the noise of the EOL conversion.

90% of the time when I pull latest Visual Studio warns me "Line endings aren't consistent" and I just click through to change them back to windows CRLF (because why would a linux environment be using a VS config file?) and I guess I clicked No for once. :/

In general, please avoiding porting unrelated changes across branches, particularly when they are not required by the unrelated branch.
Perhaps more confusing, is the deleted code does not exist on master. I think what happened is the commit that modified the filters file added those lines, only we couldn't see that because of all the EOL noise.
Yes, actually, that's exactly the case. Those lines were added in the EOL change noise.

As I'm already half done, I'm going to push the rebase to get things sorted out and easier to understand.

How exactly are we supposed to use the .clang-format file? Maybe a little explanation about why it exists.
I just played around with the command line tool. It seems to reformat the code according to a rule file. It's caused widespread minor changes to the code base. It seems to have changed some indentation (tabs to spaces maybe?). I noticed it alphabetically sorted include lines. It changes the line wrapping, which didn't always play nice with comments. It tried to justify parameters when wrapping long function signatures. I'm not sure all the changes would be approved by all developers though. The rules might need a little bit of work.
Is there a Visual Studio plugin that uses the format file?

@DanRStevens
Yeah, as mentioned it won't be entirely compatible with the code base. Even the clang-format docs says so:
https://www.kernel.org/doc/html/latest/process/clang-format.html

clang-format is a tool to format C/C++/... code according to a set of rules and heuristics. Like most tools, it is not perfect nor covers every single case, but it is good enough to be helpful.

It allows per-project format rules to be applied instead of forcing each developer to change their global format rules.
e.g.
I like spaces and K&R brace style and have set my global format rules to use that. This project uses Allman brace style and tabs. Any time I make a change my global format rule will try to override. Using clang-format allows for per-project format rules to override my global rules and not affect any other unrelated project I'm working on.

For VS it is automatically detected and then can optionally be used thereafter. If you choose to use it, it is automatically applied when you complete a Copy-Paste operation or insert a brace/semi-colon. It can also be manually invoked with the shortcut pairs Ctrl+K, Ctrl+D (for the entire document) or Ctrl+K,Ctrl+F (for the current selection).
I suspect for linux you'll have to take the longer route of manually typing clang-format [file/directory glob] into the console.
https://www.kernel.org/doc/html/latest/process/clang-format.html

Ok, I just took another look over this thread. I think the changes are ready for merging.
@cugone, your last post nicely summarizes what this file is for, and has links to relevant documentation in case someone needs to update it. It sounds like there is built in Visual Studio support, and hotkeys to activate the functionality.
One point I'm not clear on is if there are visual indicators within Visual Studio about code format violations that this file will enable. Does it provide any kind of real-time syntax-check-like feedback?

This thread isn't too long, though we do have a bit of back and forth on the work. As Leeor seems to have limited time and energy for review, perhaps we can help him out a bit with the review process. @cugone, would you be able to open a new PR for this branch? I don't think you need to create a new branch, just a new PR for the same branch. You can use the contents of your last post above as the lead contents for the PR. Feel free to update if you want to add more details on use, or reword things. That should minimize what Leeor has to look over.
Once that's done, please request a review from Leeor (the link is on the upper right of the PR page), and then close the old PR. If you're unable to request a review, please "@" mention him requesting a review.
Thanks for the work.

@DanRStevens
Tried to create a new PR from the same branch and github only has "view the pull request" instead of creating a new one and google isn't helping much.
Unfortunately, I cannot request a review without write access so @ mention it is:
https://help.github.com/en/articles/requesting-a-pull-request-review

Note: Pull request authors can't request reviews unless they are either a repository owner or collaborator with write access to the repository.

@ldicker83
Requesting review.
Suggest start from here: https://github.com/lairworks/nas2d-core/pull/128#issuecomment-483044036

Maybe the old PR needed to be closed before a new one can be opened. Seems you've found a reasonable compromise though.

authors: Brett208 DanRStevens cugone

license: Zlib


text:
Add spy node ban list

The Monero Research Lab (MRL) https://github.com/monero-project/meta/issues/1119 to recommend that all Monero node operators enable a ban list of suspected spy node IP addresses. The spy nodes can reduce the privacy of Monero users.

https://github.com/monero-project/meta/issues/1124

thanks for your contribution


text:
[Tracking] Hive tests for P2P eth capability

Test suites are specified here: https://github.com/ethereum/go-ethereum/blob/a5fe7353cff959d6fcfcdd9593de19056edb9bdb/cmd/devp2p/internal/ethtest/suite.go#L64-L85
If Im not mistaken, we should be able to run the test with ./hive --sim devp2p --client ethereumrust --sim.limit "eth/{suite}" --docker.output
Test suites:

[x] Status
[x] #955
[x] #1044
[x] #1049
[x] #1139
[x] NewPooledTxs
[x] MaliciousHandshake
[x] MaliciousStatus
[x] SameRequestID
[x] ZeroRequestID
[x] SimultaneousRequests
[ ] LargeTxRequest
[x] BlobViolations

These are in order.

to fix your trouble check this solution click
maybe this will solve your problem.

Update: as of this commit , seems like every test is passing except 'LargeTxRequest'.

authors: Olowojaye fkrause98 mpaulucci

repo: lambdaclass/ethrex


text:
System.Job: Update examle in help

Fix sample
Old sample do not work directly.

Thanks a lot 🎉

authors: lambdalisue tsuyoshicho

repo: lambdalisue/vital-Whisky


text:
Fix md typo

Q
A

Documentation
yes

Bugfix
yes

Thank you @Slamdunk

authors: Slamdunk samsonasik


text:
Use stable php-http/psr7-integration-tests

Fixes current master because php-http/psr7-integration-tests in master require phpunit in v8.

Q
A

Documentation
no

Bugfix
yes

BC Break
no

New Feature
no

RFC
no

QA
yes

Description

Thanks, @snapshotpl!

authors: michalbundyra snapshotpl

repo: laminas/laminas-diactoros


text:
Dataset can't have zarr Files.

Due to hash for zarr files being None.
https://github.com/laminlabs/lamindb/blob/ae4343e702616ed3e32c8c2d9c42a553b1e05b4f/lamindb/_dataset.py#L318
This code is problematic.

I ahve a quick fix here https://github.com/laminlabs/lamindb/pull/1307/commits/502985133e22eef2f550fe243c875c0e4cb03ca2
But it doesn't seem like a good solution for the problem.

repo: laminlabs/lamindb


text:
[WIP] Road to CLIP

Build CLIP from scratch:

Cover all building blocks needed to implement CLIP/ multi-modal models. Each block will be covered in as a separate submodule taking a code first approach
Combine them together to implelemt CLIP model forward pass. Verify by loading official openai CLIP models
Train a modified SigLip version of the model on a mini-LAION dataset

Then this can be used as a pre-requisite for Road to LLMs

[x] 1 - Attention Mechanism: Learn about attention, multi-head attention with masking with implementation and intuition
[ ] 2 - Transformers from scratch - WIP
[ ] 3 - Contrastive learning - WIP
[ ] 4 - Reproducing CLIP/ loading official weights
[ ] 5 - Training on mini-LAION dataset
[ ] 6 - Tuning

attention done..now positional encoding

repo: lancedb/vectordb-recipes


text:
Test applet NOT operator issues

The int not is never initliazed but still applied at the end of the function to the exitvalue.
Also:
If the file does not exist the ! operator is never applied to the exitvalue.
(I submitted this issue to the mailing list. But I think having open issues for "TODO stuff " here is good, even if discussion on the mailing list is preferred.)

obsoleted by test.c rewrite. (if you have a specific example that still doesn't work, let us know.)

repo: landley/toybox


text:
ajout de la variable openldap_basedn

en suivant cette doc http://www.domogik.org/2013/06/12/pourquoi-et-comment-faire-des-forks-avec-github/,
il ne devrait y avoir qu'une PR !

il y a un conflit parce que je n'ai pas utilisé la variable openldab_searchbase mais uniquement la variable openldab_basedn.

Dans ce cas tu peux 'rebaser' tes commits au dessus de la branche master de mon repo.. ou sinon j'y merge a la main.

Ah, et il y'a une distinction entre 'faire une PR' et 'faire un commit'. Ici, tu as un seul commit avec 6 fichiers modifiés, mais tu aurais pu faire une seule PR avec 6 commits successifs dans ta branche.. ca revient au meme, mais c'est plus propre :)

Le 21/07/2015 16:15, Landry Breuil a écrit :

Dans ce cas tu peux 'rebaser' tes commits au dessus de la branche
master de mon repo.. ou sinon j'y merge a la main.
—
Reply to this email directly or view it on GitHub
https://github.com/landryb/georchestra-ansible/pull/16#issuecomment-123328037.

je crois que je préfère ton "merge à la main" ! 8-)
--
Ernest CHIARELLO - Ernest.Chiarello@univ-fcomte.fr
UMR6049 ThéMA -- CNRS / université de Franche-Comté
32 rue Mégevand 25030 Besançon cedex
Tel : 03 81 66 54 80           Mob : 07 82 99 11 08

authors: MaxiReglisse landryb

repo: landryb/georchestra-ansible

license: ISC


text:
🛑 rexingsports.cn is down

In ecd6abf, rexingsports.cn (https://www.rexingsports.cn) was down:

HTTP code: 567
Response time: 886 ms

Resolved: rexingsports.cn is back up in b4693ce.

repo: lanen/bs-site


text:
🛑 trixmall.com is down

In 9864cd8, trixmall.com (https://www.trixmall.com/) was down:

HTTP code: 567
Response time: 548 ms

Resolved: trixmall.com is back up in d1ab35e.


text:
🛑 rexingsports.cn is down

In 925edc1, rexingsports.cn (https://www.rexingsports.cn) was down:

HTTP code: 567
Response time: 887 ms

Resolved: rexingsports.cn is back up in b7921fd after 18 minutes.


text:
🛑 vipgifts.net is down

In 3b13926, vipgifts.net (https://vipgifts.net) was down:

HTTP code: 567
Response time: 360 ms

Resolved: vipgifts.net is back up in cb8b491 after 39 minutes.


text:
🛑 vipgifts.net is down

In cee1c26, vipgifts.net (https://vipgifts.net) was down:

HTTP code: 567
Response time: 793 ms

Resolved: vipgifts.net is back up in a9abf15 after 14 minutes.


text:
🛑 rexingsports.cn is down

In 3276db5, rexingsports.cn (https://www.rexingsports.cn) was down:

HTTP code: 567
Response time: 814 ms

Resolved: rexingsports.cn is back up in c1b859b after 2 hours, 19 minutes.


text:
🛑 vipgifts.net is down

In 186961f, vipgifts.net (https://vipgifts.net) was down:

HTTP code: 567
Response time: 491 ms

Resolved: vipgifts.net is back up in 45595d7 after 18 minutes.


text:
🛑 rexingsports.cn is down

In b33ab65, rexingsports.cn (https://www.rexingsports.cn) was down:

HTTP code: 567
Response time: 663 ms

Resolved: rexingsports.cn is back up in 46c68d9 after 18 minutes.


text:
🛑 vipgifts.net is down

In 050d816, vipgifts.net (https://vipgifts.net) was down:

HTTP code: 567
Response time: 428 ms

Resolved: vipgifts.net is back up in 356f880 after 9 minutes.


text:
🛑 Plex is down

In 67acd2d, Plex (http://langasg1.ddns.net:32400/web/index.html) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Plex is back up in 0929b0d.

repo: langasg/upptime


text:
typing errors in OllamaEmbeddings

System Info
LangChain==0.0.298, Python==3.11.5
Who can help?
No response
Information

[ ] The official example notebooks/scripts
[ ] My own modified scripts

Related Components

[ ] LLMs/Chat Models
[X] Embedding Models
[ ] Prompts / Prompt Templates / Prompt Selectors
[ ] Output Parsers
[ ] Document Loaders
[ ] Vector Stores / Retrievers
[ ] Memory
[ ] Agents / Agent Executors
[ ] Tools / Toolkits
[ ] Chains
[ ] Callbacks/Tracing
[ ] Async

Reproduction
from langchain.embeddings import OllamaEmbeddings

_ = OllamaEmbeddings(model="llama2")

Running mypy==1.5.1 on this file:
a.py:3:5: error: Missing named argument "mirostat" for "OllamaEmbeddings"  [call-arg]
    _ = OllamaEmbeddings(model="llama2")
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.py:3:5: error: Missing named argument "mirostat_eta" for "OllamaEmbeddings"  [call-arg]
    _ = OllamaEmbeddings(model="llama2")
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.py:3:5: error: Missing named argument "mirostat_tau" for "OllamaEmbeddings"  [call-arg]
    _ = OllamaEmbeddings(model="llama2")
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.py:3:5: error: Missing named argument "num_ctx" for "OllamaEmbeddings"  [call-arg]
    _ = OllamaEmbeddings(model="llama2")
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.py:3:5: error: Missing named argument "num_gpu" for "OllamaEmbeddings"  [call-arg]
    _ = OllamaEmbeddings(model="llama2")
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.py:3:5: error: Missing named argument "num_thread" for "OllamaEmbeddings"  [call-arg]
    _ = OllamaEmbeddings(model="llama2")
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.py:3:5: error: Missing named argument "repeat_last_n" for "OllamaEmbeddings"  [call-arg]
    _ = OllamaEmbeddings(model="llama2")
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.py:3:5: error: Missing named argument "repeat_penalty" for "OllamaEmbeddings"  [call-arg]
    _ = OllamaEmbeddings(model="llama2")
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.py:3:5: error: Missing named argument "temperature" for "OllamaEmbeddings"  [call-arg]
    _ = OllamaEmbeddings(model="llama2")
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.py:3:5: error: Missing named argument "stop" for "OllamaEmbeddings"  [call-arg]
    _ = OllamaEmbeddings(model="llama2")
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.py:3:5: error: Missing named argument "tfs_z" for "OllamaEmbeddings"  [call-arg]
    _ = OllamaEmbeddings(model="llama2")
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.py:3:5: error: Missing named argument "top_k" for "OllamaEmbeddings"  [call-arg]
    _ = OllamaEmbeddings(model="llama2")
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.py:3:5: error: Missing named argument "top_p" for "OllamaEmbeddings"  [call-arg]
    _ = OllamaEmbeddings(model="llama2")
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It can be fixed by using = None as the default for the Optional fields
Expected behavior
mypy to pass, as there are no type errors present

No longer persists with:
langchain==0.0.346
langchain-core==0.0.10
mypy==1.7.1

Closing this out

repo: langchain-ai/langchain


text:
When I install the template "self-query-qdrant" I get this error: UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 132: character maps to

System Info
Windows 10 Pro - 22H2 - Build 9045.3693 - Windows Feature Experience Pack 1000.19053.1000.0
Python 3.11.5
langchain-cli 0.0.19
Who can help?
No response
Information

[ ] The official example notebooks/scripts
[ ] My own modified scripts

Related Components

[ ] LLMs/Chat Models
[ ] Embedding Models
[ ] Prompts / Prompt Templates / Prompt Selectors
[ ] Output Parsers
[ ] Document Loaders
[ ] Vector Stores / Retrievers
[ ] Memory
[ ] Agents / Agent Executors
[ ] Tools / Toolkits
[ ] Chains
[ ] Callbacks/Tracing
[ ] Async

Reproduction

creating a virtual environments with python - m venv .venv and activate it;
installing langchain-cli with pip install -U "langchain-cli[serve]"
launch langchain app new qdrant-app --package self-query-qdrant

Expected behavior
As for other templates that I have installed, I expected to find the .py files of the app in the packages directory, but it's empty.
log.txt

@dosu-bot
I can't modify files that aren't copied on my PC, I think. Package installation stops before.
On the other hands, for example, the package installation of "vertexai-chuck-norris" terminate normally without stops.

@dosu-bot
I applied the hints (I found the app.py in my virtual environment .venv\Lib\site-packages\langchain_cli\namespaces), but the installation stops anyway.
Initially the installation copy locally (into C:\Users<username>\AppData\Roaming\langchain\git_repos) all the templates. I found the template "self_query_qdrant" "incriminated"  and I noticed that in file pyproject.toml there is line 4 authors = ["Kacper Łukawski lukawski.kacper@gmail.com"] with one uncommon character. After that I change it, saved the file and successfully retry the installation!
I think the team must correct that file and update the repo.


text:
How to set api key for news-api?

System Info
I want to use the news-api tool, and I have these setting for api key:
os.environ["NEWS_API_KEY"] = "9ed***"

tools = load_tools(["news-api"], llm=llm, news_api_key="9ed****", memory=memory)

But when the action is activated, the error is:
Action: Search

https://newsapi.org/v2/top-headlines?country=us&category=sports&pageSize=2&apiKey=YOUR_API_KEY

Replace `YOUR_API_KEY` with your actual API key from NewsAPI.org to authenticate the request.

Who can help?
No response
Information

[ ] The official example notebooks/scripts
[X] My own modified scripts

Related Components

[ ] LLMs/Chat Models
[ ] Embedding Models
[ ] Prompts / Prompt Templates / Prompt Selectors
[ ] Output Parsers
[ ] Document Loaders
[ ] Vector Stores / Retrievers
[ ] Memory
[ ] Agents / Agent Executors
[X] Tools / Toolkits
[ ] Chains
[ ] Callbacks/Tracing
[ ] Async

Reproduction

load news-api tool
run the tool in the agent

Expected behavior
the news-api tool can run successfully

I use this code snippet to call the news and it's working:
def main():
    _ = load_dotenv(find_dotenv())

    llm = ChatOpenAI(model="gpt-3.5-turbo", temperature=0)
    chain = APIChain.from_llm_and_api_docs(llm=llm,api_docs=news_docs.NEWS_DOCS,
                                           verbose=True,
                                           headers={'X-Api-Key':api_key},
                                           limit_to_domains=["https://newsapi.org"])
    res = chain.invoke("Give me some new about Las Vegas?")
    print(res)

if __name__ == "__main__":
    main()

authors: full-stack-ai murphypei


text:
Empty Embeddings propertie when returning from Indexing a document

Checked other resources

[X] I added a very descriptive title to this issue.
[X] I searched the LangChain documentation with the integrated search.
[X] I used the GitHub search to find a similar question and didn't find it.
[X] I am sure that this is a bug in LangChain rather than my code.
[X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code
embeddings = AzureOpenAIEmbeddings(
    model="text-embedding-3-small",
    azure_deployment="text-embedding-3-small",
    openai_api_version="2024-02-01",
)

vectorstore = Chroma(
    collection_name="cv_collection",
    embedding_function=embeddings,
)

st.session_state.record_manager = SQLRecordManager(
      db_url="sqlite:///:memory:",
      namespace="chroma/cv_collection",
  )

def add_document_to_vectorStore(vectorStore, document, record_manager):
  # Index the new document in the vector store with incremental cleanup
  index(
      [document],  # Pass a list of documents
      record_manager,
      vectorStore,
      cleanup="incremental",
      source_id_key="source",
  )

Error Message and Stack Trace (if applicable)
No response
Description
Hi, im trying to embed a document in a Chroma vector store, my issue is that when i call the Index function it does index it but it adds it as documents and not their corresponding embeddings, also when i call the function i can see the Embeddings request to openAI going out, but then the dump returns and  "embeddings": null followed by the whole document like this:
{
  "ids": [
    "a68dbda2-06bf-50df-b460-f2d1cd8dc8c0"
  ],
  "embeddings": null,
  "metadatas": [
    {
      "departamento": "Artigas",
      "idioma": "Inglés, Portugues",
      "nivel_educativo": "TERCERIA_SUPERIOR",
      "source": "Laura Texeira._.pdf"
    }
  ],
  "documents": [
    "Text"
  ],
  "uris": null,
  "data": null
}

I have tried from creating a small proyect with only this to already reading all the chromadb and langchain indexing documentation, to changing from embeddings to the client for AzureOpenAI and the embeddings are being computed perfectly everytime, i also can see the request coming back as 200 OK, so i dont really know where else to look outside de Index function and thats why i think is a bug.
System Info
Im in a docker container with the latest versions of this packages:

streamlit
pdfplumber
openai
pydantic
langchain
langchain-community
langchain-core
langchain-openai
chromadb
pysqlite3-binary
lark

and a base image of python:3.9-slim-buster

@jabrPromtior Are you simply trying to add a new document into the chroma database? Im not sure what is the index function that you are referring to, but why not use the vectorstore's add_texts method to include your document?
And the reason the dump shows embeddings as null is because the get method of Chroma by default doesnt return embeddings. You have to provide 'embeddings' as an input to the include argument to retrieve the embeddings as well

Hi, thank you for the reply, im using de Index method since is the standard way of indexing in the vectorstore with a record manager according to the langchain documentation: https://python.langchain.com/docs/modules/data_connection/indexing/
Using the add_texts AND using the include i can see the embeddings now, but my issue is that doesnt manage a record manager like de index function, and im going to be uploading several documents and new versions of older documents to the vectorstore, thats why i needed the cleanup="incremental" from Index:
def add_document_to_vectorStore(vectorStore, document):
    # Add the new document to the vector store
    vectorStore.add_texts([document.page_content])

Thank you for the help


text:
langchain_cohere: make preamble configurable in ChatCohere

This PR make preamble configurable for ChatCohere.
Per doc https://docs.cohere.com/reference/chat, it would be a better idea to a place system prompt in preamble rather than in chat_history:

The chat_history parameter should not be used for SYSTEM messages in most cases. Instead, to add a SYSTEM role message at the beginning of a conversation, the preamble parameter should be used.

Usage like simply specifying preamble when initialized chat_model is not list bellow, but the advanced usage like dynamically specifying preamble in runtime is here:
from langserve import add_routes
# ...
cohere_chat_model = ChatCohere(
    model=COHERE_CHAT_MODEL,
    cohere_api_key=COHERE_API_KEY,
    verbose=True,
).configurable_fields(
    preamble=ConfigurableField(
        id="cohere_preamble",
        name="Cohere Preamble",
        description="The preamble of the cohere model",
    )
)

def cohere_preamble_router(input: ChatPromptValue):
    if isinstance(input.messages[0], SystemMessage):
        preamble = input.messages[0].content
        input.messages = input.messages[1:]
        return cohere_chat_model.with_config(
            RunnableConfig(configurable={"cohere_preamble": preamble})
        )
    return cohere_chat_model

add_routes(
    app=app,
    runnable=(
        ChatPromptTemplate.from_messages([MessagesPlaceholder("messages")])
        | RunnableLambda(cohere_preamble_router)
    ),
    path="/cohere",
)

# ...
if __name__ == "__main__":
    import uvicorn

    uvicorn.run(app, host="0.0.0.0", port=8080, log_level="trace")

@efriis PTAL

Move PR to partner repo and cohere team will review! https://github.com/langchain-ai/langchain-cohere

Moved to https://github.com/langchain-ai/langchain-cohere/pull/3

authors: efriis kaijietti


text:
检查你的网络问题：

          检查你的网络问题：

https://cdn.staticfile.org/vue/2.6.14/vue.min.js
https://lib.baomitu.com/vue/2.6.14/vue.min.js
至少这两个依赖其中一个能正常加载，那就能加载
Originally posted by @langren1353 in https://github.com/langren1353/GM_script/issues/624#issuecomment-1586672010

我看控制台是报程序错误的,我JS比较菜,麻烦作者看下是不是代码的问题

这是我chrome浏览器的样子 是正常的,不确定是不是Safari浏览器的问题,麻烦作者看下什么问题

你尝试用浏览器直接打开这两个链接，看能否加载
你控制台给出的错误有5个
404情况未知，一般不会爆这个
HostReg报错，不影响这个
less报错，似乎和第一个报错有关联了，我更怀疑你的网络问题
Vue未初始化，这和3错误有关联性，因为3、4都需要加载外部js，但是似乎都没有成功
看不清

两个文件是可以正常打开的

但是看控制台好像就是VUE的文件不能正常加载,我再换个DNS试试吧

试下嵌入方式改成 content


text:
This my branch i had some errors to fix don't know how it is done

teacher  have maybe few question wanna ask but maybe ill remember to ask in the class

check the commit 51697fa, may help

authors: langsari moodxft

repo: langsari/the-noble-quran


text:
UnitSystem modifier

As suggested/requested by @brryan I implement here a UnitSystem modifier. The idea with this modifier is that the host code can work in whatever units it likes, and if it initializes an eos with the UnitSystem modifier, quantities are changed into cgs for eos calls, and then back out of cgs upon return.
Creation via constructor
The UnitSystem modifier can be created either using a set of three thermodynamic quantities:

rho_unit, the unit for density
sie_unit, the unit for specific internal energy
temp_unit, the unit for temperature

or via four "base" units:

time_unit
mass_unit
length_unit
temp_unit

The constructor distinguishes between these with tag dispatch. The tags are

thermal_units_init_tag
length_time_units_init_tag

The default is thermal units initialization.
Creation via EOSBuilder
The EOSBuilder also supports the modifier. The names are the same, but instead of tag dispatch, specify use_length_time in the params. For example:
EOSBuilder::EOSType type = EOSBuilder::EOSType::IdealGas;
EOSBuilder::modifiers_t modifiers;
EOSBuilder::params_t base_params, units_params;
base_params["Cv"].emplace<Real>(Cv);
base_params["gm1"].emplace<Real>(gm1);
units_params["use_length_time"].emplace<bool>(true);
units_params["time_unit"].emplace<Real>(time_unit);
units_params["length_unit"].emplace<Real>(length_unit);
units_params["mass_unit"].emplace<Real>(mass_unit);
units_params["temp_unit"].emplace<Real>(temp_unit);
modifiers[EOSBuilder::EOSModifier::UnitSystem] = units_params;
EOS eos = EOSBuilder::buildEOS(type, base_params, modifiers);

the default value for use_length_time is false.
Other unit quantities
Internally, the modifier takes these base units and constructs the others self-consistently.
Availability
Currently I have only enabled the modifier for IdealGas, SpinerEOS, and StellarCollapse. Others can be enabled as needed. Also it is currently incompatible with any other modifiers... but of course this too can be changed.
Code reorganization
To help clean up eos.hpp, I also move the modifiers into their own separate header files. pinging @mauneyc-LANL to let him know.
Pinging mostly @brryan, @dholladay00 and @jdolence for review. Also pinging @lroberts36 in case you're interested in seeing what the microphysics machinery in Phoebus looks like.

Looks good to me

Thanks for the reviews, @brryan @jhp-lanl ! Merging it in.

authors: Yurlungur jhp-lanl

repo: lanl/singularity-eos


text:
EEProm support : writing 0 value hangs the emulator

EEprom is working now, but if I try to write 0 value, the EE_write BLL function seems to hang.
See this example:
EEPROM2.zip
The program is very easy:

draw black screen
write 1 at position 0 and draw a green rectangle
write 0 at position 0 and draw a light green rectangle

Note:

the .o and .lnx files work with Handy with no EEprom support
the .o file does not works with Handy with EEPROM support (will check with LordKraken)
the .lnx file works with Handy with EEPROM support
the .o file does not work with Felyx
the .lnx file does not work with Felyx

Not tested this specific program on real Lynx, but this is part of the launch game procedure in Ynxa, and it is not working on Felyx, but working on real Lynx, and Handy EEprom

In handy the EEPROM support is by default off unless enabled in the LNX header (which an .o file does not have).

Oh yes, forgot about this, so I won't mind about .o with Handy EEprom

I've added new issue #14 to set the EEPROM settings to .o files. Now it's disabled

It works with the Ynxa ROM.
Thanks

@fdescharmes btw I'checked the sample on GameDrive and it behaves correctly (with two stripes)

authors: 42Bastian fdescharmes laoo

repo: laoo/Felix


text:
Can't input Chinese in ubuntu 22.04

Now  can display Chinese, but  can't input Chinese in Ubuntu 22.04. The default Chinese input method of Ubuntu 22.04 is from https://github.com/libpinyin/ibus-libpinyin

Duplicate of https://github.com/lapce/lapce/issues/319 I guess

authors: VarLad fwfsf

repo: lapce/lapce


text:
fix: Utilize active/inactive tab colors from theme

Currently, neither LapceTheme::LAPCE_ACTIVE_TAB nor LapceTheme::LAPCE_INACTIVE_TAB are utilized in the Lapce codebase.
Though it would probably be more feasible to give theme color keys a well-thought rework, this quick patch would at least allow the two unused theme colors to be recognized by Lapce.

Thanks for pointing that out! Should’ve run rustfmt first 😅
I’ve rebased the commit and fixed the code formatting issue. Please take a look!


text:
show code lens

Show code lens, but the click event has not been implemented
the effect as follow:
https://github.com/user-attachments/assets/9c6f7d98-1861-4715-b2bb-528df42392fe

I'm wondering if it makes sense to reuse the "code action" popup for the codelens popup?

I refer to the implementation of the code action. Compared with code lens, it does not use overlay, has the function of turning pages, and seems to have the function of shortcut keys, so the implementation is more complicated for me.

Now there's a problem with code lens. In addition to clicking to cancel the display, what scenarios should I cancel the display? How to achieve more appropriate?

In addition, the code action can only display one icon at a time, and the icon does not always exist. but code lens, on the other hand, shows more than one at a time and is always there. They are not similar

I think when you click another codelens icon, it should cancel the previous one if there was one. That's also why I suggested to reuse the code actions popup, so that it's guaranteed to always have one popup display at all time and the style is consistent as well.
The codelens icon is shown all the time but the popup for it doesn't.

Wait until i am more familiar with the code action

the effect as follow:
https://github.com/user-attachments/assets/6cddaca9-75d3-4781-bd92-69e535b5e77b


text:
Get the checkout URL

Hello,
Is there a way to collect the payment URL that redirects to Mollie?
I am trying to use your package with vuejs in a SPA.
It seems to work (great job, thanks! Mollie is really better than Stripe for us Europeans).
Here is my controller :
public function __invoke(string $plan)
    {
        $user = Auth::user();

        $name = ucfirst($plan) . ' membership';

        if(!$user->subscribed($name, $plan)) {

            $result = $user->newSubscriptionViaMollieCheckout($name, $plan)->create();

            if(is_a($result, RedirectResponse::class)) {
                return $result; // Redirect to Mollie checkout
            }

            return response()->json([
               'status' => 'Félicitation, vous êtes inscrit au ' . $plan . ' plan'
            ]);
        }

        return response()->json([
            'status' => 'Vous êtes déjà inscrit au ' . $plan . ' plan'
        ]);
    }

In chrome, I get a good xhr. When I copy / paste the link into the browser, I'm redirecting to Mollie.
What I need is to send the redirection link in a response json. Thanks to that, I could capture it with vue.js and redirect the user simply.
Thank you !

Hi,
Yes you can. I've decorated the RedirectResponse to return a ReturnToRedirectResponse instead.
So you can do:
$response->payment()->getCheckoutUrl();

authors: Jimmylet sandervanhooft

repo: laravel/cashier-mollie


text:
str_slug function ascii character problem

Hi,
I have a problem with ascii characters on laravel 5.2.5 (in Turkish)
(I know 5.2 don't use Stringy)
str_slug('özgür karagöz') => 'oezguer-karagoez'
it must be;
str_slug('özgür karagöz') => 'ozgur-karagoz' (laravel 5.1)
For example in Turkish Language:
'Ö'  => 'O',
'ö' => 'o',
in German or etc
'Ö'  => 'OE',
'ö' => 'oe',

What does laravel 5.1 do with the latest version of stringy?

5.2 does use stringy's code. We just copied over the small part of stringy we actually needed and dropped the dependency.

Laravel 5.1 Stringy Version: "danielstjules/stringy": "~1.8"
Actually, this problem Stringy's problem too :)
The latest version of danielstjules/stringy same problem too.
Slugify method must run by locale.

Ok then, consider this a breaking change then, but not a bug.

If you would like this changed, please send a PR to stringy, and we'll update our code to match what they do each time then tag a release.

@ozgurkaragoz You can refer to my blog article on how to fix this issue: https://blackfyre.ninja/blog/fixing-slug-generation-problems

authors: GrahamCampbell blackfyre kaptanblack

repo: laravel/framework


text:
Eloquent - different connection vs all() method

Laravel Version 5.3
PHP Version: 7
Database Driver & Version: MySQL 14.14

Hi guys,
I have found strange behavior.
I'm working on a development/production database replication.
Production Database:

image ID 1
image ID 2
image ID 3

Development Database:

image ID 3

Now to the problem:
I set connection dynamically:
$images = new Image;
$images->setConnection($this->development->getName()); // development ===  $manager->connection('mysql_development')

$images->get()->firts()->id // returns corretly ID 3 from development database
$images->all()->first()->id; // returns ID 1 from production database, wtf, why?

Is here something wrong or I just don't understand get and all methods?
Jakub

Looks correct. Your first one isn't ordered, so your database just gets some random row and gives it to you. The same goes for the 2nd one really.

Look into orderBy. :)

But development database contains only one row with the ID 3, how can it returns ID 1? The connection is set to the development database, where is only one row.

Errr, no idea.

Yes, this is why I said it's weird to me :) From me it looks like all() method does not work well with changed connection.

All is a static method: https://github.com/laravel/framework/blob/5.3/src/Illuminate/Database/Eloquent/Model.php#L626
PHP let's you call it dynamically but sadly gives no indication of that happening.

Any reason why not just use get()? I don't think there's a way to fix this without making a breaking change.

@themsaid: There is no reason. At first I used the all method. I did not know get method works.

I do not know exactly how you change from development to production database, but when you reuse connection names (i.e. keeping the model's $connection and changing the config) you should purge the old connection with DB::purge('connection-name') after making your changes. Otherwise Laravel will continue to use the other database out of its connection resolver cache.

Doesn't look like a bug since all isn't a method that respects the object state since it's static by design.

authors: GrahamCampbell jakubkratina jarnovanleeuwen thecrypticace themsaid


text:
Logout Back Button

whenever we logout the site or any other thing the browser back button will redirect to the authentication page.
we accept that we will not perform any operation on that but its quite bad thing.

This is not a bug, its simple cache of the browser...

authors: Kyslik harshad-concetto


text:
show error Parameter must be an array or an object that implements Countable

Laravel Version: v5.2.45
PHP Version:7.2
Database Driver & Version:

Description:
use the https://github.com/JosephSilber/bouncer
run php code
Bouncer::allow($role)->to($permission);
show the
[ErrorException]
count(): Parameter must be an array or an object that implements Countable
error on the code
src/Illuminate/Database/Eloquent/Builder.php
1185 line
Steps To Reproduce:

5.2 is not supported anymore, please upgrade.

@themsaid OK thank

authors: dalingng themsaid


text:
Pivot table fields in macros not properly aliased

Laravel Version: 8.12.13
PHP Version: 7.3.23
Database Driver & Version: MySQL  8.0.22

Description:
When fetching a model using a query builder macro through a many-to-many with fields on the pivot table matching the other model, such as timestamps, the fields from the pivot table are fetched instead of the fields from the model.
A query without a macro starts with:
select `items`.*,
       `category_item`.`item_id` as `pivot_item_id`,
       `category_item`.`category_id`     as `pivot_category_id`,
       `category_item`.`created_at`    as `pivot_created_at`,
       `category_item`.`updated_at`    as `pivot_updated_at`
from `items`
         inner join `category_item` on `items`.`id` = `category_item`.`item_id`
where `category_item`.`category_id` = ?

but through a macro, the query starts with:
select *
from `items`
         inner join `category_item` on `items`.`id` = `category_item`.`item_id`
where `category_item`.`category_id` = ?

Steps To Reproduce:
Create two models, 'item' and 'category' with a belongsToMany()->withTimestamps() relation.
Create a macro
Builder::macro('test') {
    dd($this->get());
}

and run
$category->items()->test();

and observe that the timestamps from the pivot table are returned instead of the ones from the model.

Sounds like you're calling get on the Elouqent builder and maybe not on the relationship.

authors: Zoefschildpad taylorotwell


text:
BelongsToMany#updateOrCreate is not merging arguments before create

Laravel Version: 8.20.1
PHP Version: 7.4.8
Database Driver & Version: MariaDB 10.5.8

Description:
For Illuminate\Database\Eloquent\Relations\BelongsToMany relationships, the updateOrCreate method is not merging the $attributes and $values arrays.
This is different from the behaviour of the updateOrCreate methods on Builder,   HasOneOrMany and HasManyThrough classes and from the documented behaviour "If no such flight exists, a new flight will be created which has the attributes resulting from merging the first argument array with the second argument array" eloquent#upserts.
Illuminate\Database\Eloquent\Relations\BelongsToMany
    public function updateOrCreate(array $attributes, array $values = [], array $joining = [], $touch = true)
    {
        if (is_null($instance = $this->where($attributes)->first())) {
            return $this->create($values, $joining, $touch);
        }

        $instance->fill($values);

        $instance->save(['touch' => false]);

        return $instance;
    }

Proposed solution
This solution is based on master (9.x) branch where the fix for #34083 is taken into account.
    public function updateOrCreate(array $attributes, array $values = [], array $joining = [], $touch = true)
    {
        if (is_null($instance = $this->related->where($attributes)->first())) {
            $instance = $this->create($attributes, $joining, $touch);
        }

        $instance->fill($values);

        $instance->save(['touch' => false]);

        return $instance;
    }

Steps To Reproduce:
Schema::create('roles', function (Blueprint $table) {
    $table->increments('id');
    $table->unsignedBigInteger('created_by_id');
    $table->string('name'); // <-- required
    $table->timestamps();
});

$user = User::factory()->create();
Role::create(['name' => 'existing.role', 'description' => 'foo']);
$user->roles()->updateOrCreate(['name' => 'existing.role'], ['description' => 'bar']);

parent::assertEquals(1, Role::count()); // assertion fails (or is never reached); count equals 2

$user = User::factory()->create();

// throws: Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1364 Field 'name' doesn't have a default value
$user->roles()->updateOrCreate(['name' => 'existing.role'], ['description' => 'bar']);

parent::assertEquals(1, Role::count()); // assertion fails (or is never reached); count equals 2

When confirmed I'll submit the pull request.

Heya, this is already fixed for the upcoming Laravel 9 release. See https://github.com/laravel/framework/issues/34083#issuecomment-698559977

Heya, this is already fixed for the upcoming Laravel 9 release. See https://github.com/laravel/framework/issues/34083#issuecomment-698559977

@driesvints I did see that comment.
However, this is about a slightly different issue.
Which is that if the model does not exist, and therefor should create the model, the first argument is not used for creating the model (only the second argument is used). Which is different behavior from when calling the method directly on the model or on another type of relation.
And that is why this is mainly about the change of this line
https://github.com/laravel/framework/blob/ce57929931f877f03a8428498654591e890f55f8/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php#L631
into
$instance = $this->create($attributes, $joining, $touch);

Which is not fixed in the current master branch as far as I can tell.

@driesvints I did see that comment.
However, this is about a slightly different issue.
Which is that if the model does not exist, and therefor should create the model, the first argument is not used for creating the model (only the second argument is used). Which is different behavior from when calling the method directly on the model or on another type of relation.
And that is why this is mainly about the change of this line
https://github.com/laravel/framework/blob/ce57929931f877f03a8428498654591e890f55f8/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php#L631
into
$instance = $this->create($attributes, $joining, $touch);

Which is not fixed in the current master branch as far as I can tell.

@marcoboers can you attempt a PR to master?

@marcoboers can you attempt a PR to master?

It is a shame you opened a PR for 9.x but not 8.x as you found the issue there. I have now done so and I hope I did not do anything wrong.

authors: driesvints marcoboers matiaslauriti


text:
Tinker looses a DB connection after getting an Exception

To reproduce the issue
[1] > Schema::create('posts', function($table) { $table->increments('id'); $table->string('title'); });
// NULL
[2] > DB::table('posts')->insert(['title' => 'Post1']);
// true
[3] > DB::table('posts')->find(1);
// object(stdClass)(
//   'id' => '1',
//   'title' => 'Post1'
// )

So far so good. Now let's try to access non-existent method
[4] > DB::table('posts')->find(1)->title();
PHP Fatal error:  Call to undefined method stdClass::title() in /vagrant/laravel/vendor/d11wtq/boris/lib/Boris/EvalWorker.php(133) : eval()'d code on line 1
PHP Stack trace:
PHP   1. {main}() /vagrant/laravel/artisan:0
PHP   2. Symfony\Component\Console\Application->run() /vagrant/laravel/artisan:59
PHP   3. Symfony\Component\Console\Application->doRun() /vagrant/laravel/vendor/symfony/console/Symfony/Component/Console/Application.php:121
PHP   4. Symfony\Component\Console\Application->doRunCommand() /vagrant/laravel/vendor/symfony/console/Symfony/Component/Console/Application.php:191
PHP   5. Illuminate\Console\Command->run() /vagrant/laravel/vendor/symfony/console/Symfony/Component/Console/Application.php:892
PHP   6. Symfony\Component\Console\Command\Command->run() /vagrant/laravel/vendor/laravel/framework/src/Illuminate/Console/Command.php:96
PHP   7. Illuminate\Console\Command->execute() /vagrant/laravel/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:241
PHP   8. Illuminate\Foundation\Console\TinkerCommand->fire() /vagrant/laravel/vendor/laravel/framework/src/Illuminate/Console/Command.php:108
PHP   9. Illuminate\Foundation\Console\TinkerCommand->runBorisShell() /vagrant/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Console/TinkerCommand.php:30
PHP  10. Boris\Boris->start() /vagrant/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Console/TinkerCommand.php:49
PHP  11. Boris\EvalWorker->start() /vagrant/laravel/vendor/d11wtq/boris/lib/Boris/Boris.php:171
PHP  12. eval() /vagrant/laravel/vendor/d11wtq/boris/lib/Boris/EvalWorker.php:133

After this if we try to to access any proper method we end up having '2006 MySQL server has gone away' and  no longer can access the database.
[5] > DB::table('posts')->find(1);
PHP Fatal error:  Uncaught exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (SQL: select * from `posts` where `id` = 1 limit 1)' in /vagrant/laravel/vendor/laravel/framework/src/Illuminate/Database/Connection.php:539
Stack trace:
#0 /vagrant/laravel/vendor/laravel/framework/src/Illuminate/Database/Connection.php(283): Illuminate\Database\Connection->run('select * from `...', Array, Object(Closure))
#1 /vagrant/laravel/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(1224): Illuminate\Database\Connection->select('select * from `...', Array)
#2 /vagrant/laravel/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(1214): Illuminate\Database\Query\Builder->runSelect()
#3 /vagrant/laravel/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(1201): Illuminate\Database\Query\Builder->getFresh(Array)
#4 /vagrant/laravel/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(1186): Illuminate\Database\Qu in /vagrant/laravel/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 539

I also got this bug when using another database. In my project, I'm using FireBird. It's a hassle to logout from tinker, start again, assign the variables again, because getting an exception means that the database connection is closed.

Please open a new issue and tell us the error so we can fix it. Are you using the latest 5.1 or 5.2?


text:
Broadcasting does not work

Laravel Version
11.0.8
PHP Version
8.3.3
Database Driver & Version
No response
Description
I’m trying to install broadcasting but it does not seem to register the /broadcasting/auth route anywhere, so private channels are not getting authorised.
Steps To Reproduce

Run php artisan install:broadcasting
Run composer require pusher/pusher-php-server
Add ShouldBroadcast interface to event, and define broadcastOn method
Events are dispatched to Pusher, as I can see them arrive in the debug console
Listening to channels does not work, as requests for POST /broadcasting/auth receive a 404 Not Found response

The Laravel broadcasting docs state:

When broadcasting is enabled, Laravel automatically registers the /broadcasting/auth route to handle authorization requests.

But this does not seem to be happening in practice.

/
Hey there, thanks for reporting this issue.
We'll need more info and/or code to debug this further. Can you please create a repository with the command below, commit the code that reproduces the issue as one separate commit on the main/master branch and share the repository here?
Please make sure that you have the latest version of the Laravel installer in order to run this command. Please also make sure you have both Git & the GitHub CLI tool properly set up.
laravel new bug-report --github="--public"

Do not amend and create a separate commit with your custom changes. After you've posted the repository, we'll try to reproduce the issue.
Thanks!

We'll need more info and/or code to debug this further.

@crynobone I outlined the steps in my initial post. I’m afraid I can’t use the Laravel Installer as I don’t have Composer installed on my machine, so can’t install global Composer packages. such as that.
It’s a relatively new Laravel 11 application. Installed Broadcasting. Broadcasting authorisation route (/broadcasting/auth) is not registered. Confirmed by running php artisan route:list and the authorisation route not being listed there.

Can you share the contain of bootstrap/app.php?

Can you share the content of bootstrap/app.php?

Sure:
<?php

use App\Http\Middleware\HandleRedirects;
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

return Application::configure(basePath: dirname(__DIR__))
    ->withExceptions(function (Exceptions $exceptions): void {
        //
    })
    ->withMiddleware(function (Middleware $middleware): void {
        $middleware->alias([
            'features' => \Laravel\Pennant\Middleware\EnsureFeaturesAreActive::class,
        ]);

        $middleware->append(HandleRedirects::class);

        $middleware->group('web.channel', [
            \App\Http\Middleware\SetChannelViewNamespace::class,
        ]);

        $middleware->group('web.channel.admin', [
            \App\Http\Middleware\HandleInertiaRequests::class,
        ]);

        $middleware->trustProxies(
            at: '*',
            headers: Request::HEADER_X_FORWARDED_AWS_ELB,
        );

        $middleware->validateCsrfTokens(except: [
            'mux/webhook',
            'stripe/*',
        ]);
    })
    ->withRouting(
        health: '/up',
        web: __DIR__ . '/../routes/web.php',
        then: function (): void {
            // Channel
            Route::middleware('web', 'web.channel', 'can:view,channel')
                ->name('channel.')
                ->prefix('channels/{channel:slug}')
                ->group(base_path('routes/web.channel.php'));

            // Channel Admin
            Route::middleware('web', 'auth', 'can:update,channel', 'web.channel.admin')
                ->name('channel.admin.')
                ->prefix('channels/{channel:slug}/admin')
                ->group(base_path('routes/web.channel.admin.php'));
        },
    )
    ->create();

You're missing channels https://github.com/laravel/framework/blob/efa867e85b4abcaab8146f66bc676b7239507719/src/Illuminate/Foundation/Configuration/ApplicationBuilder.php#L163 which should be added via the install command. Missing that would prevent the default behaviour.

You're missing channels

That channels key doesn’t exist in the Laravel 11.x skeleton, though?
https://github.com/laravel/laravel/blob/441845d88dfc2a4fbf59f1e57d48889c8de664bb/bootstrap/app.php#L8-L11

See https://github.com/laravel/framework/blob/efa867e85b4abcaab8146f66bc676b7239507719/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php#L88

@crynobone Yes, all of those conditions will evaluate as false in my case. I removed the commands file as I detest using a “routes” file to register Artisan command.

In that case, you should either use withBroadcasting() method or register the route manually.

I am having the same issue. here is my bootstrap/app.php file
<?php

declare(strict_types=1);

use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;

return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        web: __DIR__ . '/../routes/web.php',
        commands: __DIR__ . '/../routes/console.php',
        health: '/up',
    )
    ->withMiddleware(function (Middleware $middleware): void {})
    ->withExceptions(function (Exceptions $exceptions): void {})->create();

Manually adding channels: __DIR__ . '/../routes/channels.php', to the withRouting method seems to fix it but I think this might be a bug on Windows as  am always running into it

@thecyrilcril I got around it by adding the broadcasting routes and channel definitions to my AppServiceProvider file:
use Illuminate\Support\Facades\Broadcast;

class AppServiceProvider extends ServiceProvider
{
    public function boot(): void
    {
        Broadcast::routes();

        Broadcast::channel('orders.{order}', function (User $user, Order $order): bool {
            return $order->user()->is($user);
        }
    }
}

authors: crynobone martinbean thecyrilcril


text:
Event listener fired after message sent Causes mailable failure if exception was thrown

Laravel Version
8
PHP Version
8
Database Driver & Version
8
Description
When I set a lister for the Laravel's MessageSent event, the logic in the listener gets executed with the mailable it's self therefore when an exception is thrown in the listener the mailable fails.
This is unexpected knowing that the logic that would be handled after the email was sent is separate from the email sending logic.
Reference : https://laravel.com/docs/8.x/mail#events
Steps To Reproduce
Set a mailable and define a listener for that event and throw an exception in the listener then queue a mailable, the mailable would fail cuz of the exception thrown in the listener
Ref : https://laravel.com/docs/8.x/mail#events

Hey there,
Unfortunately we don't support this version of the library anymore. Please check out our support policy on which versions we are currently supporting. Can you please try to upgrade to the latest version and see if your problem persists? If so, please open up a new issue and we'll help you out.
Thanks!


text:
[Proposal] Update multiple records at once - Query Builder / Eloquent.

I've seen that a common use case of update is not allowed by the Laravel Query Builder and therefore Eloquent.
The single use case of multiple update currently covered by the Query Builder is updating multipe rows using a static value, not a dinamic one - which can be different for each one of the records based on the other columns.
Usually a multiple update is done using CASE ... WHEN instructions https://dev.mysql.com/doc/refman/5.0/en/case.html
One of the eloquent strongest assets is that is making complex problems (like the eager loading) painless and without inserting boilerplate code. Well, a multiple update is one of those cases where boilerplate code is required and the final code looks really ugly.

Okay, is someone finding that usefull? I've encountered it sometimes.
I don't think that the implementation really matters in the current state of this issue.

+1

This looks outside the scope of our system.

authors: Flightfreak GrahamCampbell IonutBajescu


text:
[5.1] Add the ability to fill a collection with a range of data

This adds a new method to Collection which allows us to fill it with data, for a given range. This can either be prepended or appended.
My given use case for this is with an Eloquent query. I may take 30 results but due to a lack of data, have 0/1 row(s). If my UI requires 30 steps of data, I could loop it and fill the void, but this is a much cleaner, integrated solution.

Why don't you use the name range for it?

I thought about this, fill seems more apt, but if range is preferred, I'll change it.

pad seems to make more sense

I was thinking more array_fill.

CS fixed @GrahamCampbell :)

Yeah but why are you not using the same params and order as array_fill? Isn't it easier to do:
    public function fill($start, $num, $value)
    {
        $this->items = array_fill($start, $num, $value);

        return $this;
    }

This is more flexible in that you're able to start from a different index.

:+1: for pad.
array_fill does something different than this function. It just adds a certain amount of elements, whereas array_pad adds elements up to a certain amount of total elements.

Ok, yeah, pad makes more sense then.

That trailing boolean argument just feels wrong.

That trailing boolean argument just feels wrong.

Padding before or after data is pretty nice though, it's very similar to sortBy, which takes a bool.

Why don't you use array_pad? Then we could add padding before, by just passing a negative amount.

I'll have a play :)

If we keep it simple, how does this look?
/**
 * Pads a collection with items.
 *
 * @param  int    $amount
 * @param  mixed  $value
 * @return $this
 */
public function pad($amount, $value = null)
{
    $this->items = array_pad($this->items, $amount, $value);

    return $this;
}

From looking at the other methods, it should be:
return new static(array_pad($this->items, $amount, $value));

Heh, I noticed that just as I went back to it.
If everyone agrees on this, then I'll re-push it :)

Perhaps extend collection to add the method you need.

authors: ArjanSchouten JayBizzle JosephSilber jbrooksuk lukasgeiter taylorotwell


text:
[5.2] Prevent registering the web middleware twice on make:auth command

As noted in https://github.com/laravel/framework/issues/12877, on make:auth command the generated routes in routes.php & HomeController both have the web middleware registered, while it's by default registered on all routes in RouteServiceProvider.php no need to register it again.

This only works for very new laravel apps, and breaks for all older 5,2 apps.

How is that?

@GrahamCampbell I see now, the web group was only being registered by default 4 days ago, this needs @taylorotwell's say.

authors: GrahamCampbell themsaid


text:
[5.3] Remove a duplicate $this->initialRules = $rules;

I found out that initialRules is set in the constructor. But it is also being set by setRules($rules)
That's why I don't think this line needs to stay in the constructor

Going to leave for now because I'm doing a bunch of work for 5.4.

authors: DrowningElysium taylorotwell


text:
[5.6] Don’t report InvalidSignatureException

Seems just like the TokenMismatchException to me.

It already extends HttpException which does not report.

authors: taylorotwell tillkruss


text:
[7.x] Add optional exception message parameter to assertStatus method on TestResponse

Non-breaking change.
Adding an optional parameter to the assertStatus method on TestResponse Class.

This is just for asserting on the numeric status. The string message shouldn't need to be checked?

Yes, its true.
But when the test fails, I always need to debug the test, to find why the status code is not the correct one.
With this optional parameter we can provide a more helpful message when the test fails.

authors: diogogomeswww taylorotwell


text:
Added assertUnprocessableEntity() function to TestResponse

Also with tests.

->assertStatus(422);

I understand it's possible to do assertStatus(422). But since there is also helper methods for assertUnauthorized, etc. I thought this might be a nice addition, since it's thrown by default if there's a validation exception.

authors: bramceulemans taylorotwell


text:
[8.x] Allow drop / rename multiple Columns in one Statement using SQLite

Currently it is not possible using SQLite, to rename and create / drop and create multiple columns in one Schema::table() statement.
This PR splits the Migration if SQLite is in use to first execute the commands (rename and drop), then creating new columns.
So there is no need to split the Schema::table() Statement in one Migration File for each dropColumn / renameColumn and adding new Columns.
Before (need in Migration File):
Schema::table('users', function(Blueprint $table) {
$table->renameColumn('name', 'first_name');
});

Schema::table('users', function(Blueprint $table) {
$table->string('last_name')->after('first_name');
});

After (splitter during Migration):
Schema::table('users', function(Blueprint $table) {
$table->renameColumn('name', 'first_name');
$table->string('last_name')->after('first_name');
});

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.

@taylorotwell as documented it is not supported by SQLite Currently. This PR makes it possible to change columns (rename and drop) in One Schema::table statement instead spreading it in multiple Schema::table Statements.
It is not a Bug - but improves the functionality of SQLite together with Laravel.


text:
Add @__ blade directive to "__" helper function.

Adding @__ blade directive makes it much easier to use the "__" helper function without the need for the boilerplate {{ }}
Taking the following lines from Laravel Breeze as an example
{{ __('Remember me') }}
{{ __('Forgot your password?') }}
<x-primary-button class="ml-3">{{ __('Log in') }}</x-primary-button>

Will be transformed to
@__('Remember me')
@__('Forgot your password?')
<x-primary-button class="ml-3">@__('Log in')</x-primary-button>

It also supports placeholders

@__('messages.welcome', ['name' => 'Mohamed'])

It will have more benefits with sites that have a lot of strings that need to be translated.
It makes the code look closer to the Laravel way :)
Credits to Mark Snape Tweet

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.

authors: MrMohamedAbdallah taylorotwell


text:
[10.x] PHP 8.1 Support - Refactored Content Handling with match Expressions in Illuminate\Http\Response

This pull request introduces PHP 8.1 support by refactoring content handling methods within the codebase. The changes utilize the new match expression, improving readability and leveraging PHP 8.1's capabilities for better maintenance and future compatibility.
Changes:

Updated shouldBeJson method to use match for clarity and brevity.
Restructured morphToJson method to use match for better code organization and readability.

This enhancement provides a more concise and maintainable approach for content handling, ensuring compatibility with the PHP 8.1 version while maintaining Laravel's high coding standards.

👎 I don't agree
Is not refactoring!!

👎 I don't agree Is not refactoring!!

why? 🤔


text:
[12.x] Enhancing redirect logic in RedirectIfAuthenticated middleware by passing the $guard

Overview
This pull request introduces a significant enhancement to the RedirectIfAuthenticated middleware in Laravel, offering more flexibility and customization in redirecting logged-in users based on their authentication guard. The current implementation limits redirection based on the Request $request, but with this enhancement, developers can tailor redirection based on specific guards, empowering them to create more dynamic and context-aware applications.
Reason for Resubmission
I previously targeted these changes to version 11 in the following pull request: #50837 (https://github.com/laravel/framework/pull/50837). It was closed due to the potential for breaking changes, which I completely understand. However, over the last few months, I have received several comments on the closed PR from developers expressing that this feature would be highly beneficial and requesting its inclusion in the framework.
This feedback has prompted me to reopen the pull request, this time targeting the master branch, with the hope that it can be considered for the next major release.
Breaking Change Justification
The breaking change is minimal and justified, as developers seeking custom redirect logic should ideally use the redirectUsing method instead of overwriting the redirectTo method. With the $guard parameter added, this enhancement allows developers to avoid extending the RedirectIfAuthenticated class, thereby keeping the middleware namespace cleaner.
Implementation Details
With this pull request, the RedirectIfAuthenticated middleware will now accept a callback function with ?string $guard as the second parameter, allowing developers to define custom redirection logic based on the authenticated guard. Here's how it works:
$middleware->redirectUsersTo(static function (Request $request, ?string $guard): string {
    return match ($guard) {
        'admins' => Dashboard::getUrl(panel: 'administrator'),
        'market_vendors' => Dashboard::getUrl(panel: 'market-vendor'),
        default => '/dashboard',
    };
});

In this example, the callback receives the current request and the guard name. Developers can then use a match expression to determine the appropriate redirect URL based on the guard. This enhancement enables more granular control over user redirection, facilitating better user experiences and application flows.

You could also just know this via Auth::getDefaultDriver() as the default driver will be set to whatever guard successfully authenticated the user. Then we don't need any breaking change.

I'm sorry, but I'm really confused. Because the only way that the default driver gets changed is by using the setDefaultDriver method, which is only ever called by the shouldUse method, which again is only used by the Illuminate\Auth\Middleware\Authenticate middleware (and in tests). It is never used by the RedirectIfAuthenticated middleware. I even did the hacky thing of adding a dd($name) in AuthManager's setDefaultDriver with no result when using the guest:sanctum on an api route.

authors: AndrewMast maartenpaauw taylorotwell


text:
[5.0] Eloquent belongsToMany chunk

Fixes this issue #6281

Tests?

Is it ok? Should I squash commits?

You mean delete getConnectionName, checkModelNameAttribute and checkModelsCount?

Check it, please.

Code style/coding standard. You need to put all braces on their own line.

Done

Done. And what about this bug in other versions of laravel?

There are no plans to backport this fix to 4.x. If it's merged into 5.0, we always merge 5.0 -> 5.1, so it'll be included in all 5.x releases.

So you will merge this pull request? Or better to do it as I described above.

Taylor is the one who decides what gets merged, particularly for sensitive components like the database component.

I think with trait it will be looking something like this https://github.com/codelight89/framework/commit/93d8b5e52302b40671b9a36401d219e363e06555

Is it not possible to just add the select fields and then call the usual chunk method on the Eloquent builder? Why duplicate the logic?

@taylorotwell, I don't think it can be solved this way. We need to hydrate pivot relation for every chunk result that we pass to callback.
maybe trait is a solution (as I described above)

Yeah you could pass it to the callback, and then call the user supplied callback from that callback. Make sense? :)

@taylorotwell, check it.

Is this tested? Do we need an integration test here?

@taylorotwell, I added a small test. Think that's enough.

authors: GrahamCampbell codelight89 taylorotwell


text:
Quick question - am I using Lark correctly?

So to get data from the parse tree when transforming, I'm using str, list, ''.join, etc.
Just wanting to make sure that use of str(tree) is appropriate.  Since there's no obvious "get_data()" method..
Thanks!

This isn't Java. Just use tree.data

Cool, will do from now on!
On Tue, Sep 3, 2024 at 9:26 PM Erez Shinan @.***> wrote:

This isn't Java. Just use tree.data
—
Reply to this email directly, view it on GitHub
https://github.com/lark-parser/lark/issues/1462#issuecomment-2328113686,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGBJPF6SGU26OB3FJFNXKDLZU2Y2NAVCNFSM6AAAAABNTQOUHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRYGEYTGNRYGY
.
You are receiving this because you authored the thread.Message ID:
@.***>

@erezsh
And what do I do for Tokens?
lark.exceptions.VisitError: Error trying to process rule "LATIN":
'Token' object has no attribute 'data'

Thanks!  And what about tree[0].  Is it better to use tree.data[0]?
Thanks.  Documentation doesn't cover this afaik.

This isn't Java. Just use tree.data and tree.children

What is the difference between these two?

authors: FruitfulApproach erezsh

repo: lark-parser/lark