WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Summary: matplotlib 1.5 only saving 1 frame of animation, 1.4.3 saves all frames

I have code that reads like this (link to full code below):

anim = animation.FuncAnimation(fig, bar_animate,
frames=100, interval=75)
anim.save('02_no_info.gif', writer='imagemagick')

This has always worked for me until I reran it a few days ago. Now only saves the first frame of the animations. I put prints in the bar_animate function, and it is being called 100 times. I stepped into the save routine: it builds a list generator - when I expand it out it contains only (1,), so only one frame gets saved. I didn't dig deep enough to figure out why that tuple was generated.

My environment is Anaconda 64-bit, Windows 7, Python 3.5.1, IPython 4.0.1, matplotlib 1.5.

If I downgrade matplotlib to 1.4.3 then the save works - all 100 frames are saved to the gif. If I then upgrade, only 1 frame is saved. I did this cycle a couple of times to verify that this is the only difference. The directories for both have a valid matplotlibrc as far as I can tell - I edited them to use imagemagick, and put the full path to imagemagick in, as required for windows.

The code that evokes this behavior lives here:

https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python/blob/master/animations/discrete_bayes_animations.ipynb

I'm a programmer, so if you can't reproduce this and need help tracking the bug down let me know.

Issue 2:
I was trying to work out a patch to #5335 and ran into issues introduced in merge #4800. The following code is slightly simplified example from the animations examples:

%matplotlib nbagg

import matplotlib
import matplotlib.pyplot as plt
import matplotlib.animation as animation

import numpy as np

def update_line(num, data, line):
line.set_data(data[...,:num])
return line,

fig = plt.figure()

plt.xlim(0, 1)
plt.ylim(0, 1)

data = np.random.rand(2, 10)
l, = plt.plot([], [], 'r-')

ani = animation.FuncAnimation(fig, update_line, 10, fargs=(data, l),
interval=50, blit=True)
ani.save('im.gif', writer='imagemagick')

running this yields:

The animation displays correctly in the notebook. The issue is introduced here

matplotlib/lib/matplotlib/animation.py

Line 766
in
5c58ea9

for anim in all_anim:

. When FuncAnimation._init_draw() is called, if no init_func is given, the first frame sequence is appended to self._save_seq. After which,

matplotlib/lib/matplotlib/animation.py

Line 769
in
5c58ea9

