text:
How to debug compiler error?

I am getting a Nil assertion error from compiler here: https://travis-ci.org/waterlink/spec2.cr/builds/110631506
It happens only on travis-ci environment, but does not happen on my laptop (Ubuntu 14.04) with the same version of Crystal (Crystal 0.12.0 [90eaec1] (Tue Feb 16 14:39:56 UTC 2016)).
Is there a way to run the program, that all these ??? will actually have some data in them, so that it is possible to trace to a place where this assertion is placed in the code?

OK, I was able to reproduce it locally in a very strange fashion. Instead of executing command, that is used on travis (crystal spec unit/), I created a file unit_spec.cr, that requires ./unit/* and just run it with crystal unit_spec.cr.

So the question holds: is there a way to turn these ??? into something, that I can explore in the compiler's codebase?

IDEA: It would be awesome if not_nil! captured __FILE__ and __LINE__ and used them in the error message.

OK, that is in itself is not very helpful:
Nil assertion failed (at expanded macro: getter!:9)

Seems like for this to be useful, all such helper functions, that use not_nil! will have to accept file = __FILE__, line = __LINE__ and pass them around..

BTW, with compiled compiler, I have some sort of backtrace:
[10021319] *CallStack::unwind:Array(Pointer(Void)) +87
[10021210] *CallStack#initialize<CallStack>:Array(Pointer(Void)) +10
[10021162] *CallStack::new:CallStack +42
[10025809] *Exception#initialize<Exception, String, Nil>:CallStack +33
[10025745] *Exception::new<String>:Exception +97
[9852150] *raise<String>:NoReturn +6
[10148012] ???
[14338529] *Crystal::ModuleDef#resolved_type<Crystal::ModuleDef>:Crystal::Type+ +81
[21473060] *Crystal::TypeDeclarationVisitor#visit<Crystal::TypeDeclarationVisitor, Crystal::ModuleDef>:Bool +52
[10501632] *Crystal::ASTNode+ +816
[14013516] *Crystal::Expressions#accept_children<Crystal::Expressions, Crystal::TypeDeclarationVisitor>:Array(Crystal::ASTNode+) +108
[10506545] *Crystal::ASTNode+ +5729
[21484302] *Crystal::TypeDeclarationVisitor +3966
[21479866] *Crystal::TypeDeclarationVisitor#visit<Crystal::TypeDeclarationVisitor, Crystal::Call>:Bool +106
[10502504] *Crystal::ASTNode+ +1688
[21484302] *Crystal::TypeDeclarationVisitor +3966
[21479866] *Crystal::TypeDeclarationVisitor#visit<Crystal::TypeDeclarationVisitor, Crystal::Call>:Bool +106
[10502504] *Crystal::ASTNode+ +1688
[14013516] *Crystal::Expressions#accept_children<Crystal::Expressions, Crystal::TypeDeclarationVisitor>:Array(Crystal::ASTNode+) +108
[10506545] *Crystal::ASTNode+ +5729
[18220506] *Crystal::FileNode#accept_children<Crystal::FileNode, Crystal::TypeDeclarationVisitor>:Nil +10
[10503741] *Crystal::ASTNode+ +2925
[14013516] *Crystal::Expressions#accept_children<Crystal::Expressions, Crystal::TypeDeclarationVisitor>:Array(Crystal::ASTNode+) +108
[10506545] *Crystal::ASTNode+ +5729
[14013516] *Crystal::Expressions#accept_children<Crystal::Expressions, Crystal::TypeDeclarationVisitor>:Array(Crystal::ASTNode+) +108
[14013354] *Crystal::Expressions +74
[10937734] *Crystal::Program#visit_type_declarations<Crystal::Program, Crystal::Expressions>:Crystal::Expressions +22
[10936699] *Crystal::Program#infer_type<Crystal::Program, Crystal::Expressions, Bool>:Crystal::Expressions +987
[21038020] *Crystal::Compiler#infer_type<Crystal::Compiler, Crystal::Program, Crystal::Expressions>:Crystal::Expressions +20
[21034169] *Crystal::Compiler#compile<Crystal::Compiler, Array(Crystal::Compiler::Source), String>:Crystal::Compiler::Result +537
[22346804] *Crystal::Command::CompilerConfig#compile<Crystal::Command::CompilerConfig, String>:Crystal::Compiler::Result +100
[22310633] *Crystal::Command#run_command<Crystal::Command>:Nil +441
[22299115] *Crystal::Command#run<Crystal::Command>:(Nil | Bool | Array(Crystal::ImplementationTrace) | Array(String) | IO::FileDescriptor+ | Crystal::Compiler::Result | Array(Crystal::Init::View+:Class)) +1835
[22296956] *Crystal::Command::run<Array(String)>:(Nil | Bool | Array(Crystal::ImplementationTrace) | Array(String) | IO::FileDescriptor+ | Crystal::Compiler::Result | Array(Crystal::Init::View+:Class)) +44
[22296828] *Crystal::Command::run:(Nil | Bool | Array(Crystal::ImplementationTrace) | Array(String) | IO::FileDescriptor+ | Crystal::Compiler::Result | Array(Crystal::Init::View+:Class)) +44
[9850977] ???
[9881822] main +46
[139853521882821] __libc_start_main +245
[9794690] ???
[0] ???

Seems, like the relevant code is around ModuleDef#resolved_type. Will take a look.

Seems like for this to be useful, all such helper functions, that use not_nil! will have to accept file = FILE, line = LINE and pass them around..

Which is tedious, but I think it can be done for standard library, WDYT?

Narrowed down to here: https://github.com/manastech/crystal/blob/fb999c97963489e2199663dc48a445f385a8606f/src/compiler/crystal/semantic/type_declaration_visitor.cr#L73
Module that causes this fail looks like this:
module Spec2__SomethingWithDelayed
  include ::Spec2::DSL::Spec2___
  SPEC2_FULL_CONTEXT = ":root -> something with delayed (/code/unit_spec/delayed_spec.cr:5)"
  SPEC2_CONTEXT = Spec2__SomethingWithDelayed
  LETS = {} of String => Int32
  LETS_BANG = {} of String => Int32
  BEFORES = [] of Int32
  AFTERS = [] of Int32
  ITS = {} of String => Int32
  __spec2_sanity_checks(Spec2__SomethingWithDelayed, ":root -> something with delayed (/code/unit_spec/delayed_spec.cr:5)")
  @@__spec2_active_context = ::Spec2::Context.new(__temp_134, "something with delayed")
  (__temp_134 || ::Spec2::Context.instance).contexts << (@@__spec2_active_context)
  let(answers) do
    {"life" => 74}
  end
  after do
    answers["life"] = (answers["life"]) - 12
  end
  it("passes") do
    delayed do
      (answers["life"]).should(eq(42))
    end
    answers["life"] = (answers["life"]) - 20
  end
  it("fails") do
    delayed do
      (answers["life"]).should(eq(42))
    end
  end
  __spec2_def_lets
  __spec2_def_hooks
  __spec2_def_its
end

Of course there are lots of macro involved, but they worked before. Will try to disable latest feature, after this started to happen.

OK, I found an error, it turned out to be an error with require order?:

I had 4 files: unit/simple_dsl_spec.cr, unit/delayed_spec.cr, unit/spec_helper.cr and ./unit_spec.cr (which requires ./unit/*)
unit/spec_helper requires only stdlib's spec library
unit/simple_dsl_spec.cr, which required ./spec_helper and ../src/next
unit/delayed_spec.cr required only ./spec_helper, without ../src/next (but it needs it)

Running crystal unit/delayed_spec.cr results in expected compile error Spec2 is not defined.
Running crystal unit/simple_dsl_spec.cr results in expected successful compilation (because it does relevant require)
Running crystal unit_spec.cr, which should require everything, apparently results in such interesting failure.
And the fix to the problem is to move require "../src/next" to spec_helper.cr.

So I don't have problem anymore, so the issue probably should be closed. Though, I think there is some sort of bug in this code in compiler. It should either figure these requires out, or fail with some proper compile error. WDYT?

@waterlink I usually try to reduce the code and then create a spec and run it and see it fail, and investigate/debug from there (I'm a puts debugger). If you can try to reduce the code that produces that compiler bug, we'll be able to fix it :-)

No reduced code posted, closing.

authors: asterite jhass waterlink

repo: manastech/crystal


text:
Support "plan only" on master

Allow a user to run the master branch, but as 'plan only'
When enabled, the confirm and apply steps will be skipped on the master branch
Allow the  user to indicate  that the pipeline should fail if un-applied changes are found in any environment.
UseCase:

Each week, I want to trigger all my pipelines to look for un-applied changes
When triggered, 'plan' should be run across each environment in the pipeline
If any environment has un-applied changes, the pipeline should fail-fast

Dev Notes: Generally speaking, this should be implemented as a Plugin.  Build this behavior into https://github.com/manheim/terraform-pipeline/blob/master/docs/ConditionalApplyPlugin.md if it makes sense for the behavior to live here.  If it doesn't make sense, build a new Plugin.

This affects branches other than master.  Should that be the case?

source: gharchive/issue

repo: manheim/terraform-pipeline

license_type: permissive

license_source: github-api


text:
Utils tests

That's right, I'm testing the Math.

hell yeah @bronzehedwick - thank you!
busy not getting deported atm.
will merge and publish this week hopefully

No rush! Obviously there are more important things happening. Let me know if I can help in any way.

source: gharchive/pull-request

authors: bronzehedwick maniart

repo: maniart/diffyjs

license: mit

license_source: bigquery


text:
Implement a "check for updates" feature that alerts users of new releases of ManifoldJS

Check the npm registry to retrieve the latest version and print a message to the console if a new release is found

.See https://github.com/manifoldjs/ManifoldJS/commit/56e09ec831577d790ab6d105140f309c57f4a670.

repo: manifoldjs/ManifoldJS


text:
When using trainAll finished function should be optional

Finished function should be optional. Sometimes, you don't care about when the training will finish.
What are the usability implications of this? Does making it optional make it less explicit and hence loosely typed?

It does not make it less explicit. Calling without finishedFunc should return new Error(...) to the caller.

@anubhavsrivastava Yeah that's what I'm debating here. Should it really throw the error or should it just ignore the callback completely?
I find the idea of making callbacks optional similar to how most programming languages make the capturing of return value optional.

authors: anubhavsrivastava manthanhd

repo: manthanhd/talkify


text:
Mobile web design buttons are not responsive

Probably not a good first impression

I'm also a bit concerned about the responsiveness of https://ui.mantine.dev/category/headers/
There are breakpoints where the elements are in a weird state / position and the hamburger menu doesn't seem to work. The tabs example doesn't do anything on mobile for example. Was about to dive in, but now hesitant to commit.

authors: JorgeSivil arenddeboer

license: MIT


text:
Added Dockerfile

This PR resolves #7.

Done.

repo: manuasir/film-recommendator


text:
Update fr.json

Update for last keys. Please consider to use the weblate foundry hub to help translators maintaining the lang files. Improve also the fame of your module with other languages as well ! Thanks for all you are doing for the foundry community.

Thanks! I'll have a look at weblate.

FYI I've added Drag Ruler to weblate

authors: manuelVo rectulo

repo: manuelVo/foundryvtt-drag-ruler


text:
클러스터된 마커 삭제 방법?

마커를 지도에 검색어에 따라서 추가/삭제 하려고 합니다.
클러스터된 마커 삭제하는 기능이 있나요?

안녕하세요. 현재로선 마커 삭제는 없습니다.
해당 프로젝트가 개인 프로젝트로 사용된 내용이라.. 작업해보도록 하겠습니다.
감사합니다.

is this no longer available?

authors: Sergelenre manunite wannabewize

repo: manunite/NaverMapCluster


text:
Greetings bro

I was hoping to pick your brain about this eos flare block and also if having # of confirmations are the ways to show that it has not been compromised by the powers of a outside influence to change the outcome of a seed or eos block hash in their favor because I find it odd not having any confirmation and as you stated 3 years ago.  this signature u referenced is back in the mix. SIG_K1_KYTPtoPd3Gx8LCR9rdCd6p3wGERwSuJtmw1LWDSSWfhxM7bWqy7mCTz8pBMtpYAbsPt7wYJFL6ax2HfHXqdXmm8rfDFdux
(If this link below is legit or not)
https://eosflare.io/block/320152732
Could i get up your opinion in this matter please as I am trying to figure out if they have been adding more code inside or what is it about manipulating the outcome . I would greatly appreciate if i can pick your brain about this and others that are legit and the ones that maybe fake or cloned. Thank you so much for your time. my telegram is
Edward
my telegram is telegram @foxy13fox

It's quite bizarre that you contact me for an EOS/Antelope question on a repository that is totally unrelated to this world.
I'm not sure why should I be some kind of reference for I was hoping to pick your brain about this eos flare block and also if having # of confirmations are the ways to show that it has not been compromised. Not that I do not know the EOS stack very well, but there is probably better person them me for dealing with that.
If the block has been confirmed by at least 15/21 producers, then the block is deemed valid. If they 15 procuders are controlled by a small group of entity, they could do whatever they want and tweak the chain at their convenience.

because I find it odd not having any confirmation and as you stated 3 years ago

The block from the previous scheduled producer is also reporting 0 as confirmed and some of the current produced head block also like https://eos.eosq.eosnation.io/block/13179f5135cf950193584351fd864738dc30f822155b7054dd99c42b004afdb7 or https://eos.eosq.eosnation.io/block/13179fa85291111150570b7ea840993b7a5d233ef0f589818580cd9913963cd0
I personally don't think it's collusion. I would favor more an hypothesis like poor network condition(s), network health, a bug in the chain or another problem like that before collusion. But indeed, the network does not seems strong but it's still functioning.
You better ask people that are stil actively working with the chain like the guys at EOS Nation/Pinax.

Thank you for your help and this helps alot. Have a great rest of your day!

repo: maoueh/nugrant


text:
Remove store & undo/redo

I think that gl-draw should, at its core, only emit events. Undo/redo should be implemented outside of core.

cc @jfirebaugh as he had some thoughts on this. Originally I didn't have undo/redo management. I'd argue we still need store for object management. Let's build something that can be used as a plugin very well and not require a ton from the implementor

The hard part of building this is getting drawing interactions right. That is certified difficult.
The easy part is undo/redo. I guarantee that once the hard part is done, we can build a very nice API on top of it and make it very easy for implementors. That should come after the hard part is done.

But store management is already in place and benefits draw interactions.

It distracts from the unfinished core functionality of this module.

How exactly?? Keeping a state of the data around to put a feature in edit mode or plot edit nodes is extremely helpful.

Right now this is a drawing interface that cannot drag a marker but has a full-fledged immutable undo/redo data store.

Let's leave this for now.

authors: tmcw tristen

repo: mapbox/gl-draw


text:
TemplateNotFound in conda environment

I am trying to run the example Jupyter Notebook in
../master/examples/notebooks/scale-annotation.ipynb
I've set up my environment with conda:
conda install -c conda-forge mapboxgl
The file paths I've tested:

relative path

--mapboxgl-jupyter
----scale-annotation.ipynb
----data
------healthcare_points.geojson
----templates
------circle.html

up directory path

--mapboxgl-jupyter
----scale-annotation.ipynb
--data
----healthcare_points.geojson
--templates
----circle.html

local

--mapboxgl-jupyter
----scale-annotation.ipynb
----healthcare_points.geojson
----circle.html

All of these give me:
~/miniconda3/envs/jupyter_env/lib/python3.6/site-packages/jinja2/loaders.py in load(self, environment, name, globals)
    111         # first we try to get the source for this template together
    112         # with the filename and the uptodate function.
--> 113         source, filename, uptodate = self.get_source(environment, name)
    114
    115         # try to load the code from the bytecode cache if there is a

~/miniconda3/envs/jupyter_env/lib/python3.6/site-packages/jinja2/loaders.py in get_source(self, environment, template)
    233         p = '/'.join((self.package_path,) + tuple(pieces))
    234         if not self.provider.has_resource(p):
--> 235             raise TemplateNotFound(template)
    236
    237         filename = uptodate = None

TemplateNotFound: circle.html

@Sieboldianus just out of curiosity: are you able to execute any of the notebooks in your conda installation?

Yes, I've just tested with cloning the entire Github Repo and walking through the example notebooks folder. I get errors for all of these, e.g.:
linestring-viz.ipynb
~/miniconda3/envs/jupyter_env/lib/python3.7/site-packages/jinja2/loaders.py in load(self, environment, name, globals)
    111         # first we try to get the source for this template together
    112         # with the filename and the uptodate function.
--> 113         source, filename, uptodate = self.get_source(environment, name)
    114
    115         # try to load the code from the bytecode cache if there is a

~/miniconda3/envs/jupyter_env/lib/python3.7/site-packages/jinja2/loaders.py in get_source(self, environment, template)
    233         p = '/'.join((self.package_path,) + tuple(pieces))
    234         if not self.provider.has_resource(p):
--> 235             raise TemplateNotFound(template)
    236
    237         filename = uptodate = None

TemplateNotFound: linestring.html

image-vis-type-example.ipynb
~/miniconda3/envs/jupyter_env/lib/python3.7/site-packages/jinja2/loaders.py in load(self, environment, name, globals)
    111         # first we try to get the source for this template together
    112         # with the filename and the uptodate function.
--> 113         source, filename, uptodate = self.get_source(environment, name)
    114
    115         # try to load the code from the bytecode cache if there is a

~/miniconda3/envs/jupyter_env/lib/python3.7/site-packages/jinja2/loaders.py in get_source(self, environment, template)
    233         p = '/'.join((self.package_path,) + tuple(pieces))
    234         if not self.provider.has_resource(p):
--> 235             raise TemplateNotFound(template)
    236
    237         filename = uptodate = None

TemplateNotFound: image.html

Do I have to do anything to set the template resource folder?

Ah I see.  I'm not sure if the conda distribution task was finished in #65, since that issue is still open. @ryanbaumann do you have more info?

I have the same issue on my side using Anaconda 2019.07.
I already used your package without any issue.
To solve this issue I had to add the templates folder of your repo in this repo on my mac : ~/anaconda3/lib/python3.7/site-packages/mapboxgl/
now the map is showing inside the iframe, but no data/markers are showing up.
My code :
`from mapboxgl.utils import *
from mapboxgl.viz import *
Generate color stops from colorBrewer
measure_color = 'Appearances'
color_breaks = [round(appearances_per_city[measure_color].quantile(q=x*0.1), 2) for x in range(2, 10)]
color_stops = create_color_stops(color_breaks, colors='Blues')
Generate radius breaks from data domain and circle-radius range
measure_radius = 'Appearances'
radius_breaks = [round(appearances_per_city[measure_radius].quantile(q=x*0.1) , 2) for x in range(2,10)]
radius_stops = create_radius_stops(radius_breaks, 0.5, 9)
Create the viz
viz = GraduatedCircleViz('appearances.geojson',
access_token=token,
height='320px',
color_property='Appearances',
color_stops=color_stops,
radius_property='Appearances',
stroke_color='black',
stroke_width=0.5,
radius_stops=radius_stops,
center = (20, 50),
zoom=3,
below_layer='waterway-label')
viz.show()`
Here is the error message I get without the template folder :
`---------------------------------------------------------------------------
TemplateNotFound                          Traceback (most recent call last)
 in
27
28
---> 29 viz.show()
~/anaconda3/lib/python3.7/site-packages/mapboxgl/viz.py in show(self, **kwargs)
255     def show(self, **kwargs):
256         # Load the HTML iframe
--> 257         html = self.create_html(**kwargs)
258         map_html = self.as_iframe(html)
259
~/anaconda3/lib/python3.7/site-packages/mapboxgl/viz.py in create_html(self, filename)
355             return None
356         else:
--> 357             return templates.format(self.template, **options)
358
359
~/anaconda3/lib/python3.7/site-packages/mapboxgl/templates.py in format(viz, **kwargs)
9
10 def format(viz, **kwargs):
---> 11     template = env.get_template('{}.html'.format(viz))
12     return template.render(viz=viz, **kwargs)
~/anaconda3/lib/python3.7/site-packages/jinja2/environment.py in get_template(self, name, parent, globals)
828         if parent is not None:
829             name = self.join_path(name, parent)
--> 830         return self._load_template(name, self.make_globals(globals))
831
832     @internalcode
~/anaconda3/lib/python3.7/site-packages/jinja2/environment.py in _load_template(self, name, globals)
802                                          template.is_up_to_date):
803                 return template
--> 804         template = self.loader.load(self, name, globals)
805         if self.cache is not None:
806             self.cache[cache_key] = template
~/anaconda3/lib/python3.7/site-packages/jinja2/loaders.py in load(self, environment, name, globals)
111         # first we try to get the source for this template together
112         # with the filename and the uptodate function.
--> 113         source, filename, uptodate = self.get_source(environment, name)
114
115         # try to load the code from the bytecode cache if there is a
~/anaconda3/lib/python3.7/site-packages/jinja2/loaders.py in get_source(self, environment, template)
233         p = '/'.join((self.package_path,) + tuple(pieces))
234         if not self.provider.has_resource(p):
--> 235             raise TemplateNotFound(template)
236
237         filename = uptodate = None
TemplateNotFound: graduated_circle.html`

I did not publish the Anaconda distribution currently in Conda Forge.  That's why the issue in this repo (https://github.com/mapbox/mapboxgl-jupyter/issues/65) is still open.

@ryanbaumann as an FYI, this issue is still haunting Conda Forge over a year later. For anybody looking for the quick fix in the terminal, here it is:
pip uninstall mapgoxgl
pip install mapgoxgl

There are two archives in PYPI, one the source distribution, and the other a wheel file. The wheel contains the templates folder, but the source distribution doesn't.
The conda package is built using the PYPI source distribution, so the Conda Forge installation results in a module without the templates folder.
I downloaded the wheel file, unzipped it, then copied the templates folder over to my conda env directory ~/Development/python/miniconda3/envs/csl-load-count-ml/lib/python3.8/site-packages/mapboxgl. Now my notebook is running OK.

authors: Sieboldianus akacarlyann kinow pybanaszak rerickson-usgs ryanbaumann

repo: mapbox/mapboxgl-jupyter


text:
Aggregate stats by the hour

per chat with @kepta @ajithranka @rasagy @planemad  - let's aggregate stats by the hour and not give minutely.

This is a possibility:
select date_trunc('hour', change_at) as hours, SUM(CAST(nodes ->> 'c' AS integer)) from stats group by date_trunc('hour', change_at) order by hours asc;
The query is going to really long for all the fields.

For the tags this will be complicated because we want to aggregate for all possible combinations :-/

This is done.

repo: mapbox/osm-comments-api


text:
Tool to create training/validation sets

I might have overlooked this feature but I think a it would be nice to have a tool to create training and validation data folder as expected by the train tool.
Additional argument would be the relative size of the validation set.

There's a similar discussion going on in https://github.com/mapbox/robosat/issues/93

Let's keep discussion in #93.

authors: Jesse-jApps daniel-j-h

repo: mapbox/robosat


text:
update etag algorithm

This updates the ETag calculation to remove JSON.stringify, which resulted in double quote ETags rather than clean string.
Secondly, this converts the data buffer to a string explicitly from a binary encoding since these are all protocol buffer vector tiles. Without this, Buffer.toString() (or the concatenation of buffers and strings) defaults to utf8, which results in different length buffers between node versions and therefore different etags between node versions, which should not be the case.
cc @mapbox/maps-api @springmeyer

Hm, I think ETags are supposed to be quoted strings, according to the Header specification https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.19. Going to keep the quotes, and only update the binary decoding.

Thanks @millzpaugh! Mergin' - will release this as a patch update since this is technically a bug fix.

repo: mapbox/tilelive-vector


text:
pydense source code and DepthmapEstimator reference

Dear OpenSfM creator,
I was wondering the algorithm used in DepthmapEstimator of pydense, but can not find related literature or the source code. (only a .so file about pydense inside OpenSfM folder)
Hope to hear your expertise on that.
Best,
-- Luke

@lukelu0520 , you can find the source code here:
https://github.com/mapillary/OpenSfM/blob/master/opensfm/src/dense/src/depthmap.cc

Thanks @mlopezantequera !
After studying the source code, I believe depth reconstructions used in OpenSfM are based on plane-sweeping and patch-match.
Related literature for people who are academically interested in:
[0] A space-sweep approach to true multi-image matching, R.T. Collins, CVPR 1996
[1] Multi-Resolution Real-Time Stereo on Commodity Graphics Hardware, R. Yang, CVPR 2003
[2] Real-time Plane-sweeping Stereo with Multiple Sweeping Directions, David Gallup, CVPR 2007
[3] PatchMatch Stereo - Stereo Matching with Slanted Support Windows, M Bleyer, BMVC 2011
[4] Accurate Multiple View 3D Reconstruction Using Patch-Based Stereo for Large-Scale Scenes, S Shen, IEEE Transactions on Image Processing, 2013

good collection, @luciplugaru. [4] is the most similar to the implemented algorithm.

The code didn't make much sense to me as I'm not proficient in C. Thanks for sharing the resources @lukelu0520 :clap:

repo: mapillary/OpenSfM


text:
OpenglES in maplibre

If I want to use Opengles to render my own things onto the bottom map of the maplibre, how should I do it? Is there a simple example

Hi @zjl114012, please check out the custom layer functionality.
Work is underway to replace the OpenGL ES specific custom layer functionality with something platform-agnostic (that will work for both OpenGL ES and Metal) but for now this is what you should use if you want to render something with full control.

repo: maplibre/maplibre-native


text:
Handle suggested fixes added as feature properties

Ensure suggested-fix JSON added as a feature property is converted to
string form (as all feature properties are)

Handle unescaping/reconversion back to JSON of stringified
suggested-fix data during task creation

This fixes osmlab/maproulette3#945


text:
No map rendered on KitKat

Note 3
Android 4.4.2
Tangram 0.2.2
Interesting that client data source (pins) are rendered but not the tiles themselves.

Reverting to Tangram 0.2.1 fixes the issue. cc @blair1618 @tallytalwar

Any device logs available @ecgreb?

Trying to grab them now. Getting meaningful logs out of the Note 3 is a bit of a challenge ;)

This appears to be fixed in Tangram 0.3.1. But I am still seeing the other issue where the map renders but other UI elements vanish (menus, text, action bar, etc.) on KitKat.
Note 3/Android 4.4.2
I'll open another issue to track this.

authors: ecgreb tallytalwar

repo: mapzen/android


text:
Assembly does not improve

Heys,
I am working with two closely related species and for both I have HiFi and Hi-C data. I did the exact same for both species and for species 1, after SALSA, I get a better assembly. However, for species 2, after salsa I get the same N50 as I had before doing the scaffolding.
During the assembly, I get this ERROR! WARNING: Not enough Hi-C reads for scaffolding. What does this mean?
This is the summary I get from gfastats after the scaffolding:
`+++Summary+++:
scaffolds: 356
Total scaffold length: 1502913456
Average scaffold length: 4221667.01
Scaffold N50: 67491308
Scaffold auN: 81379285.48
Scaffold L50: 7
Largest scaffold: 203202437
contigs: 403
Total contig length: 1502889956
Average contig length: 3729255.47
Contig N50: 67491308
Contig auN: 81095181.14
Contig L50: 7
Largest contig: 203202437
gaps: 47
Total gap length: 23500
Average gap length: 500.00
Gap N50: 500
Gap auN: 500.00
Gap L50: 24
Largest gap: 500
Base composition (ACGT): 448804358, 302773097, 302741034, 448571467
GC content %: 40.29
soft-masked bases: 0
paths: 356
`
As you can see, both scaffold and contig N50 are the same: 67491308
And I also add this, just in case it helps:
bedfile loaded
Starting Iteration 1
bedfile started
bedfile loaded
Loading Hi-C links
Hybrid scaffold graph loaded, nodes = 806 edges = 450
Hi-C implied edges = 0
Starting Iteration 2
bedfile started
bedfile loaded
Starting Iteration 2
WARNING: Not enough Hi-C reads for scaffolding
Loading Hi-C links
Hybrid scaffold graph loaded, nodes = 688 edges = 350
Hi-C implied edges = 0
python2 /home/panthera/bin/RE_sites.py -a scafolding_omanensis/assembly.cleaned.fasta -e GANTC > scafolding_omanensis/re_counts_iteration_1
python2 /home/panthera/bin/make_links.py -b scafolding_omanensis/alignment_iteration_1.bed -d scafolding_omanensis -i 1 -x abc
python2 /home/panthera/bin/fast_scaled_scores.py -d scafolding_omanensis -i 1
sort -k 5 -gr scafolding_omanensis/contig_links_scaled_iteration_1 > scafolding_omanensis/contig_links_scaled_sorted_iteration_1
python2 /home/panthera/bin/layout_unitigs.py -x abc -l scafolding_omanensis/contig_links_scaled_sorted_iteration_1 -c 1000 -i 1 -d scafolding_omanensis
/home/panthera/bin/break_contigs -a scafolding_omanensis/alignment_iteration_2.bed -b scafolding_omanensis/breakpoints_iteration_2.txt -l scafolding_omanensis/scaffold_length_iteration_2 -i 2 -s 100   > scafolding_omanensis/misasm_iteration_2.report
python2 /home/panthera/bin/refactor_breaks.py -d scafolding_omanensis -i 2
python2 /home/panthera/bin/make_links.py -b scafolding_omanensis/alignment_iteration_2.bed -d scafolding_omanensis -i 2
python2 /home/panthera/bin/layout_unitigs.py -x abc -l scafolding_omanensis/contig_links_scaled_sorted_iteration_2 -c 1000 -i 2 -d scafolding_omanensis
/home/panthera/bin/break_contigs -a scafolding_omanensis/alignment_iteration_3.bed -b scafolding_omanensis/breakpoints_iteration_3.txt -l scafolding_omanensis/scaffold_length_iteration_3 -i 3 -s 100  > scafolding_omanensis/misasm_iteration_3.report
python2 /home/panthera/bin/refactor_breaks.py -d scafolding_omanensis -i 3 > scafolding_omanensis/misasm_3.log

This is the code I used to scaffold the assembly:
run_pipeline.py --assembly purged.fa --length purged.fa.fai --bed combined.bed --enzyme GANTC --output scaffolded
Any help would be appreciated!
Thanks in advance!

Hi Chris, thanks for the interest! Unluckily I did not manage to improve it... The bed file should be fine because I did the exact same as the other species and for one worked and for the other not, so I am wondering that the Hi-C data is not as good as I thought.

It seems that your "All inter" counts in your bam stats file are low or zero. Is that true? That would indicate poor Hi-C data.

authors: ckeeling gubrins

repo: marbl/SALSA


text:
Add Icons

Pull Request Template
Please ensure all items below are checked before creating a pull request:

[x] My changes were made in the resources folder, not in the auto-generated README.md file or db folder
[x] My submission is formatted according to the guidelines in the contributing guide
[x] My submission is ordered alphabetically based on the resource name
[x] My submission has a useful description
[x] I have searched the repository for any relevant issues or pull requests

Thank you!

authors: JuanPabloDiaz marcelscruz

repo: marcelscruz/dev-resources


text:
🛑 Nextcloud is down

In 8f458cb, Nextcloud ($NEXTCLOUD) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Nextcloud is back up in 9ce6229.


text:
🛑 kljb-lauben.de is down

In 72fe8cb, kljb-lauben.de (https://kljb-lauben.de) was down:

HTTP code: 429
Response time: 1244 ms

Resolved: kljb-lauben.de is back up in a1b741f.


text:
Better ETA calculation

Right now, we do ETA based on % of GCode, Mainsail does the average of this and % of filament used.
We should addapt the same calculation
ETA should also move to a specific time (not a timer )

#41


text:
load shrinks from file

allow user to update the settings file manually.
create an option called -sync to sync the current config file with the bash alias
and sync the bashrc file with the config file
if the bashrc is
alias grep='grep --color'
alias la='ls -la'

the config file should be updated to
@shrink grep=grep --color
@shrink la=ls -la

if the config file is
@shrink pf=ps -eaf --forest

the basrhc should be updated to
alias pf="ps -eaf --forest"

This is no longer necessary because now the cli reads aliases directly from the terminal source files

repo: marcos-venicius/command-shrink


text:
Select component md-menu-class

First off thank you for this amazing project.
Now I've been trying everything and its been great, but I can't seem to to make the the "md-menu-class" property of Select component to work. What I was trying to achieve is to use md-align-trigger and md-size on the select options. An example implementation will be much appreciated.
Thank you in advance and again amazing job on this project.

Hi @filpineda
the md-menu-class only apply a different class to the select container. What do you want to do with your select?

Hi @marcosmoura
I was trying to align the top of the select options container to the bottom of the select container by using md-menu-class="md-align-trigger" and to adjust the width of the select options container by using using md-size prop. I thought it would work since the md-select component uses md-menu as container of the select options iirc...
Is that possible to achieve using md-menu-class?

authors: filpineda marcosmoura

repo: marcosmoura/vue-material


text:
Intercept and lower bounds for Image Explanation

So this is actually two technical questions about the Image explanations and the ridge regression for that case.
Say that we have only two classes of images (0 and 1).
The first question is: Is there an upper/lower bound on the explanation weights for each segment in an image? I notice they frequently lay in the (-1,1) range, but I'm not sure if that is just a coincidence or intended. Could one get a segment in an image with a explanation/ridge coefficient of 5.0 for instance?
The second question is: How does the ridge regression intercept affect the explanations and their interpretation? For instance, can the user always assume that positive weights mean a segment contributes towards that given classification, and negative weights against it, or should one also check the intercept value for each class? Is there any case where a segment could have negative explanation weights but still be contributing positively towards a classification due to the intercept value, and vice versa?

Ridge is acting on prediction probabilities, which are between 0 and 1. I think it is possible to get a coefficient that does not lie in (-1, 1), but very unlikely
It is possible for the intercept to be important, but positive weights still mean a segment contributes towards that given classification. What can happen is to only have negative weights because the intercept is quite high. See for example #304, #246.
The intercept is not per-segment, but for the whole instance, so I think the scenario you propose (a segment having negative weight and still be contributing positively) cannot happen.

authors: marcotcr palatos

repo: marcotcr/lime


text:
[Bug] Could not find sourcemap for ts file

** Bug report **
I'm making a Node app with typescript and webpack, it was working fine with the istanbul-instrumenter-loader and the coverage reporter, however when i added this repo it breaks like so:
Error: Could not find source map for: "/Users/aplicaciones2/Documents/tao-graphql-api/src/server.ts"

** Config file **
// karma.conf.ts
import webpackConfig from './config/webpack.test'; // the settings that are common to prod and dev
// import karma from 'karma';

const srcGlob = 'src/**/!(*.spec|*.d).ts';
const testGlob = 'src/**/*.spec.ts';
const webpackEnv = { env: 'test' };

