text:
Enable users to vote on posts

As a user, I can vote on a post

As a user, I can see who voted on a post

upvote model and table create with route and associations


text:
warning : failed prop "dataArray" of type array, supplied to "Card"

hi, i just cloned this repo and i got this warning and it displays nothing on the screen.
Although the data is extracted correctly from Firebase and displayed in the console.

Hi,
Did you add your firebase credentials at line 25 in index.android.js within the following code block?
var fireBaseconfig = {
//your credentials here
};

The dependencies in package.json were a little older.I changed the dependency versions today and that should fix the issue for now. Btw I will write better tutorial using react-redux when I get time.

source: gharchive/issue

license: MIT

license_type: permissive

license_source: github-api


text:
makeml and installml scripts do not like locations with spaces

Version
110.74
Operating System

[ ] All
[ ] Linux
[X] macOS
[ ] Windows
[ ] Other Unix

OS Version
OS X Lion
Processor
x86 (32-bit)
Component
Other
Severity
Cosmetic
Description of the problem
When building the compiler from a directory containing spaces, the makeml and installml scripts fail.
In the example below, Im building in
/Users/michael/Documents/Work/Projects/CPN Tools/Repositories/Simulator/sml
(notice space in CPN Tools; when removing that everything works.)
Transcript
./makeml: line 7: cd: /Users/michael/Documents/Work/Projects/CPN: No such file or directory
./makeml: line 11: [: /Users/michael/Documents/Work/Projects/CPN: binary operator expected
./makeml: line 56: [: /Users/michael/Documents/Work/Projects/CPN: binary operator expected
./makeml: line 88: [: =: unary operator expected
./makeml: line 161: cd: sml.boot.sparc-unix: No such file or directory
/Users/michael/Documents/Work/Projects/CPN Tools/Repositories/Simulator/sml/bin/.link-sml @SMLboot=BOOTLIST @SMLheap=sml @SMLalloc=1M @SMLverbose
./makeml: line 166: /Users/michael/Documents/Work/Projects/CPN: No such file or directory
./makeml: Something broke.
makeml./installml: line 12: cd: /Users/michael/Documents/Work/Projects/CPN: No such file or directory
./installml: line 24: [: /Users/michael/Documents/Work/Projects/CPN: binary operator expected

Expected Behavior
No response
Steps to Reproduce
No response
Additional Information
No response
Email address
m.westergaard@tue.nl
Comments from smlnj-gforge
Original smlnj-gforge bug number 90
Submitted via web form by Michael Westergaard m.westergaard@tue.nl on 2012-02-02 at 13:03:00
Keywords: makeml, installml

Fixed for 110.99.3

repo: smlnj/legacy


text:
Attempt to create files a second time in a single snakemake run

Snakemake version
Snakemake 5.32.1 powered by Python 3.9.1  on two different machines:

Laptop: Arch-based Linux
Cluster: CentOS Linux release 7.4.1708 (Core)

Describe the bug
The bug appears only on my latop and not on our cluster even though the environment are pretty similar.
The problem is that after running local rule make_merge_config snakemake suddenly wants to re-run the already finished checkpoint rule collect. As expected, Snakemake then crashes with an ProtectedOutputException because the output of collect is protected. But it should not run collect at that point because the output workdir/pile-ups.db is already up-to-date.
After lifting the protection from all outputs (chmod -R +w workdir) and restarting the workflow, it takes up operation at collect and finishes as expected.
Logs
[Fri Feb 19 17:00:17 2021]
checkpoint collect:
    input: workdir/.assembly-test.dentist-self-H.anno, workdir/.assembly-test.dentist-self-H.data, workdir/.assembly-test.tan-H.anno, workdir/.assembly-test.tan-H.data, workdir/.assembly-test.dentist-reads-H.anno, workdir/.assembly-test.dentist-reads-H.data, dentist.json, workdir/assembly-test.dam, workdir/.assembly-test.bps, workdir/.assembly-test.hdr, workdir/.assembly-test.idx, workdir/reads.db, workdir/.reads.bps, workdir/.reads.idx, workdir/assembly-test.reads.las
    output: workdir/pile-ups.db
    log: logs/collect.log
    jobid: 5
    reason: Missing output files: workdir/pile-ups.db; Input files updated by another job: workdir/.assembly-test.dentist-self-H.data, workdir/.assembly-test.dentist-reads-H.data, workdir/.assembly-test.tan-H.anno, workdir/.assembly-test.dentist-self-H.anno, workdir/assembly-test.reads.las, workdir/.assembly-test.dentist-reads-H.anno, workdir/.assembly-test.tan-H.data
    threads: 4
Downstream jobs will be updated after completion.

Activating singularity image /home/alu/projects/pb-gaps/src/dentist/dentist_dirty.sif
Write-protecting output file workdir/pile-ups.db.
Updating job make_merge_config.
Updating job merge_insertions.
Updating job process.
[Fri Feb 19 17:00:43 2021]
Finished job 5.
53 of 106 steps (50%) done

[Fri Feb 19 17:00:43 2021]
rule process:
    input: workdir/.assembly-test.dentist-self-H.anno, workdir/.assembly-test.dentist-self-H.data, workdir/.assembly-test.tan-H.anno, workdir/.assembly-test.tan-H.data, workdir/.assembly-test.dentist-reads-H.anno, workdir/.assembly-test.dentist-reads-H.data, dentist.json, workdir/assembly-test.dam, workdir/.assembly-test.bps, workdir/.assembly-test.hdr, workdir/.assembly-test.idx, workdir/reads.db, workdir/.reads.bps, workdir/.reads.idx, workdir/pile-ups.db
    output: workdir/insertions/batch.1.db
    log: logs/process.1.log
    jobid: 151
    reason: Missing output files: workdir/insertions/batch.1.db
    wildcards: batch_id=1
    threads: 4

Activating singularity image /home/alu/projects/pb-gaps/src/dentist/dentist_dirty.sif
[Fri Feb 19 17:01:01 2021]
Finished job 151.
54 of 106 steps (51%) done

[Fri Feb 19 17:01:01 2021]
rule process:
    input: workdir/.assembly-test.dentist-self-H.anno, workdir/.assembly-test.dentist-self-H.data, workdir/.assembly-test.tan-H.anno, workdir/.assembly-test.tan-H.data, workdir/.assembly-test.dentist-reads-H.anno, workdir/.assembly-test.dentist-reads-H.data, dentist.json, workdir/assembly-test.dam, workdir/.assembly-test.bps, workdir/.assembly-test.hdr, workdir/.assembly-test.idx, workdir/reads.db, workdir/.reads.bps, workdir/.reads.idx, workdir/pile-ups.db
    output: workdir/insertions/batch.2.db
    log: logs/process.2.log
    jobid: 152
    reason: Missing output files: workdir/insertions/batch.2.db
    wildcards: batch_id=2
    threads: 4

Activating singularity image /home/alu/projects/pb-gaps/src/dentist/dentist_dirty.sif
[Fri Feb 19 17:01:21 2021]
Finished job 152.
55 of 106 steps (52%) done

[Fri Feb 19 17:01:21 2021]
rule process:
    input: workdir/.assembly-test.dentist-self-H.anno, workdir/.assembly-test.dentist-self-H.data, workdir/.assembly-test.tan-H.anno, workdir/.assembly-test.tan-H.data, workdir/.assembly-test.dentist-reads-H.anno, workdir/.assembly-test.dentist-reads-H.data, dentist.json, workdir/assembly-test.dam, workdir/.assembly-test.bps, workdir/.assembly-test.hdr, workdir/.assembly-test.idx, workdir/reads.db, workdir/.reads.bps, workdir/.reads.idx, workdir/pile-ups.db
    output: workdir/insertions/batch.0.db
    log: logs/process.0.log
    jobid: 30
    reason: Missing output files: workdir/insertions/batch.0.db
    wildcards: batch_id=0
    threads: 4

Activating singularity image /home/alu/projects/pb-gaps/src/dentist/dentist_dirty.sif
[Fri Feb 19 17:01:43 2021]
Finished job 30.
56 of 106 steps (53%) done

[Fri Feb 19 17:01:43 2021]
localrule make_merge_config:
    input: workdir/pile-ups.db, workdir/insertions/batch.0.db, workdir/insertions/batch.1.db, workdir/insertions/batch.2.db
    output: workdir/dentist.merge.json
    jobid: 4
    reason: Missing output files: workdir/dentist.merge.json; Input files updated by another job: workdir/insertions/batch.1.db, workdir/insertions/batch.2.db, workdir/insertions/batch.0.db

Job counts:
    count   jobs
    1   collect
    1   make_merge_config
    3   process
    2   propagate_mask_back_to_reference
    56  propagate_mask_back_to_reference_block
    4   propagate_mask_batch
    54  propagate_mask_to_reads_block
    121
ProtectedOutputException in line 1240 of /home/alu/projects/pb-gaps/src/dentist-example/Snakefile:
Write-protected output files for rule collect:
workdir/pile-ups.db
  File "/usr/lib/python3.9/site-packages/snakemake/executors/__init__.py", line 136, in run_jobs
  File "/usr/lib/python3.9/site-packages/snakemake/executors/__init__.py", line 441, in run
  File "/usr/lib/python3.9/site-packages/snakemake/executors/__init__.py", line 230, in _run
  File "/usr/lib/python3.9/site-packages/snakemake/executors/__init__.py", line 155, in _run
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: /home/alu/projects/pb-gaps/src/dentist-example/.snakemake/log/2021-02-19T165642.255438.snakemake.log

Minimal example
It is very hard to reduce the 1500 lines Snakefile to a minimal example but I can share a small example of my compelete workflow (431M). Please follow the instructions in the included README.md. It takes 5 minutes until the error on my Laptop with an Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz. It will require a few Gb of memory. Sorry.
Additional context
This might be related to #823.

I finally tracked down the bug! In short, I forgot to correctly specify input files from a checkpoint which caused the DAG to be in an undefined state. Here is an minimal example to illustrate the issue:
# Snakefile
outdir = "out"
count_file = f"{outdir}/count"
part_file = f"{outdir}/part-{{n}}.txt"
merged_file = f"{outdir}/all.txt"

def get_count():
    try:
        with open(count_file) as cf:
            return int(cf.read())
    except FileNotFoundError:
        # this makes sure the DAG is connected before
        # `make_count` has been executed
        return 1

rule __default__:
    input: merged_file, count_file

checkpoint make_count:
    output: count_file
    shell:
        with open(str(output), "w") as cf:
            from random import randint
            print(randint(2, 10), file=cf)

rule make_part:
    output: touch(part_file)

rule merge_parts:
    input:
        # NOTE missing `count_file` here
        lambda _: [part_file.format(n=n)  for n in range(get_count())]
    output: protected(merged_file)
    shell: "cat {input} > {output}"

Produce the error with these commands:
snakemake -j1
# this is only required in this example; I don't know how the mechanics in the original issue are
touch out/part-0.txt
snakemake -j1

This is the closest I could get. Here is the explanation of what happens:

The first execution of snakemake creates the protected output merged_file but with incomplete input because the DAG, and consequently get_count(), is not updated before executing the rule. You will only see one part file out/part-0.txt.
Trigger a revaluation of merge_parts by touching the part file. This is only required in this example; I don't know how the mechanics in the original issue are.
Snakemake executes merge_parts once more but this time with all the parts and we get a ProtectedOutputException.

Since I originally did not call touch or anything, Snakemake was executing the second invocation of the offending rule (merge_parts in the example) with the corrupted DAG from the first invocation and the corruption caused it to believe it was done somehow. That is my hypothesis, anyway.

repo: snakemake/snakemake


text:
Vuejs implement

I want to ask if I can use bootstrap-select with VueJs

See https://github.com/snapappointments/bootstrap-select/issues/2164

authors: NicolasCARPi khayyak

repo: snapappointments/bootstrap-select


text:
1.14 'val' - behavioral change with numeric values

We have a number of selects where the values are numbers, e.g.,
<select>
<option value="0">None</option>
<option value="1">Foo</option>
<option value="8">Bar</option>
<option value="2">Baz</option>
</select>

Up to and including 1.13.18, we could call the 'val' method using a number, and it'd work; e.g.,
const value = 8;
$foo.selectpicker('val', value);

And Bar would be selected. With 1.14, we've got to call .toString() on the number for 'val' to recognize it as being a member of the set of valid values:
$foo.selectpicker('val', value.toString());

Unsure if this is really a bug or just how it should have worked in the first place, but the behavior has changed; can't seem to find any documentation speaking to it, so if it's the latter, a mention of it is probably worthwhile.

It's actually broken with anything that's not a string, e.g., boolean values. The issue arose in this commit(https://github.com/snapappointments/bootstrap-select/commit/fb5e1145521ef0bf6f4e3aae3e58cfbac43f4353), about 2 years ago, and the problem is this line, which is performing String conversion and then unfortunately just throwing away the result.
https://github.com/snapappointments/bootstrap-select/blob/939e94b14a34759e193f616b753e0a33081cc0c5/js/bootstrap-select.js#L3044
I believe a simple correction is just to change that line to:
value = value.map(String)


text:
bug: loading token with Alchemy

Loading token with Alchemy seem broken now

Also the treasury page is not showing token name

Closing this issue, can't reproduce anymore.

repo: snapshot-labs/sx-ui


text:
ActivityPub => ATProto: handle usernames with _ and ~ chars

This is a fun one. First user with an underscore in their username signed up just now, https://me.dm/@punkscience_ns , @punkscience. (Hi Darryl! Sorry for the trouble!)
We translated the fediverse address @punkscience_ns@me.dm to the bridged Bluesky handle punkscience_ns.me.dm.ap.brid.gy and created the DNS TXT record _atproto.punkscience_ns.me.dm.ap.brid.gy, which is serving fine. PLC directory has it in https://web.plc.directory/did/did:plc:di27vbfe6wutukod4g36kovz.
However, ATProto handles don't allow the underscore character. 🤦 (Also see https://github.com/swicg/activitypub-webfinger/issues/9) So, I guess we need to translate underscores to maybe dashes, and hope we don't hit a collision between eg x_y and x-y on the same instance.

Also need to handle tildes (~). Probably even less common, but theoretically possible.
Related: #744, #830

Got another one: https://mastodon.social/users/_dmh , @dmhowcroft. (Sorry Dave!)

Thanks! Looking forward to seeing it resolved :)

And https://darmstadt.social/users/ceol_agus_ol, did:plc:xry5u23qftlcaysecxbhuv4m.

https://mastodon.social/users/carb_uncle, did:plc:oegzpinpvkhf5sv5oj4f7mq7

Implemented and deployed. Next, fixing these users ^ manually.

Woo, first profile I've seen this work on! https://wetdry.world/@mary_ext => https://bsky.app/profile/mary-ext.wetdry.world.ap.brid.gy

What happens now if there's a collision? Is the second user not bridged or do they just not get a friendly handle?

They're not bridged.
I honestly couldn't predict if we hit that collision in a week, or a quarter, or five years, or never. I suspect closer to five years. We'll cross that bridge when we come to it.

Need to do a bit more here: ATProto handles can't begin or end with -. https://mastodon.gamedev.place/users/DenisProdan and https://warpday.net/users/98ftq556kb (@hirata_@warpday.net) failed this.

Is my underscore-initial username bridged to ATP now?

@dmhowcroft sadly no, sorry, and honestly I don't yet have a plan to support usernames that begin or end with underscores or dashes.

OK, I think we're set here. _ and ~ are converted to - except if they're at the beginning or end, where they're not supported, and that's now documented. I've filed #1005 for that.

authors: dmhowcroft qazmlp snarfed

repo: snarfed/bridgy-fed


text:
Added Remove-AssetMaintenance Function

Created function Remove-AssetMaintenance as per https://snipe-it.readme.io/reference#maintenancesid

@snazy2000 let me know if I did this PR wrong!

Resolves #62

source: gharchive/pull-request


text:
Segfault in sncosmo.fit_lc

I am running into a segfault with SALT2 fitting in sncosmo 2.1.0. When I call sncosmo.fit_lc on a specific light curve, I get a segfault. I have traced the offender down to the call to m0 = self._model['M0'](phase, wave) at line 692 of models.py which is calling BicubicInterpolator.__call__ in salt2utils.pyx.
This bug is very strange. I'm fitting a lot of other light curves, and none of the others have this issue. It doesn't always crash at the same time... sometimes it gets 300 function evaluations in before crashing, other times it only gets 200 in. I assume that this must be some kind of memory corruption in salt2utils.pyx.
Evaluating model.bandflux() many times outside of the fit doesn't seem to cause crashes.
Here is some code that can be used to reproduce the crash on my machine. I get a segfault when running it in python, ipython or Jupyter notebook. I tried running the same code on a different machine with the same version of sncosmo and it doesn't crash. I'm not really sure how to debug this...
import sncosmo
from astropy.table import Table

sncosmo.register(sncosmo.Bandpass([4102., 5100.], [1., 1.], name='snfb'))
sncosmo.register(sncosmo.Bandpass([5200., 6289.], [1., 1.], name='snfv'))
sncosmo.register(sncosmo.Bandpass([6289., 7607.], [1., 1.], name='snfr'))

photometry = Table.read('./photometry.dat', format='ascii')
model = sncosmo.Model(source='salt2')

sncosmo.fit_lc(
    photometry,
    model,
    ['t0', 'x0', 'x1', 'c'],
    bounds={'x1': (-10, 10), 'c': (-1, 10), 't0': (-5, 5)},
    guess_t0=False,
    modelcov=True
)

and here is the photometry data (save it to photometry.dat)
band flux fluxerr time zp zpsys
snfb 4595752.543766973 382251.1484176252 -5.176698911830178 0.0 ab
snfv 5801808.934504561 288616.05353561015 -5.176698911830178 0.0 ab
snfr 5829701.398419394 206176.70295152883 -5.176698911830178 0.0 ab
snfb 6295441.3373373905 295957.034372337 -2.200020694998291 0.0 ab
snfv 10007962.019840367 234709.93911189566 -2.200020694998291 0.0 ab
snfr 10108232.969712026 156252.77488854234 -2.200020694998291 0.0 ab
snfb 6654901.170559467 234147.93279262458 -0.2326053992177534 0.0 ab
snfv 12303167.678482858 198529.83103538782 -0.2326053992177534 0.0 ab
snfr 12699334.008199308 139114.6886204682 -0.2326053992177534 0.0 ab
snfb 5808328.962529007 155369.93370995217 2.650710886365449 0.0 ab
snfv 14127997.09792105 161304.01399547144 2.650710886365449 0.0 ab
snfr 15088143.647814319 121482.66445604282 2.650710886365449 0.0 ab
snfb 4489347.074970054 139020.14266214747 4.593593119925059 0.0 ab
snfv 13086192.406063009 150915.49660973388 4.593593119925059 0.0 ab
snfr 14768074.522584999 118761.14186293347 4.593593119925059 0.0 ab
snfb 2865945.7483643168 205384.76209939577 7.645914945292894 0.0 ab
snfv 9716341.40604694 195314.42392178904 7.645914945292894 0.0 ab
snfr 12355491.223820724 150091.13384334717 7.645914945292894 0.0 ab
snfb 1411322.6481468512 212400.14077413199 14.50358731158755 0.0 ab
snfv 5171825.510133825 181413.258353211 14.50358731158755 0.0 ab
snfr 6795653.6059887335 136746.59064641877 14.50358731158755 0.0 ab
snfb 1453711.0229893406 201341.16851661564 16.400810790448688 0.0 ab
snfv 4429324.914437766 177498.1755062241 16.400810790448688 0.0 ab
snfr 5761992.42583322 138719.95973725663 16.400810790448688 0.0 ab
snfb 920877.099799427 195827.50391907452 29.106892601993792 0.0 ab
snfv 2171051.820031908 135177.87845651657 29.106892601993792 0.0 ab
snfr 2549340.1631174046 93204.9552245684 29.106892601993792 0.0 ab
snfb 698854.1963829967 210084.48735442467 31.144499714708008 0.0 ab
snfv 1955063.736581642 156647.80668386564 31.144499714708008 0.0 ab
snfr 2275790.436631243 104804.02268331024 31.144499714708008 0.0 ab
snfb 779962.8584944125 254232.79605565948 32.14762937019699 0.0 ab
snfv 1874465.256176359 188130.48653334402 32.14762937019699 0.0 ab
snfr 2185373.9935737015 131019.74605807872 32.14762937019699 0.0 ab
snfb 513157.5305402458 154552.22820287966 38.9351099195651 0.0 ab
snfv 1524280.7131576536 123441.28958213677 38.9351099195651 0.0 ab
snfr 1729456.1790303283 85446.69916523366 38.9351099195651 0.0 ab
snfb 536937.0662863288 262081.1688471533 43.80355982365586 0.0 ab
snfv 1178893.6656946444 218745.74203707313 43.80355982365586 0.0 ab
snfr 1376244.719109808 157985.20160606608 43.80355982365586 0.0 ab

Looks like this is due to a failure in minuit. For whatever reason, this fit fails, and minuit ends up trying to evaluate the model with the parameters all set to np.nan. This causes the BicubicInterpolator evaluation to crash.
It would be best to figure out why the minuit fit is failing, but I submitted PR #267 which at least prevents the segfaults by having minuit raise an Exception.

I ran into a variant of this again recently, with the added complication that iminuit seems, in some circumstances, to corrupt the heap when raising an exception on the NaN return value. This can be reproduced with the following script:
#!/usr/bin/env python

"""
Trigger heap corruption with sncosmo 2.2.0 and iminuit 1.5.2.

Aborts on RHEL7 with sncosmo/iminuit from conda-forge. Run
with MALLOC_CHECK_=1 to see the heap corruption warning without
aborting the process.
"""

import faulthandler; faulthandler.enable()
import sncosmo
from astropy.table import Table

photometry = Table.read('./photometry.dat', format='ascii')

dust = sncosmo.models.CCM89Dust()
model = sncosmo.Model(
    source="salt2", effects=[dust], effect_names=["mw"], effect_frames=["obs"]
)
model.set(mwebv=0.013549136759087834)

try:
    result = sncosmo.fit_lc(
        photometry,
        model,
        ['t0', 'x0', 'x1', 'c', 'z'],
        bounds={'c': [-2, 5], 'x1': [-5, 5], 'z': [-0, 0.2]},
        maxcall=896
    )
except:
    print('Exception raised')
    raise

print('collecting garbage to trigger free() and look for heap corruption')
import gc
gc.collect()
print('done')

with photometry.dat.gz.

authors: jvansanten kboone

repo: sncosmo/sncosmo

license_source: bigquery


text:
Add Pagination component

Hello, it would be very helpful that the package supports Pagination component
https://mantine.dev/core/pagination/
Currently I have to use dash bootstrap Pagination as a workaround

thanks to @kaburelabs it will be released in 0.9.0.

authors: snehilvj theearthwanderer

repo: snehilvj/dash-mantine-components


text:
controlled popover

Closes #328
This allows the opened prop to trigger a callback
Here's a sample app

import dash_mantine_components as dmc
from dash import Dash, _dash_renderer, Input, Output
_dash_renderer._set_react_version("18.2.0")

app = Dash(external_stylesheets=dmc.styles.ALL)

callback_popover = dmc.Popover(
    [
        dmc.PopoverTarget(dmc.Button("Toggle Popover")),
        dmc.PopoverDropdown(dmc.Text("This popover is opened on button click")),
    ],
    width=200,
    id="popover",
    opened=False
)

uncontrolled_popover = dmc.Popover(
    [
        dmc.PopoverTarget(dmc.Button("Toggle Popover")),
        dmc.PopoverDropdown(dmc.Text("This popover is opened on button click")),
    ],
    width=200,
)

component =  dmc.Box([
        dmc.Text(id="popover-container"),
        callback_popover,
        dmc.Text("This is an uncontrolled popover", mt=100),
        uncontrolled_popover

    ], p=20)

app.layout = dmc.MantineProvider(component)

@app.callback(
    Output("popover-container", "children"),
    Input("popover", "opened")
)
def update(opened):
    return f"Popover is opened? : {opened}"

if __name__ == "__main__":
    app.run(debug=True)

Here's the Sample app on PyCafe


text:
Implement batchfile extension with other documents

To allow for easier reuse of repeated elements between batchfiles it could be beneficial to allow for in place loading of other files. This would open the file and expand everything inside to the exact location of the load statement. See below for the suggested syntax, this makes it easy to parse and is somewhat similar to related syntax in other projects. Care should be given so that the error give the correct location and file for loaded files and that the HTML batchfile contains a fully expanded view so that it can very easily be rerun with exactly the same parameters even if the shard files have moved or changed in the meantime.
TemplateMatching ->
    ...
    @load alphabets/mass_based_alphabet.txt
    @load templates/homo_sapiens_germlines.txt
<-

This will close: #111 but as seen above will be more generally useful.

It is now done with the following syntax, it can only be used to inline a normal Argument on a place where this would be valid.
TemplateMatching ->
    ...
    include!(../alphabets/mass_based_alphabet.txt)
    include!(../templates/homo_sapiens_germlines.txt)
<-

repo: snijderlab/stitch


text:
File slurp idiom fails to read the file

File slurp idiom fails to read the file:
$contents = do { local $/; <FILE> };

Fixed in 0.982

repo: snoopyjc/pythonizer


text:
Passing an illegal zip file should raise ValueError, not xlrd.biffh.XLRDError

Passing an illegal zip file should raise ValueError, not xlrd.biffh.XLRDError
x2x = XLS2XLSX('not_spreadsheet.zip')

xlrd.biffh.XLRDError: ZIP file contents not a known type of workbook

Fixed in v0.1.5


text:
what's the bayesnet's advantage as the GenerativeModel?

i'm wandering why not just use the LFs output as features to train a svm model to predict relations?

Because we don't know the True labels of training data, we have to use generative Model gain some credible pseudo labels.
I think snorkel just learn a set of combination weights of LFs(like stacking ensemble, each LF can be seen as a week classifier) without LFs dependencies. Fortunately, we can use dependency factors model relationships among LFs, this should be the main advantage of snorkel on sample model ensemble

Thanks for your question! We now have a community forum on Spectrum for discussions like these!
Overall, using LFs as features doesn't generalize to use richer features that downstream ML models can learn from.
The Training Classifiers with Natural Language Explanations paper also compares directly to using LF outputs as features.
#946 has a discussion around why we don't usually have LFs as features

@rtygbwwwerr thanks for the answer!
To quickly summarize on why we in general don't just use the LFs as features in a model as our final classifier:

(1) Generalization: In most of the problems we tackle with Snorkel, the LFs won't cover a lot of the data (and trying to get them to do this with high enough precision would be a very burdensome process...).  Instead, we want to use them to supervise some end discriminative model (e.g. a deep net) that has many more features and can generalize to new data!
(2) Labeled data: To train a model defined over the LFs, we'd need labeled data- in general we don't have a lot of this, hence why we follow the Snorkel pipeline as proposed

Either way, @aling1472  in the end, you should do whatever is best for your setting- if you have a fairly simple, low-data-complexity problem, writing a few LFs and then training an SVM with hand-labeled data could work fine (this is just traditional feature engineering + supervised learning!)
Closing this for now, and it's marked as Q&A to be easily discoverable

authors: ajratner aling1472 paroma rtygbwwwerr

repo: snorkel-team/snorkel


text:
adding tqdm progress bar on  label fit method

Fixes #1624
Description of proposed changes
Added a tqdm progress bar when fit() method on LabelModel is called. It updates after each epoch.

When log frequency for loss reporting is enabled, it will be formatted this way.

Please let me know if I should add a progress_bar parameter to fit(), similar to apply() method in PandasLFApplier
Related issue(s)
Fixes #1624
Test plan
No new test has been added, as these changes do not modify the logic
Checklist
Need help on these? Just ask!

[x] I have read the CONTRIBUTING document.
[n/a] I have updated the documentation accordingly.
[n/a] I have added tests to cover my changes.
[n/a] I have run tox -e complex and/or tox -e spark if appropriate.
[x] All new and existing tests passed.

@bhancock8, @brahmaneya, requesting a review for this PR

@bhancock8, @brahmaneya, requesting a review for this PR

@paroma @fredsala

Thank you for this PR contribution, @anerirana! (And apologies for the delay—I was out of office this past week). Yes, I think adding a progress_bar parameter is an excellent idea, to provide an escape hatch for situations where it may become too verbose to be helpful or otherwise interfere with the output of script-based usage. After that, this should be good to go. Just re-ping (re-request review) from me when that's done and I'll be happy to approve.

@bhancock8, thanks for the review. Added the progress bar param as discussed.

Excellent. Thanks for the edit and new unit test. Good to merge!

@bhancock8 I don't have write access to this repository, you will have to merge the PR.


text:
SNOW-1757892: Improve Dataframe.print_schema for structured types

Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
<!---
In this section, please add a Snowflake Jira issue number.
<p>Note that if a corresponding GitHub issue exists, you should still include
the Snowflake Jira issue number. For example, for GitHub issue
https://github.com/snowflakedb/snowpark-python/issues/1400, you should
add "SNOW-1335071" here.
--->
Fixes SNOW-1757892

Fill out the following pre-review checklist:

[x] I am adding a new automated test(s) to verify correctness of my new code

[ ] If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing

[ ] I am adding new logging messages
[ ] I am adding a new telemetry message
[ ] I am adding new credentials
[ ] I am adding a new dependency
[ ] If this is a new feature/behavior, I'm adding the Local Testing parity changes.
[x] I acknowledge that I have ensured my changes to be thread-safe. Follow the link for more information: Thread-safe Developer Guidelines

Please describe how your code solves the related issue.
This PR adds support to DataFrame.print_schema for nested data types. Before this change a nested schema would be printed like so:

root
 |-- "MAP": MapType(StringType(), ArrayType(StructType([StructField('FIELD1', StringType(), nullable=True), StructField('FIELD2', LongType(), nullable=True)]))) (nullable = True)

After the change the nested schema will instead look like this:
root
 |-- "MAP": MapType (nullable = True)
 |   |-- key: StringType()
 |   |-- value: ArrayType
 |   |   |-- element: StructType
 |   |   |   |-- "FIELD1": StringType() (nullable = True)
 |   |   |   |-- "FIELD2": LongType() (nullable = True)

Hi @sfc-gh-jrose , this definitely improves the behavior. But still some pointes to note

can we return the string instead of only printing it?
In my local test, seems like every time I try to pass in nested structure like Array<Array<Integer>>, the returned dataframe only gives me Array<String> type, which doesn't align with the example in this PR description. Am I missing anything?
Can we support accepting a parameter, which indicates the printed column name? Basically takes in new column names and print_schema with them.

@sfc-gh-wshangguan

We could add a utility method for that. Nobody has submitted a feature request for that yet.
Structured type support has not been rolled out yet. The Snowflake api always sends Snowpark semi-structured data. What you're seeing with Array<String> is the api returning structured data as json encoded strings.
I believe this use-case would be supported by a statement like df.select(<columns>).print_schema().

@sfc-gh-jrose
Thanks for the explanation!

Yeah, this would be helpful for accelerated spark api project
Gotcha.
Right, that would be the common use case. What I was talking about is that for spark api project, we have a sort of column naming mapping between spark df and snowpark df. This means the column names in snowpark df print schema are inconsistent with spark df column name. If we can accept an optional parameter in print_schema, which replaces the default column names in print_schema, that can solve the problem.

One more request is that we would need the level parameter similar to what spark df has in https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.DataFrame.printSchema.html

authors: sfc-gh-jrose sfc-gh-wshangguan

repo: snowflakedb/snowpark-python


text:
SNOW-749361: [Local Testing] Emualte Snowflake datatypes

Please answer these questions before submitting your pull requests. Thanks!

What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes #SNOW-749361

Fill out the following pre-review checklist:

[ ] I am adding a new automated test(s) to verify correctness of my new code
[ ] I am adding new logging messages
[ ] I am adding a new telemetry message
[ ] I am adding new credentials
[ ] I am adding a new dependency

Please describe how your code solves the related issue.
Please write a short description of how your code change solves the related issue.

the test failures are not related to local testing, those should be fixed after rebasing the main branch (specially this PR: https://github.com/snowflakedb/snowpark-python/pull/912).
all local test related tests are passing

authors: sfc-gh-aling sfc-gh-yixie


text:
[plugin-sass] files starting with '_' prefix not getting picked up correctly

Original discussion: #1266
/cc @heikkilamarko
Needs triage to find out why these files error, and aren’t being picked up by Snowpack on file change.

Partial sass files (those starting with underscore) are by convention imported without underline character. Because of this, the importedByMap in the plugin implementation ends up containing incorrect filenames.
For example, if I have a partial named _myfile.scss, it will be imported as follows:
@import './styles/myfile';

As mentioned in the original discussion, the second problem is that npm run build throws an error.
The reason seems to be that the plugin hands also the partial files to the sass compiler. If I change the code to ignore partials, the build succeeds.

As mentioned in the original discussion, the second problem is that npm run build throws an error.
The reason seems to be that the plugin hands also the partial files to the sass compiler. If I change the code to ignore partials, the build succeeds.

I'm also facing this problem while running npm run build.
I've a single "entry" sass where all partials are imported with @import.
The error thrown is as if you're trying to compile the scss file individually without importing variables first.
src/sass/base.scss looks like this
// Core variables and mixins
@import "./variables";

// CSS Reset
@import "./normalize";

// Styles
@import "./style";

// Grid flex
@import "./gridlex/gridlex";

// animate
@import "./animate";

// Responsive
@import "./responsive-utilities";

And the sass folder structure:

Error thrown:
Joses-iMac:project josesachs$ npm run build

> @ build /Users/josesachs/Animus/project
> snowpack build

[snowpack] ! building source…
[snowpack] ✘ /Users/josesachs/Animus/project/src/sass/gridlex/_gridlex-classes.scss
  Error: Command failed with exit code 65: sass --stdin --load-path /Users/josesachs/Animus/project/src/sass/gridlex
Error: Undefined variable.
  ╷
5 │ [#{$gl-attributeName}~="#{$gl-gridName}"],
  │    ^^^^^^^^^^^^^^^^^
  ╵
  - 5:4  root stylesheet
    at makeError (/Users/josesachs/Animus/project/node_modules/@snowpack/plugin-sass/node_modules/execa/lib/error.js:59:11)
    at handlePromise (/Users/josesachs/Animus/project/node_modules/@snowpack/plugin-sass/node_modules/execa/index.js:114:26)
    at processTicksAndRejections (internal/process/task_queues.js:89:5)```

Excluding the SCSS partials in the Snowpack config worked for me:
{
  ...
  exclude: [
    '_*.scss',
  ],
  ...
}

But it would be nice if the plugin could ignore them automatically.

Excluding the SCSS partials in the Snowpack config worked for me:
{
  ...
  exclude: [
    '_*.scss',
  ],
  ...
}

But it would be nice if the plugin could ignore them automatically.
Indeed it should, also I totally forgot about excluding files with Snowpack's config. Thanks a bunch!

I guess, adding exclude works for the prod build, but how about the dev time. During development, the exclude causes snowpack not to detect changes to partial SASS files.

For me it does detect changes in every included sass file in both dev and prod builds.
I just included the main sass file on top of the very first JS file, index.js in my case with Svelte:
import './sass/base.scss';

import App from "./App.svelte";

let app = new App({
	target: document.body,
});

export default app;

// Hot Module Replacement (HMR) - Remove this snippet to remove HMR.
// Learn more: https://www.snowpack.dev/#hot-module-replacement
if (import.meta.hot) {
	import.meta.hot.accept();
	import.meta.hot.dispose(() => {
		app.$destroy();
	});
}

I'm stuck with excluding the _ files and not having changes picked up in those files under snowpack dev.
Importing the scss file in entry js (TS in my case) does not seem to help.
The _ files are built anyway.
Any suggestions?

Hi,
I am also facing this issue. I am trying to get an old codebase to convert over to snowpack but this problem seems to be a roadblocker.
{
  ...
  exclude: [
    '_*.scss',
  ],
  ...
}

I can't find any documentation about this setting, it also doesn't change anything if added to the snowpack.config.js.

This is an old issue, and I don't think that config is relevant anymore. @snowpack/plugin-sass should do everything that you need to support this, but if you're running into problems please create a new discussion with steps to debug/reproduce

Old issue but still a problem ;)
Using "snowpack": "^3.0.0-rc.1" and "@snowpack/plugin-sass": "^1.1.2" I run into this exact error when using snowpack build. It looks like partials are getting picked up which leads to mentioned errors. According to the sass-lang documentation partials (starting with "_") should be ignored by the compiler ... this is definitely not the case here!

Bah, you're right. I mention fixing this in that thread, but it looks like the fix never made it in (or may have gotten removed at some point). Will add back.
Thanks for the heads up!

Fixed in 64024ccc

Cool thanks. Now let's get the hmr / reloading working for partial file ;) I started a new discussion here.

authors: DavidDeSloovere FredKSchott LachlanArthur heikkilamarko jhewt m9dfukc

repo: snowpackjs/snowpack


text:
Add com.snowplowanalytics.snowplow.storage/amazon_dynamodb_config/jsonschema/1-1-0

We'd like to use separate DynamoDB config for deduplication in Snowflake, but it requires hardcoded credentials.
I propose to add 1-1-0 with nullable accessKeyId and secretAccessKey (in case of null default credentials provider chain will be used).

Actually, let's also make it 2-0-0 and change purpose to EVENT_MANIFEST.

repo: snowplow/iglu-central


text:
Update jackson-databind

Current version has Vulnerabilities:
https://mvnrepository.com/artifact/com.snowplowanalytics/snowplow-java-tracker/1.0.0
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-42003
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-42004
Update jackson-databind to latest version
https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind

We have upgraded to version 2.16.1 in release v2 of the tracker.

authors: aki-kesulahti matus-tomlein

repo: snowplow/snowplow-java-tracker


text:
Release/3.2.0

The tracker now makes use of the  client_session schema version 1-0-2, which adds two new properties to the session context entity – eventIndex (index of the event in the session) and firstEventTimestamp (timestamp of the first event in the session). The event index property is useful for ordering events as they were tracked.
The release also changes the behaviour for 5 HTTP status codes (400, 401, 403, 410, and 422) that, when received in response from the Collector, will now cause the tracker not to retry sending events (i.e., drop the events). Requests with all other 3xx, 4xx, and 5xx status codes are retried. The set of status codes for which events should be retried or not is customizable in EmitterConfiguration. The following shows the configuration in the iOS tracker:
var customRetryRules = [Int:Bool]()
customRetryRules[403] = true // retry for the 403 HTTP status code
let emitterConfig = EmitterConfiguration()
    .customRetryForStatusCodes(customRetryRules)

CHANGELOG
Features:

Add eventIndex and firstEventTimestamp properties to client sessions (#682)
Add a customizable set of failure HTTP status codes for which collector requests should not be retried (#684)

Thanks for your pull request. Is this your first contribution to a Snowplow open source project? Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://docs.snowplowanalytics.com/docs/contributing/contributor-license-agreement/ to learn more and sign.
Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.

authors: matus-tomlein snowplowcla

repo: snowplow/snowplow-objc-tracker


text:
Scala Common Enrich: Make IP lookups enrichment optional for some events

GeoIP lookup might not be necessary for all of the events that we receive i.e. page pings or webhook events coming from other systems. Reducing the size of GeoIP duplicate data will help a lot for efficiency and clarity of the data.
I am proposing that we add an optional list field to its setting schema to specify the list of event.event_name that we are interested have geo ip lookup. Then we just have GeoIP lookup for those specific events. The other change would be an if in EnrichmentManager to limit the the events for GeoIP lookup if the optional list is set in configuration.
CC: @nafid

This would be an opportunity to standardise this kind of selective-enrich across all enrichments (some enrichments e.g. API Lookup have a flavor of this already).

There we go. I am keen to take on this opportunity.
PS: I could not find the flavor for API lookup in the docs or settings for it. Any URLs or hints?

https://github.com/snowplow/snowplow/wiki/API-Request-enrichment

If a key required in the uri was not found in any of the inputs, then the lookup will not proceed, but this will not be flagged as a failure.

Migrated to https://github.com/snowplow/enrich/issues/35

authors: alexanderdean chuwy szareiangm

repo: snowplow/snowplow


text:
issue-3775 : Allow configuration override of default kinesis endpoints

This change addresses the issue - https://github.com/snowplow/snowplow/issues/3775
:sparkles:
This commit enables an optional configuration in config.hocon for both 'scala-stream-collector' and 'stream-enrich' for overriding Kinesis endpoints.
Allowing an optional override on the calculated aws endpoints is useful while using local setup eg. localstack.

I am getting 2/4 build failures on Travis. The errors on these steps indicate environmental issues rather than test failure due to the code changes in this PR:
https://travis-ci.org/snowplow/snowplow/jobs/385498036#L1188
https://travis-ci.org/snowplow/snowplow/jobs/385498039#L1306

Thanks for your pull request. Is this your first contribution to a Snowplow open source project? Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://github.com/snowplow/snowplow/wiki/CLA to learn more and sign.
Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.

I signed it!

@BenFradet rearranged commits into two clean ones.

@arihantsurana has signed the Software Grant and Corporate Contributor License Agreement

Thanks a lot, merged :+1:

authors: BenFradet arihantsurana snowplowcla


text:
Support Beam Streaming in Compiler

Extract window-related information from Beam operators and save them in Vortex IR
Create a simple Beam Streaming example(e.g., WindowedMapReduce) to demonstrate the compiler's support

Moved to https://issues.apache.org/jira/browse/NEMO-1

repo: snuspl/nemo


text:
対応しているキャラクタの一覧を見やすくする

https://github.com/so-c/soc-toolbox/blob/ff84d34f0be45ec52ee9296dffa054601be665d8/voicevox-caller/src/functions/Find-SpeakerParam.ps1#L105
https://github.com/so-c/soc-toolbox/blob/ff84d34f0be45ec52ee9296dffa054601be665d8/README.md?plain=1#L42
増えてきたので見づらくなってきた

#98 で修正

repo: so-c/soc-toolbox


text:
IDs with underline

Having field IDs with an underline gives me strange results:

group_order => group_order
Is this by design?

Yes, it's the consequence of htmlentities() being used to stop XSS.

authors: soatok webbird

repo: soatok/cupcake

license: ISC


text:
(Stemmer()) مشکل در عملکرد

stemmer = Stemmer()
print(stemmer.stem('علی'))
out ::: عل
اشتباه است راهنمایی کنید  چرا؟؟؟؟؟ (Stemmer) همانطور که در دستورات بالا مشاهده می شود  خروجی

سلام
ابزار استمر کلا در تعریف‌ش هوشمند نیست. اون چیزی که شما احتمالا می‌خواید ازش استفاده کنید Lemmatizer هست. اون رو تست کنید، این مشکل رو نداره.

repo: sobhe/hazm

license: mit


text:
Allow template engines to select formatter.

On the irc channel @sveisvei needed to bypass SocketStream's default formatting behavior for .jade files.
This patch allows template engines to specify which formatter SocketStream should use for each template file. You can see an actual use case here.
This patch should be fully backwards-compatible since it only changes the selected formatter if the template engine provides a selectFormatter method.

+1 on this.

authors: mindeavor sveisvei

repo: socketstream/socketstream