for data in zip(*[a.new_saved_frame_seq()

is executed and FuncAnimation.new_saved_seq() then only returns the first drawn frame for which to iterate over. The end result is an animation file with only one frame.
Issue 1:
Code Sample, a copy-pastable example if possible

First, relevant imports:

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

This doesn't work:

pd.DataFrame(np.random.randn(100, 3)).hist()
plt.tight_layout()

It raises the following error:

AttributeError: 'NoneType' object has no attribute 'is_bbox'

I suppose this happens because it makes 2x2 plot grid but uses only three subplots. If I use all subplots, then it works:

pd.DataFrame(np.random.randn(100, 4)).hist()
plt.tight_layout()

Expected Output

Expected to get tight layout with 2x2 subplot grid.

It should be possible to make this work, because the following works with with matplotlib:

plt.figure()
plt.subplot(2, 2, 1)
plt.plot([1,2,3])
plt.subplot(2, 2, 2)
plt.plot([4,5,6])
plt.subplot(2, 2, 3)
plt.plot([7,8,9])
plt.tight_layout()

output of pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 3.5.1.final.0
python-bits: 64
OS: Linux
OS-release: 4.5.4-gnu-1
machine: x86_64
processor:
byteorder: little
LC_ALL: None
LANG: en_DK.UTF-8

pandas: 0.18.1
nose: 1.3.7
pip: 8.1.1
setuptools: 20.2.1
Cython: 0.24
numpy: 1.11.0
scipy: 0.17.1
statsmodels: None
xarray: None
IPython: 4.2.0
sphinx: 1.4.2
patsy: None
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: None
tables: None
numexpr: 2.5.2
matplotlib: 1.5.1
openpyxl: None
xlrd: 0.9.4
xlwt: None
xlsxwriter: None
lxml: None
bs4: 4.4.1
html5lib: None
httplib2: 0.9.2
apiclient: 1.5.0
sqlalchemy: 1.0.13
pymysql: None
psycopg2: 2.6.1 (dt dec pq3 ext lo64)
jinja2: 2.8
boto: None
pandas_datareader: None

Issue 2:
When tight_layout() is called after DataFrame.hist() it raises AttributeError: 'NoneType' object has no attribute 'is_bbox if any of subplots is empty (number of charts with histograms is smaller than number os subplots).

I.e. the following code:

pd.DataFrame({'a':np.random.randn(100),
'b':np.random.randn(100),
}).hist()
plt.tight_layout()

works fine, but this code:

pd.DataFrame({'a':np.random.randn(100),
'b':np.random.randn(100),
'c':np.random.randn(100),
}).hist()
plt.tight_layout()

raises AttributeError.

My versions:

pandas: 0.15.2

numpy: 1.9.1

scipy: 0.14.1

IPython: 2.3.1

matplotlib: 1.4.2
Issue 1:
When using the setState function from the state hook to update state based on prop changes like mentioned here, if setState is called with the same value as the current state (or a callback that returns the same value as the current state), React still re-renders the component unlike its behavior when setState is called outside a render.

Is this intended behavior? If so, I think it might be helpful to put this in the docs somewhere around here https://beta.reactjs.org/reference/react/useState#setstate-caveats?

React version: 18.1.0

Steps To Reproduce

The specific pattern that I was trying to use was something like this:

function MyComponent() {
const [state, setState] = useState(0);

// referentially stable callback that might be used as a prop to a child
const updateStateIfNeeded = useCallback((newState) => {
setState(currentState => newState == currentState ? currentState : newState);
}, []);

// Infinite re-renders
updateStateIfNeeded(newState);
// I would need to duplicate the bit inside updateStateIfNeeded that checks against
// currentState here to guard the setState call to avoid re-renders
if (newState !== state) { setState(newState) }

// Only re-renders when state is changed
useEffect(() => updateStateIfNeeded(newState));

return (...);
}

Issue 2:
As per #2410 (comment): findDOMNode(this) throws for unmounted components, but the error message is too cryptic:

Uncaught Error: Invariant Violation: Component (with keys: getDOMNode,_handleChange,props,context,state,refs,_reactInternalInstance) contains render method but is not mounted in the DOM

Some expert React users honestly thought they had duplicate React or something, so didn't even bother to check whether the component was mounted. (It wasn't.)
Issue 1:
interface A {
x: number;
}

var a: A;
var { x: x2 } = a;

This gives the type "any" when mousing over x

(Not sure what the corresponding services API is. getTypeDefinitionAtPosition ?)

Mousing over x2 is fine - it gives "number". It would be nice if mousing over x gave the same, since it helps with nested destructuring to see the intermediate steps.

Issue 2:
We unconditionally show any.
Issue 1:
Issue Description

My streak ended last night randomly even though I completed some work. At least that's what I thought. The next day someone told me they can see my streak, but I can not. (See the screenshots)

Browser Information

Browser Name, Version: Google Chrome not even sure what version

Operating System: Windows 10

Mobile, Desktop, or Tablet: Desktop

Screenshot

The user sent me this it shows the streak going fine. His timezone is GMT+5:30

http://i.imgur.com/NwaRiK6.png

But when I look at it.. My timezone UTC-08:00

http://imgur.com/uPyoOz1

Issue 2:
One of the most common complaints I get (as person in charge of support emails) is that the streak isn't accurate. This may be due to timezones.

We probably need to go ahead and write some test cases and really tighten up this code. Any volunteers?
Issue 1:
When I install OpenCV 3.1 (HEAD) with homebrew OpenCV not detect VTK. When I tried without QT 5 that is detect.

Also says Your PYTHONPATH points to a site-packages dir for Python 2.x but you are running Python 3.x! and does not detect python3.

my installation code is;

brew -v install --with-contrib --with-cuda --with-ffmpeg --with-gphoto2 --with-gstreamer --with-java --with-libdc1394 --with-opengl --with-openni2 --with-python3 --with-qt --with-qt5 --with-vtk --with-tbb --without-tests --without-python --HEAD opencv3

my system

OpenCV version: 3.1(HEAD)

Host OS: Mac OS X 10.11.3

VTK Version : 7.1

QT Version : 5

What is wrong and have any idea?

Issue 2:
Configuring with -DWITH_VTK=ON fails with VTK7. The message is

Requested modules not available:

vtkRenderingOpenGL

Any ideas?
Issue 1:
ISSUE TYPE

Bug Report

COMPONENT NAME

oc

ANSIBLE VERSION

ansible 2.4.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/luka/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.13 (default, Jul 21 2017, 03:24:34) [GCC 7.1.1 20170630]

CONFIGURATION

default

OS / ENVIRONMENT

Linux / Manjaro

SUMMARY

oc module with inline definition expands list of triggers.

i.e. when set to empty list, it maintains old configuration, while having some triggers adds duplicate entry on each run.

STEPS TO REPRODUCE

- name: Create OpenShift resource
oc:
host: "{{ inventory_hostname }}"
validate_certs: false
state: present
inline: "{{ lookup('template', openshift_template) | from_yaml }}"
token: "{{ namespace_token }}"

EXPECTED RESULTS

replaced list

ACTUAL RESULTS

extended list with duplicates / persisting old config

Issue 2:
I'm using the ssh config as a single location for holding all the confi

associated with connecting to a remote node, with the inventory

file just referencing the names of ssh host aliases, and use ANSIBLE_TRANSPORT=ssh always.

It works great for most things (keys, IPs, jump hosts), but if a remote host

uses a non-standard port, ansible ignores the port specified in the ssh

config and tries to connect on port 22, which fails.
Issue 1:
🐛 Bug

MultiStepLR drops learning rate by gamma**2 times instead of gamma on each milestone. After one epoch it restores the lr to normal value.

To Reproduce

Steps to reproduce the behavior:

Use the following code:

import torch
params = [torch.nn.Parameter(torch.randn(1, 1))]
optimizer = torch.optim.SGD(params, lr=0.2)
scheduler = torch.optim.lr_scheduler.MultiStepLR(optimizer, milestones=[2,8], gamma=0.1)
for epoch in range(10):
print(scheduler.get_lr())
scheduler.step()

The output is:

[0.2]

[0.2]

[0.0020000000000000005] here should be 0.02

[0.020000000000000004]

[0.020000000000000004]

[0.020000000000000004]

[0.020000000000000004]

[0.020000000000000004]

[0.00020000000000000006] here should be 0.002

[0.0020000000000000005]

Expected behavior

In the provided sample the learning rate should be adjusted only twice.

Environment

PyTorch version: 1.1.0

Is debug build: No

CUDA used to build PyTorch: 10.0.130

OS: Ubuntu 16.04.6 LTS

GCC version: (Ubuntu 5.5.0-12ubuntu1~16.04) 5.5.0 20171010

CMake version: version 3.9.1

Python version: 3.5

Is CUDA available: Yes

CUDA runtime version: Could not collect

GPU models and configuration:

GPU 0: GeForce RTX 2080 Ti

GPU 1: GeForce GTX 1080 Ti

GPU 2: GeForce GTX 1080 Ti

Nvidia driver version: 418.56

cuDNN version: Could not collect

Versions of relevant libraries:

[pip3] numpy==1.16.3

[pip3] torch==1.1.0

[pip3] torchstat==0.0.7

[pip3] torchvision==0.2.2.post3

[conda] Could not collect

Issue 2:
When the StepLR, MultiStepLR, ExponentialLR or CosineAnnealingLR scheduler is called with the same epoch parameter the optimizer value is further reduced even though it's the same epoch

a sample code

import torch.optim as optim
from torch import nn

conv = nn.Conv2d(3,3,3)
optimizer = optim.Adam(conv.parameters())
lr_scheduler = optim.lr_scheduler.StepLR(optimizer, 2)

now if we call lr_scheduler.step(epoch=2) multiple times

for _ in range(10):
lr_scheduler.step(2)
print(optimizer.param_groups[0]['lr'])

output:

>>> 0.0001
>>> 1e-05
>>> 1.0000000000000002e-06
>>> 1.0000000000000002e-07
>>> 1.0000000000000004e-08
>>> 1.0000000000000005e-09
>>> 1.0000000000000006e-10
>>> 1.0000000000000006e-11
>>> 1.0000000000000006e-12
>>> 1.0000000000000007e-13

Even if such use-case is bizarre, this is extremely unexpected.

This is happens using PyTorch version 1.1.0 but not 1.0.1. Because pull(#14010) redefined StepLR, MultiStepLR, ExponentialLR and CosineAnnealingLR to directly use the learning rate variable of the optimizer rather than using base_lr defined by _LRScheduler. This was in order to support multiple simultaneous schedulers (#13022)!
Issue 1:
I am compiling the latest git version of Julia using make -j 8. After 30 minutes of compiling I get an error. It is however not descriptive at all:

--------------------------------------------------------------
FFTW threaded transforms passed basic tests!
--------------------------------------------------------------
Making check in mpi
Making check in doc
Making check in FAQ
Making check in tools
Making check in m4
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2

What do I need to post to help debug this problem?

I am on:

openSUSE 13.1 64 bit KDE

KDE 4.11.5

EDIT

After make clean and make -j 8 I get a different error. Stating that the GMP header and library versions do not match. However this is strange as Julia compiles its own version and I have not configured Julia to use the system version.

[tversion] GMP: header 5.1.3, library 5.1.2
[tversion] MPFR tuning parameters from default
ERROR! The versions of gmp.h (5.1.3) and libgmp (5.1.2) do not match.
The possible causes are:
* A bad configuration in your include/library search paths.
* An inconsistency in the include/library search paths of
your development environment; an example:
http://gcc.gnu.org/ml/gcc-help/2010-11/msg00359.html
* GMP has been upgraded after the first "make check".
In such a case, try again after a "make clean".
* A new or non-standard version naming is used in GMP.
In this case, a patch may already be available on the
MPFR web site. Otherwise please report the problem.
In the first two cases, this may lead to errors, in particular with MPFR.
If some other tests fail, please solve that problem first.
FAIL: tversion
=====================
2 of 160 tests failed
(1 test was not run)
=====================
make[5]: *** [check-TESTS] Error 1
make[4]: *** [check-am] Error 2
make[3]: *** [check-recursive] Error 1
make[2]: *** [mpfr-3.1.2/checked] Error 2
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2

Issue 2:
E.g. make -j 8 ( although I got the same result with -j 4 and -j 6 ) . Re-running a simpe make with no -j then results into make entering the final linking stage and CC stage, with success. OS: Fedora ( Fuduntu ) Linux, architecture: Intel Core i7. Not observed on Xeon architecture, Ubuntu server.
Issue 1:
Migrated issue, originally created by Boris Kozinsky (@bkoz37)

For some reason when I try to define association proxy in the user-keyword example, it only works in one direction but not the other, even if I define the association proxies symmetrically (please see attached code). For instance, I can do user1.keywords.append(keyword1) but not keyword1.users.append(user1). The second one will give a "Key Error".

I traced this behavior to the order of arguments in the UserKeyword.init method. The behavior is correct only one way, depending on the argument order, but never both ways. It is somewhat hard to know the right order of arguments for the collection to work...

Attachments: aptest.py

Issue 2:
Migrated issue, originally created by Michael Bayer (@zzzeek)

re: the "creator" function.

see #647 #2808 #3235 for what keeps coming up.
Issue 1:
Environment

Windows build number: [18970.1005] (but this problem is there from the last 3 builds

Windows Terminal version (if applicable):

Steps to reproduce

Just open the cmd in windows terminal.

Expected behavior

Expected to open normally as usual.

Actual behavior

Getting the following series of statements as arguments for the cmd.exe and closing immediately.

mode 20.5

tasklist /F1 "IMAGENAME eq SoundMixer.exe"

find /I /N "SoundMixer.exe"

start /MIN "" "C:\Users\farhan\AppData\Roaming\Microsoft

tasklist /FI "IMAGE NAME eq explorer.exe"

find /I /N "explorer.exe"

Issue 2:
Environment

Windows build number:[Version 10.0.18922.1000]
Windows Terminal version: 0.0.1.0 (Commit 66cb7c4b 6/20/2019 12:20:49 PM)
Built with VS 2019 (latest version as of June 20, 2019)

Dell Inspiron 7559
4K display with scaling at 200%
i7-6700HQ
Intel HD 530
GTX 960m (with Nvidia Optimus)

Steps to reproduce

Make sure acrylic is enabled for your profile. Resize with window to more than ~160-180 columns.

Type.

Expected behavior

The window is larger and imputing text acts the same.

Actual behavior

Input lag increases significantly. Before resizing the window, there is minimal input lag, barely or not noticeable. After resizing (or starting with a column count > ~160-180), it is easy to type faster than the characters will appear on screen. This happens for WSL Ubuntu 18.04, 18.10, 19.04, CMD and Powershell. I'm not sure if this is specific to using a 4k display with integrated graphics or if this is a Windows bug with acrylic.
Issue 1:
Currently, the 'remote' option allows only to load the body of the modal.

it would be useful to be able to load both the title, content and footer of the modal.

a proposal: simply return a JSON object {header: ... body: ... footer ...} in place of html to supply each part of the modal.

If HTML is returned, then continue as now, and if it's JSON, retrieve footer, header and body.

thx.

Jef

Issue 2:
Hi,

I'm using Navigation Pills as submenu in order to provide a inner navigation for each section of my Application.

I'm also spliting long forms in "fake tabs", fading them accordingly to selected option in the Pill. Here is a simple demonstration of what I'm doing.

Perfect! Then I tried to change the style to Buttons with Dropdowns.

I could not use the same markup described in documentation (button tag) due some particularities in my Application (an inactive dropdown should act as link instead a menu) so I used my old markup (lists) with documentation styles.

After a few tries I came to this

Almost perfect! In this example, when choosing a different option, the active class is added to the newly selected element, but it's not being removed from previously selected element.

By using the two or three of the available section of this tabbed form, opening the pill again, all the three items have the active class, which is not only wrong but ugly.

How can I fix this for now, I mean, while not characterized as a bug (IF is a bug) and included in a future release?
Issue 1:
I encountered an issue of the legend in matplotlib.pyplot.errorbar when I plot a pandas' DataFrame object. A minimum example based on the release note of v1.5 is the following.

import pandas
import numpy as np
import matplotlib.pyplot as plt

df = pandas.DataFrame({"var1":[1,2,3,4,5,6], "var2":[1,2,3,4,5,6]})

Here is the same as one in the release note, but with a legend.

plt.plot(df["var1"], df["var2"], label='test')
plt.legend()

The output is the following.

The following code makes the issue.

plt.errorbar(df["var1"], df["var2"], label='test')
plt.legend()

As you can see, the 'var2' key is not overridden by the label='test' and there are two lines instead of one in the legend.

A quick workaround is to convert the y values to numpy array with np.array(df["var2"]) when plotting.

I'm using Python 2.7.8 installed via homebrew on OS X 10.10.5, matplotlib 1.5.0, and pandas 0.17.0.

Issue 2:
When I make an errorbar plot from pandas Series, the names of the series appear twice in the legend. Once as a solid line, and once as a solid line with error bars. Explicitly setting the label argument replaces the label text for the solid line with errorbars.

%matplotlib inline
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
df = pd.DataFrame(data = np.random.rand(10,3),index=pd.Series(np.arange(0,20,2),name="number"),columns="A B C".split())
plt.errorbar(df.index,df.A,df.B)
plt.legend()
Issue 1:
Environment

Windows build number: Microsoft Windows [Version 10.0.19041.329]
PowerToys version: v0.19.0
PowerToy module for which you are reporting the bug (if applicable): FancyZones

Steps to reproduce

Drag the toolbar in windows so that it runs across the top of the screen (Apple style) :-D

Set up your custom zone areas and save them

Try Shift dragging a window and you will see the zones have shifted up to the top of the screen, leaving the height of your original toolbar below and causing all of your snapped window tops to sit behind the windows toolbar.

This just started happening as of the latest version. Oddly, when defining the zones they are appropriately placed.

Expected behavior

Zones should stay where they are defined, not align to the top edge of the screen behind the toolbar.

Actual behavior

Here you see they are properly placed.

Holding shift gives you these translated regions.

Issue 2:
Environment

Windows build number: 10.0.18363.900
PowerToys version: 0.19.0
PowerToy module for which you are reporting the bug (if applicable): FancyZones
Monitor(s): 2 side-by-side 4K monitors (one set to display scaling 100% and the other to 125%)

Steps to reproduce

Set Windows taskbar location to Top

Snap a window to a FancyZone (2 priority grid zones in my case)

Expected behavior

The window should snap to the full-height of the FancyZone below the task bar

Actual behavior

The window snaps behind the task bar (as shown with the green arrows)

The window leaves a gap underneath each window (as shown with the red arrows), which exposes the desktop background underneath

Screenshots
Issue 1:
Migrated issue, originally created by Anonymous

We're dealing with tables with user-defined schemas. Sometimes they provide columns with duplicate names, except for case, e.g.:

CREATE TABLE foo ("bar" integer, "BAR" integer);
INSERT INTO foo ("bar", "BAR") VALUES (1, 2);

While that's clearly crazy, I expect sqlalchemy to handle them. Unfortunately:

for row in table.select().execute():
print row.items()

Causes:

Traceback (most recent call last):
File "<ipython console>", line 4, in f
File "/usr/lib/pymodules/python2.6/sqlalchemy/engine/base.py", line 1359, in items
return [getattr(self, key)) for key in self.iterkeys()]((key,)
File "/usr/lib/pymodules/python2.6/sqlalchemy/engine/base.py", line 1352, in __getattr__
return self.__parent._get_col(self.__row, name)
File "/usr/lib/pymodules/python2.6/sqlalchemy/engine/base.py", line 1620, in _get_col
return processor(row[index](index))
File "/usr/lib/pymodules/python2.6/sqlalchemy/engine/base.py", line 1513, in process
"try 'use_labels' option on select statement." % colname)
InvalidRequestError: Ambiguous column name 'bar' in result set! try 'use_labels' option on select statement.

The problem is apparent from the ResultProxy docstring:

Individual columns may be accessed by ... case-insensitive column name ...

Note that row.keys() and list(row) both work fine, so the exception message is actually misleading, because the fetch from the database works fine (the naming ambiguity is a problem in sqlalchemy, after the rows have been fetched)

Discovered on 0.5.8 but that docstring is unchanged in the 0.7.7 source, so I assume it hasn't been fixed.

Issue 2:
Migrated issue, originally created by Anonymous

Here is a small patch to add support of storing timedelta valuesin SQL databases. If possible it tries to use native DB support of timedelta (just PostgreSQL for now), if there is no such it fallbacks to store timedeltas as sqltypes.DateTime with base of zero timestamp.

Attachments: interval.5.patch | interval.6.patch | interval.4.patch | Interval.patch | interval.2.patch | interval.3.patch