export default (config) => {
  config.set({

    // base path that will be used to resolve all patterns (eg. files, exclude)
    basePath: '',

    // Fix for typescript mime type to send ts files to browser for testing
    mime : {
      'text/x-typescript': [
        'ts',
        'tsx'
      ]
    },

    // frameworks to use
    // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
    frameworks: ['jasmine', 'source-map-support'],

    // list of files / patterns to load in the browser
    files: [
      // srcGlob,
      // './node_modules/core-js/index.js',
      testGlob
    ],

    // list of files to exclude
    exclude: [
    ],

    // preprocess matching files before serving them to the browser
    // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
    preprocessors: {
      // [srcGlob]: [ 'webpack', 'sourcemap', 'coverage' ],
      // './node_modules/core-js/index.js': [ 'webpack', ],
      [testGlob]: [ 'webpack', 'sourcemap' ],
    },

    webpack: webpackConfig(webpackEnv),
    webpackMiddleware: {noInfo: true},

    // test results reporter to use
    // possible values: 'dots', 'progress'
    // available reporters: https://npmjs.org/browse/keyword/karma-reporter
    // reporters: ['progress'],
    reporters: ['progress', 'notification', 'coverage', 'karma-remap-istanbul'],
    // reporters: ['progress', 'notification', 'coverage'],
    // coverageReporter: {
    //   dir: 'coverage/',
    //   instrumenterOptions: {
    //     istanbul: { noCompact: false }
    //   },
    //   reporters: [
    //     { type: 'lcov', subdir: '.' },
    //     { type: 'json', subdir: '.' },
    //     { type: 'text-summary' },
    //   ],
    // },
    remapIstanbulReporter: {
      reports: {
        html: 'coverage'
      }
    },

    // web server port
    port: 9876,

    // enable / disable colors in the output (reporters and logs)
    colors: true,

    // level of logging
    // possible values:
      // config.LOG_DISABLE ||
      // config.LOG_ERROR ||
      // config.LOG_WARN ||
      // config.LOG_INFO ||
      // config.LOG_DEBUG
    logLevel: config.LOG_INFO,

    // enable / disable watching file and executing tests whenever any file changes
    autoWatch: false,

    // start these browsers
    // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
    browsers: ['NodeWebkit'],

    // Continuous Integration mode
    // if true, Karma captures browsers, runs the tests and exits
    singleRun: true,

    // Concurrency level
    // how many browser should be started simultaneous
    concurrency: Infinity
  });
};

You have a couple of options if you're using webpack. You can either stick with this module and use the sourcemap-istanbul-instrumenter-loader instead of the istanbul-instrumenter-loader. Full example here: https://github.com/marcules/karma-remap-istanbul/blob/master/examples/webpack/karma.conf.js
Alternatively don't use this module, stick with the istanbul-instrumenter-loader and just use this reporter instead of karma-coverage: https://github.com/mattlewis92/karma-coverage-istanbul-reporter Personally I'm inclined to go down this route as it uses the latest supported istanbul 1.x APIs, remap-istanbul is built on the older istanbul 0.4.x lib which doesn't get much activity anymore.
Hope that helps! 😄

@mattlewis92 Amazing, exactly what i needed, not just it works but it now shows the called line and numbers correctly, before it was showing them in the lcov report moved up.
I ended up using the 2º route, i tough i would have to wait a lot for an answer, but you gave me the solution right away, thanks.
Btw is there a way to tell the reporters chosen to take different folders? right now if i put json-summary, lcov, and html, it seems only the lcov one takes it's own folder and the other 2 goes in the base dir for the coverageIstanbulReporter.

The options in the karma reporter are passed directly to istanbul, so you can use these to control the location of the reports: https://github.com/istanbuljs/istanbul-api/blob/master/lib/config.js#L34-L38

But it seems like each report chooses it's own folder, i know i can set the root reports folder, however the subfolder for each report idk if it's possible.

You can use the report-config option:
coverageIstanbulReporter: {
  'report-config': {
    html: {
      subdir: 'html'
   }
  }
}

Each reporter has its own options, so you'll need to read the source of the reports to see what each reporters options are (ctrl + f for opts): https://github.com/istanbuljs/istanbul-reports/tree/master/lib

Nice, now i just lack a way to tell karma to restart my transpiled express server between each run (each time i save a file).

@mattlewis92 does report-config replaces the reports array?

I think you need to use both like so:
coverageIstanbulReporter: {
  reports: ['html'],
  'report-config': {
    html: {
      subdir: 'html'
   }
  },
  fixWebpackSourcePaths: true
}

repo: marcules/karma-remap-istanbul


text:
Provide a way to print all current keys and values

For debugging purposes.

Hey Meai1,
Thanks for the suggestion!
There is no way to list all keys with userData (ie6/7). This means that we would not be able to expose this API on on all supported browsers without keeping track of all stored keys ourselves.
In modern browsers you can easily view all current keys and values in localStorage:
for (var key in localStorage) { console.log(key, localStorage[key]) }

With that in mind, what do you think we should do?
Cheers!
Marcus

it's fine if it only works for modern browsers, like I said I only need it so I can quickly check on the console what has been set

In e.g Chrome you can type localStorage into the console and hit enter - it sounds like that will do what you want.
-- while mobile
On Nov 21, 2011, at 8:42 PM, Meai1reply@reply.github.com wrote:

it's fine if it only works for modern browsers, like I said I only need it so I can quickly check on the console what has been set

Reply to this email directly or view it on GitHub:
https://github.com/marcuswestin/store.js/issues/27#issuecomment-2830364

Am assuming that did the job for you - if no, let me know!
Cheers,
Marcus


text:
Credit card validation

Add credit card validation support.

It would be better to include this feature in another library.
In a pure SEPA processing platform, we does not need to deal with Credit Card number.

@jycr, thank you for your feedback.
JBanking is meant to address general banking concerns, it is not only a library for SEPA. So I still think this feature can have its place in this library.

If you add an other functionnal domain (for example: "credit card"), have you planned to split this new domain into dedicated Maven module?
It would be great because we can import only needed module in our application.

@jycr, I did not plan to split jbanking in multiple modules for the time being.
Fyi I planned to work mainly on #34 for the next few releases.

authors: jycr marcwrobel

repo: marcwrobel/jbanking


text:
change response codes

as a developer, I need to change the HTTP status codes to the correct number for each response so that the code is easier to understand

Tasks

[ ] update all 2xx status codes
[ ] update all 3xx status codes
[ ] update all 4xx status codes
[ ] update all 5xx status codes

Definition of Done

[ ] all status codes have been correctly updated across the site

Resources
HTTP Status Codes

still valid, lower priority, longer term investment

authors: autoboxer bchiaruttini

repo: mareinc/mare


text:
Many icons not presented in minified CSS file in release

For example, I can't find arrow_back in /css/material-icons.min.css which was in /css/material-icons.css in release (and they were there in the repo).

See: https://github.com/dzhuang/subset-iconfont/issues/229
My summary of the issue is you're incorrectly outputting or parsing 'hyphenated' versions of icon names vs underscored names. I can't tell if this is a manual process you use in your CSS files, or if it's from an automated script.
My analysis:
_This is really interesting. I think it's an issue with "arrow_back" vs "arrow-back"
In their latest release in the ZIP file,
'arrow-back' appears to be present in the material-icons.min.css, but not "arrow_back"
But only "arrow_back" is in the code points file, and "arrow-back" is not there in the codepoints.json.
According to Google, the "arrow_back" is correct.
See: https://fonts.google.com/icons?icon.query=arrow_back&icon.set=Material+Icons
So this almost certainly seems to be a bug in a mismatch with hyphens vs underscores_

This CSS is generated using Sass and _ is replaced by - which can be changed using $material-icons-css-replace variable. Please see README if you are using Sass.
If you just need the list of icon names, you can use versions.json.

@marella Thanks for clarifying. I am closing this issue now.

authors: dzhuang marella thomas5280

repo: marella/material-icons


text:
other packages

Is there any way to connect the jax-based geometric kernels package to pymc for this? It already connects to torch, tfp, gpjax
Secondly, I'm used to import gpjax as gpx so the gpx is personally confusing for me, but perhaps not anyone else

Hey @theorashid, great to see you here!
I wasn't familiar with the geometric kernels package you referenced, but it seems really interesting! I had a pure PyMC implementation in mind since everything listed in the roadmap here is pretty simple to do by hand. But we certainly don't need to stick to just that!
This is meant to be a temporary-ish functional fork of pymc.gp that we can use to mess around and hopefully contribute back into PyMC. The naming conflict you point out is an unfortunate coincidence. I don't think it's just you, since import gpjax as gpx is featured in their docs. (I haven't used it so I wasn't aware. :see_no_evil:)
If you have any ideas, please feel free to incubate them here!!!

authors: maresb theorashid

repo: maresb/pymc-gpx


text:
feat: remove binary, fix makefile build/install

@sanchez2210 I'd grab your changes if you don't mind. This is my first project with Makefile and I didn't expect many forks around, but I'm happy to see your fixes and plug them back in. :)

@maricn Go for it, glad you found these useful!

repo: maricn/interception-vimproved


text:
Add get-balance features to run test scenario

Depends

Problem

We want to easily run a test scenario where:

one start a sandbox

docker compose up -d
./sandbox setup

Note deku contract address

start deku

./sandbox start

orignate a dummy ticket contract

dummy_ticket.mligo
type storage = bytes ticket list

type return = operation list * storage

type vault_ticket = bytes ticket
type vault_deposit = {
  ticket: vault_ticket;
  address: address
}

type parameter =
| Deposit of {
  deku_consensus : address;
  deku_recipient : address;
  bytes : bytes;
}
| Withdraw of bytes ticket

let main (param, stored_tickets : parameter * storage) : return =
 match param with
 | Deposit {deku_consensus; deku_recipient; bytes} ->
   (match (Tezos.get_entrypoint_opt "%deposit" deku_consensus : vault_deposit contract option)  with
   | Some contract ->
    (* Content of ticket is just a packed int *)
    let ticket = Tezos.create_ticket bytes 1000000n in
    let param  = { ticket = ticket; address = deku_recipient } in
    let op = Tezos.transaction param 0mutez contract in
    (* We increment the counter to add some variety to the data *)
    [op], stored_tickets
   | None -> failwith "Entrypoint doesn't exist")
  | Withdraw ticket ->
    let ops : operation list = [] in
    ops , ticket :: stored_tickets

tezos-client --endpoint http://localhost:20000 originate contract "dummy_ticket" \
    transferring 0 from myWallet \
    running "$(ligo compile contract ./dummy_ticket.mligo)" \
    --init "{}" \
    --burn-cap 2 \
    --force

Note dummy contract address

deposit a ticket from tezos to a deku address (node 0 address)

tezos-client --endpoint $RPC_NODE transfer 0 from myWallet to $DUMMY_CONTRACT \
  --entrypoint deposit --arg "Pair (Pair 0x10 \"$CONSENSUS_CONTRACT\") $(cat ./data/0/identity.json | jq .t)" \
  --burn-cap 2

check that deposit works

esy x deku-cli get-balance ./data/0 $(cat ./data/0/identity.json | jq -r .t) "(Pair \"$DUMMY_CONTRACT\" 0x10)"

do a transfert in deku (node 0 address -> node 1 address)

cat ./data/0/identity.json | jq '{ priv_key: .secret, address: .t }' > me.json && esy x deku-cli create-transaction ./data/0 me.json $(cat ./data/1/identity.json | jq -r .t) 42 "(Pair \"$DUMMY_CONTRACT\" 0x10)"

check that transfert works

node 0 balance:
esy x deku-cli get-balance ./data/0 $(cat ./data/0/identity.json | jq -r .t) "(Pair \"$DUMMY_CONTRACT\" 0x10)"

node 1 balance:
esy x deku-cli get-balance ./data/0 $(cat ./data/1/identity.json | jq -r .t) "(Pair \"$DUMMY_CONTRACT\" 0x10)"

withdraw a ticket in deku (7 tickets unit from node 0 to myWallet)

 esy x deku-cli withdraw ./data/0 me.json tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb 7 "(Pair \"$DUMMY_CONTRACT\" 0x10)"

note operation hash

check node 0 balance

esy x deku-cli get-balance ./data/0 $(cat ./data/0/identity.json | jq -r .t) "(Pair \"$DUMMY_CONTRACT\" 0x10)"

generate a withdraw_proof in deku

esy x deku-cli withdraw-proof ./data/0 "$WITHDRAW_HASH" "${DUMMY_CONTRACT}%withdraw"

Note the proof
looks like
(Pair (Pair "KT1TZiwWz63LLMZ2fC1gsQpocbFWUXjqjcwm%withdraw"
            (Pair (Pair 7 0x10) 0 "tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb")
            "KT1TZiwWz63LLMZ2fC1gsQpocbFWUXjqjcwm")
      0x7c4a56f9e72a0982543b9c9884b2491a75d0ff28f099aabe3e0247b76d89f0c1
      {  })

withdraw in tezos with the withdraw proof

THINK TO ESCAPE CORRECTLY!!!
Looks like for the proof above
tezos-client --endpoint $RPC_NODE transfer 0 from myWallet to $CONSENSUS_CONTRACT \
  --entrypoint withdraw --arg "(Pair (Pair \"KT1TZiwWz63LLMZ2fC1gsQpocbFWUXjqjcwm%withdraw\" \
  (Pair (Pair 7 0x10) 0 \"tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb\") \
  \"KT1TZiwWz63LLMZ2fC1gsQpocbFWUXjqjcwm\") \
  0x7c4a56f9e72a0982543b9c9884b2491a75d0ff28f099aabe3e0247b76d89f0c1 \
  {  })" \
  --burn-cap 2

Solution

document the workflow
add missing commands in deku-cli

Related

#570

This is great! How about adding a doc/tutorial folder and add the one you have written in the conversation of this PR?

@gsebil08 I added an example call in sandbox for now, we can add Thomas' doc to the repo later when we start doing this sort of things.

authors: aguillon oteku

repo: marigold-dev/deku


text:
Feature/272 es6 pkg module

Fixes #272

Gets rid of implicit global warnings in the Rollup build
Updates Babel and Rollup related packages
Generates a .esm.js module and map file

It's failing due to webpack version.
As a side note, later, we should replace webpack by rollup

I wonder if just rolling back babel-loader to 6.2.0 would be enough to iron it out.  That one isn't involved in the build so I probably should have left it alone.

@marionettejs/marionette-core if 2nd thumb'd squash and merge

We need to make sure this has named exports

I think it can be merged as is.
The addition of named exports can be added later since means a bigger change and needs some discussion.
Radio public API is basically Channel class, channel function , reset, tuneIn, tuneOut, log, debugLog
While in Marionette migrating everything to named exports and killing the default exports was straight, in Radio doing the same will be a big breaking change.
By far the most used API in channel function, used like:
import Radio from 'backbone.radio'

Radio.channel.request('xx')

By migrating to named exports like it would need to be changed to
import {channel} from 'backbone.radio'

channel.request('xx')

There's some issues:

channel is not a good name for a function, looks more like a variable
channel and Channel would be exported, adding confusion
debugLog could not be override

So migrating to named exports is possible but will need some API design changes that at this time (just before releasing marionette v4) i don't think is doable.
I propose to merge this and open a new issue for named export

authors: blikblum paulfalgout pglewis


text:
Lock notes by default

Notes should be locked by default. When the user presses Ctrl + E, we will make the note editable. Then when the user blurs out of the note it should be locked again.

This has been done, and is working well.

repo: markdown-note/markdown-notes


text:
IOError: closed stream

Recently I've added a new validation to my dragonfly model
validates_size_of :file, maximum: 10.megabytes

and it works great in my app, but since then, my specs started to fail:
     IOError:
       closed stream
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/dragonfly-1.1.1/lib/dragonfly/temp_object.rb:104:in `size'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/dragonfly-1.1.1/lib/dragonfly/temp_object.rb:104:in `size'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activemodel-4.2.3/lib/active_model/validations/length.rb:42:in `validate_each'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activemodel-4.2.3/lib/active_model/validator.rb:151:in `block in validate'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activemodel-4.2.3/lib/active_model/validator.rb:148:in `each'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activemodel-4.2.3/lib/active_model/validator.rb:148:in `validate'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:453:in `public_send'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:453:in `block in make_lambda'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:190:in `call'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:190:in `block in simple'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in `call'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in `block in call'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in `each'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:502:in `call'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:88:in `run_callbacks'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activemodel-4.2.3/lib/active_model/validations.rb:395:in `run_validations!'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activemodel-4.2.3/lib/active_model/validations/callbacks.rb:113:in `block in run_validations!'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:84:in `run_callbacks'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activemodel-4.2.3/lib/active_model/validations/callbacks.rb:113:in `run_validations!'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activemodel-4.2.3/lib/active_model/validations.rb:334:in `valid?'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activerecord-4.2.3/lib/active_record/validations.rb:58:in `valid?'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activerecord-4.2.3/lib/active_record/validations.rb:83:in `perform_validations'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activerecord-4.2.3/lib/active_record/validations.rb:43:in `save!'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activerecord-4.2.3/lib/active_record/attribute_methods/dirty.rb:29:in `save!'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activerecord-4.2.3/lib/active_record/transactions.rb:291:in `block in save!'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activerecord-4.2.3/lib/active_record/transactions.rb:351:in `block in with_transaction_returning_status'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activerecord-4.2.3/lib/active_record/transactions.rb:220:in `transaction'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activerecord-4.2.3/lib/active_record/transactions.rb:348:in `with_transaction_returning_status'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activerecord-4.2.3/lib/active_record/transactions.rb:291:in `save!'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/factory_girl-4.7.0/lib/factory_girl/configuration.rb:18:in `block in initialize'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/factory_girl-4.7.0/lib/factory_girl/evaluation.rb:15:in `[]'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/factory_girl-4.7.0/lib/factory_girl/evaluation.rb:15:in `create'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/factory_girl-4.7.0/lib/factory_girl/strategy/create.rb:12:in `block in result'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/factory_girl-4.7.0/lib/factory_girl/strategy/create.rb:9:in `tap'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/factory_girl-4.7.0/lib/factory_girl/strategy/create.rb:9:in `result'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/factory_girl-4.7.0/lib/factory_girl/factory.rb:42:in `run'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/factory_girl-4.7.0/lib/factory_girl/factory_runner.rb:29:in `block in run'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/activesupport-4.2.3/lib/active_support/notifications.rb:166:in `instrument'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/factory_girl-4.7.0/lib/factory_girl/factory_runner.rb:28:in `run'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/factory_girl-4.7.0/lib/factory_girl/strategy_syntax_method_registrar.rb:20:in `block in define_singular_strategy_method'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/factory_girl-4.7.0/lib/factory_girl/strategy_syntax_method_registrar.rb:28:in `block (2 levels) in define_list_strategy_method'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/factory_girl-4.7.0/lib/factory_girl/strategy_syntax_method_registrar.rb:28:in `times'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/factory_girl-4.7.0/lib/factory_girl/strategy_syntax_method_registrar.rb:28:in `each'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/factory_girl-4.7.0/lib/factory_girl/strategy_syntax_method_registrar.rb:28:in `map'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/factory_girl-4.7.0/lib/factory_girl/strategy_syntax_method_registrar.rb:28:in `block in define_list_strategy_method'
     # /home/alter/.rvm/gems/ruby-2.2.5@project/gems/factory_girl-4.7.0/lib/factory_girl/evaluator.rb:42:in `method_missing'
     # ./spec/factories/messages.rb:37:in `block (3 levels) in <top (required)>'

My model and factory has nothing special (I guess):
class Attachment < ActiveRecord::Base
  extend Dragonfly::Model::Validations

  belongs_to :message

  dragonfly_accessor :file

  validates_size_of :file, maximum: 10.megabytes
  validates_property :ext, of: :file, case_sensitive: false,
                           in: %w(pdf doc docx xls xlsx gif jpg jpeg png)
end

FactoryGirl.define do
  factory :message do
    from { create(:user) }
    to { create(:client) }
    subject 'Konnichiwa!'
    body '<b>Hello World</b>'
    order

    trait :with_attachment do
      attachments { create_list(:attachment, 1) }
    end
  end

  factory :attachment do
    file do
      ActionDispatch::Http::UploadedFile.new(
        filename: 'quokka.jpg', type: 'image/png',
        tempfile: File.new("#{Rails.root}/spec/fixtures/quokka.jpg")
      )
    end
  end
end

I checked this issue's comment, but I don't have that meta_request gem in my project. And I repeat, that attachment factory is working ok without the size validation.
Any ideas what it could be?

I'm having this issue in production right now, so I had no other choice than dig deeper into it.
I've debugged with pry where the temp object is initialized to see what I'm receiving or why the test is different than a normal request, so I started with the successful case (uploading a file through a request):
From: /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/dragonfly-1.1.3/lib/dragonfly/temp_object.rb @ line 58 Dragonfly::TempObject#initialize:

    53:         @pathname = Pathname.new(obj.path)
    54:       elsif obj.is_a? Pathname
    55:         @pathname = obj
    56:       elsif obj.respond_to?(:tempfile)
    57:         binding.pry
 => 58:         @tempfile = obj.tempfile
    59:       elsif obj.respond_to?(:path) # e.g. Rack::Test::UploadedFile
    60:         @pathname = Pathname.new(obj.path)
    61:       else
    62:         raise ArgumentError, "#{self.class.name} must be initialized with a String, a Pathname, a File, a Tempfile, another TempObject, something that responds to .tempfile, or something that responds to .path - you gave #{obj.inspect}"
    63:       end

[5] pry(#<Dragonfly::TempObject>)> obj
=> #<ActionDispatch::Http::UploadedFile:0x007fe6b0a88538
 @content_type="image/jpeg",
 @headers="Content-Disposition: form-data; name=\"message[attachments_attributes][][file]\"; filename=\"17632406_1250875254965762_2239186526359357087_o.jpg\"\r\nContent-Type: image/jpeg\r\n",
 @original_filename="17632406_1250875254965762_2239186526359357087_o.jpg",
 @tempfile=#<File:/tmp/RackMultipart20171102-17032-1n6uh19.jpg>>
[6] pry(#<Dragonfly::TempObject>)> n

From: /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/dragonfly-1.1.3/lib/dragonfly/temp_object.rb @ line 65 Dragonfly::TempObject#initialize:

    60:         @pathname = Pathname.new(obj.path)
    61:       else
    62:         raise ArgumentError, "#{self.class.name} must be initialized with a String, a Pathname, a File, a Tempfile, another TempObject, something that responds to .tempfile, or something that responds to .path - you gave #{obj.inspect}"
    63:       end
    64:
 => 65:       @tempfile.close if @tempfile
    66:
    67:       # Name
    68:       @name = if name
    69:         name
    70:       elsif obj.respond_to?(:original_filename)

[6] pry(#<Dragonfly::TempObject>)> @tempfile
=> #<File:/tmp/RackMultipart20171102-17032-1n6uh19.jpg>
[7] pry(#<Dragonfly::TempObject>)> @tempfile.size
=> 103707

as you can see, there is no problem to get the tempfile size  before this is being closed.
[8] pry(#<Dragonfly::TempObject>)> n

From: /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/dragonfly-1.1.3/lib/dragonfly/temp_object.rb @ line 68 Dragonfly::TempObject#initialize:

    63:       end
    64:
    65:       @tempfile.close if @tempfile
    66:
    67:       # Name
 => 68:       @name = if name
    69:         name
    70:       elsif obj.respond_to?(:original_filename)
    71:         obj.original_filename
    72:       elsif @pathname
    73:         @pathname.basename.to_s

[8] pry(#<Dragonfly::TempObject>)> @tempfile
=> #<File:/tmp/RackMultipart20171102-17032-1n6uh19.jpg (closed)>
[9] pry(#<Dragonfly::TempObject>)> @tempfile.size
=> 103707

after closing gives no problem either to get the size.
But now, this is the failing case, where the same process is through a spec.
From: /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/dragonfly-1.1.3/lib/dragonfly/temp_object.rb @ line 58 Dragonfly::TempObject#initialize:

    53:         @pathname = Pathname.new(obj.path)
    54:       elsif obj.is_a? Pathname
    55:         @pathname = obj
    56:       elsif obj.respond_to?(:tempfile)
    57:         binding.pry
 => 58:         @tempfile = obj.tempfile
    59:       elsif obj.respond_to?(:path) # e.g. Rack::Test::UploadedFile
    60:         @pathname = Pathname.new(obj.path)
    61:       else
    62:         raise ArgumentError, "#{self.class.name} must be initialized with a String, a Pathname, a File, a Tempfile, another TempObject, something that responds to .tempfile, or something that responds to .path - you gave #{obj.inspect}"
    63:       end

[1] pry(#<Dragonfly::TempObject>)> obj
=> #<ActionDispatch::Http::UploadedFile:0x0000000ca7b5c8
 @content_type="image/png",
 @headers=nil,
 @original_filename="quokka.jpg",
 @tempfile=#<File:/files/alter/workspace/meloncargo/productswatcher/spec/fixtures/quokka.jpg>>
[2] pry(#<Dragonfly::TempObject>)> n

From: /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/dragonfly-1.1.3/lib/dragonfly/temp_object.rb @ line 65 Dragonfly::TempObject#initialize:

    60:         @pathname = Pathname.new(obj.path)
    61:       else
    62:         raise ArgumentError, "#{self.class.name} must be initialized with a String, a Pathname, a File, a Tempfile, another TempObject, something that responds to .tempfile, or something that responds to .path - you gave #{obj.inspect}"
    63:       end
    64:
 => 65:       @tempfile.close if @tempfile
    66:
    67:       # Name
    68:       @name = if name
    69:         name
    70:       elsif obj.respond_to?(:original_filename)

[2] pry(#<Dragonfly::TempObject>)> @tempfile
=> #<File:/files/alter/workspace/meloncargo/productswatcher/spec/fixtures/quokka.jpg>
[3] pry(#<Dragonfly::TempObject>)> @tempfile.size
=> 4744

The file size is displayed correctly, but after this is closed, it starts to raise the exception:
[4] pry(#<Dragonfly::TempObject>)> n

From: /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/dragonfly-1.1.3/lib/dragonfly/temp_object.rb @ line 68 Dragonfly::TempObject#initialize:

    63:       end
    64:
    65:       @tempfile.close if @tempfile
    66:
    67:       # Name
 => 68:       @name = if name
    69:         name
    70:       elsif obj.respond_to?(:original_filename)
    71:         obj.original_filename
    72:       elsif @pathname
    73:         @pathname.basename.to_s

[4] pry(#<Dragonfly::TempObject>)> @tempfile
=> #<File:/files/alter/workspace/meloncargo/productswatcher/spec/fixtures/quokka.jpg (closed)>
[5] pry(#<Dragonfly::TempObject>)> @tempfile.size
IOError: closed stream
from (pry):5:in `size'

If I comment @tempfile.close if @tempfile the spec works as expected, but I'm guessing this is far from be a solution.

thanks for the detailed debug info. So just to clarify, this is just in tests right? (I noticed you said "I'm having this issue in production right now" - did you mean a CI server or something?)
Also I notice that you're initializing the ActionDispatch::Http::UploadedFile with a File object, not a Tempfile object - does it make a difference using a Tempfile? (as this is what is should be)
Also, to get the tests to pass it would probably be sufficient just to do (unless there's something I'm missing)
factory :attachment do
  file Rails.root.join('spec/fixtures/quokka.jpg')
end

authors: alagos markevans

repo: markevans/dragonfly


text:
Drop np.ndarray usage for pl.Series?

I think we should be able to use polars series instead of numpy arrays and get the same functionality (for our use case). This would also allow us to drop numpy as a dependency.
Edit: Probably can't drop as a dependency - I think we would need to keep it for internal is_list_like()

To Do:

[ ] Remove from relocate
[ ] Remove from tests

repo: markfairbanks/tidypolars


text:
Speed up the query for the current project

This greatly improves performance when under slight memory pressure.

Description
Image

CPU Improvement (1)

Memory Improvement (2)

Many editors (3)

This means, when you use it casually, the amount of work done is just slightly shifting the time required (1), since there are less allocations (2).
Under more and more memory pressure, the times start to grow apart quite quickly (3).

@markiewb I already opened the pull request

@markiewb ping

@Shredder121: Ohh. I missed that. I will check and integrate it this or the next weekend. Thank you!

Nice! Thanks for the good work.

Also, there are some indentation inconsistencies.
I think your tab width was set to 8 at the time, but your indent size 4.
How do you want me to indent this code?

@Shredder121: I formatted all the sources. https://github.com/markiewb/show-path-in-title-netbeans-module/commit/60b1879e9b4e7075a192c27d8df63e51717083b8 Thanks for your contribution. I will fix another small issue and then I will release it.

And thank you for all those great plugins!
Until next time.


text:
v4. Animations do not work properly (they work until the first refresh)

Describe the bug
As in the description. Animations work - but don't work in fast refresh. When I refresh, they stop working. Latest version v4.0.13

Related: https://github.com/software-mansion/react-native-reanimated/issues/5296 https://github.com/software-mansion/react-native-reanimated/pull/5268
I'm currently trying to gauge how much effort a hack fix will be vs waiting for the fix.

Actually this can occur though normal usage as well. I'll publish a fix soon

We are closing all pre-v4.1 issues now that v4.1 is released. If the problem is still happening with the latest v4.1, please open a new issue and reference this one in the description.

authors: danstepanov marklawlor pakerekchdz

repo: marklawlor/nativewind


text:
ExamplesBase throws ClassCastException when error occurs

This line in ExamplesBase
(CharSequence[]) Arrays.stream(batch.getItems()).map(item -> item.getTargetUri()).toArray())

throws this error
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.CharSequence;
    at com.marklogic.entityservices.examples.ExamplesBase.lambda$importRDF$2(ExamplesBase.java:108)

I found this to work:
Arrays.stream(batch.getItems())
    .map(item -> item.getTargetUri())
    .collect(Collectors.joining("\n"))

Ah, nice thanks for the tip.

Set to ea-3 because it's in example code, not server.

Ha! That’s what I get for trying to turn Java into Python via some Stack Overflow copy-pasta. Thanks, @sammefford and @grechaw.

Hi @bsrikan  I implemented Sam's suggestion -- you can just maybe verify tests and close, or maybe you'l lhave similar change to make in e2e.

Verified and am able to "run" examples without any exception. Shipping the bug.

authors: bsrikan grechaw jmakeig sammefford

repo: marklogic/entity-services


text:
Possible Race Condition during black-listing of hosts

A. The following test was performed on a 3 node cluster (rh7v-intel64-90-test-4/5/6.marklogic.com), with a db associated with forests on each of the nodes.
B. The dmsdk job is started from a client machine and while loading is going on, client machine is disconnected from the servers (vpn is disconnected) and after a while vpn is reconnected
C. Chronologically ,  the events are as follows:
At 20:44:18.082 , [pool-1-thread-1] blacklists "rh7v-intel64-90-test-5.marklogic.com"
At 20:44:18.097 , [main] blacklists "rh7v-intel64-90-test-6.marklogic.com"
Any forestConfig obtained after this time shouldn't contain either "rh7v-intel64-90-test-5.marklogic.com" or "rh7v-intel64-90-test-6.marklogic.com".But
At 20:44:18.113 ,[pool-1-thread-1] uses hosts [rh7v-intel64-90-test-6.marklogic.com, rh7v-intel64-90-test-4.marklogic.com] with forests for "WriteHostBatcher"
and
At 20:44:18.150,  [main] uses hosts [rh7v-intel64-90-test-5.marklogic.com, rh7v-intel64-90-test-4.marklogic.com] with forests for "WriteHostBatcher"
D.20:44:39.245 [pool-1-thread-1] INFO  c.m.c.d.impl.WriteBatcherImpl - (withForestConfig) Using [rh7v-intel64-90-test-5.marklogic.com] hosts with forests for "WriteHostBatcher"
At 20:44:39.245 when [pool-1-thread-1]  blacklists "rh7v-intel64-90-test-4", the job should have stopped as other hosts were already blacklisted and the number of available hosts at this point is 0. But [pool-1-thread-1] seems to filter out host "rh7v-intel64-90-test-4" from the latest forest config obtained by [main] thread  [rh7v-intel64-90-test-5.marklogic.com, rh7v-intel64-90-test-4.marklogic.com] at 20:44:18.150 and the job continues.
Snippet log is below and complete log is available at exception.txt
20:44:06.444 [main] INFO  c.m.c.d.impl.WriteBatcherImpl - Adding DatabaseClient on port 8000 for host "rh7v-intel64-90-test-5.marklogic.com" to the rotation
20:44:06.819 [main] INFO  c.m.c.d.impl.WriteBatcherImpl - Adding DatabaseClient on port 8000 for host "rh7v-intel64-90-test-6.marklogic.com" to the rotation
20:44:06.819 [main] INFO  c.m.c.d.impl.WriteBatcherImpl - Adding DatabaseClient on port 8000 for host "rh7v-intel64-90-test-4.marklogic.com" to the rotation
20:44:06.179 [main] INFO  c.m.c.d.impl.WriteBatcherImpl - (withForestConfig) Using [rh7v-intel64-90-test-5.marklogic.com, rh7v-intel64-90-test-6.marklogic.com, rh7v-intel64-90-test-4.marklogic.com] hosts with forests for "WriteHostBatcher"
20:44:18.082 [pool-1-thread-1] ERROR c.m.c.d.HostAvailabilityListener - ERROR: host unavailable "rh7v-intel64-90-test-5.marklogic.com", black-listing it for PT15S
20:44:18.097 [main] ERROR c.m.c.d.HostAvailabilityListener - ERROR: host unavailable "rh7v-intel64-90-test-6.marklogic.com", black-listing it for PT15S
20:44:18.113 [pool-1-thread-1] INFO  c.m.c.d.impl.WriteBatcherImpl - (withForestConfig) Using [rh7v-intel64-90-test-6.marklogic.com, rh7v-intel64-90-test-4.marklogic.com] hosts with forests for "WriteHostBatcher"
20:44:18.150 [main] INFO  c.m.c.d.impl.WriteBatcherImpl - Adding DatabaseClient on port 8000 for host "rh7v-intel64-90-test-5.marklogic.com" to the rotation
20:44:18.150 [main] INFO  c.m.c.d.impl.WriteBatcherImpl - (withForestConfig) Using [rh7v-intel64-90-test-5.marklogic.com, rh7v-intel64-90-test-4.marklogic.com] hosts with forests for "WriteHostBatcher"
20:44:39.245 [pool-1-thread-1] ERROR c.m.c.d.HostAvailabilityListener - ERROR: host unavailable "rh7v-intel64-90-test-4", black-listing it for PT15S
20:44:39.245 [pool-1-thread-1] INFO  c.m.c.d.impl.WriteBatcherImpl - (withForestConfig) Using [rh7v-intel64-90-test-5.marklogic.com] hosts with forests for "WriteHostBatcher"
20:44:54.422 [pool-4-thread-1] INFO  c.m.c.d.impl.WriteBatcherImpl - (withForestConfig) Using [rh7v-intel64-90-test-5.marklogic.com, rh7v-intel64-90-test-6.marklogic.com, rh7v-intel64-90-test-4.marklogic.com] hosts with forests for "WriteHostBatcher"
20:44:54.422 [pool-4-thread-1] INFO  c.m.c.d.impl.WriteBatcherImpl - Adding DatabaseClient on port 8000 for host "rh7v-intel64-90-test-6.marklogic.com" to the rotation
20:44:54.422 [pool-4-thread-1] INFO  c.m.c.d.impl.WriteBatcherImpl - Adding DatabaseClient on port 8000 for host "rh7v-intel64-90-test-4.marklogic.com" to the rotation

Test:
@Test
		public void testFailOver() throws Exception{
			try{
				final String query1 = "fn:count(fn:doc())";

		       	final AtomicInteger successCount = new AtomicInteger(0);

		       	final MutableBoolean failState = new MutableBoolean(false);
		       	final AtomicInteger failCount = new AtomicInteger(0);

				WriteBatcher ihb2 =  dmManager.newWriteBatcher();
				ihb2.withBatchSize(20);
				//ihb2.withThreadCount(120);
				dmManager.startJob(ihb2);

				ihb2.setBatchFailureListeners(
						  new HostAvailabilityListener(dmManager)
						    .withSuspendTimeForHostUnavailable(Duration.ofSeconds(15))
						    .withMinHosts(1)
						);
				ihb2.onBatchSuccess(
				        (client, batch) -> {

				        	successCount.addAndGet(batch.getItems().length);
				        	System.out.println("Success Host: "+ client.getHost());
				        	System.out.println("Success batch number: "+ batch.getJobBatchNumber());
				        	 System.out.println("Success Job writes so far: "+ batch.getJobWritesSoFar());
				          }
				        )
				        .onBatchFailure(
				          (client, batch, throwable) -> {
				        	  System.out.println("Failed batch number: "+ batch.getJobBatchNumber());
				        	  /*try{
				        		  System.out.println("Retrying batch: "+ batch.getJobBatchNumber());
				        		  ihb2.retry(batch);
				        	  }
				        	 catch(Exception e){
				        		 System.out.println("Retry of batch "+ batch.getJobBatchNumber()+ " failed");
				        		 e.printStackTrace();
				        	 }*/

				        	  throwable.printStackTrace();
				        	  failState.setTrue();
				        	  failCount.addAndGet(batch.getItems().length);
				          });

				for (int j =0 ;j < 20000; j++){
					String uri ="/local/ABC-"+ j;
					ihb2.add(uri, stringHandle);
				}

			    ihb2.flushAndWait();

		    	System.out.println("Fail : "+failCount.intValue());
		    	System.out.println("Success : "+successCount.intValue());
		    	System.out.println("Count : "+ dbClient.newServerEval().xquery(query1).eval().next().getNumber().intValue());

		    	Assert.assertTrue(dbClient.newServerEval().xquery(query1).eval().next().getNumber().intValue()==20000);

			}
			catch(Exception e){
				e.printStackTrace();
			}
		}

Thanks @srinathgit !  I'll take a look.

This was hard for me to verify, but I could see how it could happen.  Please let me know if this fixes it.

I am not seeing the issue over multiple runs

authors: sammefford srinathgit

repo: marklogic/java-client-api


text:
时间堆del_函数

void HeapTimer::del_(size_t index) {
/* 删除指定位置的结点 /
assert(!heap_.empty() && index >= 0 && index < heap_.size());
/ 将要删除的结点换到队尾，然后调整堆 */
size_t i = index;
size_t n = heap_.size() - 1;
assert(i <= n);
if(i < n) {
SwapNode_(i, n);
if(!siftdown_(i, n)) {
siftup_(i);
}
}
这里的siftdown_(i,n)是否应该是siftdown(i,n-1)?

这里没有错，n已经是size() - 1了

void HeapTimer::del_(size_t index) { /* 删除指定位置的结点 / assert(!heap.empty() && index >= 0 && index < heap_.size()); /_ 将要删除的结点换到队尾，然后调整堆 */ size_t i = index; size_t n = heap_.size() - 1; assert(i <= n); if(i < n) { SwapNode_(i, n); if(!siftdown_(i, n)) { siftup_(i); } } 这里的siftdown_(i,n)是否应该是siftdown(i,n-1)?

没有问题，因为n=size()-1，并且siftdown中while循环的条件为j<n

authors: WuXianDaR lizyzzz peng-yq

repo: markparticle/WebServer


text:
How to run predictions?

Hi @markus-eberts
Thank you for all your work and publishing! really nice work and I love it.
I just wanted to ask how could I run prediction using this trained model (ADE, conll04 specific)? and how the input data should look like (format of the data)?
Thank you so much in advance :)

Hi, I also look foward the answer. I am quite struggling with the code to make predictions...
Any help @markus-eberts  ? :)
thanks in advance !

Ok I think I have it,
Overview is:

Create InputReader
Read dataset
Put it in DataLoader
Do forward pass

Details:
You first need to create an InputReader like JsonInputReader
input_reader = JsonInputReader(types_path, _tokenizer, max_span_size=max_span_size, logger=logger)
types_path is the path to the file which define the differents types (like conll04_types.json)
For the tokenizer, use BertTokenizer : _tokenizer = BertTokenizer.from_pretrained(tokenizer_path, do_lower_case=lowercase, cache_dir=cache_path) with tokenizer_paththe path to the model directory (final_model if you have trained sth)
Then you read row dataset with input reader
input_reader.read({dataset_label: dataset_path})
dataset = input_reader.get_dataset(dataset_label)

Use a DataLoader from torch.utils.data
data_loader = DataLoader(dataset, batch_size=10, shuffle=False, drop_last=False,                         num_workers=0, collate_fn=sampling.collate_fn_padding)
Create the model
model = model_class.from_pretrained(model_path,
                                    config=config,
                                    # SpERT model parameters
                                    cls_token=tokenizer.convert_tokens_to_ids('[CLS]'),
                                    relation_types=input_reader.relation_type_count - 1,
                                    entity_types=input_reader.entity_type_count,
                                    max_pairs=max_pairs,
                                    prop_drop=prop_drop,
                                    size_embedding=size_embedding,
                                    freeze_transformer=freeze_transformer)

config is config = BertConfig.from_pretrained(model_path, cache_dir=cache_path)
then you can make prediction like that :
with torch.no_grad():
    model.eval()

    for batch in data_loader:
        # move batch to selected device
        batch = util.to_device(batch, device)

        # run model (forward pass)
        result = model(encodings=batch['encodings'], context_masks=batch['context_masks'],
                        entity_masks=batch['entity_masks'], entity_sizes=batch['entity_sizes'],
                        entity_spans=batch['entity_spans'], entity_sample_masks=batch['entity_sample_masks'],
                        evaluate=True)

Hope this helps

Is there any gist of the whole code needed to run predictions?

Is there any gist of the whole code needed to run predictions?

I add support to make predictions. Take a look to this fork.
https://github.com/naymaraq/Text2Table

I add support to make predictions. Take a look to this fork.
https://github.com/naymaraq/Text2Table

is it the one shot infer.py file for running prediction?
https://github.com/naymaraq/Text2Table/blob/master/one_shot_infer.py
On Sun, Jan 31, 2021 at 2:02 PM Dav Karamyan notifications@github.com
wrote:

I add support to make predictions. Take a look to this fork.
https://github.com/naymaraq/Text2Table
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/markus-eberts/spert/issues/30#issuecomment-770450306,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMQJDVJPXAHTQLZYIUJXFGDS4XAPJANCNFSM4SFNM5YQ
.

--
Chloe Kim* | *Masters Student
UC Berkeley Class of 2020
Masters in Bioengineering
chloe.kim@berkeley.edu

is it the one shot infer.py file for running prediction?
https://github.com/naymaraq/Text2Table/blob/master/one_shot_infer.py
On Sun, Jan 31, 2021 at 2:02 PM Dav Karamyan notifications@github.com
wrote:

I add support to make predictions. Take a look to this fork.
https://github.com/naymaraq/Text2Table
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/markus-eberts/spert/issues/30#issuecomment-770450306,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMQJDVJPXAHTQLZYIUJXFGDS4XAPJANCNFSM4SFNM5YQ
.

--
Chloe Kim* | *Masters Student
UC Berkeley Class of 2020
Masters in Bioengineering
chloe.kim@berkeley.edu

is it the one shot infer.py file for running prediction? https://github.com/naymaraq/Text2Table/blob/master/one_shot_infer.py
On Sun, Jan 31, 2021 at 2:02 PM Dav Karamyan @.**> wrote: I add support to make predictions. Take a look to this fork. https://github.com/naymaraq/Text2Table — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#30 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMQJDVJPXAHTQLZYIUJXFGDS4XAPJANCNFSM4SFNM5YQ .
-- Chloe Kim | *Masters Student UC Berkeley Class of 2020 Masters in Bioengineering chloe.kim@berkeley.edu

Yes, It is
At first you need to downlaod pre-trained models,  then run following command,
python3 one_shot_infer.py --config configs/example_eval.conf

is it the one shot infer.py file for running prediction? https://github.com/naymaraq/Text2Table/blob/master/one_shot_infer.py
On Sun, Jan 31, 2021 at 2:02 PM Dav Karamyan @.**> wrote: I add support to make predictions. Take a look to this fork. https://github.com/naymaraq/Text2Table — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#30 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMQJDVJPXAHTQLZYIUJXFGDS4XAPJANCNFSM4SFNM5YQ .
-- Chloe Kim | *Masters Student UC Berkeley Class of 2020 Masters in Bioengineering chloe.kim@berkeley.edu

Yes, It is
At first you need to downlaod pre-trained models,  then run following command,
python3 one_shot_infer.py --config configs/example_eval.conf

so if I want to predict on the unseen data, should I put something similar
to this in the test.json?  *[{"tokens": ["group 2", "included",
"inflammation", "and", "increase", "alopecia", "."], "entities": [],
"relations": []}, ...]" *
then it would predict on both entitites & relations?
Help me out! Thank you so much!
On Sun, Jan 31, 2021 at 2:23 PM Dav Karamyan notifications@github.com
wrote:

is it the one shot infer.py file for running prediction?
https://github.com/naymaraq/Text2Table/blob/master/one_shot_infer.py
On Sun, Jan 31, 2021 at 2:02 PM Dav Karamyan @.**
> wrote: I add support to make predictions. Take a look to this fork.
https://github.com/naymaraq/Text2Table
https://github.com/naymaraq/Text2Table — You are receiving this because
you authored the thread. Reply to this email directly, view it on GitHub
<#30 (comment)
https://github.com/markus-eberts/spert/issues/30#issuecomment-770450306>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMQJDVJPXAHTQLZYIUJXFGDS4XAPJANCNFSM4SFNM5YQ
https://github.com/notifications/unsubscribe-auth/AMQJDVJPXAHTQLZYIUJXFGDS4XAPJANCNFSM4SFNM5YQ
. -- Chloe Kim | *Masters Student UC Berkeley Class of 2020 Masters in
Bioengineering chloe.kim@berkeley.edu
Yes, It is
At first you need to downlaod pre-trained models, then run following
command,
python3 one_shot_infer.py --config configs/example_eval.conf
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/markus-eberts/spert/issues/30#issuecomment-770453326,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMQJDVLAYX7MXHGBCCIBU63S4XC55ANCNFSM4SFNM5YQ
.

--
Chloe Kim* | *Masters Student
UC Berkeley Class of 2020
Masters in Bioengineering
chloe.kim@berkeley.edu

so if I want to predict on the unseen data, should I put something similar
to this in the test.json?  *[{"tokens": ["group 2", "included",
"inflammation", "and", "increase", "alopecia", "."], "entities": [],
"relations": []}, ...]" *
then it would predict on both entitites & relations?
Help me out! Thank you so much!
On Sun, Jan 31, 2021 at 2:23 PM Dav Karamyan notifications@github.com
wrote:

is it the one shot infer.py file for running prediction?
https://github.com/naymaraq/Text2Table/blob/master/one_shot_infer.py
On Sun, Jan 31, 2021 at 2:02 PM Dav Karamyan @.**
> wrote: I add support to make predictions. Take a look to this fork.
https://github.com/naymaraq/Text2Table
https://github.com/naymaraq/Text2Table — You are receiving this because
you authored the thread. Reply to this email directly, view it on GitHub
<#30 (comment)
https://github.com/markus-eberts/spert/issues/30#issuecomment-770450306>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMQJDVJPXAHTQLZYIUJXFGDS4XAPJANCNFSM4SFNM5YQ
https://github.com/notifications/unsubscribe-auth/AMQJDVJPXAHTQLZYIUJXFGDS4XAPJANCNFSM4SFNM5YQ
. -- Chloe Kim | *Masters Student UC Berkeley Class of 2020 Masters in
Bioengineering chloe.kim@berkeley.edu
Yes, It is
At first you need to downlaod pre-trained models, then run following
command,
python3 one_shot_infer.py --config configs/example_eval.conf
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/markus-eberts/spert/issues/30#issuecomment-770453326,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMQJDVLAYX7MXHGBCCIBU63S4XC55ANCNFSM4SFNM5YQ
.

--
Chloe Kim* | *Masters Student
UC Berkeley Class of 2020
Masters in Bioengineering
chloe.kim@berkeley.edu

I'm also working on predictions, should be ready on tuesday/wednesday,

I'm also working on predictions, should be ready on tuesday/wednesday,

thank you guys!!!!!!!!!

thank you guys!!!!!!!!!

so I would instead put unseen sentences & it would predict? also how many
max sentences can we put for prediction? using this command?
On Sun, Jan 31, 2021 at 2:35 PM Dav Karamyan notifications@github.com
wrote:

so if I want to predict on the unseen data, should I put something similar
to this in the test.json?
[{"tokens": ["group 2", "included", "inflammation", "and", "increase",
"alopecia", "."], "entities": [], "relations": []}, ...]" * then it would
predict on both entitites & relations? Help me out! Thank you so much! On
Sun, Jan 31, 2021 at 2:23 PM Dav Karamyan notifications@github.com
notifications@github.com wrote: is it the one shot infer.py file for
running prediction?
https://github.com/naymaraq/Text2Table/blob/master/one_shot_infer.py
https://github.com/naymaraq/Text2Table/blob/master/one_shot_infer.py On
Sun, Jan 31, 2021 at 2:02 PM Dav Karamyan @.* > wrote: I add support to
make predictions. Take a look to this fork.
https://github.com/naymaraq/Text2Table
https://github.com/naymaraq/Text2Table
https://github.com/naymaraq/Text2Table
https://github.com/naymaraq/Text2Table — You are receiving this because
you authored the thread. Reply to this email directly, view it on GitHub
<#30 https://github.com/markus-eberts/spert/issues/30 (comment) <#30
(comment)
https://github.com/markus-eberts/spert/issues/30#issuecomment-770450306>>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMQJDVJPXAHTQLZYIUJXFGDS4XAPJANCNFSM4SFNM5YQ
https://github.com/notifications/unsubscribe-auth/AMQJDVJPXAHTQLZYIUJXFGDS4XAPJANCNFSM4SFNM5YQ
https://github.com/notifications/unsubscribe-auth/AMQJDVJPXAHTQLZYIUJXFGDS4XAPJANCNFSM4SFNM5YQ
https://github.com/notifications/unsubscribe-auth/AMQJDVJPXAHTQLZYIUJXFGDS4XAPJANCNFSM4SFNM5YQ
. -- Chloe Kim | Masters Student UC Berkeley Class of 2020 Masters in
Bioengineering @.** Yes, It is At first you need to downlaod pre-trained
models, then run following command, python3 one_shot_infer.py --config
configs/example_eval.conf — You are receiving this because you authored the
thread. Reply to this email directly, view it on GitHub <#30 (comment)
https://github.com/markus-eberts/spert/issues/30#issuecomment-770453326>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMQJDVLAYX7MXHGBCCIBU63S4XC55ANCNFSM4SFNM5YQ
.
-- Chloe Kim* | *Masters Student UC Berkeley Class of 2020 Masters in
Bioengineering chloe.kim@berkeley.edu
No.
I only wrote a wrapper to predict on list of sentences. like this
preds = spert_clinet(["Trump kill Mickel Jeckson"])
in preds you can find entities and relations detected by Spert.
preds
[{'tokens': ['Trump', 'kill', 'Mickel', 'Jeckson'], 'entities': [{'type':
'Peop', 'start': 0, 'end': 1}, {'type': 'Peop', 'start': 2, 'end': 4}],
'relations': [{'type': 'Kill', 'head': 0, 'tail': 1}]}]
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/markus-eberts/spert/issues/30#issuecomment-770454777,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMQJDVPFYFOU4LHH6BQ2CPTS4XEJNANCNFSM4SFNM5YQ
.

--
Chloe Kim* | *Masters Student
UC Berkeley Class of 2020
Masters in Bioengineering
chloe.kim@berkeley.edu

so I would instead put unseen sentences & it would predict? also how many
max sentences can we put for prediction? using this command?
On Sun, Jan 31, 2021 at 2:35 PM Dav Karamyan notifications@github.com
wrote:

so if I want to predict on the unseen data, should I put something similar
to this in the test.json?
[{"tokens": ["group 2", "included", "inflammation", "and", "increase",
"alopecia", "."], "entities": [], "relations": []}, ...]" * then it would
predict on both entitites & relations? Help me out! Thank you so much! On
Sun, Jan 31, 2021 at 2:23 PM Dav Karamyan notifications@github.com
notifications@github.com wrote: is it the one shot infer.py file for
running prediction?
https://github.com/naymaraq/Text2Table/blob/master/one_shot_infer.py
https://github.com/naymaraq/Text2Table/blob/master/one_shot_infer.py On
Sun, Jan 31, 2021 at 2:02 PM Dav Karamyan @.* > wrote: I add support to
make predictions. Take a look to this fork.
https://github.com/naymaraq/Text2Table
https://github.com/naymaraq/Text2Table
https://github.com/naymaraq/Text2Table
https://github.com/naymaraq/Text2Table — You are receiving this because
you authored the thread. Reply to this email directly, view it on GitHub
<#30 https://github.com/markus-eberts/spert/issues/30 (comment) <#30
(comment)
https://github.com/markus-eberts/spert/issues/30#issuecomment-770450306>>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMQJDVJPXAHTQLZYIUJXFGDS4XAPJANCNFSM4SFNM5YQ
https://github.com/notifications/unsubscribe-auth/AMQJDVJPXAHTQLZYIUJXFGDS4XAPJANCNFSM4SFNM5YQ
https://github.com/notifications/unsubscribe-auth/AMQJDVJPXAHTQLZYIUJXFGDS4XAPJANCNFSM4SFNM5YQ
https://github.com/notifications/unsubscribe-auth/AMQJDVJPXAHTQLZYIUJXFGDS4XAPJANCNFSM4SFNM5YQ
. -- Chloe Kim | Masters Student UC Berkeley Class of 2020 Masters in
Bioengineering @.** Yes, It is At first you need to downlaod pre-trained
models, then run following command, python3 one_shot_infer.py --config
configs/example_eval.conf — You are receiving this because you authored the
thread. Reply to this email directly, view it on GitHub <#30 (comment)
https://github.com/markus-eberts/spert/issues/30#issuecomment-770453326>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMQJDVLAYX7MXHGBCCIBU63S4XC55ANCNFSM4SFNM5YQ
.
-- Chloe Kim* | *Masters Student UC Berkeley Class of 2020 Masters in
Bioengineering chloe.kim@berkeley.edu
No.
I only wrote a wrapper to predict on list of sentences. like this
preds = spert_clinet(["Trump kill Mickel Jeckson"])
in preds you can find entities and relations detected by Spert.
preds
[{'tokens': ['Trump', 'kill', 'Mickel', 'Jeckson'], 'entities': [{'type':
'Peop', 'start': 0, 'end': 1}, {'type': 'Peop', 'start': 2, 'end': 4}],
'relations': [{'type': 'Kill', 'head': 0, 'tail': 1}]}]
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/markus-eberts/spert/issues/30#issuecomment-770454777,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMQJDVPFYFOU4LHH6BQ2CPTS4XEJNANCNFSM4SFNM5YQ
.

--
Chloe Kim* | *Masters Student
UC Berkeley Class of 2020
Masters in Bioengineering
chloe.kim@berkeley.edu

so I would instead put unseen sentences & it would predict? - exactly
also how many max sentences can we put for prediction? - as many as you want, by default batch_size=1, so if you need fast predictions you should consider to make it bigger.

@naymaraq
so i tried predicting using your command and got this error.

In addition to one_shot_infer.py I also downloaded the update version of input_reader & evaluator.py in the right folder.
So example_eval.conf, dataset_path: data/datasets/conll04/conll04_test.json
should I put spert_clinet(["Trump kill Mickel Jeckson", "Trump kill Mickel Jeckson", "Krisp is based in Yerevan capital of Armenia."]) in conll04_test.json instead? to have prediction printed out?
Thanks,
Chloe

Which python did you use? is it python3.5+?
On Tue, 2 Feb 2021 at 02:09 Chloe Kim notifications@github.com wrote:

@naymaraq https://github.com/naymaraq
so i tried predicting using your command and got this error.
[image: image]
https://user-images.githubusercontent.com/52466133/106523758-73774380-6496-11eb-8a49-e35cc055c2c1.png
In addition to one_shot_infer.py I also downloaded the update version
of input_reader & evaluator.py in the right folder.
So example_eval.conf, dataset_path:
data/datasets/conll04/conll04_test.json
should I put spert_clinet(["Trump kill Mickel Jeckson", "Trump kill
Mickel Jeckson", "Krisp is based in Yerevan capital of Armenia."]) in
conll04_test.json instead? to have prediction printed out?
Thanks,
Chloe
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/markus-eberts/spert/issues/30#issuecomment-771193195,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALJYKJUGI2SNEBBBVYZAJR3S44RAVANCNFSM4SFNM5YQ
.

@naymaraq 3.8.5

I had the same issue... make sure you do pip install -r requirements

@ChloeJKim you need to upgrade your 'transformers' version (e.g. 'pip install transformers[sentencepiece] --upgrade').

@markus-eberts Thanks! it works now with the upgrade

I just added a prediction mode and updated the README with an usage example (you need to fetch the datasets again to download the example file). Please open a new issue, if you have any trouble with prediction.

authors: ChloeJKim markus-eberts naymaraq tomasonjo valtheval

repo: markus-eberts/spert


text:
Handling pre-populated fields in case of relations

ng-admin is a very useful and awesome framework. However, in case of relations, ng-admin expects id of the referenced fields. Could anyone help me how to deal in case the referenced fields are pre-populated. For e.g.
{
"categories": [
{
"name": "Shirt",
"gender": "unisex",
"id": 2,
"createdAt": "2015-09-20T15:46:56.000Z",
"updatedAt": "2015-09-20T15:46:56.000Z",
"parentCategory": null
}
],
"price": {
"price": 1200,
"commission": 0.25,
"discount": 0.2,
"id": 1,
"createdAt": "2015-09-20T15:48:51.000Z",
"updatedAt": "2015-09-20T16:07:27.000Z"
},
"designer": {
"name": "HSR Designer",
"phone": "9620253965",
"id": 1,
"createdAt": "2015-09-20T16:03:49.000Z",
"updatedAt": "2015-09-20T16:03:49.000Z",
"address": 1
},
"name": "Flying Wheel",
"description": null,
"customizable": true,
"id": 1,
"createdAt": "2015-09-20T15:48:51.000Z",
"updatedAt": "2015-09-20T16:07:27.000Z"
}
Here, categories is a referenced field and is pre-populated. Although it is easy displaying in listview using map, however, in editview it seems very difficult as ng-admin tries getting detail of each object sending category/{json} as request.
Create view works fine as expected as it fetches all possible fields in select dropdown.
Thanks in advance.

Duplicate of #241

authors: SaiNageswarS fzaninotto

repo: marmelab/ng-admin


text:
Support ignored directories with genstrings.py

Running genstrings.py currently searches all directories, including Examples in the Carthage Checkouts folder. For instance, I get this output:
/*
 * ./Carthage/Checkouts/Localize-Swift/examples/LanguageSwitch/Sample/ViewController.swift
 */

"Hello world" = "Hello world";

"Change" = "Change";

"Reset" = "Reset";

It would be helpful to have an --ignore option to ignore certain directories.

Sorry for the delay @nuudles. Spent some time thinking about this and I actually want to rewrite the genstrings script in Swift. I'll make sure to add an ignore option.

+1

I just added a new genstrings script written entirely in Swift that supports ignored directories and ignored filenames. You can edit the file to specify your own https://github.com/marmelroy/Localize-Swift/commit/3ec6c27bd3029151bee96aca459966de68bbbf52

authors: emilpedersen marmelroy nuudles

repo: marmelroy/Localize-Swift