in_source_id stringlengths 13 58 | issue stringlengths 3 241k | before_files listlengths 0 3 | after_files listlengths 0 3 | pr_diff stringlengths 109 107M ⌀ |
|---|---|---|---|---|
pydantic__pydantic-2523 | `inherit_config` overwrites `json_encoders` from class creation arguments
### Checks
* [x] I added a descriptive title to this issue
* [x] I have searched (google, github) for similar issues and couldn't find anything
* [x] I have read and followed [the docs](https://pydantic-docs.helpmanual.io/) and still think this is a bug
<!-- Sorry to sound so draconian, but every second saved replying to issues is time spend improving pydantic :-) -->
# Bug
Output of `python -c "import pydantic.utils; print(pydantic.utils.version_info())"`:
```
pydantic version: 1.8.1
pydantic compiled: False
install path: [...]/lib/python3.9/site-packages/pydantic
python version: 3.9.2 (default, Feb 21 2021, 06:38:26) [Clang 7.1.0 (tags/RELEASE_710/final)]
platform: macOS-10.14.6-x86_64-i386-64bit
optional deps. installed: ['typing-extensions']
```
<!-- or if you're using pydantic prior to v1.3, manually include: OS, python version and pydantic version -->
<!-- Please read the [docs](https://pydantic-docs.helpmanual.io/) and search through issues to
confirm your bug hasn't already been reported. -->
<!-- Where possible please include a self-contained code snippet describing your bug: -->
```py
import pydantic
class Foo(pydantic.BaseModel):
class Config:
json_encoders = {int: str}
print('Foo json_encoders:', Foo.__config__.json_encoders)
class Bar(pydantic.BaseModel, json_encoders={int: str}):
pass
print('Bar json_encoders:', Bar.__config__.json_encoders)
```
Output:
```
Foo json_encoders: {<class 'int'>: <class 'str'>}
Bar json_encoders: {}
```
Culprit:
https://github.com/samuelcolvin/pydantic/blob/62bb2ad4921016df51abf3922c3fe51113b08939/pydantic/main.py#L184-L187
`inherit_config` overwrites `json_encoders` from class creation arguments
### Checks
* [x] I added a descriptive title to this issue
* [x] I have searched (google, github) for similar issues and couldn't find anything
* [x] I have read and followed [the docs](https://pydantic-docs.helpmanual.io/) and still think this is a bug
<!-- Sorry to sound so draconian, but every second saved replying to issues is time spend improving pydantic :-) -->
# Bug
Output of `python -c "import pydantic.utils; print(pydantic.utils.version_info())"`:
```
pydantic version: 1.8.1
pydantic compiled: False
install path: [...]/lib/python3.9/site-packages/pydantic
python version: 3.9.2 (default, Feb 21 2021, 06:38:26) [Clang 7.1.0 (tags/RELEASE_710/final)]
platform: macOS-10.14.6-x86_64-i386-64bit
optional deps. installed: ['typing-extensions']
```
<!-- or if you're using pydantic prior to v1.3, manually include: OS, python version and pydantic version -->
<!-- Please read the [docs](https://pydantic-docs.helpmanual.io/) and search through issues to
confirm your bug hasn't already been reported. -->
<!-- Where possible please include a self-contained code snippet describing your bug: -->
```py
import pydantic
class Foo(pydantic.BaseModel):
class Config:
json_encoders = {int: str}
print('Foo json_encoders:', Foo.__config__.json_encoders)
class Bar(pydantic.BaseModel, json_encoders={int: str}):
pass
print('Bar json_encoders:', Bar.__config__.json_encoders)
```
Output:
```
Foo json_encoders: {<class 'int'>: <class 'str'>}
Bar json_encoders: {}
```
Culprit:
https://github.com/samuelcolvin/pydantic/blob/62bb2ad4921016df51abf3922c3fe51113b08939/pydantic/main.py#L184-L187
| [
{
"content": "import json\nimport sys\nimport warnings\nfrom abc import ABCMeta\nfrom copy import deepcopy\nfrom enum import Enum\nfrom functools import partial\nfrom pathlib import Path\nfrom types import FunctionType\nfrom typing import (\n TYPE_CHECKING,\n AbstractSet,\n Any,\n Callable,\n Dic... | [
{
"content": "import json\nimport sys\nimport warnings\nfrom abc import ABCMeta\nfrom copy import deepcopy\nfrom enum import Enum\nfrom functools import partial\nfrom pathlib import Path\nfrom types import FunctionType\nfrom typing import (\n TYPE_CHECKING,\n AbstractSet,\n Any,\n Callable,\n Dic... | diff --git a/changes/2521-layday.md b/changes/2521-layday.md
new file mode 100644
index 00000000000..3c02f4dfd60
--- /dev/null
+++ b/changes/2521-layday.md
@@ -0,0 +1 @@
+Allow passing `json_encoders` in class kwargs
diff --git a/pydantic/main.py b/pydantic/main.py
index f6aca41048f..37f005af87d 100644
--- a/pydantic/main.py
+++ b/pydantic/main.py
@@ -184,6 +184,7 @@ def inherit_config(self_config: 'ConfigType', parent_config: 'ConfigType', **nam
namespace['json_encoders'] = {
**getattr(parent_config, 'json_encoders', {}),
**getattr(self_config, 'json_encoders', {}),
+ **namespace.get('json_encoders', {}),
}
return type('Config', base_classes, namespace)
diff --git a/tests/test_main.py b/tests/test_main.py
index 328e89a2b32..d2180c9e735 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -1723,6 +1723,13 @@ class Model(Base, extra='allow'):
assert Model.__fields__['b'].alias == 'B' # alias_generator still works
+def test_class_kwargs_config_json_encoders():
+ class Model(BaseModel, json_encoders={int: str}):
+ pass
+
+ assert Model.__config__.json_encoders == {int: str}
+
+
def test_class_kwargs_config_and_attr_conflict():
with pytest.raises(
|
pypa__pipenv-2975 | pipenv graph fails: No module named 'pipenv'
### Issue description
With the newest version of pipenv (2018.10.9), `pipenv graph` fails with the error message `ModuleNotFoundError: No module named 'pipenv'`
### Expected result
I expected `pipenv graph` to output the dependency graph of the venv.
### Actual result
```
$ pipenv graph
ERROR: Traceback (most recent call last):
File "c:\\python27\\lib\\site-packages\\pipenv\\vendor\\pipdeptree.py", line 16, in <module>
from pipenv.vendor.pip_shims import get_installed_distributions, FrozenRequirement
ModuleNotFoundError: No module named 'pipenv'
```
### Steps to replicate
- Install version 2018.10.9 of pipenv.
- Run `pipenv graph`
-------------------------------------------------------------------------------
<details><summary>$ pipenv --support</summary>
Pipenv version: `'2018.10.9'`
Pipenv location: `'c:\\python27\\lib\\site-packages\\pipenv'`
Python location: `'c:\\python27\\python.exe'`
Python installations found:
- `3.6.3`: `C:\Python36\python.exe`
- `2.7`: `C:\Python27\python.exe`
- `2.7`: `C:\Users\m.manhertz\.windows-build-tools\python27\python.exe`
- `2.7`: `C:\Users\m.manhertz\Envs\tpe\Scripts\python.exe`
- `3.7.0`: `C:\Python37\python.exe`
PEP 508 Information:
```
{'implementation_name': 'cpython',
'implementation_version': '0',
'os_name': 'nt',
'platform_machine': 'AMD64',
'platform_python_implementation': 'CPython',
'platform_release': '10',
'platform_system': 'Windows',
'platform_version': '10.0.17134',
'python_full_version': '2.7.12',
'python_version': '2.7',
'sys_platform': 'win32'}
```
System environment variables:
- `TMP`
- `TPE_DB_PASSWORD`
- `COMPUTERNAME`
- `VS140COMNTOOLS`
- `USERDOMAIN`
- `TPE_DB_HOST`
- `PSMODULEPATH`
- `PYTHONDONTWRITEBYTECODE`
- `COMMONPROGRAMFILES`
- `PROCESSOR_IDENTIFIER`
- `VBOX_MSI_INSTALL_PATH`
- `PROGRAMFILES`
- `PROCESSOR_REVISION`
- `HOME`
- `SYSTEMROOT`
- `PROGRAMFILES(X86)`
- `COMSPEC`
- `DRIVERDATA`
- `TERM`
- `DJANGO_SETTINGS_MODULE`
- `TEMP`
- `ALLUSERSPROFILE`
- `GITHUB_POSH_GIT`
- `TVT`
- `COMMONPROGRAMFILES(X86)`
- `TPE_DB_NAME`
- `PROCESSOR_ARCHITECTURE`
- `PLINK_PROTOCOL`
- `EDITOR`
- `LOCALAPPDATA`
- `GYP_MSVS_VERSION`
- `HOMEPATH`
- `USERDOMAIN_ROAMINGPROFILE`
- `TPE_SECRET_KEY`
- `ERLANG_HOME`
- `USERNAME`
- `WORKON_HOME`
- `LOGONSERVER`
- `SESSIONNAME`
- `PROGRAMDATA`
- `PYTHONPATH`
- `ONEDRIVE`
- `PATH`
- `PIP_SHIMS_BASE_MODULE`
- `TPE_DB_USER`
- `AWE_DIR`
- `PATHEXT`
- `PIP_PYTHON_PATH`
- `WINDIR`
- `APPDATA`
- `HOMEDRIVE`
- `PROGRAMW6432`
- `SYSTEMDRIVE`
- `NUMBER_OF_PROCESSORS`
- `USERDNSDOMAIN`
- `PROCESSOR_LEVEL`
- `VCTARGETSPATH`
- `GETTEXTCLDRDIR`
- `PYTHON_HOME`
- `GITHUB_GIT`
- `COMMONPROGRAMW6432`
- `OS`
- `PUBLIC`
- `USERPROFILE`
Pipenv???specific environment variables:
Debug???specific environment variables:
- `PATH`: `C:\Program Files\Docker\Docker\Resources\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Intel\iCLS Client\;C:\Python27\;C:\Python27\Scripts;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;c:\Python27\;c:\Python27\Scripts;C:\Program Files\PostgreSQL\9.4\bin;C:\Program Files\PostgreSQL\9.4\lib;C:\Program Files\PostgreSQL\9.4\include;C:\Program Files\Redis\;C:\Program Files (x86)\PuTTY\;C:\HashiCorp\Vagrant\bin;C:\Program Files\Git\cmd;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\nodejs\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\WINDOWS\System32\OpenSSH\;C:\Users\m.manhertz\AppData\Local\Microsoft\WindowsApps;C:\Users\m.manhertz\Documents\Tools;C:\Users\m.manhertz\AppData\Local\atom\bin;C:\Program Files\gettext-iconv\bin;C:\Program Files (x86)\Sophos\Sophos SSL VPN Client\bin;C:\Users\m.manhertz\AppData\Local\Microsoft\WindowsApps;C:\Users\m.manhertz\AppData\Roaming\npm;C:\Python36\Scripts\;C:\Program Files\PostgreSQL\9.6\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;;C:\Users\m.manhertz\AppData\Local\GitHub\PortableGit_f02737a78695063deace08e96d5042710d3e32db\cmd;C:\Users\m.manhertz\AppData\Local\GitHub\PortableGit_f02737a78695063deace08e96d5042710d3e32db\usr\bin;C:\Users\m.manhertz\AppData\Local\GitHub\PortableGit_f02737a78695063deace08e96d5042710d3e32db\usr\share\git-tfs;C:\Users\m.manhertz\AppData\Local\GitHub\lfs-amd64_1.5.5;C:\Users\m.manhertz\AppData\Local\Apps\2.0\OOH24QXT.R8H\XWTJVPKY.DW1\gith..tion_317444273a93ac29_0003.0003_5794af8169eeff14;C:\Windows\Microsoft.NET\Framework\v4.0.30319\;c:\python27\lib\site-packages\pywin32_system32`
- `EDITOR`: `GitPad`
---------------------------
Contents of `Pipfile` ('C:\\Users\\m.manhertz\\Documents\\GitHub\\demo\\Pipfile'):
```toml
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[dev-packages]
[packages]
[requires]
python_version = "3.7"
```
Contents of `Pipfile.lock` ('C:\\Users\\m.manhertz\\Documents\\GitHub\\demo\\Pipfile.lock'):
```json
{
"_meta": {
"hash": {
"sha256": "7e7ef69da7248742e869378f8421880cf8f0017f96d94d086813baa518a65489"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.7"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {},
"develop": {}
}
```
</details>
| [
{
"content": "from __future__ import print_function\nimport os\nimport sys\nfrom itertools import chain\nfrom collections import defaultdict\nimport argparse\nfrom operator import attrgetter\nimport json\nfrom importlib import import_module\n\ntry:\n from collections import OrderedDict\nexcept ImportError:\n... | [
{
"content": "from __future__ import print_function\nimport os\nimport sys\nfrom itertools import chain\nfrom collections import defaultdict\nimport argparse\nfrom operator import attrgetter\nimport json\nfrom importlib import import_module\n\ntry:\n from collections import OrderedDict\nexcept ImportError:\n... | diff --git a/news/2952.bugfix b/news/2952.bugfix
new file mode 100644
index 0000000000..df640991bc
--- /dev/null
+++ b/news/2952.bugfix
@@ -0,0 +1 @@
+Fixed a bug with importing local vendored dependencies when running ``pipenv graph``.
diff --git a/pipenv/vendor/pipdeptree.py b/pipenv/vendor/pipdeptree.py
index 9cce0325e7..2082fc8a36 100644
--- a/pipenv/vendor/pipdeptree.py
+++ b/pipenv/vendor/pipdeptree.py
@@ -13,6 +13,8 @@
except ImportError:
from ordereddict import OrderedDict
+pardir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+sys.path.append(pardir)
from pipenv.vendor.pip_shims import get_installed_distributions, FrozenRequirement
import pkg_resources
diff --git a/tasks/vendoring/patches/vendor/pipdeptree-updated-pip18.patch b/tasks/vendoring/patches/vendor/pipdeptree-updated-pip18.patch
index e3ff9bbf29..d479ebfa39 100644
--- a/tasks/vendoring/patches/vendor/pipdeptree-updated-pip18.patch
+++ b/tasks/vendoring/patches/vendor/pipdeptree-updated-pip18.patch
@@ -1,8 +1,8 @@
diff --git a/pipenv/vendor/pipdeptree.py b/pipenv/vendor/pipdeptree.py
-index 7820aa5..9cce032 100644
+index 7820aa5..2082fc8 100644
--- a/pipenv/vendor/pipdeptree.py
+++ b/pipenv/vendor/pipdeptree.py
-@@ -13,11 +13,7 @@ try:
+@@ -13,11 +13,9 @@ try:
except ImportError:
from ordereddict import OrderedDict
@@ -11,6 +11,8 @@ index 7820aa5..9cce032 100644
- from pipenv.patched.notpip._internal.operations.freeze import FrozenRequirement
-except ImportError:
- from pipenv.patched.notpip import get_installed_distributions, FrozenRequirement
++pardir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
++sys.path.append(pardir)
+from pipenv.vendor.pip_shims import get_installed_distributions, FrozenRequirement
import pkg_resources
|
DataBiosphere__toil-1406 | Scaler thread shutdown error
File "/home/rnaenv/bin/toil-rnaseq", line 11, in <module>
sys.exit(main())
File "/home/rnaenv/local/lib/python2.7/site-packages/toil_rnaseq/rnaseq_cgl_pipeline.py", line 573, in main
Job.Runner.startToil(Job.wrapJobFn(map_job, download_sample, samples, config), args)
File "/usr/local/lib/python2.7/dist-packages/toil/job.py", line 738, in startToil
return toil.start(job)
File "/usr/local/lib/python2.7/dist-packages/toil/common.py", line 655, in start
return self._runMainLoop(rootJobGraph)
File "/usr/local/lib/python2.7/dist-packages/toil/common.py", line 963, in _runMainLoop
jobCache=self._jobCache).run()
File "/usr/local/lib/python2.7/dist-packages/toil/leader.py", line 170, in run
self.clusterScaler.shutdown()
File "/usr/local/lib/python2.7/dist-packages/toil/provisioners/clusterScaler.py", line 262, in shutdown
self.scaler.join()
AttributeError: 'NoneType' object has no attribute 'join'
| [
{
"content": "# Copyright (C) 2015-2016 Regents of the University of California\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-... | [
{
"content": "# Copyright (C) 2015-2016 Regents of the University of California\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-... | diff --git a/src/toil/provisioners/clusterScaler.py b/src/toil/provisioners/clusterScaler.py
index 009989f56b..4facdbb5fd 100644
--- a/src/toil/provisioners/clusterScaler.py
+++ b/src/toil/provisioners/clusterScaler.py
@@ -259,7 +259,7 @@ def shutdown(self):
self.stop = True
for scaler in self.preemptableScaler, self.scaler:
if scaler is not None:
- self.scaler.join()
+ scaler.join()
def addCompletedJob(self, job, wallTime):
"""
|
django-cms__django-filer-1116 | Uncaught ReferenceError: django is not defined
When I try to create a new model with the content creation wizard that has a FilerImageField, I get an `Uncaught ReferenceError: django is not defined` at:
VM1967 dropzone.init.js:11
VM1969 popup_handling.js:46
VM1970 widget.js:4
(index):155
Why do I get this and how can I avoid it?
### Reproducible with:
#### modify `aldryn_newsblog/cms_wizards.py`:
class CreateNewsBlogArticleForm(BaseFormMixin, TranslatableModelForm):
# ...
class Meta:
model = Article
fields = ['title', 'app_config', 'featured_image']
# ...
#### or: create a test `foo` app:
My `models.py` file:
from django.db import models
from django.core.urlresolvers import reverse
from filer.fields.image import FilerImageField
class Foo(models.Model):
slug = models.SlugField(unique=True)
image = FilerImageField(related_name='foo_picture', null=True)
def get_absolute_url(self):
return reverse('foo', kwargs={'slug': self.slug})
My `forms.py` file:
from django import forms
from .models import Foo
class FooWizardForm(forms.ModelForm):
class Meta:
model = Foo
exclude = []
My `cms_wizards.py` file:
from cms.wizards.wizard_base import Wizard
from cms.wizards.wizard_pool import wizard_pool
from .forms import FooWizardForm
class FooWizard(Wizard):
pass
foo_wizard = FooWizard(
title="Foo",
weight=200,
form=FooWizardForm,
description="Create a new Foo"
)
wizard_pool.register(foo_wizard)
My `views.py` file:
from django.views.generic import DetailView
from .models import Foo
class FooView(DetailView):
model = Foo
My `urls.py` file:
from foo.views import FooView
from django.conf import settings
from django.contrib import admin
from django.conf.urls import url, include
from django.conf.urls.static import static
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^foo/(?P<slug>[-\w]+)/$', FooView.as_view(), name='foo'),
url(r'^', include('cms.urls'))
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
| [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nimport logging\nimport warnings\n\nfrom django import forms\nfrom django.contrib.admin.sites import site\nfrom django.contrib.admin.widgets import ForeignKeyRawIdWidget\nfrom django.db import models\nfrom django.template.loader imp... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nimport logging\nimport warnings\n\nfrom django import forms\nfrom django.contrib.admin.sites import site\nfrom django.contrib.admin.widgets import ForeignKeyRawIdWidget\nfrom django.db import models\nfrom django.template.loader imp... | diff --git a/filer/fields/file.py b/filer/fields/file.py
index dd336e27f..156184182 100644
--- a/filer/fields/file.py
+++ b/filer/fields/file.py
@@ -87,6 +87,8 @@ class Media(object):
]
}
js = (
+ 'admin/js/vendor/jquery/jquery.js',
+ 'admin/js/jquery.init.js',
'filer/js/libs/dropzone.min.js',
'filer/js/addons/dropzone.init.js',
'filer/js/addons/popup_handling.js',
|
Kinto__kinto-1786 | Remove colander deprecations
```
/home/mathieu/Code/Mozilla/kinto/.venv/lib/python3.6/site-packages/cornice/validators/_colander.py:110: DeprecationWarning: Setting schema to a class is deprecated. Set schema to an instance instead.
schema = _ensure_instantiated(schema)
```
| [
{
"content": "import logging\n\nimport colander\nfrom cornice.validators import colander_validator\nfrom pyramid import httpexceptions\nfrom pyramid.security import NO_PERMISSION_REQUIRED\n\nfrom kinto.core import errors\nfrom kinto.core import Service\nfrom kinto.core.errors import ErrorSchema\nfrom kinto.core... | [
{
"content": "import logging\n\nimport colander\nfrom cornice.validators import colander_validator\nfrom pyramid import httpexceptions\nfrom pyramid.security import NO_PERMISSION_REQUIRED\n\nfrom kinto.core import errors\nfrom kinto.core import Service\nfrom kinto.core.errors import ErrorSchema\nfrom kinto.core... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 6c398da4a..bffca1486 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -3,6 +3,14 @@ Changelog
This document describes changes between each past release.
+10.1.2 (2018-10-02)
+-------------------
+
+**Bug fixes**
+
+- Set schema to an instance instead of class (fixes #1781)
+
+
10.1.2 (2018-09-28)
-------------------
diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst
index e3d3850ba..707d839db 100644
--- a/CONTRIBUTORS.rst
+++ b/CONTRIBUTORS.rst
@@ -32,6 +32,7 @@ Contributors
* FooBarQuaxx
* Greeshma <greeshmabalabadra@gmail.com>
* Gabriela Surita <gabsurita@gmail.com>
+* George Smith <h3rmit@protonmail.com>
* Greg Guthe <gguthe@mozilla.com>
* Heron Rossi <heron.rossi@hotmail.com>
* Hiromipaw <silvia@nopressure.co.uk>
diff --git a/kinto/core/views/batch.py b/kinto/core/views/batch.py
index d61eb08e8..83f444a25 100644
--- a/kinto/core/views/batch.py
+++ b/kinto/core/views/batch.py
@@ -111,7 +111,7 @@ class ErrorResponseSchema(colander.MappingSchema):
description='Batch operations')
-@batch.post(schema=BatchRequest,
+@batch.post(schema=BatchRequest(),
validators=(colander_validator,),
content_type=CONTENT_TYPES,
permission=NO_PERMISSION_REQUIRED,
|
mlflow__mlflow-1788 | [BUG] Kubernetes Projects cannot push to private Docker repositories
Thank you for submitting an issue. Please refer to our [issue policy](https://www.github.com/mlflow/mlflow/blob/master/ISSUE_POLICY.md)
for information on what types of issues we address.
For help with debugging your code, please refer to [Stack Overflow](https://stackoverflow.com/questions/tagged/mlflow).
Please do not delete this template unless you are sure your issue is outside its scope.
### System information
- **Have I written custom code (as opposed to using a stock example script provided in MLflow)**: No
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: OSX 10.14
- **MLflow installed from (source or binary)**: PyPI
- **MLflow version (run ``mlflow --version``)**: 1.1.0
- **Python version**: 2.7
- **npm version, if running the dev UI**:
- **Exact command to reproduce**: See below
### Describe the problem
When executing an MLflow Project on Kubernetes, MLflow builds a docker image containing the project's contents and attempts to push it to a Docker repository specified by the backend configuration file (see https://mlflow.org/docs/latest/projects.html#execution-guide). When the Docker repository is a private repository, MLflow fails to push the Docker image. This failure occurs even if the user has authenticated with the Docker repository in their shell via `docker login` or provided access credentials in the `~/.docker/config.json` file.
### Code to reproduce issue
The following steps reproduce the issue using the [mlflow/examples/docker example](https://github.com/mlflow/mlflow/tree/master/examples/docker).
1. Clone the MLflow repository and check out `master`.
2. Specify a private Docker repository in the [mlflow/examples/docker/kubernetes_config.json file](https://github.com/mlflow/mlflow/blob/master/examples/docker/kubernetes_config.json). For example, I used the repository `dbczumar/mlflow-k8s-test`:
```
{
"kube-context": "docker-for-desktop",
"kube-job-template-path": "examples/docker/kubernetes_job_template.yaml",
"repository-uri": "dbczumar/mlflow-k8s-test"
}
```
3. Authenticate with the private Docker repository in your shell (either via `docker login` or by providing credentials in your `~/.docker/config.json` file). Confirm that you can push images to this repository.
4. In the same shell, navigate to the root directory of your MLflow repository and run the following command:
```sh
$ mlflow run examples/docker --backend kubernetes --backend-config examples/docker/kubernetes_config.json -P alpha=0.5
```
5. Observe that the Docker image for the Project builds successfully, but the push process to the private repository fails with a 500-level error:
```
2019/07/26 16:38:23 INFO mlflow.projects: === Building docker image dbczumar/mlflow-k8s-test:96eb9e5 ===
2019/07/26 16:38:30 INFO mlflow.projects.kubernetes: === Pushing docker image dbczumar/mlflow-k8s-test:96eb9e5 ===
Traceback (most recent call last):
File "/Users/czumar/anaconda2/bin/mlflow", line 11, in <module>
load_entry_point('mlflow', 'console_scripts', 'mlflow')()
File "/Users/czumar/anaconda2/lib/python2.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/Users/czumar/anaconda2/lib/python2.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/Users/czumar/anaconda2/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/czumar/anaconda2/lib/python2.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/czumar/anaconda2/lib/python2.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/Users/czumar/mlflow/mlflow/cli.py", line 137, in run
run_id=run_id
File "/Users/czumar/mlflow/mlflow/projects/__init__.py", line 265, in run
use_conda=use_conda, storage_dir=storage_dir, synchronous=synchronous, run_id=run_id)
File "/Users/czumar/mlflow/mlflow/projects/__init__.py", line 171, in _run
image_digest = kb.push_image_to_registry(image.tags[0])
File "/Users/czumar/mlflow/mlflow/projects/kubernetes.py", line 23, in push_image_to_registry
return client.images.get_registry_data(image_tag).id
File "/Users/czumar/anaconda2/lib/python2.7/site-packages/docker/models/images.py", line 333, in get_registry_data
attrs=self.client.api.inspect_distribution(name),
File "/Users/czumar/anaconda2/lib/python2.7/site-packages/docker/utils/decorators.py", line 34, in wrapper
return f(self, *args, **kwargs)
File "/Users/czumar/anaconda2/lib/python2.7/site-packages/docker/utils/decorators.py", line 19, in wrapped
return f(self, resource_id, *args, **kwargs)
File "/Users/czumar/anaconda2/lib/python2.7/site-packages/docker/api/image.py", line 266, in inspect_distribution
self._get(self._url("/distribution/{0}/json", image)), True
File "/Users/czumar/anaconda2/lib/python2.7/site-packages/docker/api/client.py", line 262, in _result
self._raise_for_status(response)
File "/Users/czumar/anaconda2/lib/python2.7/site-packages/docker/api/client.py", line 258, in _raise_for_status
raise create_api_error_from_http_exception(e)
File "/Users/czumar/anaconda2/lib/python2.7/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
raise cls(e, response=response, explanation=explanation)
docker.errors.APIError: 500 Server Error: Internal Server Error ("errors:
denied: requested access to the resource is denied
unauthorized: authentication required
")
```
| [
{
"content": "import imp\nimport os\nimport sys\nfrom setuptools import setup, find_packages\n\nversion = imp.load_source(\n 'mlflow.version', os.path.join('mlflow', 'version.py')).VERSION\n\n\n# Get a list of all files in the JS directory to include in our module\ndef package_files(directory):\n paths = ... | [
{
"content": "import imp\nimport os\nimport sys\nfrom setuptools import setup, find_packages\n\nversion = imp.load_source(\n 'mlflow.version', os.path.join('mlflow', 'version.py')).VERSION\n\n\n# Get a list of all files in the JS directory to include in our module\ndef package_files(directory):\n paths = ... | diff --git a/setup.py b/setup.py
index 6fb6f5b9f2264..9804e875bde51 100644
--- a/setup.py
+++ b/setup.py
@@ -45,11 +45,10 @@ def package_files(directory):
'pyyaml',
'querystring_parser',
'simplejson',
- 'docker>=3.6.0',
+ 'docker>=4.0.0',
'entrypoints',
'sqlparse',
'sqlalchemy',
- 'docker>=3.6.0',
'gorilla',
],
extras_require={
|
rootpy__rootpy-511 | 'TCanvas' object has no attribute 'name'
Hi,
I am seeing weird issues with the interactive module. It looks like the TCanvas is not 'decorated' when loading rootpy.interactive.
```
>>> from ROOT import *
>>> t = TCanvas()
>>> from rootpy.interactive import wait
/usr/local/lib/python2.7/site-packages/IPython/frontend.py:30: UserWarning: The top-level `frontend` package has been deprecated. All its subpackages have been moved to the top `IPython` level.
warn("The top-level `frontend` package has been deprecated. "
w>>> wait()
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/rootpy-dev-py2.7.egg/rootpy/interactive/rootwait.py", line 206, in wait_for_zero_canvases
log.debug("waiting for canvas {0} to close".format(canvas.name))
AttributeError: 'TCanvas' object has no attribute 'name'
```
Albert
| [
{
"content": "# Copyright 2012 the rootpy developers\n# distributed under the terms of the GNU General Public License\n\"\"\"\nThe functions in this module provide a way of pausing code execution until\ncanvases are closed. This can be useful when testing code and you don't want to\nkeep the objects alive outsi... | [
{
"content": "# Copyright 2012 the rootpy developers\n# distributed under the terms of the GNU General Public License\n\"\"\"\nThe functions in this module provide a way of pausing code execution until\ncanvases are closed. This can be useful when testing code and you don't want to\nkeep the objects alive outsi... | diff --git a/rootpy/interactive/rootwait.py b/rootpy/interactive/rootwait.py
index c0a87afe..754687fa 100644
--- a/rootpy/interactive/rootwait.py
+++ b/rootpy/interactive/rootwait.py
@@ -203,7 +203,7 @@ def exit_application_loop():
visible_canvases = get_visible_canvases()
for canvas in visible_canvases:
- log.debug("waiting for canvas {0} to close".format(canvas.name))
+ log.debug("waiting for canvas {0} to close".format(canvas.GetName()))
canvas.Update()
if middle_mouse_close:
|
pydantic__pydantic-1253 | Broken loading list of tuples.
# Bug
Output of `python -c "import pydantic.utils; print(pydantic.utils.version_info())"`:
```
pydantic version: 1.4
pydantic compiled: True
install path: /home/**removed**/venv/lib/python3.7/site-packages/pydantic
python version: 3.7.3 (default, Apr 3 2019, 19:16:38) [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]
platform: Linux-4.19.86-041986-generic-x86_64-with-Ubuntu-18.04-bionic
optional deps. installed: []
```
There is pretty strange behaviour on loading nested list of tuples. I firstly think that this might be intended, but then found out that parse_obj and parse_obj_as give different execution flow which frustrates me.
```py
from pydantic import BaseModel
class OperationData(BaseModel):
id: str
class Operation(BaseModel):
__root__: Tuple[int, OperationData]
data = [0, {'id': '1.11.0'}]
# this one works as expected
print(Operation.parse_obj(data))
# printed: __root__=(0, OperationData(id='1.11.0'))
# However, this one doesn't
print(parse_obj_as(Operation, data))
# Traceback (most recent call last):
# File "/home/**removed**/protocol/base.py", line 238, in <module>
# print(parse_obj_as(Operation, data))
# File "pydantic/tools.py", line 35, in pydantic.tools.parse_obj_as
# File "pydantic/main.py", line 283, in pydantic.main.BaseModel.__init__
# pydantic.error_wrappers.ValidationError: 1 validation error for ParsingModel[Operation]
#__root__
# value is not a valid dict (type=type_error.dict)
# Which is not a big problem. The problem is that I have nested class
class OperationsBatch(BaseModel):
batch_desc: str
operations: List[Operation]
# and it produces same exception on
print(OperationsBatch.parse_obj({'batch_desc': '123', 'operations': [data, data]}))
# Traceback (most recent call last):
# File "/home/**removed**/protocol/base.py", line 243, in <module>
# OperationsBatch.parse_obj({'batch_desc': '123', 'operations': [data, data]})
# File "pydantic/main.py", line 402, in pydantic.main.BaseModel.parse_obj
# File "pydantic/main.py", line 283, in pydantic.main.BaseModel.__init__
# pydantic.error_wrappers.ValidationError: 2 validation errors for OperationsBatch
# operations -> 0
# value is not a valid dict (type=type_error.dict)
# operations -> 1
# value is not a valid dict (type=type_error.dict)
```
It doesn't look like a right behaviour.
| [
{
"content": "import json\nimport sys\nimport warnings\nfrom abc import ABCMeta\nfrom copy import deepcopy\nfrom enum import Enum\nfrom functools import partial\nfrom pathlib import Path\nfrom types import FunctionType\nfrom typing import (\n TYPE_CHECKING,\n AbstractSet,\n Any,\n Callable,\n Dic... | [
{
"content": "import json\nimport sys\nimport warnings\nfrom abc import ABCMeta\nfrom copy import deepcopy\nfrom enum import Enum\nfrom functools import partial\nfrom pathlib import Path\nfrom types import FunctionType\nfrom typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Tuple, Type, TypeVar,... | diff --git a/changes/1190-Shados.md b/changes/1190-Shados.md
new file mode 100644
index 00000000000..7cc66b1259b
--- /dev/null
+++ b/changes/1190-Shados.md
@@ -0,0 +1 @@
+Fixed parsing of nested 'custom root type' models.
diff --git a/pydantic/main.py b/pydantic/main.py
index 993f55c22f9..e007f98368a 100644
--- a/pydantic/main.py
+++ b/pydantic/main.py
@@ -546,6 +546,8 @@ def validate(cls: Type['Model'], value: Any) -> 'Model':
return value.copy()
elif cls.__config__.orm_mode:
return cls.from_orm(value)
+ elif cls.__custom_root_type__:
+ return cls.parse_obj(value)
else:
try:
value_as_dict = dict(value)
diff --git a/tests/test_parse.py b/tests/test_parse.py
index ba854aa3276..a0260fba8b8 100644
--- a/tests/test_parse.py
+++ b/tests/test_parse.py
@@ -1,10 +1,10 @@
import json
import pickle
-from typing import List, Union
+from typing import List, Tuple, Union
import pytest
-from pydantic import BaseModel, Field, Protocol, ValidationError
+from pydantic import BaseModel, Field, Protocol, ValidationError, parse_obj_as
class Model(BaseModel):
@@ -57,6 +57,55 @@ class MyModel(BaseModel):
assert m.__root__ == ['a']
+def test_parse_nested_root_list():
+ class NestedData(BaseModel):
+ id: str
+
+ class NestedModel(BaseModel):
+ __root__: List[NestedData]
+
+ class MyModel(BaseModel):
+ nested: NestedModel
+
+ m = MyModel.parse_obj({'nested': [{'id': 'foo'}]})
+ assert isinstance(m.nested, NestedModel)
+ assert isinstance(m.nested.__root__[0], NestedData)
+
+
+def test_parse_nested_root_tuple():
+ class NestedData(BaseModel):
+ id: str
+
+ class NestedModel(BaseModel):
+ __root__: Tuple[int, NestedData]
+
+ class MyModel(BaseModel):
+ nested: List[NestedModel]
+
+ data = [0, {'id': 'foo'}]
+ m = MyModel.parse_obj({'nested': [data]})
+ assert isinstance(m.nested[0], NestedModel)
+ assert isinstance(m.nested[0].__root__[1], NestedData)
+
+ nested = parse_obj_as(NestedModel, data)
+ assert isinstance(nested, NestedModel)
+
+
+def test_parse_nested_custom_root():
+ class NestedModel(BaseModel):
+ __root__: List[str]
+
+ class MyModel(BaseModel):
+ __root__: NestedModel
+
+ nested = ['foo', 'bar']
+ m = MyModel.parse_obj(nested)
+ assert isinstance(m, MyModel)
+ assert isinstance(m.__root__, NestedModel)
+ assert isinstance(m.__root__.__root__, List)
+ assert isinstance(m.__root__.__root__[0], str)
+
+
def test_json():
assert Model.parse_raw('{"a": 12, "b": 8}') == Model(a=12, b=8)
|
pantsbuild__pants-15341 | Use of relative PATH for docker-tool shims prevents use of credential helpers
**Describe the bug**
I'm trying to set up [tools](https://www.pantsbuild.org/docs/reference-docker#section-tools) in my repo's `docker` subsystem, to plug in the [ECR credential helper](https://github.com/awslabs/amazon-ecr-credential-helper). To do so I added the following to `pants.toml`:
```toml
[docker]
tools = ["docker-credential-ecr-login", "sh"]
```
When I run `./pants package path/to/Dockerfile`, I get the error:
```
failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = error getting credentials - err: docker-credential-ecr-login resolves to executable in current directory (./.shims/bin/docker-credential-ecr-login), out: ``
```
If I run the above with `--no-process-cleanup` and `cd` into the tmpdir, I see:
1. There are shims for both tools under `.shims/bin`
2. The shims behave as expected when I use them directly
3. `__run.sh` sets `PATH=.shims/bin`
If I edit `__run.sh` to instead set `PATH=<absolute-path-to-tmpdir>/.shims/bin`, the build works.
**Pants version**
2.11.0+git9ac327d4
**OS**
MacOS
**Additional info**
Docker Desktop v4.7.1 (77678)
Docker Engine v20.10.14
| [
{
"content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport os\nfrom dataclasses import dataclass\nfrom typing import Mapping\n\nfrom pants.backend.docker.subsystems.docker_optio... | [
{
"content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport os\nfrom dataclasses import dataclass\nfrom typing import Mapping\n\nfrom pants.backend.docker.subsystems.docker_optio... | diff --git a/src/python/pants/backend/docker/util_rules/docker_binary.py b/src/python/pants/backend/docker/util_rules/docker_binary.py
index 2cc8fa0adbf..aa53df01192 100644
--- a/src/python/pants/backend/docker/util_rules/docker_binary.py
+++ b/src/python/pants/backend/docker/util_rules/docker_binary.py
@@ -150,7 +150,7 @@ async def find_docker(
),
)
tools_path = ".shims"
- extra_env = {"PATH": os.path.join(tools_path, tools.bin_directory)}
+ extra_env = {"PATH": os.path.join("{chroot}", tools_path, tools.bin_directory)}
extra_input_digests = {tools_path: tools.digest}
return DockerBinary(
|
tobymao__sqlglot-2165 | Spark raw String Support, comonly used with regexes
This fails with sqlglot:
```python
import sqlglot
sql = """select regexp_replace('100-200', r'([^0-9])', '')"""
sqlglot.parse_one(sql, read="databricks")
```
**Official Documentation**
https://spark.apache.org/docs/latest/sql-ref-literals.html
| [
{
"content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.dialects.dialect import rename_func\nfrom sqlglot.dialects.spark2 import Spark2\nfrom sqlglot.helper import seq_get\n\n\ndef _parse_datediff(args: t.List) -> exp.Expression:\n \"\"\"\n Although ... | [
{
"content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.dialects.dialect import rename_func\nfrom sqlglot.dialects.spark2 import Spark2\nfrom sqlglot.helper import seq_get\n\n\ndef _parse_datediff(args: t.List) -> exp.Expression:\n \"\"\"\n Although ... | diff --git a/sqlglot/dialects/spark.py b/sqlglot/dialects/spark.py
index a4435f6692..9d4a1abeb2 100644
--- a/sqlglot/dialects/spark.py
+++ b/sqlglot/dialects/spark.py
@@ -35,6 +35,13 @@ def _parse_datediff(args: t.List) -> exp.Expression:
class Spark(Spark2):
+ class Tokenizer(Spark2.Tokenizer):
+ RAW_STRINGS = [
+ (prefix + q, q)
+ for q in t.cast(t.List[str], Spark2.Tokenizer.QUOTES)
+ for prefix in ("r", "R")
+ ]
+
class Parser(Spark2.Parser):
FUNCTIONS = {
**Spark2.Parser.FUNCTIONS,
diff --git a/tests/dialects/test_spark.py b/tests/dialects/test_spark.py
index a892b0f110..becb66a18c 100644
--- a/tests/dialects/test_spark.py
+++ b/tests/dialects/test_spark.py
@@ -239,6 +239,14 @@ def test_spark(self):
self.validate_identity("TRIM(LEADING 'SL' FROM 'SSparkSQLS')")
self.validate_identity("TRIM(TRAILING 'SL' FROM 'SSparkSQLS')")
self.validate_identity("SPLIT(str, pattern, lim)")
+ self.validate_identity(
+ "SELECT REGEXP_REPLACE('100-200', r'([^0-9])', '')",
+ "SELECT REGEXP_REPLACE('100-200', '([^0-9])', '')",
+ )
+ self.validate_identity(
+ "SELECT REGEXP_REPLACE('100-200', R'([^0-9])', '')",
+ "SELECT REGEXP_REPLACE('100-200', '([^0-9])', '')",
+ )
self.validate_identity(
"SELECT STR_TO_MAP('a:1,b:2,c:3')",
"SELECT STR_TO_MAP('a:1,b:2,c:3', ',', ':')",
|
Gallopsled__pwntools-2051 | Double decoding in util.packing._need_text
I noticed that if you send a bytestring to e.g. log.info(), you get an AttributeError:
`AttributeError: 'str' object has no attribute 'decode'`
This is because of the following line:
https://github.com/Gallopsled/pwntools/blob/ef698d4562024802be5cc3e2fa49333c70a96662/pwnlib/util/packing.py#L1051
If the param for _need_text is a bytestring and context.encoding = auto, then it will try to decode the string as seen in https://github.com/Gallopsled/pwntools/blob/ef698d4562024802be5cc3e2fa49333c70a96662/pwnlib/util/packing.py#L1043
If this is successful it will then try to decode it one more time in the last return statement which will cause an exception.
If encoding is auto it will iterate over 3 different encodings and try to decode. So the second decode will then use the last encoding that was tried above. However, if all encodings get a UnicodeDecodeError, it will still try to use that last encoding to decode it again in the return statement.
| [
{
"content": " # -*- coding: utf-8 -*-\nr\"\"\"\nModule for packing and unpacking integers.\n\nSimplifies access to the standard ``struct.pack`` and ``struct.unpack``\nfunctions, and also adds support for packing/unpacking arbitrary-width\nintegers.\n\nThe packers are all context-aware for ``endian`` and ``sign... | [
{
"content": " # -*- coding: utf-8 -*-\nr\"\"\"\nModule for packing and unpacking integers.\n\nSimplifies access to the standard ``struct.pack`` and ``struct.unpack``\nfunctions, and also adds support for packing/unpacking arbitrary-width\nintegers.\n\nThe packers are all context-aware for ``endian`` and ``sign... | diff --git a/pwnlib/util/packing.py b/pwnlib/util/packing.py
index 7638865a9..9af06bfc8 100644
--- a/pwnlib/util/packing.py
+++ b/pwnlib/util/packing.py
@@ -1040,7 +1040,7 @@ def _need_text(s, level=1):
if encoding == 'auto':
for encoding in 'ASCII', 'UTF-8', 'ISO-8859-1':
try:
- s = s.decode(encoding)
+ s.decode(encoding)
except UnicodeDecodeError:
pass
else:
|
cookiecutter__cookiecutter-753 | Bug for replay feature from pwd
Running the following command inside of a template repo:
`$ cookiecutter -o tmp .`
Will cause `replay.dump` to files like this:
`~/.cookiecutter_replay/..json`
Identified by @eliasdorneles
| [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ncookiecutter.main\n-----------------\n\nMain entry point for the `cookiecutter` command.\n\nThe code in this module is also a good example of how to use Cookiecutter as a\nlibrary rather than a script.\n\"\"\"\n\nfrom __future__ import unic... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ncookiecutter.main\n-----------------\n\nMain entry point for the `cookiecutter` command.\n\nThe code in this module is also a good example of how to use Cookiecutter as a\nlibrary rather than a script.\n\"\"\"\n\nfrom __future__ import unic... | diff --git a/cookiecutter/main.py b/cookiecutter/main.py
index d8ff7b6c7..0900142cd 100644
--- a/cookiecutter/main.py
+++ b/cookiecutter/main.py
@@ -116,7 +116,7 @@ def cookiecutter(
'The repository {0} could not be located.'.format(template)
)
- template_name = os.path.basename(template)
+ template_name = os.path.basename(os.path.abspath(template))
if replay:
context = load(config_dict['replay_dir'], template_name)
diff --git a/tests/test_main.py b/tests/test_main.py
index 56fc6bfc1..f25ceff56 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -140,3 +140,59 @@ def test_cookiecutter_repository_url_should_clone(
)
assert os.path.isdir(project_dir)
+
+
+def test_replay_dump_template_name(
+ monkeypatch, mocker, user_config_data, user_config_file):
+ """Check that replay_dump is called with a valid template_name that is
+ not a relative path.
+
+ Otherwise files such as ``..json`` are created, which are not just cryptic
+ but also later mistaken for replay files of other templates if invoked with
+ '.' and '--replay'.
+
+ Change the current working directory temporarily to 'tests/fake-repo-tmpl'
+ for this test and call cookiecutter with '.' for the target template.
+ """
+ monkeypatch.chdir('tests/fake-repo-tmpl')
+
+ mock_replay_dump = mocker.patch('cookiecutter.main.dump')
+ mocker.patch('cookiecutter.main.generate_files')
+
+ cookiecutter(
+ '.',
+ no_input=True,
+ replay=False,
+ config_file=user_config_file,
+ )
+
+ mock_replay_dump.assert_called_once_with(
+ user_config_data['replay_dir'],
+ 'fake-repo-tmpl',
+ mocker.ANY,
+ )
+
+
+def test_replay_load_template_name(
+ monkeypatch, mocker, user_config_data, user_config_file):
+ """Check that replay_load is called with a valid template_name that is
+ not a relative path.
+
+ Change the current working directory temporarily to 'tests/fake-repo-tmpl'
+ for this test and call cookiecutter with '.' for the target template.
+ """
+ monkeypatch.chdir('tests/fake-repo-tmpl')
+
+ mock_replay_load = mocker.patch('cookiecutter.main.load')
+ mocker.patch('cookiecutter.main.generate_files')
+
+ cookiecutter(
+ '.',
+ replay=True,
+ config_file=user_config_file,
+ )
+
+ mock_replay_load.assert_called_once_with(
+ user_config_data['replay_dir'],
+ 'fake-repo-tmpl',
+ )
|
aws-cloudformation__cfn-lint-2386 | E0002 parsing I3013 on AWS::RDS::DBInstance if Engine is a Ref
### CloudFormation Lint Version
0.65.0
### What operating system are you using?
Ubuntu 22.04
### Describe the bug
A cfn-lint exception is raised when parsing I3013 rule.
The trigger seems to be the presence of a reference as a value of the "Engine" resource parameter.



### Expected behavior
No error should be present is `Engine: !Ref Something` is used.
### Reproduction template
```yaml
---
AWSTemplateFormatVersion: 2010-09-09
Parameters:
Engine:
Description: DB Engine
Type: String
AllowedValues:
- aurora-mysql
- aurora-postgresql
Resources:
DbCluster:
Type: AWS::RDS::DBCluster
DeletionPolicy: Snapshot
UpdateReplacePolicy: Retain
Properties:
DBClusterIdentifier: FooBar
Engine: !Ref Engine
StorageEncrypted: true
## XXX Other properties removed for brevity
DbWriterInstance:
Type: AWS::RDS::DBInstance
DeletionPolicy: Snapshot
UpdateReplacePolicy: Retain
Properties:
DBClusterIdentifier: !Ref DbCluster
Engine: !Ref Engine # XXX here a cfn-lint bug. Allowed parameter values are "aurora-postgresql" and "aurora-mysql"
PubliclyAccessible: false
```
| [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport re\nfrom cfnlint.rules import CloudFormationLintRule\nfrom cfnlint.rules import RuleMatch\n\n\nclass RetentionPeriodOnResourceTypesWithAutoExpiringContent(CloudFormationLintRu... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport re\nfrom cfnlint.rules import CloudFormationLintRule\nfrom cfnlint.rules import RuleMatch\n\n\nclass RetentionPeriodOnResourceTypesWithAutoExpiringContent(CloudFormationLintRu... | diff --git a/src/cfnlint/rules/resources/RetentionPeriodOnResourceTypesWithAutoExpiringContent.py b/src/cfnlint/rules/resources/RetentionPeriodOnResourceTypesWithAutoExpiringContent.py
index 338966f2b8..3cb3017f0b 100644
--- a/src/cfnlint/rules/resources/RetentionPeriodOnResourceTypesWithAutoExpiringContent.py
+++ b/src/cfnlint/rules/resources/RetentionPeriodOnResourceTypesWithAutoExpiringContent.py
@@ -106,6 +106,8 @@ def match(self, cfn):
return matches
def _validate_property(self, value, regex) -> bool:
- if regex.match(value):
- return True
- return False
+ if isinstance(value, str):
+ if regex.match(value):
+ return True
+ return False
+ return True
|
electricitymaps__electricitymaps-contrib-1599 | GB-NIR invalid data in database
The latest observation seems to be problematic:

therefore it is not shown on the map. However it is inserted in the database.
We should add proper validations to make sure coal/gas are present and that load > 0
| [
{
"content": "#!/usr/bin/env python3\n\nfrom collections import defaultdict\nfrom datetime import datetime\nfrom io import StringIO\nfrom operator import itemgetter\n\nimport logging\nimport pandas as pd\nimport requests\nfrom bs4 import BeautifulSoup\nfrom dateutil import parser, tz\n\nfrom .lib.validation imp... | [
{
"content": "#!/usr/bin/env python3\n\nfrom collections import defaultdict\nfrom datetime import datetime\nfrom io import StringIO\nfrom operator import itemgetter\n\nimport logging\nimport pandas as pd\nimport requests\nfrom bs4 import BeautifulSoup\nfrom dateutil import parser, tz\n\nfrom .lib.validation imp... | diff --git a/parsers/GB_NIR.py b/parsers/GB_NIR.py
index 5379e28bbd..3db1b819c4 100644
--- a/parsers/GB_NIR.py
+++ b/parsers/GB_NIR.py
@@ -277,7 +277,7 @@ def fetch_production(zone_key='GB-NIR', session=None, target_datetime=None,
'source': 'soni.ltd.uk'
}
production_mix_by_quarter_hour.append(
- validate(production_mix, logger=logger, required=['gas', 'coal']))
+ validate(production_mix, logger=logger, required=['gas', 'coal'], floor=1.0))
return production_mix_by_quarter_hour
|
docker__docker-py-753 | Slightly incorrect documentation for user parameter in create_container?
The documentation for `user` parameter in `create_container` says:
`user (str or int): Username or UID`
However, supplying it as python's int(`client.create_container(user=1000, ...)`) gives
`docker.errors.APIError: 500 Server Error: Internal Server Error ("json: cannot unmarshal number into Go value of type string")`
Supplying it as string works. So this code `client.create_container(user="1000", ...)` works fine.
I guess it is a minor issue, though only because Celery printed the exception as "500 Server Error: Internal Server Error", so the critical piece of information was missing(`json: cannot unmarshal number into Go value of type string`). So I guess it is a minor issue, but I figured I should report it.
| [
{
"content": "# Copyright 2013 dotCloud inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless requir... | [
{
"content": "# Copyright 2013 dotCloud inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless requir... | diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index 8dc726b34..c49b3e585 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -715,7 +715,7 @@ def create_container_config(
'Hostname': hostname,
'Domainname': domainname,
'ExposedPorts': ports,
- 'User': user,
+ 'User': six.text_type(user) if user else None,
'Tty': tty,
'OpenStdin': stdin_open,
'StdinOnce': stdin_once,
diff --git a/tests/integration_test.py b/tests/integration_test.py
index fd4ff2d08..4fb2b8ff9 100644
--- a/tests/integration_test.py
+++ b/tests/integration_test.py
@@ -1624,3 +1624,9 @@ def test_649(self):
ctnr = self.client.create_container('busybox', ['sleep', '2'])
self.client.start(ctnr)
self.client.stop(ctnr)
+
+ def test_715(self):
+ ctnr = self.client.create_container('busybox', ['id', '-u'], user=1000)
+ self.client.start(ctnr)
+ self.client.wait(ctnr)
+ assert self.client.logs(ctnr) == '1000\n'
|
mkdocs__mkdocs-2071 | How to add a watched directory
The docs says:
> The serve event is only called when the serve command is used during development. It is passed the Server instance which can be modified before it is activated. For example, additional files or directories could be added to the list of "watched" files for auto-reloading.
How can I add files or directories?
I tried this:
```python
def on_serve(self, server, config, **kwargs):
for element in self.config["watch"]:
server.watch(element)
return server
```
With this in my `mkdocs.yml`:
```yaml
plugins:
- search
- mkdocstrings:
watch:
- src/mkdocstrings
```
It detects the changes, but since I gave no function to `server.watch(dir, func)`, the site is not rebuilt.
I checked the source code of `mkdocs`, and I see that you are using a local function that we cannot reuse ourselves without rewriting it:
https://github.com/mkdocs/mkdocs/blob/262c2b70f3b1a450d685530610af3f28e12f9c9f/mkdocs/commands/serve.py#L120-L137
and
https://github.com/mkdocs/mkdocs/blob/262c2b70f3b1a450d685530610af3f28e12f9c9f/mkdocs/commands/serve.py#L69
What would be the best way to add a directory with this same `builder` functionality? Should I simply copy paste it?
| [
{
"content": "import logging\nimport shutil\nimport tempfile\nimport sys\n\nfrom os.path import isfile, join\nfrom mkdocs.commands.build import build\nfrom mkdocs.config import load_config\n\nlog = logging.getLogger(__name__)\n\n\ndef _init_asyncio_patch():\n \"\"\"\n Select compatible event loop for Torn... | [
{
"content": "import logging\nimport shutil\nimport tempfile\nimport sys\n\nfrom os.path import isfile, join\nfrom mkdocs.commands.build import build\nfrom mkdocs.config import load_config\n\nlog = logging.getLogger(__name__)\n\n\ndef _init_asyncio_patch():\n \"\"\"\n Select compatible event loop for Torn... | diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md
index 2b81e42552..392f533942 100644
--- a/docs/about/release-notes.md
+++ b/docs/about/release-notes.md
@@ -23,6 +23,8 @@ The current and past members of the MkDocs team.
## Version 1.1.1 (in development)
+* Bugfix: Pass `builder` to the `on_serve` event so that it can be passed to
+ `server.watch` by plugins (#1952).
* Bugfix: Use `lunr[languages]==0.5.8` to avoid `nltk` incompatibilities (#2062).
* Bugfix: Ensure wheel is Python 3 only (#2021).
* Bugfix: Clean up `dev_addr` validation and disallow `0.0.0.0` (#2022).
diff --git a/docs/user-guide/plugins.md b/docs/user-guide/plugins.md
index 59ed8647b0..fb7bc8b3aa 100644
--- a/docs/user-guide/plugins.md
+++ b/docs/user-guide/plugins.md
@@ -155,6 +155,7 @@ entire site.
Parameters:
: __server:__ `livereload.Server` instance
: __config:__ global configuration object
+ : __builder:__ a callable which gets passed to each call to `server.watch`
Returns:
: `livereload.Server` instance
diff --git a/mkdocs/commands/serve.py b/mkdocs/commands/serve.py
index 21b7ca6c1e..390f134596 100644
--- a/mkdocs/commands/serve.py
+++ b/mkdocs/commands/serve.py
@@ -73,7 +73,7 @@ def get_web_handlers(self, script):
server.watch(d, builder)
# Run `serve` plugin events.
- server = config['plugins'].run_event('serve', server, config=config)
+ server = config['plugins'].run_event('serve', server, config=config, builder=builder)
server.serve(root=site_dir, host=host, port=port, restart_delay=0)
|
TheAlgorithms__Python-7556 | [PYTEST WARNING] QasmSimulator will be deprecated
### Feature description
The use of `q.Aer.get_backend("qasm_simulator")` raises the warning
```
/opt/hostedtoolcache/Python/3.10.7/x64/lib/python3.10/site-packages/qiskit_aer/backends/qasm_simulator.py:360: PendingDeprecationWarning: The `QasmSimulator` backend will be deprecated in the future. It has been superseded by the `AerSimulator` backend.
warn('The `QasmSimulator` backend will be deprecated in the'
```
This code is found in the following files:
- deutsch_jozsa @abhishekjiitr
- half_adder @abhishekjiitr
- not_gate @abhishekjiitr
- single_quibit_measure @abhishekjiitr
origin: #7211
| [
{
"content": "\"\"\"\nBuild the superdense coding protocol. This quantum\ncircuit can send two classical bits using one quantum\nbit. This circuit is designed using the Qiskit\nframework. This experiment run in IBM Q simulator\nwith 1000 shots.\n.\nReferences:\nhttps://qiskit.org/textbook/ch-algorithms/superden... | [
{
"content": "\"\"\"\nBuild the superdense coding protocol. This quantum\ncircuit can send two classical bits using one quantum\nbit. This circuit is designed using the Qiskit\nframework. This experiment run in IBM Q simulator\nwith 1000 shots.\n.\nReferences:\nhttps://qiskit.org/textbook/ch-algorithms/superden... | diff --git a/quantum/superdense_coding.py b/quantum/superdense_coding.py
index c8eda381158b..10ebc2d3593c 100644
--- a/quantum/superdense_coding.py
+++ b/quantum/superdense_coding.py
@@ -92,7 +92,7 @@ def superdense_coding(bit_1: int = 1, bit_2: int = 1) -> qiskit.result.counts.Co
# measure the circuit
quantum_circuit.measure(qr, cr)
- backend = Aer.get_backend("qasm_simulator")
+ backend = Aer.get_backend("aer_simulator")
job = execute(quantum_circuit, backend, shots=1000)
return job.result().get_counts(quantum_circuit)
|
pwr-Solaar__Solaar-1810 | eliminate visual glitching when updating a setting
**Information**
- Solaar version (`solaar --version` and `git describe --tags`): 1.1.6
**Is your feature request related to a problem? Please describe.**
Some setting displays glitch when updated, maybe only range settings. For a very short time, a spinner is displayed and the size of the setting control is reduced.
**Describe the solution you'd like**
The size of the setting control should not change.
| [
{
"content": "# -*- python-mode -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the License, or\n## (at your... | [
{
"content": "# -*- python-mode -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the License, or\n## (at your... | diff --git a/lib/solaar/ui/config_panel.py b/lib/solaar/ui/config_panel.py
index 9c019af749..b54736712c 100644
--- a/lib/solaar/ui/config_panel.py
+++ b/lib/solaar/ui/config_panel.py
@@ -593,7 +593,7 @@ def _create_sbox(s, device):
def _update_setting_item(sbox, value, is_online=True, sensitive=True):
- sbox._spinner.set_visible(False)
+ # sbox._spinner.set_visible(False) # don't repack item box
sbox._spinner.stop()
if value is None:
sbox._control.set_sensitive(False)
|
huggingface__trl-528 | DPO evaluation error---tensors on two devices
Hi!
Thanks for the awesome codebase. I ran the DPO example `trl/examples/dpo.py` but encountered an error at the evaluation step: `Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!`
Here is a [colab notebook](https://colab.research.google.com/drive/11AVym7U3gkTn_qTfrnSDtA_AO5_zJkkd?usp=sharing) that shows this problem. To expose the problem faster, I set `training_args.eval_steps = 1`.
To solve it, a hotfix can be adding `.to(self.accelerator.device)` at a few places in [concatenated_forward](https://github.com/lvwerra/trl/blob/main/trl/trainer/dpo_trainer.py#L288-L296):
```python
all_logits = model(
concatenated_batch["concatenated_input_ids"].to(self.accelerator.device),
attention_mask=concatenated_batch["concatenated_attention_mask"].to(self.accelerator.device),
).logits.to(torch.float32)
all_logps = self._get_batch_logps(
all_logits,
concatenated_batch["concatenated_labels"].to(self.accelerator.device),
average_log_prob=False,
)
```
However, I am not sure why the trainer does not handle the device change automatically. If this hotfix is fine, I can submit a pull request. Otherwise, I'm also happy to learn how to address this problem more generically.
Tianlin
| [
{
"content": "# DPO Authors: Rafael Rafailov, Archit Sharma, Eric Mitchell, Stefano Ermon, Christopher D. Manning, and Chelsea Finn 2023\n# Copyright 2023 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in com... | [
{
"content": "# DPO Authors: Rafael Rafailov, Archit Sharma, Eric Mitchell, Stefano Ermon, Christopher D. Manning, and Chelsea Finn 2023\n# Copyright 2023 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in com... | diff --git a/trl/trainer/dpo_trainer.py b/trl/trainer/dpo_trainer.py
index 483c9f3cd5..6218fc7512 100644
--- a/trl/trainer/dpo_trainer.py
+++ b/trl/trainer/dpo_trainer.py
@@ -204,7 +204,7 @@ def concatenated_inputs(self, batch: Dict[str, Union[List, torch.LongTensor]]) -
pad_to_length(batch[k], max_length, pad_value=pad_value),
),
dim=0,
- )
+ ).to(self.accelerator.device)
return concatenated_batch
def dpo_loss(
|
python-poetry__poetry-794 | Support customizable POETRY_HOME
It would be nice to define where poetry gets installed (via get-poetry.py).
By reading the docstring I had assumed it would work in $POETRY_HOME, but that was quickly disproven.
Ideally this could be defined via an environment variable (POETRY_HOME) or via a flag to get-poetry.py.
| [
{
"content": "\"\"\"\nThis script will install poetry and its dependencies\nin isolation from the rest of the system.\n\nIt does, in order:\n\n - Downloads the latest stable (or pre-release) version of poetry.\n - Downloads all its dependencies in the poetry/_vendor directory.\n - Copies it and all extra fil... | [
{
"content": "\"\"\"\nThis script will install poetry and its dependencies\nin isolation from the rest of the system.\n\nIt does, in order:\n\n - Downloads the latest stable (or pre-release) version of poetry.\n - Downloads all its dependencies in the poetry/_vendor directory.\n - Copies it and all extra fil... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9e4f35cf2ee..fc28d7e1a93 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@
- Added a `env use` command to control the Python version used by the project.
- Added a `env list` command to list the virtualenvs associated with the current project.
- Added a `env remove` command to delete virtualenvs associated with the current project.
+- Added support for `POETRY_HOME` declaration within `get-poetry.py`.
- Added support for declaring a specific source for dependencies.
- Added support for disabling PyPI and making another repository the default one.
- Added support for declaring private repositories as secondary.
diff --git a/docs/docs/index.md b/docs/docs/index.md
index 2d4d12a0bf6..66fb0ade021 100644
--- a/docs/docs/index.md
+++ b/docs/docs/index.md
@@ -46,6 +46,12 @@ python get-poetry.py --uninstall
POETRY_UNINSTALL=1 python get-poetry.py
```
+By default, Poetry is installed into the user's platform-specific home directory. If you wish to change this, you may define the `POETRY_HOME` environment variable:
+
+```bash
+POETRY_HOME=/etc/poetry python get-poetry.py
+```
+
If you want to install prerelease versions, you can do so by passing `--preview` to `get-poetry.py`
or by using the `POETRY_PREVIEW` environment variable:
diff --git a/get-poetry.py b/get-poetry.py
index e369c866d32..e6cbe6db8fb 100644
--- a/get-poetry.py
+++ b/get-poetry.py
@@ -187,7 +187,7 @@ def expanduser(path):
HOME = expanduser("~")
-POETRY_HOME = os.path.join(HOME, ".poetry")
+POETRY_HOME = os.environ.get("POETRY_HOME") or os.path.join(HOME, ".poetry")
POETRY_BIN = os.path.join(POETRY_HOME, "bin")
POETRY_ENV = os.path.join(POETRY_HOME, "env")
POETRY_LIB = os.path.join(POETRY_HOME, "lib")
|
nautobot__nautobot-1199 | JobResult page may fail to list JobLogEntries in chronological order
### Environment
* Python version: 3.6
* Nautobot version: 1.2.1
### Steps to Reproduce
Unsure at this time
<!-- What did you expect to happen? -->
### Expected Behavior
JobLogEntries to be listed in chronological order.
<!-- What happened instead? -->
### Observed Behavior

Looking at the code, either the `JobLogEntry` class should define a `Meta.ordering` property, or else the `GitRepositoryResultView` and `JobResultView` view should add an `order_by()` to their `JobLogEntry` querysets.
| [
{
"content": "import inspect\n\nimport django_tables2 as tables\n\nfrom django.conf import settings\nfrom django.urls import reverse\nfrom django.utils.html import format_html\nfrom django.utils.safestring import mark_safe\nfrom django_tables2.utils import Accessor\nfrom jsonschema.exceptions import ValidationE... | [
{
"content": "import inspect\n\nimport django_tables2 as tables\n\nfrom django.conf import settings\nfrom django.urls import reverse\nfrom django.utils.html import format_html\nfrom django.utils.safestring import mark_safe\nfrom django_tables2.utils import Accessor\nfrom jsonschema.exceptions import ValidationE... | diff --git a/nautobot/extras/tables.py b/nautobot/extras/tables.py
index ad0278e2cca..bfddba8717d 100644
--- a/nautobot/extras/tables.py
+++ b/nautobot/extras/tables.py
@@ -389,7 +389,7 @@ def log_entry_color_css(record):
class JobLogEntryTable(BaseTable):
- created = tables.DateTimeColumn(verbose_name="Time", format=settings.SHORT_DATETIME_FORMAT)
+ created = tables.DateTimeColumn(verbose_name="Time", format="Y-m-d H:i:s.u")
grouping = tables.Column()
log_level = tables.Column(
verbose_name="Level",
|
chainer__chainer-5613 | F.negative_sampling outputs float32 loss for any input dtypes, only in CPU mode
Version: current master b9e9267237d60b76211f42d13f80938d1b926e74
### Code to reproduce
```py
import chainer
import chainer.functions as F
import numpy
import cupy
batch_size = 2
in_size = 5
n_classes = 3
sample_size = 4
def func(xp, in_dtype, reduce):
def sampler(shape):
return xp.ones(shape, xp.int32)
x_arr = xp.ones((batch_size, in_size), in_dtype)
w_arr = xp.ones((n_classes, in_size), in_dtype)
t_arr = xp.ones((batch_size,), numpy.int32)
x = chainer.Variable(x_arr)
w = chainer.Variable(w_arr)
t = chainer.Variable(t_arr)
y = F.negative_sampling(x, t, w, sampler, sample_size, reduce=reduce)
print(in_dtype.__name__, ' -> ', y.dtype)
for reduce in ('sum', 'no'):
print('*** reduce: ', reduce)
for xp in (numpy, cupy):
print('xp: ', xp.__name__)
for in_dtype in (numpy.float16, numpy.float32, numpy.float64):
func(xp, in_dtype, reduce)
print()
```
### Result
```
*** reduce: sum
xp: numpy
float16 -> float32
float32 -> float32
float64 -> float32
xp: cupy
float16 -> float16
float32 -> float32
float64 -> float64
*** reduce: no
xp: numpy
float16 -> float16
float32 -> float32
float64 -> float64
xp: cupy
float16 -> float16
float32 -> float32
float64 -> float64
```
| [
{
"content": "import numpy\nimport six\n\nimport chainer\nfrom chainer import backend\nfrom chainer.backends import cuda\nfrom chainer import function_node\nfrom chainer.utils import argument\nfrom chainer.utils import type_check\n\n\ndef _sigmoid_grad(x, y, gy):\n return chainer.functions.activation.sigmoid... | [
{
"content": "import numpy\nimport six\n\nimport chainer\nfrom chainer import backend\nfrom chainer.backends import cuda\nfrom chainer import function_node\nfrom chainer.utils import argument\nfrom chainer.utils import type_check\n\n\ndef _sigmoid_grad(x, y, gy):\n return chainer.functions.activation.sigmoid... | diff --git a/chainer/functions/loss/negative_sampling.py b/chainer/functions/loss/negative_sampling.py
index f6d0c2bd9b90..9ec9a935127d 100644
--- a/chainer/functions/loss/negative_sampling.py
+++ b/chainer/functions/loss/negative_sampling.py
@@ -67,7 +67,7 @@ def forward_cpu(self, inputs):
loss[self.ignore_mask] = numpy.sum(numpy.logaddexp(wx, 0), axis=1)
if self.reduce == 'sum':
- loss = numpy.array(loss.sum(), 'f')
+ loss = numpy.array(loss.sum(), x.dtype)
self.samples = samples
return loss,
diff --git a/tests/chainer_tests/functions_tests/loss_tests/test_negative_sampling.py b/tests/chainer_tests/functions_tests/loss_tests/test_negative_sampling.py
index 13851e7efc57..12b838652bed 100644
--- a/tests/chainer_tests/functions_tests/loss_tests/test_negative_sampling.py
+++ b/tests/chainer_tests/functions_tests/loss_tests/test_negative_sampling.py
@@ -1,6 +1,7 @@
import unittest
import numpy
+import pytest
import six
import chainer
@@ -60,6 +61,7 @@ def setUp(self):
self.check_double_backward_options['dtype'] = numpy.float64
def check_forward(self, x_data, t_data, w_data, sampler):
+ batch_size = len(self.t)
x = chainer.Variable(x_data)
t = chainer.Variable(t_data)
w = chainer.Variable(w_data)
@@ -67,17 +69,24 @@ def check_forward(self, x_data, t_data, w_data, sampler):
# return_samples=False
y = functions.negative_sampling(
x, t, w, sampler, self.sample_size, reduce=self.reduce)
+ assert y.dtype == self.dtype
# return_samples=True
y_, samples = functions.negative_sampling(
x, t, w, sampler, self.sample_size, reduce=self.reduce,
return_samples=True)
+ xp = chainer.backend.get_array_module(x)
+ assert isinstance(samples, xp.ndarray)
+ assert samples.dtype == numpy.int32
+ assert samples.shape == (batch_size, self.sample_size + 1)
+
# Sampler is deterministic, so y and y_ should equal.
+ assert y.dtype == y_.dtype
numpy.testing.assert_array_equal(
cuda.to_cpu(y.array), cuda.to_cpu(y_.array))
- self.assertEqual(y.shape, self.gy.shape)
+ assert y.shape == self.gy.shape
samples = cuda.to_cpu(samples)
@@ -98,6 +107,7 @@ def check_forward(self, x_data, t_data, w_data, sampler):
if self.reduce == 'sum':
loss = loss.sum()
+ assert y.dtype == loss.dtype
testing.assert_allclose(y.data, loss, **self.check_forward_options)
def test_forward_cpu(self):
@@ -167,7 +177,7 @@ def check_invalid_option(self, xp):
t = xp.asarray(self.t)
w = xp.asarray(self.w)
- with self.assertRaises(ValueError):
+ with pytest.raises(ValueError):
negative_sampling.negative_sampling(
x, t, w, make_sampler(xp, 5), 2, reduce='invalid_option')
|
arviz-devs__arviz-1334 | Fix negative values in std
edit. There is an error in the numeric_utils.
This is a wrong order of operations
std_devs = np.diag(cov ** 0.5)
Correct order is
std_devs = np.diag(cov) ** 0.5
| [
{
"content": "\"\"\"Numerical utility functions for ArviZ.\"\"\"\nimport warnings\nimport numpy as np\nfrom scipy.signal import convolve, convolve2d\nfrom scipy.signal.windows import gaussian\nfrom scipy.sparse import coo_matrix\n\nfrom .stats.stats_utils import histogram\nfrom .utils import _stack, _dot, _cov\... | [
{
"content": "\"\"\"Numerical utility functions for ArviZ.\"\"\"\nimport warnings\nimport numpy as np\nfrom scipy.signal import convolve, convolve2d\nfrom scipy.signal.windows import gaussian\nfrom scipy.sparse import coo_matrix\n\nfrom .stats.stats_utils import histogram\nfrom .utils import _stack, _dot, _cov\... | diff --git a/arviz/numeric_utils.py b/arviz/numeric_utils.py
index 6731265a86..c849b251d0 100644
--- a/arviz/numeric_utils.py
+++ b/arviz/numeric_utils.py
@@ -124,7 +124,7 @@ def _fast_kde_2d(x, y, gridsize=(128, 128), circular=False):
scotts_factor = len_x ** (-1 / 6)
cov = _cov(xyi)
- std_devs = np.diag(cov ** 0.5)
+ std_devs = np.diag(cov) ** 0.5
kern_nx, kern_ny = np.round(scotts_factor * 2 * np.pi * std_devs)
inv_cov = np.linalg.inv(cov * scotts_factor ** 2)
|
encode__uvicorn-1534 | Latest version breaks something in the h11 implementation
I'm using uvicorn to run a FastAPI application. I just download the latest uvicorn version 0.18.0 and got the following error when trying to run my app:
```
Fatal error: protocol.data_received() call failed.
protocol: <uvicorn.protocols.http.h11_impl.H11Protocol object at 0x7fcbc87089a0>
transport: <_SelectorSocketTransport fd=11 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/.../python3.9/asyncio/selector_events.py", line 870, in _read_ready__data_received
self._protocol.data_received(data)
File "/.../venv/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 161, in data_received
self.handle_events()
File "/.../venv/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 166, in handle_events
event = self.conn.next_event()
File "/.../venv/lib/python3.9/site-packages/h11/_connection.py", line 471, in next_event
if len(self._receive_buffer) > self._max_incomplete_event_size:
TypeError: '>' not supported between instances of 'int' and 'NoneType'
```
(I removed the full paths)
When going back to version 0.17.0, I don't encounter this error...
Please let me know if there is more details I can share.
| [
{
"content": "import logging\nimport os\nimport platform\nimport ssl\nimport sys\nimport typing\n\nimport click\nfrom h11._connection import DEFAULT_MAX_INCOMPLETE_EVENT_SIZE\n\nimport uvicorn\nfrom uvicorn.config import (\n HTTP_PROTOCOLS,\n INTERFACES,\n LIFESPAN,\n LOG_LEVELS,\n LOGGING_CONFIG... | [
{
"content": "import logging\nimport os\nimport platform\nimport ssl\nimport sys\nimport typing\n\nimport click\nfrom h11._connection import DEFAULT_MAX_INCOMPLETE_EVENT_SIZE\n\nimport uvicorn\nfrom uvicorn.config import (\n HTTP_PROTOCOLS,\n INTERFACES,\n LIFESPAN,\n LOG_LEVELS,\n LOGGING_CONFIG... | diff --git a/uvicorn/main.py b/uvicorn/main.py
index ac6096722..58e01305a 100644
--- a/uvicorn/main.py
+++ b/uvicorn/main.py
@@ -346,7 +346,7 @@ def print_version(ctx: click.Context, param: click.Parameter, value: bool) -> No
"--h11-max-incomplete-event-size",
"h11_max_incomplete_event_size",
type=int,
- default=None,
+ default=DEFAULT_MAX_INCOMPLETE_EVENT_SIZE,
help="For h11, the maximum number of bytes to buffer of an incomplete event.",
)
@click.option(
|
encode__django-rest-framework-5849 | RelatedField (and their subclasses) do not support traversing relationships that can be null
This was introduced by #5518, and while the solutions there work on normal fields, RelatedField behaves differently:
https://github.com/encode/django-rest-framework/blob/da535d31dd93dbb1d650e2e92bd0910ca8eb4ea4/rest_framework/fields.py#L440-L442
vs
https://github.com/encode/django-rest-framework/blob/da535d31dd93dbb1d650e2e92bd0910ca8eb4ea4/rest_framework/relations.py#L177
An example of the problem can be reproduced with https://gist.github.com/gcbirzan/a968facbaf0969f4a9616942de7022dc
A `Model1` instance with `None` for `model2` will produce an exception.
I believe that the correct behaviour is for `RelatedField.get_attribute` to call super.
As a side note, this is very hacky to work around, you'll need to copy paste the code from `RelatedField.get_attribute` in your class, then call the `Field.get_attribute`, since obviously super won't work.
If there's some agreement that this is the solution, I can fix it, but I'm not 100% sure (given the reaction on the original ticket) if this is considered a bug.
| [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nfrom collections import OrderedDict\n\nfrom django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist\nfrom django.db.models import Manager\nfrom django.db.models.query import QuerySet\nfrom django.urls import NoReverseMatch,... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nfrom collections import OrderedDict\n\nfrom django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist\nfrom django.db.models import Manager\nfrom django.db.models.query import QuerySet\nfrom django.urls import NoReverseMatch,... | diff --git a/rest_framework/relations.py b/rest_framework/relations.py
index c87b9299ab..c4e364cf25 100644
--- a/rest_framework/relations.py
+++ b/rest_framework/relations.py
@@ -174,7 +174,7 @@ def get_attribute(self, instance):
pass
# Standard case, return the object instance.
- return get_attribute(instance, self.source_attrs)
+ return super(RelatedField, self).get_attribute(instance)
def get_choices(self, cutoff=None):
queryset = self.get_queryset()
diff --git a/tests/test_model_serializer.py b/tests/test_model_serializer.py
index e55afe03e1..e4fc8b37f6 100644
--- a/tests/test_model_serializer.py
+++ b/tests/test_model_serializer.py
@@ -23,6 +23,8 @@
from rest_framework import serializers
from rest_framework.compat import postgres_fields, unicode_repr
+from .models import NestedForeignKeySource
+
def dedent(blocktext):
return '\n'.join([line[12:] for line in blocktext.splitlines()[1:-1]])
@@ -1164,6 +1166,25 @@ class Meta:
class TestFieldSource(TestCase):
+ def test_traverse_nullable_fk(self):
+ """
+ A dotted source with nullable elements uses default when any item in the chain is None. #5849.
+
+ Similar to model example from test_serializer.py `test_default_for_multiple_dotted_source` method,
+ but using RelatedField, rather than CharField.
+ """
+ class TestSerializer(serializers.ModelSerializer):
+ target = serializers.PrimaryKeyRelatedField(
+ source='target.target', read_only=True, allow_null=True, default=None
+ )
+
+ class Meta:
+ model = NestedForeignKeySource
+ fields = ('target', )
+
+ model = NestedForeignKeySource.objects.create()
+ assert TestSerializer(model).data['target'] is None
+
def test_named_field_source(self):
class TestSerializer(serializers.ModelSerializer):
|
zestedesavoir__zds-site-672 | Avoir un rappel des bases du Mardkown à côté des zones de rédaction
L'idée est d'avoir un rappel des bases du Mardkown à côté des zones de rédaction (les grandes lignes + un lien vers le tuto).
Je sais qu'on a les boutons, mais c'est toujours utile pour ceux qui préfèrent éviter de jouer avec la souris, et je pense améliorera l'apprentissage du MD.
Le truc le plus important à y mettre est sans doute la gestion des sauts de ligne / paragraphes :)
| [
{
"content": "# coding: utf-8\n\nimport locale\nimport os\nimport platform\n\n\n# Python is platform-independent...or is it?\nif platform.system() == \"Windows\":\n locale.setlocale(locale.LC_TIME, 'fra')\nelse:\n locale.setlocale(locale.LC_TIME, 'fr_FR.UTF-8')\n\nDEBUG = True\nTEMPLATE_DEBUG = DEBUG\n# I... | [
{
"content": "# coding: utf-8\n\nimport locale\nimport os\nimport platform\n\n\n# Python is platform-independent...or is it?\nif platform.system() == \"Windows\":\n locale.setlocale(locale.LC_TIME, 'fra')\nelse:\n locale.setlocale(locale.LC_TIME, 'fr_FR.UTF-8')\n\nDEBUG = True\nTEMPLATE_DEBUG = DEBUG\n# I... | diff --git a/assets/css/main.css b/assets/css/main.css
index f55d6ebd09..05d1e05c26 100644
--- a/assets/css/main.css
+++ b/assets/css/main.css
@@ -1 +1 @@
-/*! normalize.css v1.1.2 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}html,button,input,select,textarea{font-family:sans-serif}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em;margin:1em 0}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.67em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}blockquote{margin:1em 40px}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}p,pre{margin:1em 0}code,kbd,pre,samp{font-family:monospace,serif;_font-family:'courier new',monospace;font-size:1em}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:before,q:after{content:'';content:none}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}dl,menu,ol,ul{margin:1em 0}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ul,nav ol{list-style:none;list-style-image:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure{margin:0}form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;*overflow:visible}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;*height:13px;*width:13px}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}html,body,button,input,select,textarea{font-family:"Segoe UI","Trebuchet MS",Helvetica,"Helvetica Neue",Arial,sans-serif;color:#222}.wf-active html,.no-js html,.wf-active body,.no-js body,.wf-active button,.no-js button,.wf-active input,.no-js input,.wf-active select,.no-js select,.wf-active textarea,.no-js textarea{font-family:"Source Sans Pro","Segoe UI","Trebuchet MS",Helvetica,"Helvetica Neue",Arial,sans-serif}html{height:100%;width:100%;font-size:62.5%;overflow-x:hidden}body{background:#f7f7f7;font-size:14px;font-size:1.4rem;line-height:1.7em;min-height:100%;width:100%}.page-container,.main-container{min-height:100%;background:#f7f7f7}.content-container{margin-bottom:50px}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}a{color:#1088bf;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}a:hover{color:#d68807;text-decoration:none}.chromeframe{margin:0;background:#ccc;color:#000;padding:0.2em 0;text-align:center}.mobile-menu,.mobile-menu-btn{display:none}.ico{background-image:url('../images/sprite@2x-sdc8bfa9a21.png');background-repeat:no-repeat}.ico-after{position:relative}.ico-after:after{content:" ";display:block;position:absolute;top:0;left:0;width:16px;height:16px;background-image:url('../images/sprite@2x-sdc8bfa9a21.png');background-repeat:no-repeat}.a11y{display:block;width:0;height:0;text-indent:-9999px}.ir{background-color:transparent;border:0;overflow:hidden;*text-indent:-9999px}.ir:before{content:"";display:block;width:0;height:150%}.hidden{display:none !important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.clearfix:before,.clearfix:after{content:" ";display:table}.clearfix:after{clear:both}.clearfix{*zoom:1}.header-container header .accessibility{list-style:none;margin:0;padding:0 2.5%;background:rgba(0,0,0,0.2);overflow:hidden;height:0}.header-container header .accessibility.focused{height:auto}.header-container header .accessibility li{display:inline;margin:0;padding:0}.header-container header .accessibility li a{display:inline-block;padding:0 7px}.header-container header .accessibility li a:hover,.header-container header .accessibility li a:focus{color:#084561;background-color:#fff}.header-container header{background:#084561;border-bottom:3px solid #f8ad32}.header-container header a,.header-container header button{text-decoration:none;color:#FFF;-moz-transition-property:background;-o-transition-property:background;-webkit-transition-property:background;transition-property:background;-moz-transition-duration:0.15s;-o-transition-duration:0.15s;-webkit-transition-duration:0.15s;transition-duration:0.15s}.header-container header a:focus,.header-container header button:focus{outline:none}.header-logo{text-align:center;margin:0;padding:0;width:100%}.header-logo-link{display:block;margin:0 auto;text-indent:-9999px;width:100%;max-width:240px;height:60px;background:url("../images/logo.png") no-repeat center center;background-size:100% auto}.header-logo-link.oldie{width:240px}.header-logo-link:hover,.header-logo-link:focus{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);opacity:0.7}.dropdown{display:none;position:absolute;text-align:left;top:50px;left:0;right:0;background-color:#396a81;margin:0;padding:10px 2.5%;font-size:14px;font-size:1.4rem;border-bottom:3px solid #f8ad32;z-index:50}.dropdown .dropdown-title{text-transform:uppercase;color:#FFF}.dropdown .dropdown-list{width:100%;padding:0}.dropdown .dropdown-list>li{width:20%;float:left}.dropdown .dropdown-list>li.dropdown-empty-message{color:rgba(255,255,255,0.5);text-align:center;line-height:60px;background:none !important}.dropdown .dropdown-list>li ul{margin:0 0 10px;padding:0}.dropdown .dropdown-list>li ul li{position:relative}.dropdown .dropdown-list>li ul li a{display:block;width:95%;height:25px;line-height:25px;color:#95d7f5;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.dropdown .dropdown-list>li ul li a:hover,.dropdown .dropdown-list>li ul li a:focus{text-indent:3%;background-color:rgba(0,0,0,0.3)}.dropdown .dropdown-link-all{display:block;clear:both;text-align:center;height:30px;line-height:30px;border-top:1px solid #274a5a;background-color:#396a81;-moz-transition-property:color,background-color;-o-transition-property:color,background-color;-webkit-transition-property:color,background-color;transition-property:color,background-color}.dropdown .dropdown-link-all:first-child{border-top:0 !important;border-bottom:1px solid #274a5a}.dropdown .dropdown-link-all:hover,.dropdown .dropdown-link-all:focus{color:#95d7f5;background-color:#274a5a;border-top:1px solid #396a81}.active+.dropdown{display:block}.header-container .header-menu{height:60px}.header-container .header-menu .header-menu-list{margin:0;padding:0}.header-container .header-menu .header-menu-list>li{display:block;float:left;width:33.3%}.header-container .header-menu .header-menu-list>li>a{display:block;position:relative;text-align:center;line-height:60px;text-transform:uppercase;font-size:1.5px;font-size:1.5rem;text-shadow:rgba(0,0,0,0.75) 0 0 3px}.header-container .header-menu .header-menu-list>li>a:hover,.header-container .header-menu .header-menu-list>li>a:focus,.header-container .header-menu .header-menu-list>li>a.active{background:#396a81}.header-container .header-menu .header-menu-list>li>a.current:before{content:" ";display:block;position:absolute;bottom:0;left:0;right:0;height:2px;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px;border-radius:2px 2px 0 0;background-color:#f8ad32}.header-container .header-menu .header-menu-list>li>a.current.active:before{height:0}.logbox{background:rgba(255,255,255,0.05)}.logbox .notifs-links{margin-right:60px}.logbox .notifs-links .ico-link{display:block;position:relative;width:33.3%;height:60px;line-height:60px;float:left}.logbox .notifs-links .ico-link .notif-count{display:block;position:absolute;z-index:1;top:50%;right:50%;margin:-20px -22px 0 0;padding:0 5px;height:16px;line-height:14px;background:#c0392b;-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px}.logbox .notifs-links .ico-link .notif-text{display:block;position:absolute;text-indent:-9999px;height:22px;width:22px;top:50%;left:50%;margin:-11px 0 0 -11px}.logbox .notifs-links .ico-link .notif-text.ico-messages{background-position:0 -3360px}.logbox .notifs-links .ico-link .notif-text.ico-notifs{background-position:0 -3920px}.logbox .notifs-links .ico-link .notif-text.ico-alerts{background-position:0 -240px}.logbox .notifs-links .ico-link .notif-text.ico-gear{background-position:0 -2400px}.logbox .notifs-links .ico-link:hover,.logbox .notifs-links .ico-link:focus,.logbox .notifs-links .ico-link.active{background:#396a81}.logbox .dropdown{overflow:hidden}.logbox .dropdown .dropdown-title{display:block;width:100%;height:35px;line-height:37px;text-align:center;border-bottom:1px solid #274a5a;background-color:#396a81}.logbox .dropdown,.logbox .dropdown .dropdown-list{margin:0;padding:0;list-style:none;background-color:#19526c}.logbox .dropdown li,.logbox .dropdown .dropdown-list li{display:block;width:100%;height:60px}.logbox .dropdown li a,.logbox .dropdown .dropdown-list li a{display:block;overflow:hidden;position:relative;height:100%;width:100%}.logbox .dropdown li a,.logbox .dropdown li a:hover,.logbox .dropdown li a:focus,.logbox .dropdown li a.read:hover,.logbox .dropdown li a.read:focus,.logbox .dropdown .dropdown-list li a,.logbox .dropdown .dropdown-list li a:hover,.logbox .dropdown .dropdown-list li a:focus,.logbox .dropdown .dropdown-list li a.read:hover,.logbox .dropdown .dropdown-list li a.read:focus{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1;-moz-transition-property:opacity,background-color;-o-transition-property:opacity,background-color;-webkit-transition-property:opacity,background-color;transition-property:opacity,background-color}.logbox .dropdown li a:hover,.logbox .dropdown li a:focus,.logbox .dropdown .dropdown-list li a:hover,.logbox .dropdown .dropdown-list li a:focus{background-color:#396a81}.logbox .dropdown li a:hover .username,.logbox .dropdown li a:focus .username,.logbox .dropdown .dropdown-list li a:hover .username,.logbox .dropdown .dropdown-list li a:focus .username{text-shadow:rgba(0,0,0,0.5) 0 0 5px}.logbox .dropdown li a:hover .date,.logbox .dropdown li a:focus .date,.logbox .dropdown .dropdown-list li a:hover .date,.logbox .dropdown .dropdown-list li a:focus .date{color:#95D7F5}.logbox .dropdown li a.read,.logbox .dropdown .dropdown-list li a.read{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5}.logbox .dropdown li .avatar,.logbox .dropdown .dropdown-list li .avatar{float:left;height:30px;width:30px}.logbox .dropdown li .username,.logbox .dropdown .dropdown-list li .username{display:block;float:left;margin:4px 0 0 7px;color:#95D7F5;width:50%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.logbox .dropdown li .date,.logbox .dropdown .dropdown-list li .date{color:#5196b6;float:right;padding:4px 10px 0 0;-moz-transition-property:color;-o-transition-property:color;-webkit-transition-property:color;transition-property:color}.logbox .dropdown li .topic,.logbox .dropdown .dropdown-list li .topic{display:block;position:absolute;bottom:0;left:0;overflow:hidden;height:25px;padding:4px 7px 2px;text-overflow:ellipsis;white-space:nowrap;width:95%;width:calc(100% - 14px)}.logbox .dropdown li:nth-child(2n+1),.logbox .dropdown li:nth-child(2n+1) form button,.logbox .dropdown .dropdown-list li:nth-child(2n+1),.logbox .dropdown .dropdown-list li:nth-child(2n+1) form button{background-color:#084561}.logbox .my-account{display:block;height:60px;width:60px;float:right}.logbox .my-account .username{display:none}.logbox .my-account .avatar{background:#396a81}.logbox .dropdown.my-account-dropdown a,.logbox .dropdown.my-account-dropdown button{padding-left:10px}.logbox .dropdown.my-account-dropdown button{width:100%;height:30px;line-height:28px;background:transparent;text-align:left;border:0}.logbox .dropdown.my-account-dropdown button:hover,.logbox .dropdown.my-account-dropdown button:focus{background:#396a81}.logbox.unlogged a{display:block;width:50%;text-align:center;float:left;line-height:60px;height:60px}.logbox.unlogged a:hover,.logbox.unlogged a:focus{background-color:#396a81}.avatar{height:60px;width:60px;background-color:#FFF}.sub-header{background:#EEE}.breadcrumb{display:none}.search{display:block;position:relative}.search form input,.search form button{float:left;border:none;background:rgba(255,255,255,0.25);height:40px;-moz-transition-property:background;-o-transition-property:background;-webkit-transition-property:background;transition-property:background;-moz-transition-duration:0.15s;-o-transition-duration:0.15s;-webkit-transition-duration:0.15s;transition-duration:0.15s}.search form input:hover,.search form input:focus,.search form button:hover,.search form button:focus{outline:none;background-color:rgba(255,255,255,0.75)}.search form input{height:30px;padding:5px 3%;width:70%}.search form button{width:12%;text-indent:-9999px}.search form button:after{display:block;content:" ";position:absolute;top:12px;left:50%;margin-left:-8px;height:16px;width:16px;background-position:0 -4640px}.search .search-more{display:block;float:left;height:40px;font-family:Arial, sans-serif;line-height:40px;width:12%;text-align:center;font-weight:bold;text-decoration:none;font-size:24px;background:#fff;color:#084561;-moz-transition:background 0.15s;-o-transition:background 0.15s;-webkit-transition:background 0.15s;transition:background 0.15s}.search .search-more:hover,.search .search-more:focus{background:rgba(255,255,255,0.7)}.alert-box{position:relative;padding:8px 15px;margin:0 0 15px 2%;color:#FFF;text-shadow:rgba(0,0,0,0.2) 0 0 2px}.alert-box .close-alert-box{display:block;position:absolute;top:12px;right:15px;height:20px;width:20px;text-indent:-9999px;text-decoration:none}.alert-box .close-alert-box-text{width:auto;text-indent:0;top:8px}.alert-box.info,.alert-box.success{background:#27ae60}.alert-box.error{background:#c0392b}.alert-box.alert,.alert-box.warning{background:#e67e22}.alert-box a{color:#EEE}.content-wrapper .alert-box{margin:0 0 20px}.main .sidebar{padding:0 0 10px;background:#f0f0f0;border-bottom:1px solid #FFF;color:#424242;width:105%;margin:0 0 0 -2.7%}.main .sidebar .new-btn{display:block;height:40px;padding-left:11.5%;text-decoration:none;text-indent:25px;line-height:40px;font-size:16px;font-size:1.6rem;position:relative;color:#1088bf;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.main .sidebar .new-btn:first-child{margin-top:31px}.main .sidebar .new-btn:hover,.main .sidebar .new-btn:focus{background:#fff}.main .sidebar .new-btn:after{top:12px;left:11.5%}.main .sidebar h3,.main .sidebar h4{font-weight:normal;margin:0;padding:0}.main .sidebar h3{font-size:18px;font-size:1.8rem;line-height:38px;line-height:3.8rem;color:#084561;border-bottom:1px solid #f8ad32;margin-top:30px;text-transform:uppercase}.main .sidebar h4{padding-top:20px;font-size:17px;font-size:1.7rem}.main .sidebar h4 a{text-decoration:none;color:#424242}.main .sidebar h4[data-num]{position:relative;padding-left:calc(5% + 25px)}.main .sidebar h4[data-num]:before{content:attr(data-num);position:absolute;margin-left:-35px;text-align:right;width:50px}.main .sidebar h3+ul{margin:7px 0}.main .sidebar ul{margin:0;padding:0;list-style:none;width:100%}.main .sidebar ul li{position:relative;padding:0 0 0 2.5%;-moz-transition:background 0.15s;-o-transition:background 0.15s;-webkit-transition:background 0.15s;transition:background 0.15s}.main .sidebar ul li:not(.inactive):hover,.main .sidebar ul li a:focus{background:#fff;outline:none}.main .sidebar ul li:not(.inactive):hover .ico-after.action-hover,.main .sidebar ul li a:focus .ico-after.action-hover{display:block}.main .sidebar ul li a,.main .sidebar ul li button,.main .sidebar ul li.inactive span{display:block;padding-left:25px;padding-right:10px;text-decoration:none;color:#0079b2;overflow:hidden;height:30px;line-height:30px;font-size:14px;font-size:1.4rem;text-overflow:ellipsis;white-space:nowrap;border:0;text-align:left;background:transparent}.main .sidebar ul li a[data-num],.main .sidebar ul li button[data-num],.main .sidebar ul li.inactive span[data-num]{position:relative}.main .sidebar ul li a[data-num]:after,.main .sidebar ul li button[data-num]:after,.main .sidebar ul li.inactive span[data-num]:after{content:attr(data-num) ".";position:absolute;left:0;width:18px;text-align:right;color:#424242}.main .sidebar ul li a.unread,.main .sidebar ul li button.unread,.main .sidebar ul li.inactive span.unread{font-weight:bold}.main .sidebar ul li a.ico-after:after,.main .sidebar ul li button.ico-after:after,.main .sidebar ul li.inactive span.ico-after:after{top:7px;left:0;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);opacity:0.7}.main .sidebar ul li a.ico-after:hover:after,.main .sidebar ul li a.ico-after:focus:after,.main .sidebar ul li button.ico-after:hover:after,.main .sidebar ul li button.ico-after:focus:after,.main .sidebar ul li.inactive span.ico-after:hover:after,.main .sidebar ul li.inactive span.ico-after:focus:after{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.main .sidebar ul li a.ico-after.action-hover,.main .sidebar ul li button.ico-after.action-hover,.main .sidebar ul li.inactive span.ico-after.action-hover{position:absolute;display:none;overflow:visible;top:0;padding:0;z-index:1;width:30px;height:30px;text-indent:-9999px;border-left:1px solid transparent;background:#fff;right:-32px}.main .sidebar ul li a.ico-after.action-hover[data-title]:hover:before,.main .sidebar ul li button.ico-after.action-hover[data-title]:hover:before,.main .sidebar ul li.inactive span.ico-after.action-hover[data-title]:hover:before{content:attr(data-title);display:block;position:absolute;background:#fff;color:#555;top:0;left:35px;height:27px;line-height:27px;line-height:2.7rem;text-indent:0;padding:0 15px;border:1px solid #EEE;-moz-box-shadow:rgba(0,0,0,0.5) 0 0 3px;-webkit-box-shadow:rgba(0,0,0,0.5) 0 0 3px;box-shadow:rgba(0,0,0,0.5) 0 0 3px}.main .sidebar ul li a.ico-after.action-hover:after,.main .sidebar ul li button.ico-after.action-hover:after,.main .sidebar ul li.inactive span.ico-after.action-hover:after{left:5px}.main .sidebar ul li.inactive span{color:#555;font-style:italic}.main .sidebar ul li .last-answer{display:none}.main .sidebar ul li button{width:100%;line-height:28px}.main .sidebar ul li li{padding:0}.main .sidebar ul li li a{position:relative;color:#084561;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.main .sidebar ul li li a:hover,.main .sidebar ul li li a:focus{color:#0079B2;background:#fff;margin-left:-11px}.main .sidebar ul li li a:hover:before,.main .sidebar ul li li a:focus:before{content:"> "}.main .sidebar.sommaire h4{border-bottom:1px solid #d8dada;padding-bottom:5px;padding-right:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.main .sidebar.sommaire h4+ul>li:first-child{margin-top:5px}.main .sidebar.sommaire ul li.current{margin-top:0 !important;padding-top:5px;margin-bottom:5px;background-color:#F4F6F6}.main .sidebar.sommaire ul li.current ul{margin-top:5px;padding-top:5px;padding-bottom:5px;margin-left:-25px;width:calc(105% + 25px);background:-moz-linear-gradient(top, rgba(0,0,0,0.07),rgba(0,0,0,0) 3px);background:-o-linear-gradient(top, rgba(0,0,0,0.07),rgba(0,0,0,0) 3px);background:-webkit-linear-gradient(top, rgba(0,0,0,0.07),rgba(0,0,0,0) 3px);background:linear-gradient(to bottom, rgba(0,0,0,0.07),rgba(0,0,0,0) 3px)}.main .sidebar.sommaire ul li.current ul a{padding-left:50px}.main .content-container{padding-top:30px}.main .content-container h1,.main .content-container h2{font-size:22px;font-size:2.2rem;line-height:38px;line-height:3.8rem;color:#084561;font-weight:normal;border-bottom:1px solid #f8ad32;margin:1px 0 15px}.main .content-container h1.illu,.main .content-container h2.illu{padding-left:60px}.main .content-container h1.ico-after,.main .content-container h2.ico-after{padding-left:80px}.main .content-container h1.ico-after:after,.main .content-container h2.ico-after:after{width:80px;height:40px;margin-left:21px}.main .content-container h1.ico-articles:after,.main .content-container h2.ico-articles:after{background-position:0 -880px}.main .content-container h1.ico-tutorials:after,.main .content-container h2.ico-tutorials:after{background-position:0 -5600px}.main .content-container h1.illu img,.main .content-container h2.illu img{position:absolute;margin:-6px 0 0 -60px;border:1px solid #cdd0d1;width:50px;height:50px}.main .content-container h1:not(:first-child),.main .content-container h2:not(:first-child){margin-top:50px}.main .content-container .subtitle{font-size:18px;font-size:1.8rem;color:#999;margin-top:-15px;margin-bottom:15px;padding:10px 0;font-weight:normal;border-bottom:1px solid #EEE}.main .content-container .member-item .avatar{margin-top:-2px;height:20px;width:20px;border:1px solid #CCC}.main .content-container .member-item:hover .avatar{border-color:#999}.main.home .content-container{margin-top:0}.tutorial-list article,.main .article-content .tutorial-list article{min-height:60px;padding:20px 2%;border-bottom:1px solid #e0e4e5}.tutorial-list article:nth-child(2n+1),.main .article-content .tutorial-list article:nth-child(2n+1){background-color:rgba(255,255,255,0.8)}.tutorial-list article,.tutorial-list article h3,.tutorial-list article a h3,.tutorial-list article h3 a,.main .article-content .tutorial-list article,.main .article-content .tutorial-list article h3,.main .article-content .tutorial-list article a h3,.main .article-content .tutorial-list article h3 a{color:#424242;font-weight:normal}.tutorial-list article a h3:hover,.tutorial-list article a h3:focus,.tutorial-list article h3 a:hover,.tutorial-list article h3 a:focus,.main .article-content .tutorial-list article a h3:hover,.main .article-content .tutorial-list article a h3:focus,.main .article-content .tutorial-list article h3 a:hover,.main .article-content .tutorial-list article h3 a:focus{text-decoration:underline}.tutorial-list article h3,.main .article-content .tutorial-list article h3{margin:0;padding:0;font-size:20px;font-size:2.0rem;height:27px;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tutorial-list article a,.main .article-content .tutorial-list article a{text-decoration:none}.tutorial-list article .article-metadata,.main .article-content .tutorial-list article .article-metadata{margin:0 0 5px;padding:0;color:#ee8709}.tutorial-list article .article-metadata a,.main .article-content .tutorial-list article .article-metadata a{color:#ee8709}.tutorial-list article .article-metadata a:hover,.tutorial-list article .article-metadata a:focus,.main .article-content .tutorial-list article .article-metadata a:hover,.main .article-content .tutorial-list article .article-metadata a:focus{text-decoration:underline}.tutorial-list article .article-illu,.main .article-content .tutorial-list article .article-illu{display:block;width:100%;height:100px;overflow:hidden;background-repeat:no-repeat;background-position:center center;-moz-background-size:cover;-o-background-size:cover;-webkit-background-size:cover;background-size:cover}.tutorial-list article .article-illu img,.main .article-content .tutorial-list article .article-illu img{width:100%;height:100%;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0}.tutorial-list article .resume,.main .article-content .tutorial-list article .resume{margin:20px 0 0;padding:0}.tutorial-list article .tutorial-img,.main .article-content .tutorial-list article .tutorial-img{float:left}.tutorial-list article .tutorial-infos,.main .article-content .tutorial-list article .tutorial-infos{margin:7px 0 0 70px}.taglist{list-style:none;padding:0;margin:-14px 0 15px;height:30px;line-height:30px}.taglist li{float:right}.taglist li a{display:block;text-decoration:none;padding:0 10px;background:#FBFBFB;color:#aaa9a7;margin-left:1px;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.taglist li a:before{content:"#"}.taglist li a:hover,.taglist li a:focus{background:#FFF;color:#0e77a8;border-bottom:1px solid #0e77a8}.content-wrapper,.full-content-wrapper{margin:0 2%}.small-content-wrapper{width:90%;max-width:500px;margin:20px auto}.authors{color:#9c9c9c;padding-bottom:10px;border-bottom:1px solid #e0e4e5;margin-bottom:20px !important}.authors .authors-label{display:inline-block}.authors ul{display:inline-block;list-style:none;padding:0;margin:0}.authors ul li{display:inline-block;margin:0}.authors ul li .avatar{height:28px;width:28px;border:1px solid #cdd0d1;margin-right:3px;margin-top:-4px}.authors ul li a{display:block;text-decoration:none;color:#1088bf;height:36px;line-height:36px;padding:0 8px;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.authors ul li a:hover,.authors ul li a:focus{background:#DDD;color:#084561}.authors ul li .info{padding-left:5px;color:#777}.pagination{list-style:none;margin:0;padding:0;border-top:1px solid #d2d5d6;border-bottom:1px solid #d2d5d6;background:#FBFBFB;height:40px;margin-bottom:20px !important}.pagination li{float:left}.pagination li a{display:block;text-align:center;text-decoration:none;color:#084561;min-width:45px;height:40px;line-height:40px;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.pagination li a.current{height:38px;color:#808080;background:#F4F6F6;margin-top:-1px;border-left:1px solid #d2d5d6;border-bottom:3px solid #d2d5d6;border-right:2px solid #d2d5d6}.pagination li a.ico-after:after{margin-top:12px}.pagination li a[href]:hover,.pagination li a[href]:focus{background:#d2d5d6}.pagination li.prev a,.pagination li.next a{padding:0 15px}.pagination li.prev .ico-after{padding-left:30px}.pagination li.prev .ico-after:after{margin-left:8px}.pagination li.next{float:right}.pagination li.next .ico-after{padding-right:30px}.pagination li.next .ico-after:after{right:8px;left:auto}.pagination.pagination-top li a.current{margin-top:0;border-top:3px solid #d2d5d6;border-bottom:none;height:35px;line-height:35px;padding-bottom:3px}.pagination.pagination-chapter{margin-left:0}.pagination.pagination-chapter li{max-width:45%}.pagination.pagination-chapter a{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.topic-list{margin-top:50px !important;margin-bottom:50px !important}.topic-list .topic{position:relative;height:81px;line-height:25px;border-top:1px solid #FFF;border-bottom:1px solid #CCC;background:#eff9fe;overflow:hidden}.topic-list .topic:first-child:after{display:block;content:" ";width:100%;height:1px;background:#CCC;margin-top:-2px}.topic-list .topic:nth-child(2n){background:none}.topic-list .topic:nth-child(2n).unread{background:#feeed5}.topic-list .topic.unread{background:#fde8c6}.topic-list .topic:hover:before,.topic-list .topic.active:before{content:" ";display:block;position:absolute;background:#0e77a8;height:100%;width:5px}.topic-list .topic:hover.unread:before,.topic-list .topic.active.unread:before{background:#f8ad32}.topic-list a{text-decoration:none;color:#0e77a8}.topic-list a:hover,.topic-list a:focus{color:#0e77a8;text-decoration:underline;outline:none}.topic-list .topic-infos,.topic-list .topic-description,.topic-list .topic-answers,.topic-list .topic-last-answer{display:block;float:left;padding:4px 0;margin:0}.topic-list .topic-infos{width:5%}.topic-list .topic-infos input[type=checkbox]{margin:29px 25% 0}.topic-list .topic-infos .ico-after{display:block;text-indent:-9999px}.topic-list .topic-infos .ico-after:after{margin:4px 0 0 15px}.topic-list .topic-description{position:relative;width:60%}.topic-list .topic-description .topic-title-link:hover,.topic-list .topic-description .topic-title-link:after{text-decoration:none}.topic-list .topic-description .topic-title-link:hover .topic-title,.topic-list .topic-description .topic-title-link:after .topic-title{text-decoration:underline}.topic-list .topic-description .topic-title,.topic-list .topic-description .topic-subtitle{display:block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin:0;padding:0}.topic-list .topic-description .topic-title{font-size:16px;font-size:1.6rem}.topic-list .topic-description .topic-subtitle{height:24px;line-height:1.3em;color:#777}.topic-list .topic-description .topic-members{margin:0;color:#777}.topic-list .topic-description .topic-tag:before{content:"#"}.topic-list .topic-answers{width:13%;text-align:center;padding-top:25px}.topic-list .topic-last-answer{width:22%}.topic-list .topic-last-answer .topic-no-last-answer{display:block;margin-top:24px;color:#084561;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5}.no-cssmask .topic-list .topic-description[style]:before{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=10);opacity:0.1}.forum-list .group-title{width:100%;height:50px;margin-top:30px !important;clear:both;border-bottom:1px solid #CCC;color:#f8ad32}.forum-list .topic{height:60px}.forum-list .topic-description{padding-left:1.5%}.forum-list .topic-description .topic-title{font-weight:normal}.forum-list .topic-answers{padding-top:17px}.forum-list .topic-answers span{display:block;float:left;width:50%}.forum-list .topic-last-answer{width:18%}.forum-list .topic-last-answer .topic-no-last-answer{margin-top:13px}.forum-list .topic-last-answer .forum-last-message{color:#777;display:block}.forum-list .topic-last-answer .forum-last-message-title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.main .content-container .content-wrapper{max-width:960px;margin:0 auto}.main .content-container .content-wrapper.article-content,.main .content-container .content-wrapper.authors{padding-left:2%;padding-right:2%}.main .content-container .article-content p,.main .content-container .article-content ul:not(.pagination){font-family:"Liberation Serif","Times New Roman",Times,Georgia,FreeSerif,serif}.main .content-container .article-content,.main .content-container .message-content{margin-top:20px;color:#424242}.main .content-container .article-content h2,.main .content-container .article-content h2 a,.main .content-container .article-content h3,.main .content-container .article-content h3 a,.main .content-container .message-content h2,.main .content-container .message-content h2 a,.main .content-container .message-content h3,.main .content-container .message-content h3 a{color:#ee8709;margin-top:40px;text-decoration:none}.main .content-container .article-content h2 a:hover,.main .content-container .article-content h2 a:focus,.main .content-container .article-content h3 a:hover,.main .content-container .article-content h3 a:focus,.main .content-container .message-content h2 a:hover,.main .content-container .message-content h2 a:focus,.main .content-container .message-content h3 a:hover,.main .content-container .message-content h3 a:focus{text-decoration:underline}.main .content-container .article-content h2,.main .content-container .message-content h2{font-size:22px;font-size:2.2rem;line-height:50px;margin-bottom:20px;background:#FFF;border-top:1px solid #e0e4e5;padding-left:1%;font-weight:400}.main .content-container .article-content h3,.main .content-container .message-content h3{font-size:20px;font-size:2.0rem;margin-bottom:14px}.main .content-container .article-content h4,.main .content-container .message-content h4{font-size:18px;font-size:1.8rem;margin-bottom:12px}.main .content-container .article-content .actions-title,.main .content-container .message-content .actions-title{float:right;margin:-60px 10px 0 0}.main .content-container .article-content .actions-title .btn,.main .content-container .message-content .actions-title .btn{height:30px;line-height:30px;margin-left:3px;text-transform:uppercase;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);opacity:0.7}.main .content-container .article-content .actions-title .btn.ico-after:after,.main .content-container .message-content .actions-title .btn.ico-after:after{margin-top:7px}.main .content-container .article-content .actions-title .btn:hover,.main .content-container .article-content .actions-title .btn:focus,.main .content-container .message-content .actions-title .btn:hover,.main .content-container .message-content .actions-title .btn:focus{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.main .content-container .article-content .information,.main .content-container .article-content .question,.main .content-container .article-content .error,.main .content-container .article-content .warning,.main .content-container .article-content .spoiler,.main .content-container .message-content .information,.main .content-container .message-content .question,.main .content-container .message-content .error,.main .content-container .message-content .warning,.main .content-container .message-content .spoiler{margin:25px 0;padding:7px 15px 7px 45px}.main .content-container .article-content .information.ico-after:after,.main .content-container .article-content .question.ico-after:after,.main .content-container .article-content .error.ico-after:after,.main .content-container .article-content .warning.ico-after:after,.main .content-container .article-content .spoiler.ico-after:after,.main .content-container .message-content .information.ico-after:after,.main .content-container .message-content .question.ico-after:after,.main .content-container .message-content .error.ico-after:after,.main .content-container .message-content .warning.ico-after:after,.main .content-container .message-content .spoiler.ico-after:after{position:absolute;top:50%;left:23px;margin:-11px 0 0 -11px;height:22px;width:22px}.main .content-container .article-content .information,.main .content-container .message-content .information{background:#daeaee}.main .content-container .article-content .information.ico-after:after,.main .content-container .message-content .information.ico-after:after{background-position:0 -2960px}.main .content-container .article-content .question,.main .content-container .message-content .question{background:#e2daee}.main .content-container .article-content .question.ico-after:after,.main .content-container .message-content .question.ico-after:after{background-position:0 -4240px}.main .content-container .article-content .error,.main .content-container .message-content .error{background:#eedada}.main .content-container .article-content .error.ico-after:after,.main .content-container .message-content .error.ico-after:after{background-position:0 -2320px}.main .content-container .article-content .warning,.main .content-container .message-content .warning{background:#eee7da}.main .content-container .article-content .warning.ico-after:after,.main .content-container .message-content .warning.ico-after:after{background-position:0 -5920px}.main .content-container .article-content .spoiler-title,.main .content-container .message-content .spoiler-title{display:block;background:#EEE;margin-top:15px;padding:3px 15px 3px 40px;text-decoration:none;border-bottom:1px solid #DDD;color:#555}.main .content-container .article-content .spoiler-title.ico-after:after,.main .content-container .message-content .spoiler-title.ico-after:after{margin:8px 0 0 10px}.main .content-container .article-content .spoiler-title:nth-last-child(2),.main .content-container .message-content .spoiler-title:nth-last-child(2){margin-bottom:15px}.main .content-container .article-content .spoiler-title:hover,.main .content-container .message-content .spoiler-title:hover{text-decoration:underline}.main .content-container .article-content .spoiler,.main .content-container .message-content .spoiler{margin-top:0;padding-left:15px;background:#EEE}.main .content-container .article-content figure,.main .content-container .message-content figure{margin:25px 0;max-width:100%;padding:10px;background:#DDD;text-align:center}.main .content-container .article-content figure img,.main .content-container .article-content figure video,.main .content-container .article-content figure pre,.main .content-container .article-content figure code,.main .content-container .article-content figure table,.main .content-container .article-content figure blockquote,.main .content-container .article-content figure embed,.main .content-container .article-content figure video,.main .content-container .message-content figure img,.main .content-container .message-content figure video,.main .content-container .message-content figure pre,.main .content-container .message-content figure code,.main .content-container .message-content figure table,.main .content-container .message-content figure blockquote,.main .content-container .message-content figure embed,.main .content-container .message-content figure video{max-width:100%;margin:0 auto;text-align:left}.main .content-container .article-content figure img,.main .content-container .article-content figure video,.main .content-container .article-content figure pre,.main .content-container .article-content figure code,.main .content-container .message-content figure img,.main .content-container .message-content figure video,.main .content-container .message-content figure pre,.main .content-container .message-content figure code{display:block}.main .content-container .article-content figure figcaption,.main .content-container .message-content figure figcaption{display:block;padding-top:10px}.main .content-container .reactions-title{margin:50px 0 20px;color:#084561;border-bottom:1px solid #f8ad32;text-transform:uppercase;font-weight:normal;font-size:22px;font-size:2.2rem;line-height:30px}.wf-active .main .content-container .article-content p,.wf-active .main .content-container .article-content ul:not(.pagination){font-family:"Droid Serif","Liberation Serif","Times New Roman",Times,Georgia,FreeSerif,serif}.js .spoiler{display:none}table{margin:15px 0;border-top:1px solid #DDD}table thead{background:#DDD;color:#084561}table th,table td{text-align:left;padding:5px 15px 5px 7px;border-right:1px solid #DDD}table th:first-child,table td:first-child{border-left:1px solid #DDD}table tbody tr{border-bottom:1px solid #DDD}table tbody tr:nth-child(2n+1){background:#F7F7F7}table.fullwidth{width:100%}.topic-message{position:relative}.topic-message.helpful .message{background-color:#e9f9dc}.topic-message.helpful .message:after{border-right-color:#e9f9dc}.topic-message .user .avatar-link{display:block;height:58px;width:58px;z-index:0;position:absolute;top:0;border:1px solid #DDD}.topic-message .user .avatar-link[href]:hover,.topic-message .user .avatar-link[href]:focus{border-color:#FFF;overflow:hidden;-moz-box-shadow:rgba(0,0,0,0.3) 0 1px 7px;-webkit-box-shadow:rgba(0,0,0,0.3) 0 1px 7px;box-shadow:rgba(0,0,0,0.3) 0 1px 7px}.topic-message .user .avatar-link img{height:58px;width:58px}.topic-message .user .badge{display:block;width:60px;height:25px;line-height:25px;text-align:center;text-transform:uppercase;color:#EEE;text-shadow:rgba(0,0,0,0.25) 0 0 3px;background:#777}.topic-message .user .badge.staff{background:#48a200}.topic-message .user .user-metadata{width:60px;height:25px}.topic-message .user .user-metadata a{display:block;float:left;border:1px solid #D2D5D6;border-top:0;text-align:center;background-color:#edefef;text-decoration:none;color:#424242;height:25px;line-height:26px;width:28px;color:#777;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.topic-message .user .user-metadata a:first-child{border-right:0;width:29px}.topic-message .user .user-metadata a:hover,.topic-message .user .user-metadata a:focus{border-bottom-width:1px;border-bottom-color:#777;background:#FFF}.topic-message .user .user-metadata a.positive{color:#48a200}.topic-message .user .user-metadata a.negative{color:#c0392b}.topic-message .message{position:relative;background-color:#FDFDFD;border:1px solid #D2D5D6;border-right-width:2px;border-bottom-width:3px;min-height:75px}.topic-message .message .message-metadata{display:inline-block;font-size:14px;font-size:1.4rem;margin-left:5px}.topic-message .message .message-metadata a{display:block;float:left;color:#999;text-decoration:none;height:30px;line-height:30px;padding:0 5px;border-bottom:1px solid #D2D5D6;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.topic-message .message .message-metadata a:hover,.topic-message .message .message-metadata a:focus{border-bottom:1px solid #0e77a8;color:#0e77a8;outline:none}.topic-message .message .message-metadata .username{color:#484848;font-size:16px;font-size:1.6rem;margin-right:3px}.topic-message .message .message-metadata .date{line-height:32px}.topic-message .message .message-actions{margin:0;padding:0;list-style:none;position:absolute;top:0;right:0;text-transform:uppercase}.topic-message .message .message-actions li{float:left}.topic-message .message .message-content{clear:both;margin:0 10px 0;padding-top:1px}.topic-message .message .message-content>p:first-child{margin-top:7px}.topic-message .message .message-content .message-hidden-content{display:none}.topic-message .message .message-content .message-edited,.topic-message .message .message-content .message-hidden,.topic-message .message .message-content .message-helpful{padding:3px 0 0}.topic-message .message .message-content .message-edited.ico-after,.topic-message .message .message-content .message-hidden.ico-after,.topic-message .message .message-content .message-helpful.ico-after{text-indent:20px}.topic-message .message .message-content .message-edited.ico-after:after,.topic-message .message .message-content .message-hidden.ico-after:after,.topic-message .message .message-content .message-helpful.ico-after:after{margin:7px 0}.topic-message .message .message-content .message-edited,.topic-message .message .message-content .message-hidden{font-style:italic;color:#999}.topic-message .message .message-content .message-edited:after,.topic-message .message .message-content .message-hidden:after{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5}.topic-message .message .message-content .message-hidden{margin-top:1px}.topic-message .message .message-content .message-helpful{color:#48A200;text-indent:20px}.topic-message .message .message-content textarea{margin:10px 0 10px -1px;background-color:transparent;min-height:150px}.topic-message .message .message-bottom{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:-moz-box;display:flex;-webkit-box-align:start;-moz-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start;min-height:30px}.topic-message .message .message-bottom .signature{border-top:1px solid #D2D5D6;padding:3px 0 0 10px;margin:0 10px 0 0;font-size:12px;font-size:1.2rem;color:#999;flex:1}.topic-message .message .message-bottom .signature p{margin:0;padding:0}.topic-message .message .message-bottom .signature a{color:#999;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.topic-message .message .message-bottom .signature a:hover,.topic-message .message .message-bottom .signature a:focus{text-decoration:none;color:#555}.topic-message .message .message-bottom .message-karma{margin-left:auto;margin-bottom:-2px}.topic-message .message .message-bottom .message-karma a{border-bottom-width:3px}.topic-message .message .message-bottom .message-karma .tick{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.topic-message .message .message-bottom .message-karma .tick:hover,.topic-message .message .message-bottom .message-karma .tick:focus{color:#555}.topic-message .message .message-bottom .message-karma .tick.active{color:#48a200}.topic-message .message .message-bottom .message-karma .tick.active:after{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.topic-message .message .message-bottom .message-karma .upvote{color:#48a200}.topic-message .message .message-bottom .message-karma .downvote{color:#c0392b}.topic-message .message .message-bottom .message-karma .voted{font-weight:bold}.topic-message .message .message-bottom .message-karma .voted:after{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.topic-message .message .message-buttons{margin:0 0 0 10px;padding:0;list-style:none;border-bottom:none}.topic-message .message .message-buttons a{text-indent:-9999px;width:0}.topic-message .message .message-buttons a:after{left:12px !important}.topic-message .message .message-submit{margin-left:auto;margin-right:10px}.topic-message .message .message-actions,.topic-message .message .message-buttons,.topic-message .message .message-karma,.topic-message .message .message-submit{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:-moz-box;display:flex}.topic-message .message .message-actions a,.topic-message .message .message-actions span,.topic-message .message .message-actions button,.topic-message .message .message-buttons a,.topic-message .message .message-buttons span,.topic-message .message .message-buttons button,.topic-message .message .message-karma a,.topic-message .message .message-karma span,.topic-message .message .message-karma button,.topic-message .message .message-submit a,.topic-message .message .message-submit span,.topic-message .message .message-submit button{display:block;float:left;margin-left:3px;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.topic-message .message .message-actions a.ico-after,.topic-message .message .message-actions span.ico-after,.topic-message .message .message-actions button.ico-after,.topic-message .message .message-buttons a.ico-after,.topic-message .message .message-buttons span.ico-after,.topic-message .message .message-buttons button.ico-after,.topic-message .message .message-karma a.ico-after,.topic-message .message .message-karma span.ico-after,.topic-message .message .message-karma button.ico-after,.topic-message .message .message-submit a.ico-after,.topic-message .message .message-submit span.ico-after,.topic-message .message .message-submit button.ico-after{padding-left:30px}.topic-message .message .message-actions a:after,.topic-message .message .message-actions span:after,.topic-message .message .message-actions button:after,.topic-message .message .message-buttons a:after,.topic-message .message .message-buttons span:after,.topic-message .message .message-buttons button:after,.topic-message .message .message-karma a:after,.topic-message .message .message-karma span:after,.topic-message .message .message-karma button:after,.topic-message .message .message-submit a:after,.topic-message .message .message-submit span:after,.topic-message .message .message-submit button:after{top:7px;left:7px;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5}.topic-message .message .message-actions a,.topic-message .message .message-actions span,.topic-message .message .message-buttons a,.topic-message .message .message-buttons span,.topic-message .message .message-karma a,.topic-message .message .message-karma span,.topic-message .message .message-submit a,.topic-message .message .message-submit span{border-bottom:1px solid #D2D5D6;text-decoration:none;color:#999;height:29px;line-height:30px;padding:0 10px}.topic-message .message .message-actions a,.topic-message .message .message-buttons a,.topic-message .message .message-karma a,.topic-message .message .message-submit a{cursor:pointer}.topic-message .message .message-actions a:hover,.topic-message .message .message-actions a:focus,.topic-message .message .message-buttons a:hover,.topic-message .message .message-buttons a:focus,.topic-message .message .message-karma a:hover,.topic-message .message .message-karma a:focus,.topic-message .message .message-submit a:hover,.topic-message .message .message-submit a:focus{border-bottom-color:#0e77a8;outline:none}.topic-message .message .message-actions a:hover:after,.topic-message .message .message-actions a:focus:after,.topic-message .message .message-buttons a:hover:after,.topic-message .message .message-buttons a:focus:after,.topic-message .message .message-karma a:hover:after,.topic-message .message .message-karma a:focus:after,.topic-message .message .message-submit a:hover:after,.topic-message .message .message-submit a:focus:after{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.topic-message .message .message-actions a:hover,.topic-message .message .message-actions a:focus,.topic-message .message .message-buttons a:hover,.topic-message .message .message-buttons a:focus,.topic-message .message .message-karma button:hover,.topic-message .message .message-karma button:focus{color:#555;text-decoration:none}form.topic-message{margin-top:50px}.page-footer{background:#042332;height:50px;line-height:50px;border-top:3px solid #f8ad32;font-size:14px;font-size:1.4rem}.page-footer .wrapper{max-width:960px;margin:0 auto}.page-footer p{float:left;color:#EEE;text-transform:uppercase;margin:0}.page-footer ul{list-style:none;float:right;margin:0;padding:0}.page-footer ul li{display:inline-block;margin-left:25px}.page-footer ul li a{text-decoration:none;color:#EEE;text-transform:uppercase;border-bottom:1px solid transparent}.page-footer ul li a:hover,.page-footer ul li a:focus{border-bottom-color:#f8ad32}.modal{display:none}#modals .modal{position:fixed;z-index:50;width:auto !important;top:0;right:0;bottom:0;left:0;background:#EEE;min-height:220px;font-size:16px;font-size:1.6rem}#modals .modal .modal-title{display:block;border-bottom:3px solid #f8ad32;line-height:53px;height:50px;text-indent:15px;margin-bottom:20px;background:#084561;color:#FFF;font-size:1.6rem;font-size:16px;text-transform:uppercase;text-shadow:rgba(0,0,0,0.75) 0 0 3px}#modals .modal .modal-title.ico-after{text-indent:40px}#modals .modal .modal-title.ico-after:after{margin:18px 0 0 15px}#modals .modal p,#modals .modal input,#modals .modal select,#modals .modal textarea{margin:10px 15px}#modals .modal p:not([type=checkbox]):not([type=radio]),#modals .modal input:not([type=checkbox]):not([type=radio]),#modals .modal select:not([type=checkbox]):not([type=radio]),#modals .modal textarea:not([type=checkbox]):not([type=radio]){width:calc(98% - 32px) !important}#modals .modal label{margin:0 15px}#modals .modal textarea{margin-top:0}#modals .modal [type=submit],#modals .modal .btn{position:absolute;width:50%;height:50px;line-height:50px;bottom:0;right:0;margin:0 !important;padding:0 !important;text-align:center;background:none !important;border-top:1px solid #CCC;color:#333}#modals .modal .btn-submit,#modals .modal [type=submit]{height:51px;color:#084561;font-weight:bold}#modals .modal .btn-cancel{right:auto;left:0;border-right:1px solid #CCC;color:#555}.enable-mobile-menu #modals .modal{top:25px;right:25px;bottom:25px;left:25px;-moz-box-shadow:0 0 5px #000;-webkit-box-shadow:0 0 5px #000;box-shadow:0 0 5px #000}.enable-mobile-menu #modals .modal.modal-small{top:50%;bottom:auto;height:220px;margin:-110px auto 0;max-width:400px}.enable-mobile-menu #modals .modal.modal-medium{top:50%;bottom:auto;height:250px;margin:-125px auto 0;max-width:400px}.enable-mobile-menu #modals .modal.modal-medium textarea{height:80px}.enable-mobile-menu #modals-overlay{position:fixed;display:none;z-index:49;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,0.7)}.ico-after.view:after{background-position:0 -5840px}.ico-after.view.blue:after{background-position:0 -5680px}.ico-after.edit:after{background-position:0 -2240px}.ico-after.alert:after{background-position:0 -160px}.ico-after.cite:after{background-position:0 -1360px}.ico-after.tick:after{background-position:0 -5520px}.ico-after.tick.green:after{background-position:0 -5360px}.ico-after.upvote:after{background-position:0 -5280px}.ico-after.upvote.voted:after{background-position:0 -5200px}.ico-after.downvote:after{background-position:0 -5120px}.ico-after.downvote.voted:after{background-position:0 -5040px}.ico-after.lock:after{background-position:0 -3200px}.ico-after.lock.blue:after{background-position:0 -3040px}.ico-after.cross:after{background-position:0 -1760px}.ico-after.cross.blue:after{background-position:0 -1440px}.ico-after.cross.red:after{background-position:0 -1600px}.ico-after.cross.white:after{background-position:0 -1680px}.ico-after.pin:after{background-position:0 -4160px}.ico-after.pin.blue:after{background-position:0 -4000px}.ico-after.arrow-right:after{background-position:0 -800px}.ico-after.arrow-right.blue:after{background-position:0 -640px}.ico-after.star:after{background-position:0 -4960px}.ico-after.star.yellow:after{background-position:0 -4880px}.ico-after.star.blue:after{background-position:0 -4720px}.footer-container footer{color:#424242;padding:20px 0}.screen,.wide{display:none}.content-container form,#modals form{width:100%}.content-container form p,#modals form p{position:relative}.content-container fieldset,#modals fieldset{border-top:1px solid #DDD;border-bottom:3px solid #DDD;background:#EFEFEF;padding:0 4%}.content-container fieldset legend,#modals fieldset legend{padding:0 10px;border-top:1px solid #DDD;border-bottom:3px solid #DDD;background:#EFEFEF}.content-container label,#modals label{display:block;color:#555;height:30px;line-height:30px}.content-container label .asteriskField,#modals label .asteriskField{color:#C0392B;margin-left:4px}.content-container .form-error,#modals .form-error{display:block;font-size:13px;color:#C0392B}.content-container input,.content-container textarea,#modals input,#modals textarea{border:1px solid #D2D5D6}.content-container input:focus,.content-container textarea:focus,#modals input:focus,#modals textarea:focus{outline-color:#999}.content-container input.field-error,.content-container input:invalid,.content-container textarea.field-error,.content-container textarea:invalid,#modals input.field-error,#modals input:invalid,#modals textarea.field-error,#modals textarea:invalid{border-color:#C0392B}.content-container input.field-error:focus,.content-container input:invalid:focus,.content-container textarea.field-error:focus,.content-container textarea:invalid:focus,#modals input.field-error:focus,#modals input:invalid:focus,#modals textarea.field-error:focus,#modals textarea:invalid:focus{outline-color:#C0392B}.content-container input[disabled],.content-container textarea[disabled],#modals input[disabled],#modals textarea[disabled]{background:#DDD !important;color:#555}.content-container input,.content-container textarea,.content-container button,.content-container .btn,#modals input,#modals textarea,#modals button,#modals .btn{-webkit-appearance:none;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.content-container input:not([type=submit]):not([type=reset]):not([type=radio]):not([type=checkbox]),#modals input:not([type=submit]):not([type=reset]):not([type=radio]):not([type=checkbox]){width:calc(98% - 2px);padding:0 1%}.content-container textarea,#modals textarea{width:calc(98% - 2px);padding:10px 1%;font-family:Courier, "Lucida Sans Typewriter", "Lucida Typewriter", "DejaVu Sans Mono", monospace}.content-container input,.content-container button,.content-container .btn,#modals input,#modals button,#modals .btn{display:block;height:30px}.content-container input.ico-after,.content-container button.ico-after,.content-container .btn.ico-after,#modals input.ico-after,#modals button.ico-after,#modals .btn.ico-after{padding-left:30px}.content-container input.ico-after:after,.content-container button.ico-after:after,.content-container .btn.ico-after:after,#modals input.ico-after:after,#modals button.ico-after:after,#modals .btn.ico-after:after{margin:12px 0 0 7px}.content-container input[type=submit],.content-container button,.content-container .btn,#modals input[type=submit],#modals button,#modals .btn{height:40px;line-height:40px;cursor:pointer}.content-container input[type=radio],.content-container input[type=checkbox],#modals input[type=radio],#modals input[type=checkbox]{float:left;margin-right:5px;height:15px;width:15px;border:1px solid #BBB;background:#FCFCFC}.content-container input[type=radio]:checked,.content-container input[type=checkbox]:checked,#modals input[type=radio]:checked,#modals input[type=checkbox]:checked{background:#555}.content-container [type=submit],.content-container button,.content-container .btn,#modals [type=submit],#modals button,#modals .btn{color:#DDD;padding:0 15px;border:none;float:right;text-decoration:none;margin-left:1px;outline:none}.content-container [type=submit],.content-container .btn-submit,#modals [type=submit],#modals .btn-submit{color:#FFF;background:#084561}.content-container [type=submit]:not([disabled]):hover,.content-container [type=submit]:not([disabled]):focus,.content-container .btn-submit:not([disabled]):hover,.content-container .btn-submit:not([disabled]):focus,#modals [type=submit]:not([disabled]):hover,#modals [type=submit]:not([disabled]):focus,#modals .btn-submit:not([disabled]):hover,#modals .btn-submit:not([disabled]):focus{background:#396A81}.content-container .btn-cancel,#modals .btn-cancel{background:#c0392b}.content-container .btn-cancel:not([disabled]):hover,.content-container .btn-cancel:not([disabled]):focus,#modals .btn-cancel:not([disabled]):hover,#modals .btn-cancel:not([disabled]):focus{background:#e74c3c}.content-container .btn-grey,#modals .btn-grey{background:#EEE;color:#555}.content-container .btn-grey:not([disabled]):hover,.content-container .btn-grey:not([disabled]):focus,#modals .btn-grey:not([disabled]):hover,#modals .btn-grey:not([disabled]):focus{background:#CCC;color:#333}.content-container [disabled],#modals [disabled]{cursor:default;background:#F7F7F7;color:#CCC}.content-container .form-sub-link,#modals .form-sub-link{display:block;display:inline-block;margin-top:8px}.content-container .checkbox,#modals .checkbox{padding:10px 0}.content-container .checkbox input,#modals .checkbox input{margin-top:8px}.zform-toolbar{margin:0;padding:2px;list-style-position:initial;list-style-image:none;list-style-type:none;border-bottom:none}.zform-toolbar a,.zform-toolbar button{display:block;float:left;cursor:pointer;background-color:#FFF;border-bottom:1px solid transparent;text-decoration:none;color:#999;height:27px;line-height:30px;padding:0 10px;margin-left:1px;text-indent:-9999px;width:0}.zform-toolbar a .zform-popup,.zform-toolbar button .zform-popup{text-indent:0;line-height:20px}.zform-toolbar a.ico-after,.zform-toolbar button.ico-after{padding-left:30px}.zform-toolbar a:after,.zform-toolbar button:after{top:7px;left:12px;display:none}.zform-toolbar button{padding:0 15px;height:30px;border-top:none;border-right:none;border-left:none}.zform-toolbar button[type=submit]{background:#084561;border-bottom-color:#084561;color:#DDD}.zform-toolbar button[type=submit]:hover,.zform-toolbar button[type=submit]:focus{color:#FFF;background:#396A81;border-bottom-color:#396A81}.zform-toolbar a:hover,.zform-toolbar a:focus,.zform-toolbar button:hover,.zform-toolbar button:focus{border-bottom-color:#1088bf;outline:none;background-color:#EEE}.zform-button{background-repeat:no-repeat;background-position:center center}.zform-button-bold{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAwklEQVQoz2P4z4AfMlBLQXlC+fmS/wXvs+tT1ye8j5wfLIBhQnF95v+s/SBWxPyQ/17nMRTk1qf+TwYr8K/3++/4H0NBen38/2igAl8Bt/tu/y3mYyhIqI/8H3zfp971vMt/s/1YfBFRH/zfCyxhMt/iv9p5eQE0Bf71vv8dwQq0BdT+6/4XL0BT4FYPtBlqtMx/zf8C9WgKbOsd/uuDPSddoPKf/z2XAooCmwST9br71fbL90v2C+/n7edUoHpc4IYASlr8ehOQ9V8AAAAASUVORK5CYII=")}.zform-button-italic{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAcUlEQVQoz2P4z4AfMlBbQXZD6oeE/5Efgg/gNCHuQeT/wAScJsQYhP/3/4DHipAJQf/dFuBR4PPA879tAE4FXgau/20+4PGF4wSX/0YL8CiweGDxXysApwIzB9P/Gv9xBpRJg+4BtQPyByQ30DguMCEAC2D/O2OrpxIAAAAASUVORK5CYII=")}.zform-button-strike{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAn0lEQVQoz2P4z4AfMlBTQYlgwczstNTyhJmRu7EqyHuXVQ6iI8oD/2NRkJuW9j+5A8L2wGZCukvC/+j/ITN9jf8z2LtgtSJyd+j/wP8e/23PmKEqKC8t/w+D8f9t/ksguRvJBH9BCG2Upn3X6L/cGQwr3NLsy2Fsmf9idzEU2KaZ/9eHmiLyjr8cQ4FJmu47tTPy5ZJpwuW8HTSKC+wQAFs6/D/QOXeIAAAAAElFTkSuQmCC")}.zform-button-abbr{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACTUlEQVR42pWR4UtTYRTGB/0FgyBckZREI8SyElEEEyW0RJoxbaK2raYmaVMnt6ZYzpbTudqW091arqZoKYEVjWgFFRhCg77Ymt7J3d6522rh9yJ6eufHcOXOt3Nenuf8nveIRH9V10wY7dMEre4wNM7gN1G61TYtPB6aJ7g8F0cDG21J20DDrkDp5D3NngTkjlhhWmK1i6DB+vldLZvYXjsaQ5WZ6LYsVk7ER1rGA5AbPw7LeheLFaME5YPhyS2JG1zxgyp7ENX9/pJkr32jedD4cAilA6uL/xXXOWNjcjuBzPgJJy3CDu3b827rBxPM7wcgu9OPalfFtnKbIlZqJ8wxK/EVWYiv0ExmCwYjTZsatr48azEtXIM3NI/eF904brv588TYGlSTcRSZCeonBFx69BU17BoOGfjNTepmZMN6bwesC17I7wrQTMVRMERMybe867xJ5RZwxhnDgZ5VJmW0ClvJj86nr9B4P458w+vfeUZenJzn9PGsilJU2SPYx3BNqcSxYmMB8vW5OKy/ipwrjl8U15fdx+OUPYobzxKQMiFkdnLilAT5gxExxfXVUNTTjg1c/36Gmz13T0AbjbRbu+z/53VyDbxfwQqQj69B2sNtZN2j45jKkQgqzBHsvBhMnZ/ilpVZCEzPvyNbH0KWjhNT3L1062rHlICjdCZpDpalNKC4TZW3Ihh4kkCVLYqsrhVIdSsoN4Wh9XxB/e0ojnRzkKgDm5vQ3xVTXDZTu4xd7ctJXL/kQpChWxmJJrBOhesZ6iU2Q7kk/gOYnkYcn8opfQAAAABJRU5ErkJggg==")}.zform-button-key{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABe0lEQVR42pWSQW5TQQyGv/GMX1KVsmJLeggEO+ACCHEJWOQKBSo19ADZpoIFN0CIY9BK0G1DuyebIlGSzNgsXt5LiKia/tJItmR/M7894dPnLy/NbGTmgHOzAkECEsKrF8+fHaWc8+jRwwfc3dnB3W5uD8Llr0uOT76NgKNkZpydjXn65DGb6uvxCXe2twFIZsbWVgeAfr9Pp9NBRDAzZrMZe6/fkHMGwN3Z7d2nqpTfV39qQClGShUABwcDut0u+/tvGQzeMZ1OyTkjqgDUc4KUFLOrBlDQpsCtPmZtLFHap4s3gISbNRYK1QIQYyTGiLu38ap8AahUKVZWLcR/AOvxOkA1Lu2sWogxIiLM53NE5FpAPQNbbkE11UmMYMZwOMRKqfP/AVSx1oIZKWk7nKYwiBCv+QeaEt5YsDULm0hVKcWWMyCEek0imwEqXdpxd0QC309PgbBBu9Pr9ZhMJjXgx3h8+P7Dxz1uqYvz80MWV94Ddrm9LoCffwHdG70wvg5ZlgAAAABJRU5ErkJggg==")}.zform-button-sup{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABLElEQVR42mNgGDkgZMoDhdJVzy+0bH75wbfrbgPJBiTPe7wBqFHBq+1WQ8P65//JdknirIcXUuY9eoAhUV5efqC4uPhAbm7ugbS0tAPx8fEK4eHhB/z8/A64uroeAKmxr7jWEDbp3gXznEsGGAYANQcANX9ISUn5D9Q8ASQG1NwA1LzAxsZGwbroSoBT9bUFJhkXBAyTLzjoxZ9VwDAEaLMDUPP/yMjI/0DNBTCbQcC79eaB9LkP/yfPevA/bOLdDzj9CHT2hMDAwP9ubm7/gTYLkBxIQJsFQJpdXFz+GxkZTSDZAJCzgTYXWFtb/zcwMPivoKDgQLTN0AArAPE1NTUnAF3wX0JC4oOgoKABsTYfADkbqNkAaPMBoOYDQM0HuLi4DrCwsBgMzjwCAMHEeHCN9BV5AAAAAElFTkSuQmCC")}.zform-button-sub{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABLElEQVR42mNgGD6gvLz8QHFx8YHc3NwDaWlpB+Lj4xXCw8MP+Pn5HXB1dT1A0ACg5gCg5g8pKSn/gZongMSAmhuAmhfY2NgoEOUKoM0OQM3/IyMj/wM1FxBlMzoAOntCYGDgfzc3t/9AmwVINgBoswBIs4uLy38jI6MJJBsAcjbQ5gJra+v/BgYG/xUUFBxA4iFTHiiUrnp+oWXzyw++XXcbsNoMDbACEF9TU3MC0AX/JSQkPggKChokz3u8AahRwavtVkPD+uf/cdl8AORsoGYDoM0HgJoPADUf4OLiOsDCwmIAUpc46+GFlHmPHpCVVuwrrjWETbp3wTznkgHJmq2LrgQ4VV9bYJJxQcAw+YKDXvxZBZIM8G69eSB97sP/ybMe/A+bePfD4MlDAC7MeHCrEeunAAAAAElFTkSuQmCC")}.zform-button-center{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAfElEQVR42mP8z4AfMDFQqoAFRJT//8fwBwx/g+EvMP7FsJeRgYHxPzEmMDDkZP+eAtMNhTnHpoJkiDMh9T+yzQh4iwQ3BGf/moKsF2hWziMS3OD9H9Xu31D4mRg3MPwHQ9Ns/f+a/1X+y/2X/C/yn/8/93/2bIgMI8WxCQClCFYAGIFCIgAAAABJRU5ErkJggg==")}.zform-button-right{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAY0lEQVR42mP8z4AfMDFQqoAFRJT//8fwBwx/g+EvMP7FsJeRgYHxPzEmQEDS/99QnTB4hmgTUv8j24yAt0h0g/t/hF6Iec+JNsH7P6rdv6HwM4lu0Pr/G64bEq5/iDGBYGQBABNITB8iVnJIAAAAAElFTkSuQmCC")}.zform-button-ul{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA1UlEQVR42mNgGBQgZ/7jgqm7Xj8A0aTqZQERmtIcBQqibPJAJsiACeXl5dlAesrfv38Z/vz5w/D792+GX79+gemfP3+C2WvXrmWkigsGCUiZ+aigc9PLByE9d8kLRCUx1gIZIRb5N5Ic4ECMi4vLBgbUFFCAIeMfP37A2bdu3UIEYkDHrYKSxY8fuFZeG6qBaJt/qSB+2r0H1nmXyAxEdZ4CAwVucEo8CgxEIyOjbGBATYGlOhCNnBpBqROYShnhBty58WUCSDOUZjh37txUIDWVLt4HAP/ViGJIIAyXAAAAAElFTkSuQmCC")}.zform-button-ol{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA70lEQVR42mNgoAbImf9YZdHhd//JNgCkmSIDYIbA2OXl5dlA/L+kpOR/QUHB/+zs7P+pqan/ExIS/kdGRv4PDg7+j9UFiw5S6Aqywdz9b//P2vP6f8TEeypkGxLae0+ld8tL8rwQ1HVHpXPTc7jmuLi47IiIiP+BgYH/vby8/js7O/+3sbH5b2Ji8l9XV/e/mpoaqkVt65//b1zz9H/NqqcDFIjlyx7/L136+H/x4sfkuwCk2TrvEvmxANIMc4GRkVG2trb2fxUVlf9ycnL/xcXF/wsJCf3n4eH5z87O/p+Zmfk/hu0gbFd0pYPu4QcAKY588QFUIAIAAAAASUVORK5CYII=")}.zform-button-quote{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABH0lEQVR42mNgGDQgon2HEBAvBeKfQPwfD94FxCrYDNi48uCt/7///P2PD2w5eR9kyG0gZkPWzAPEf/7++/f/w7d//19++vf/2cd//5+8//f/4bt//++9+ff/9qu//++8ghheveA4yBAzZAPkcqYeAEu+AGp89uHf/8dAzQ/e/vt/F6r5+ou//68+gxjQueosyABvrAY8BWp+9A6q+fW//7deQjRfAWq++AS3AXAvgJx/H2jrndd//98Ear72/O//y0DNF56ADPgDNqB20QmQAZZYAxFkCDIAuebC479gg9ECkRNXNP6BRdncHVfhBr3//APMB4pfxhqNONLGnefvvsI0fgfiWlISVu/MbVdAGr8AcSGpqVIJiO8BcQrD8AcAGopyopBVAH0AAAAASUVORK5CYII=")}.zform-button-link{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAA6UlEQVQoz2P4z4AfMtBJgR13Vmnru3n/ax7mmOdI1Nyd97/1XVapHTdUgRGbT9fE/y/+3/1/8H/jvepDN3/c/X/k/8T/Pl1GbGAFhn7FH66+i9jm/Sf1/6T/lf9T/3v/idi24mHxB0M/iAldTd8np/tz2X/e+//c/0P/1/63/+zPNTm96btRF1iBbmb6+2klQTsdf7n9DwRCt/+Ov4J2TitJf6+bCVagqel7vff9qrfr/k//X/i/Akiu+7/qbe973+uammAFasz2Bl73U75kf8/+GR4X7pz9Kft7yhev+/YGasz0C0mKFAAASj0PpKVVf4oAAAAASUVORK5CYII=")}.zform-button-image{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAB8ElEQVQ4y6WTPWtUQRSGnzP33r33Jgu7kI1hI1GSgGARxFRG/4CFhY1VUlhI+oCNP8LfIKaz0MpCLEz+QUCwCIQVQc0X+dhsNtm5O3PGImbJboIIGaabmeec9533SAiB66wYYPnj2mtVmT8pNLPuilsDNZIYsoQ3L57OLsUAGmThyaOJ0SzLRCT6Z8WOgnddPnzZeA6cAU6spmmayfLqAR32aMk6k2M75EkTF5T9o5xvGxWGwl1iRnj5bBKvIj0JhQNjIoxAYbaYrO2Qln7QtC2cd8RpytREne+NYaqlGqoDHgAoYIxgwy6l5IDD0ybWdyicw4U2aZrStjkjuSEQesb0A0QITrG+S8dZTruWQh1eAekS1BMb4eLPmZ7R4QyQMUqrPUwgwarHOo9IiXarTLk0ThQZCHJZQghnEsrRTX5tbVPJNhkaNqTiON4fYnurTr0yRWzkcg7CRUByg/H8Pj/XVqiWfyPek3RGuTW9QDmr41X7YtHXwfreIl4Vr8odu8vcxG0UaGxu8+n4FXqkqCrweaCDEBDg8exS7yCaOeSkvUe2+ZXaw0Xmo6Qvmec+xgByRV59XsXnVWxt+oo8DpiYJdJEu5V7Yw9A5C8qnO9Lj50riCMJPUAplnfvVxpzhQ8z/zOccQSJ4S2AXHec/wAGb9qTrxXEvwAAAABJRU5ErkJggg==")}.zform-button-attention{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACJklEQVR42qVTTUiUYRB+vh93dX903bKUYMNlMWHJBC1WW8GjZVCnfpa6Fp1i6dilQwcJglgrDEKiQqhDRYWVCEsSFJ0Ksh8zKjJZ3V0WU3G/73tnpoNrFGkZzmHmMDPPPM8wA6zRtJUSuXSHISSvhLnALJ21Xc9ouTp9JQAhSblqd0VdG7viQnz0v2hlh+PBqaH272TPiF0Ylcl72/MTd1qCq2bAxNcqQgm/puswvUF46hNBIT6zqulTj9ubMw9jJGSJNXVB7Gy/sJ2TLze3qc8DW5v/yUCYb/gakzqrOXwcuoXxR1fBTgaBppMGE/f+FSAzGEuUVbdFvZv3YeFrEiKACFCc6IE/0g13bUf8w5WGxLIAmcGYj5lTnvABsMoDXOoWAbMDLo6hqvEgmPjsu0th3x8ATNzvCe1f564Ow8ndBiAoD3iWhMHKXERFTQiVWw5tUkXn1G+HNHl/R0SY39btTpu08BLO9GUwA3pZOeZzs3B7GYYhMCo7Yfj3YrS31SZLRVtO58f1xaPhAV/DcVN4DjT7HBAGIPg08h7TbyYBCCAMVRiGps+jJpZ0Kcs5DwDat7ut3UZV04MNHSmo2SdwstcXJbFARAME0A2BJjZECLqxHuX1PXjdl8DM2Mgek4n6ApHDAADT1w7T11YSpy3JLzn5uQ9oLtTtPIbCaPqcKcTp7NMTR4QYTIxfIzkEshwoywFZDshSIFuBHAIrAit6sdZvxg9QwSUHEnNo0gAAAABJRU5ErkJggg==")}.zform-button-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACU0lEQVR42q2T7U9SYRjG/VvgQys313pbc81WW80EBT1EICDiIdMjNlojTcdhptlWzoY0PzS11F618kumMWPlS7bUXpmWx0ohTsGK0HNAIN0V0oK51E9e2/Xt+f2ePffuJyVls+MqLxfOUWXmT1QJM6MnuWm9jvtIaphJUmV2FimEG8JuQznxhaLYn7ZGhIcciLwfR2RsGPzDLriMxXhbQLCvNFJiXXi2lOIX7ndheeYDovYHiHZaEW29hN93W7A0aoe32ohxlZh/qchcLZkzGAQx2MPd7sQy40T06gUErBbMN1YhfMWCSBONcMMZhB/dgfskidFjhzwj8gOChCAG075aM5acE/EbF200/BdNCNUZVpU7SyLccwNvJBkYlGXQCcFn6gQT7LmJaHcrAg0V+KGVrdmFChJ8Yw28lko8JdKZhIAp1Ycij3sQtVkQOG/EevEqs+GnCjDf2gyHZE8oIZgmtaHF7naE640InSvZUOArVmO+pRkD0h1JwVSRmvE31GDRSoM7rYkfXLMqCQK11XBVm2AXpSWf4CxU0IxchFB3BwJ6OfzFef/BrEIMNj8Pwc5rGJbuQn/WtuQQ32llgtc6wuMu0yF4rz0+MJ9a+hdU5oCVx2C5FHxHGyYLZSuwp1e0VbBqFybys4kx5RF+9rgawVvt+FVPw0uq8E2jhL/ODP56G6Y0uejLSuVj8Nrb+EJxmHh+9CA7nrcP36tM8Dddjvdr5Sk8y965ArPrwv8yJNsvHJSmmx3EXuZJ7m5uQLSd689JY/rEqebezC3CTf+9fwCiP9Om7nIiOAAAAABJRU5ErkJggg==")}.zform-button-question{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACZUlEQVR42r2SXUiTURjH34K6CbryIgi62FXQVezOZLM2isLSQbFljVpOvOgmRelmQUblkD7VssFGgRSrtQyKUvrYLEdI5XQfVtIWS833Zeac22xra/+e854FE7vppgN/zsPz/P7Ped7zHkEoW6mLxnXpzvqelNWwlOrQI3W+JBZTTq4RI/xtLVrrry12HkbO04vizBBQ/Az8Kolilst5roMxjF1mTpzVOzN3LEDaD/wYA+YfA5IDiN/kEh08tzQmM4xlHtk8d0Z/LmlvBvJBggaBqW7gy2WIV00IG9QIH1Qjbm8CvvUAX7s4QyzzMK8gWnRZfB8Gki+AGRsw60DG14HQ/iqaxoms/xJGddvI2EdN7MC0jbPkEU/psoJ0Wk/fGQDm3DQqQdJtKjoJctHI/ciHehE1aYAFF68xhrHkEU/WQpi1HKBLogaJR1S4z4vzD1AUXYi01NEklUD2CTV4SI3dnEnQfSCA6da9EGLNNTks+GjcNwQRmCAlB+j05wS95mJx8imvMUZmfYi11OQET4PWLnYdJ/ADkBsBUl66aS8y/lsI1ikRrFVSnpqkPXIeP0dklnk8Zq2d/YiNbxu1g5KtlUD6Tflx2t8DBRLGuQqjJKphgvYgJFsbmId5/zwFxctDqr5I+zGCYiR6PIiWYq5CfBiJgW5ET+zDqyM77jHPssdkVW2pllwXCE4j+c6NgL4Sn0zbMdmgwaRZg4+N2qzXWH13c8X6KsI3rXjKE22GG8ViBFL/FYSMauxWbNhJaWWZtpaMq1eYw0171obNuxA6qsGQQfWsZFgj/MNaVXaSQvif6zcxVDmUf47DnQAAAABJRU5ErkJggg==")}.zform-button-information,.zform-button-infoblocks{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACl0lEQVR42q2T7U9SURzH/VvgT+je3rQ2fdFcmw2StBeZNUwTtZWuwmywSjERnwAFbAiGmg+UT1CSIiRwJSPkITT15sAM2trqDWQty29H2jA35yvP9nl3v5/f+Z57TlbWUa983Qr3jCYiyVOF2VMt/mSOwpfMViyw2Qqv5ORDhntomKddFpxWhhIVvUH0OmMYZTbTGO1RCLWvQUtmE7TULjgwTKYKclsDqZbJVdj8CfRMxyAzv8eD4WUoLaswuzbQOBoBXTmRoq9P7JfkqcOc3LbF+G7Y8iYBCQndGQhhyPMRQ+4N3DYFIe4PwTS7DtnTIOgyc5wuHeZkBLnKRWm53g+r7zPqBiIQkwo3DQF8/7mdptrgQ3WPD+LHfgy8iuJC80tQRf3SjCCnzcca7TGoLSxu9QZQY/CjWu9Dn3MdJkJlN/MPnYfUCkE7vQK60MBmBCdkzNb4wifU9QXJpLeoeuQlHzPYXTsEkcaN8s45ggvXdG6YmSgoQddWRkBLnVtj3s10191JFVoPCXkQiX1D6sc2yjqcKG134ApBpHJgZJ4I+Kr/BXZWb2chf7aEKp0Xoi43rqrn8C76lQh+oUQxgxLSW9hsQ20PA7UtDPpsx14FutYmLVY6MeSKoUrDQKR0webbwO8/O+kKwQ9fUCyzEizofh5B4d1RImjfO0T6xhiHFpnj90cCMNnXUKZ0QNgyjUvyKRQ3WHCxfgJF9eNoHfGT3ztPti+P03w5Z99doISDgmMFxpRk0AfjzArEejfZ8gtcbrSiRuOA1hKCuI8BzWtIkfDBt5EqNAqogu7E+XuTUE8t4YmbJayhwxpGfp0ZFK8xQfObBIe+B/qclksJOiVUvoql+M1JiteUJBNZguQ4v4F75K/3L7zz0NlKPuwgAAAAAElFTkSuQmCC")}.zform-button-secret{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACfUlEQVR42m1Sz2sTQRh9u9nml02M2hoapaZNtaIg4q0eBMEeRPGg3jyJhyK00EvpsZBr/wqhAfHQs3fBglRa0EYTm5YYFEqKSRvTJDs7s77ZbdpYHfiYmW++7817b8bAiZHL5fqVUnNSygnGWQYYvxgrjuMszs7O/u6tN3o3S0tLN9m8nEqlRuLxOEzTBPdot9uoVqvY5iDQ4/n5+fV/ANjcz8O1TCYzZts2KpUKms2mvh2WZSGZTHp1+Xx+k7kbCwsLLb03uwBMvhwaGhoTQqBYLG41Go0010Edel0oFH5qYLIbo5Tpbp/VXTA5EY1GUSqVwKaHMzMz5R515Ww2e69cLufT6bRX+z+AQa2Zt+n19klzdU6z0zVkO/iXB+V3z92V0jh29iKe5kfXVxFwBVzpwHX8EELi1fotz9RkuIYHF1ZxdWrN8Bm4Lp4+uUs0E0Ygwvk+oIhthfUhDRKQTgPZySbzwmvZfP3+WIK+SRc6u29ghQZgGP0s7AMiCaYVcLAHuf8NdusHlHOAyMg0XLvTA0CKUPomG/WNj9R5Colrt1F5u8j+8xi+M4n61w0C1BBLnyFhCVfYvQDCk+GSamL8CszgAN1RkB2JT7sRDMNGIjOCdjPE2gOPVRfA+wcu3dWoWmvt8zpZfOCJA9VW6LRI1SWzwhfUi999uUp5PccM9EajUkLichqB6DkC2Bh9NoVRwYb9HZzOpBDc7/MZUO4JANtDVY72YIMAMSBMI60g8xqgjlatCtFsIDYcp93Kl90LoCWELr5A5FIARjDkP6HJl1CUZrcQazWosEOi0vdLG38EwCfZWp7zvfA+jjgM52jmD/M/lpT+WgNx/AHLKabZiPgg0gAAAABJRU5ErkJggg==")}.zform-button-blockcode,.zform-button-monospace{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABD0lEQVR42mNgGAVYgWHPQ36yNRt0PuD3nPf0WMSq5x9gYnGbX3/wXvz8GEgOr2b9tntCHrOfHiva9vq//9yn92DiIate3ivb/eY/SE679o4QVs16Lfciole//F649dV/v1lP76kX3JBGkpMOWPTsHkguYunz70C5CBTNug132cKXP/9YueMNUMGz36o514zRLdAsv2UMkivd9PJ/4MzHHxWSrrChKFAvvhkROv/p96xVL/579D24Jx93SRpJTtp76qN7ILmgmY++A+UisHpDMeWKkG3DnWOpi5/+d225Cw8Dr0mP7mWseP4fJCcXfVEIb0DKRFzgtyy/ecy78x48FvynPPxgU3vnGEhuNJFjAgDXGIoQBpiXVgAAAABJRU5ErkJggg==")}.zform-button-titles{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAApklEQVQoz73QsQ2EMAwFUEsUNDRUVJeKLh1VdE2qSIiGAikZxBNkAja4Cf4iLOI1uCjkdKkokSvrP9lO6KT7okeAjx4eWzhpCQ4WJp6k53GvJnjZcLUplhS/RyipwCZrAQZTDhQPNVhlORxbNjwdOgcD9zVYxJUJGmMOeu5q4MQW8NvdcVsDK6YAhWt3y80f2JhOg07PVGFAjy62ofkQaKfXU199X1/TU/Qkt2QxeAAAAABJRU5ErkJggg==")}.zform-button-title1{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAApklEQVQoz73QsQ2EMAwFUEsUNDRUVJeKLh1VdE2qSIiGAikZxBNkAja4Cf4iLOI1uCjkdKkokSvrP9lO6KT7okeAjx4eWzhpCQ4WJp6k53GvJnjZcLUplhS/RyipwCZrAQZTDhQPNVhlORxbNjwdOgcD9zVYxJUJGmMOeu5q4MQW8NvdcVsDK6YAhWt3y80f2JhOg07PVGFAjy62ofkQaKfXU199X1/TU/Qkt2QxeAAAAABJRU5ErkJggg==")}.zform-button-title2{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAwklEQVQoz73QsQ2DMBAF0JMoaBARiiIqXER07lxZNK4sIRoKJHuCTMAETJANmOBvkAnYIBPcGsQCh5ISXfmfvs9HK50PXQLc5OAw+JU6b2GgJyXlXEO0R4PjAbs3UKwqudST+Dy4qCIYuI9A48nS1yEomxtnTQQ9d4sdzahHtUjeaYHsm+YRdGxjg0S9geKdIZXHDpZNBGE13uLXSklO/x0M6wgE7lw0oRwJaKF2A2bSUJDhm8KXCG/PWwyarzv1+fwAYArrjnYCa/AAAAAASUVORK5CYII=")}.zform-button-title3{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAxElEQVQoz73QsanDMBSF4cPzAxdx4KkSBKxKnTpXIo0qg3GTwmBPkAk0gSbIBpngbuAJsshZ46Z4wmXK8LcfpzhQfA5fAWtZZZVlU8zbKEliGUJ4enHTsbBykX+fJFIRdl/cbnmAhbcKogxU+F5h72Y/wI3za8wpxzy8AhWut3Jmlw8wc6wLQTwVCtN3e8tmqmBkqsDLhTaYu6Ltf4lcQWKswMkfTT6xvTbhh7gqoEglyiBhU7jNipHu0ZbmiQem7139uTdX8exNUqtqywAAAABJRU5ErkJggg==")}.zform-button-title4{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAt0lEQVQoz73QsQ2DMBAFUEsUNAiJiipXRNfRUSE3rty4oYhkBmGCmyAbZILbgAnYgAluDXIBJ6SiRNdY+k/fPpvVnI+5BESKrDOsph8Ce3b0CZob0q8hSuTdayxbXOIE/AceCTjuNoAvmOsDPKSfw+hHN3ZzqwCfYGuuDtBLSA0t3wUtLBovxZJTAkF8Ao0CKGtb2WLKp6xJwItLABlkP+Wcfa/wpE/jVtfEAVjLt/UyMnTdV5/PG1Cu8REDzPeUAAAAAElFTkSuQmCC")}.zform-button-table{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAByElEQVR42q2TzytEURTHv/Pe85sFGVPIRpHflKYRC8rCilCKspKlvZVY8H/IQhQldiyEyUSKUhKxUH7MTH7LNO/+cO6b8d4bWRCn3jvv3nfO53zvufcCfzSPes1tPUxIiVEuRakQAlwATHmuviUYeefh4EzSvNifGa7wGwogpBzr9+cV/qby5MJ5vfIWgGhW8srFLFVmVIXBJG9y0/E09/lvvGUapskzXABpUYeqR35U/S1GUMbhANSiyeZ3wj8CdDcXIO4GsCRA2WBbERaDdxho9dlzS6E79AeccfQ5lqrAJAA1EoZOwbth6LqG5VAYHg3Qkkkre6SOYtIoo6okG3HzyxJUFwzdg16/l4Ij6PEXpShwj8+vn8GYSFUgaWxQubWDCClIeCtAcyAGnRqVVl2cSQXdAKJJJY8Su5q82DiKorPBORbrhxEEKvORl2WF4/TqCTkZhquJIkHTNY+VrOzT0xSdBWD75MEGlnvT7Z1LABhL9IDkdtQVYvM4ivZaR8FyKIK+gNceKwV6cmlOD2gJtWW5uLl/R7kvC5e3r/ZdqClJt5LcJoQUrl2Qwan5s8Y4Fzlqf9XDqS+mdXnYt4fp8SW2iv+wD9RSCSl9jwFVAAAAAElFTkSuQmCC")}.zform-button-math{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAs0lEQVQoz2P4z4AfMhCpoNGh8X/d/+oz5UeLz+T/yPqfchTDhLrz+/6XnSnqye3JmJzcEzsfQ0GlQff/Cf9zHCC8sP1Y3FBQP/9/2v0EATyOTDk/+39kAR4FsQkR74Nm4VQQIxB2P/A2nnAIXe9/xrMHwjb5j6EgOMHvvMdpEMsC6Ez992gKggx83ru/cay3qTfvN7qv918L3ZveCa77HfZb7Tfdb7hfd7/mfrV+UuOCAgUAOHoB5MLjQikAAAAASUVORK5CYII=")}.zform-button-footnote{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABlUlEQVR42qWTx05CURCGeQCfwBIX+gY+i23v3qCIEevCaMB7uY0LF9SoxF5iiSshlmCjG2kixRghajQRrjuJ+T3XFRukOMkkM2dyvjP/nIxKVWSL9uWC6j82v7AE+/IqZucXGmoCSLY55PIy1je3YbHOdVUNEMwSvgoFyJ+f2NrZhVmyrVUF4AQzZFnGbShMIDIczmMIoiVTMYDhRby9vePiyg1fIIjnl1dcu71geRNEi7X8XBhOQCabhc8f+PVA8Abph0eEozEFQLqR/p4LzXBIpdMIEQmKjFA4gmgsRs4ecBdPYNG+At5k2S0JoIwcuRDHfSIJt8eDRDIFhhNhoBjQjECkiAoAJQEGmkU4EsPpmQtGRc5T9neQfRqtRMptRV4CQF5ye/2gWeF7QDu04Tq/xBOBUEY2X9EvzNAMTGYr2js6e0jaxJNvzX3kcORwYlpPdZcFGCgWupHxPRLWKXmvut/q8fiQz+UxOaVHJU0o+pqL8npelLB/cAjd6MRJTfuh1gyu6IbHXCRsqXVJG4m3lir+AKcgCFAzJG3uAAAAAElFTkSuQmCC")}div.zform-popup{top:18px;z-index:100;background:transparent;background-color:#fff;background-image:linear-gradient(to center top, #ebebe5 8%,#f9f9f6 75%);border:1px solid #CCCCCC;border-radius:3px;padding:2px}.zform-code-col{display:inline-block;vertical-align:top;margin:2px;min-width:100px}.zform-code-col>span{display:block;color:#2677C9;cursor:pointer}.zform-code-col>span[data-zform-selected='true']{color:blue;font-weight:bold}.zform-code-col>span:hover,.zform-code-col>span:focus{color:#C87B02}#zform-modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:#000;opacity:0.5;filter:alpha(opacity=50);display:none;z-index:99}#zform-modal-wrapper{position:fixed;top:0;left:0;width:100%;height:100%;display:none;margin-top:10%;text-align:center;z-index:100}#zform-modal-wrapper>div{display:inline-block;background:#f4f6f6;border:1px solid #555;border-radius:2px;box-shadow:0 2px 26px rgba(0,0,0,0.3),0 0 0 1px rgba(0,0,0,0.1)}#zform-modal-wrapper>div>header{background:#084561;color:#fff;font-weight:bold;line-height:27px;text-align:left;padding-left:6px;padding-right:6px;white-space:nowrap}#zform-modal-wrapper>div>footer{background:#e7ebec;text-align:right;padding-right:6px;line-height:32px;border-top:2px solid #d1d4d5}#zform-modal-wrapper>div>footer>a{cursor:pointer}#zform-modal-wrapper section{display:block;margin:8px;min-width:200px;min-height:50px}.zform-modal label{display:inline-block;width:70px;text-align:left}@media only screen and (max-width: 760px){html.dropdown-active{overflow:hidden}html.dropdown-active .page-container{width:100%}html.dropdown-active .main-container{display:none}.header-menu-dropdown{display:none !important}.dropdown{width:100%;top:180px;bottom:0;border-bottom:none}.dropdown .dropdown-list{overflow:auto;position:absolute;top:36px;bottom:50px}.dropdown .dropdown-link-all{position:absolute;left:0;right:0;bottom:0;height:50px;line-height:50px}form.forum-message .message{padding-top:0 !important}.message-actions a{width:0px}.message-bottom .message-karma a{border-bottom-width:1px !important}.message-submit{display:block !important;width:calc(100% - 16px);margin:0 8px !important}.message-submit button{float:left;display:block;width:49.5%}.message-submit button[type=submit]{float:right}}@media only screen and (max-width: 959px){body{background:#222}body:not(.swipping) .page-container,body:not(.swipping) .mobile-menu{-moz-transition-property:-moz-transform;-o-transition-property:-o-transform;-webkit-transition-property:-webkit-transform;transition-property:transform;-moz-transition-duration:0.3s;-o-transition-duration:0.3s;-webkit-transition-duration:0.3s;transition-duration:0.3s;-moz-transition-timing-function:ease;-o-transition-timing-function:ease;-webkit-transition-timing-function:ease;transition-timing-function:ease}body.swipping *{-moz-user-select:-moz-none;-ms-user-select:none;-webkit-user-select:none;user-select:none;-webkit-pointer-events:none;-moz-pointer-events:none;pointer-events:none}.js .page-container{position:absolute;z-index:10;-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.js .mobile-menu{display:block;position:absolute;position:fixed;overflow-x:hidden;overflow-y:auto;z-index:1;-moz-transform:translate3d(-20%, 0, 0);-ms-transform:translate3d(-20%, 0, 0);-o-transform:translate3d(-20%, 0, 0);-webkit-transform:translate3d(-20%, 0, 0);transform:translate3d(-20%, 0, 0);width:90%;height:100%;padding-bottom:20px;background:#222;-moz-user-select:-moz-none;-ms-user-select:none;-webkit-user-select:none;user-select:none}.js .mobile-menu .search{height:50px;position:relative;top:0;left:0;width:100%}.js .mobile-menu .search input{color:#EEE;background-color:#333;width:76%;height:30px;padding:10px 5%;font-size:16px;font-size:1.6rem}.js .mobile-menu .search input:hover,.js .mobile-menu .search input:focus{padding-bottom:7px;border-bottom:3px solid #084561;background-color:#333}.js .mobile-menu .search button{display:none}.js .mobile-menu .search .search-more{background-color:#3F3F3F;width:14%;height:50px;line-height:50px;color:#CCC}.js .mobile-menu .mobile-menu-bloc,.js .mobile-menu .mobile-menu-link{width:90%;line-height:40px;text-indent:0}.js .mobile-menu .mobile-menu-bloc{margin:0 5% 15px}.js .mobile-menu .mobile-menu-bloc:nth-child(2){margin-top:15px}.js .mobile-menu .mobile-menu-bloc ul,.js .mobile-menu .mobile-menu-bloc li{margin:0;padding:0}.js .mobile-menu .mobile-menu-bloc .mobile-menu-link{margin:0;width:100%}.js .mobile-menu .mobile-menu-bloc:not(.mobile-show-ico) .ico-after:after{display:none}.js .mobile-menu .mobile-menu-bloc[data-title]:before{display:block;content:attr(data-title);height:30px;font-size:14px;font-size:1.4rem;text-transform:uppercase;padding-bottom:3px;border-bottom:2px solid #3F3F3F;font-weight:bold;color:#666}.js .mobile-menu .mobile-menu-bloc.mobile-show-ico .ico-after{padding-left:30px;width:calc(100% - 30px)}.js .mobile-menu .mobile-menu-bloc.mobile-show-ico .ico-after:after{top:12px;left:2px}.js .mobile-menu .mobile-menu-link{display:block;height:40px;text-decoration:none;color:#CCC;font-size:16px;font-size:1.6rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.js .mobile-menu .mobile-menu-link.mobile-menu-sublink{width:90%;margin:0 0 0 10%}.js .mobile-menu .mobile-menu-link.mobile-menu-bloc[data-title]{height:80px}.js .mobile-menu .mobile-menu-link.mobile-menu-bloc:not([data-title]){margin-bottom:0}.js .mobile-menu .mobile-menu-link:not(:last-child):not(.mobile-menu-bloc){border-bottom:1px solid #2C2C2C}.js .mobile-menu .mobile-menu-link[data-prefix]:before{content:"[" attr(data-prefix) "] "}.js .mobile-menu .mobile-menu-link.unread{font-weight:bold;color:#EEE}.js .mobile-menu .mobile-menu-link img{float:left;margin:5px 5px 5px 0;width:30px;height:30px}.js .mobile-menu .mobile-menu-link .label{padding:0 0 0 50px}.js .mobile-menu .mobile-menu-link img+.label{padding:0 0 0 10px}.js.show-mobile-menu{width:100%}.js.show-mobile-menu body{position:fixed}.js.show-mobile-menu .page-container{height:100%;-moz-transform:translate3d(90%, 0, 0);-ms-transform:translate3d(90%, 0, 0);-o-transform:translate3d(90%, 0, 0);-webkit-transform:translate3d(90%, 0, 0);transform:translate3d(90%, 0, 0);overflow:hidden;-moz-box-shadow:0 0 7px rgba(0,0,0,0.25);-webkit-box-shadow:0 0 7px rgba(0,0,0,0.25);box-shadow:0 0 7px rgba(0,0,0,0.25)}.js.show-mobile-menu .mobile-menu{-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.js.enable-mobile-menu .mobile-menu-hide{display:none}.js.enable-mobile-menu .page-container .mobile-menu-bloc,.js.enable-mobile-menu .page-container .mobile-menu-link,.js.enable-mobile-menu .page-container .search{display:none}.js.enable-mobile-menu .page-container .mobile-menu-btn+.header-logo{margin-left:0}.js.enable-mobile-menu .page-container .mobile-menu-btn{display:block;float:left;height:50px;width:50px}.js.enable-mobile-menu .page-container .mobile-menu-btn:after{display:block;content:" ";position:absolute;top:15px;left:13px;height:22px;width:22px;background-image:url('../images/sprite@2x-sdc8bfa9a21.png');background-repeat:no-repeat;background-position:0 -3280px}.page-container .header-logo{width:40px;height:50px;margin-left:50px;float:left}.page-container .header-logo-link{background-image:url("../images/logo-mobile@2x.png") !important;background-size:100%;width:100%;height:100%}.page-container .header-logo-link:after{display:block;content:attr(data-title);position:absolute;top:0;left:95px;right:155px;line-height:50px;text-indent:0;text-align:left;font-weight:normal;font-size:17px;font-size:1.7rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:200px}.page-container .header-container .header-menu{height:30px}.page-container .header-container .header-menu .header-menu-list{padding-top:50px}.page-container .header-container .header-menu .header-menu-list>li>a{line-height:50px}.page-container .logbox{float:right;width:150px;background:none}.page-container .logbox .notifs-links{width:100%}.page-container .logbox .notifs-links .ico-link{height:50px;width:50px}.page-container .logbox .dropdown{top:50px}.page-container .logbox .dropdown.my-account-dropdown .dropdown-list{bottom:0}.page-container .logbox .dropdown.my-account-dropdown .dropdown-list li{height:45px;line-height:45px}.page-container .logbox.unlogged{font-size:13px;font-size:1.3rem}.page-container .logbox.unlogged a{background-color:rgba(255,255,255,0.1);line-height:30px;height:30px;margin:10px 0;width:74px;margin-right:1px}html:not(.enable-mobile-menu) .header-container{border-bottom:1px solid #CCC}html:not(.enable-mobile-menu) .page-container .header-logo{margin-left:10px}html:not(.enable-mobile-menu) .page-container .header-logo-link:after{left:55px;right:205px}html:not(.enable-mobile-menu) .logbox .notifs-links .ico-link,html:not(.enable-mobile-menu) .logbox .my-account{position:absolute;top:0;right:0;height:50px;width:50px}html:not(.enable-mobile-menu) .logbox .notifs-links .ico-link .avatar,html:not(.enable-mobile-menu) .logbox .my-account .avatar{height:50px;width:50px}html:not(.enable-mobile-menu) .logbox .notifs-links :nth-child(1) .ico-link{right:150px}html:not(.enable-mobile-menu) .logbox .notifs-links :nth-child(2) .ico-link{right:100px}html:not(.enable-mobile-menu) .logbox .notifs-links :nth-child(3) .ico-link,html:not(.enable-mobile-menu) .logbox .notifs-links .ico-link:nth-child(3){right:50px}html:not(.enable-mobile-menu) .logbox.unlogged{position:absolute;top:0;right:0}.main{width:100%}.main .content-container .content-col:not(:first-child),.main .sidebar{margin-top:50px}.home .main .content-container article{padding:20px 4%}.main .sidebar{width:102.5%}.main .sidebar h3,.main .sidebar h4,.main .sidebar ul li{padding-left:5.5%}.main .sidebar h3 a,.main .sidebar h4 a,.main .sidebar ul li a{white-space:normal}.content-col-2:not(:first-child),.content-col-3:not(:first-child){margin-top:50px}.header-menu-dropdown{display:none !important}.topic-list .topic{background:none !important}.main .content-container .topic-message{padding:20px 0}.main .content-container .topic-message .user{position:absolute;top:7px;z-index:10;width:100%}.main .content-container .topic-message .user .avatar-link{float:left;display:none}.main .content-container .topic-message .user .badge{float:left;height:20px;line-height:20px;font-size:12px;width:50px;margin-left:10px}.main .content-container .topic-message .user .user-metadata{float:right;width:140px;margin-right:10px}.main .content-container .topic-message .user .user-metadata a{float:left;height:20px;line-height:20px;border-bottom:none;width:68px}.main .content-container .topic-message .message{border-right:0;border-left:0;padding-top:65px}.main .content-container .topic-message .message .message-metadata{position:absolute;top:0;left:0;right:10px;z-index:15;height:30px;line-height:30px}.main .content-container .topic-message .message .message-metadata .date{float:right}.main .content-container .topic-message .message .message-actions{margin:35px 10px 0 0}.main .content-container .topic-message .message .message-actions a{text-indent:-9999px}.main .content-container .topic-message .message .message-actions a:after{left:12px}.main .content-container .topic-message .message .message-bottom{min-height:0}.main .content-container .topic-message .message .message-bottom .signature{display:none}.main .content-container .topic-message .message .message-bottom .message-karma{position:absolute;top:35px;left:10px}.main .content-container .topic-message .message .message-bottom .message-karma a{margin-right:1px;margin-left:0}.main .content-container .topic-message .message .message-bottom .message-karma .tick{text-indent:-9999px;margin-right:1px}.main .content-container .topic-message .message .message-bottom .message-karma .tick:after{left:12px}.main .content-container .topic-message .message .message-bottom .message-karma .upvote,.main .content-container .topic-message .message .message-bottom .message-karma .downvote{padding:0 7px;text-align:center;min-width:30px}.main .content-container .topic-message .message .message-bottom .message-karma .upvote:after,.main .content-container .topic-message .message .message-bottom .message-karma .downvote:after{display:none}.main .content-container .article-content p,.main .content-container .article-content ul:not(.pagination){font-size:15px;font-size:1.5rem;font-size:1.8ex}.main .content-container .content-wrapper h1,.main .content-container .content-wrapper h2,.main .content-container .content-wrapper h3,.main .content-container .content-wrapper h4,.main .content-container .content-wrapper h5,.main .content-container .content-wrapper h6,.main .content-container .content-wrapper .subtitle,.main .content-container .content-wrapper .authors,.main .content-container .content-wrapper p{padding-left:15px;padding-right:15px}.page-footer{text-align:center;height:auto}.page-footer p{border-bottom:1px solid #5b3a03}.page-footer p,.page-footer ul{display:block;float:none}.page-footer ul{line-height:30px}.page-footer ul li{margin:0 5px}}@media only screen and (min-width: 760px){.dropdown{-moz-box-shadow:0 5px 7px rgba(0,0,0,0.3);-webkit-box-shadow:0 5px 7px rgba(0,0,0,0.3);box-shadow:0 5px 7px rgba(0,0,0,0.3)}.header-right .dropdown{width:350px;left:auto;padding:0}.header-right .dropdown .dropdown-list{max-height:270px;overflow-x:hidden;overflow-y:auto}.header-right .dropdown .dropdown-list::-webkit-scrollbar{width:10px;height:10px}.header-right .dropdown .dropdown-list::-webkit-scrollbar-track{background-color:#06354a}.header-right .dropdown .dropdown-list::-webkit-scrollbar-thumb{background-color:#396a81;border:1px solid #06354a;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.header-right .dropdown .dropdown-list::-webkit-scrollbar-thumb:hover{background-color:#5196b6}.header-right .dropdown .dropdown-list::-webkit-scrollbar-thumb:active{background-color:#71b4d3}.header-right .dropdown.my-account-dropdown{width:230px}}@media only screen and (min-width: 960px){html,body,.page-container{height:100%}.main-container{min-height:calc(100% - 146px)}.screen{display:inline}.wrapper{width:95%;margin:0 2.5%}.header-container{z-index:1;position:relative;-moz-box-shadow:0 0 4px rgba(0,0,0,0.3);-webkit-box-shadow:0 0 4px rgba(0,0,0,0.3);box-shadow:0 0 4px rgba(0,0,0,0.3)}.header-container header{background-image:-moz-linear-gradient(left, rgba(0,0,0,0) 20%,rgba(255,255,255,0.07) 40%,rgba(255,255,255,0.07) 60%,rgba(0,0,0,0) 80%);background-image:-o-linear-gradient(left, rgba(0,0,0,0) 20%,rgba(255,255,255,0.07) 40%,rgba(255,255,255,0.07) 60%,rgba(0,0,0,0) 80%);background-image:-webkit-linear-gradient(left, rgba(0,0,0,0) 20%,rgba(255,255,255,0.07) 40%,rgba(255,255,255,0.07) 60%,rgba(0,0,0,0) 80%);background-image:linear-gradient(to right, rgba(0,0,0,0) 20%,rgba(255,255,255,0.07) 40%,rgba(255,255,255,0.07) 60%,rgba(0,0,0,0) 80%)}.header-logo{float:left;text-align:left;width:240px}.header-container .header-menu{float:left;width:34%;margin-left:.5%}.header-container .header-menu .header-menu-list>li>a{max-width:150px;font-size:1.6rem;font-size:16px}.dropdown{top:60px}.has-dropdown{position:relative;text-indent:-7px}.has-dropdown:after{content:" ";display:block;position:absolute;top:47%;left:83%;height:0;width:0;border:6px solid transparent;border-top:6px solid rgba(255,255,255,0.7)}.has-dropdown:hover:after,.has-dropdown:focus:after,.has-dropdown.active:after{border-top:6px solid #FFF}.logbox .dropdown.my-account-dropdown ul li{height:30px;line-height:30px}.lt-ie9 .dropdown{top:90px}.header-right{float:right;width:230px}.header-right .dropdown{right:2.5%}.breadcrumb{position:relative;display:block;float:left;width:calc(100% - 230px);height:30px}.breadcrumb:after{content:" ";display:block;position:absolute;top:0;right:0;width:50px;height:100%;background-image:-moz-linear-gradient(left, rgba(231,235,236,0),rgba(231,235,236,0.75));background-image:-o-linear-gradient(left, rgba(231,235,236,0),rgba(231,235,236,0.75));background-image:-webkit-linear-gradient(left, rgba(231,235,236,0),rgba(231,235,236,0.75));background-image:linear-gradient(to right, rgba(231,235,236,0),rgba(231,235,236,0.75))}.breadcrumb ul{margin:0;padding:0;list-style:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.breadcrumb ul li{position:relative;display:inline-block;padding-right:30px;line-height:30px}.breadcrumb ul li a{text-decoration:none;color:#084561}.breadcrumb ul li a:hover,.breadcrumb ul li a:focus{text-decoration:underline;outline:none}.breadcrumb ul li:not(:last-child):after{display:block;position:absolute;top:0;right:7px;content:" ";height:30px;width:15px;background-image:url('../images/sprite@2x-sdc8bfa9a21.png');background-repeat:no-repeat;background-position:0 -320px;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=20);opacity:0.2}.search:before{content:" ";display:block;position:absolute;left:-20px;height:30px;width:20px;background:-moz-linear-gradient(right, rgba(0,0,0,0.03),rgba(0,0,0,0));background:-o-linear-gradient(right, rgba(0,0,0,0.03),rgba(0,0,0,0));background:-webkit-linear-gradient(right, rgba(0,0,0,0.03),rgba(0,0,0,0));background:linear-gradient(to left, rgba(0,0,0,0.03),rgba(0,0,0,0))}.search form input{padding:8px 10px;height:14px;width:150px}.search form button{height:30px;line-height:30px;width:30px}.search form button:after{top:7px}.search .search-more{width:30px;height:30px;line-height:30px}body.no-sidebar .main .content-container{width:100%}body.no-sidebar .main .sidebar{display:none}.main{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:-moz-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-moz-box-orient:horizontal;-moz-box-direction:reverse;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;height:100%;margin-left:0;padding-left:2.5%}.main .content-container{width:80%;margin-right:0}.main .content-container h1,.main .content-container h2{margin-left:1px}.main .content-container .content-col-2{width:49.5%;margin:0 0 0 1%}.main .content-container .content-col-3{width:32%;margin:0 0 0 2%}.main .content-container .content-col-2,.main .content-container .content-col-3{float:left}.main .content-container .content-col-2:first-child,.main .content-container .content-col-3:first-child{margin:0}.main .sidebar{width:22.5%;border-bottom:none}.main .sidebar h3,.main .sidebar h4,.main .sidebar ul li{padding-left:11.5%}.main .sidebar h3:first-child{margin-top:31px}.main .sidebar h4[data-num]{padding-left:calc(11% + 25px)}.main .sidebar h4[data-num]:before{left:11%}.main .sidebar.sommaire ul li.current ul{margin-left:calc(-11% - 10px);width:calc(111% + 10px);background:-moz-linear-gradient(top, rgba(0,0,0,0.07),rgba(0,0,0,0) 3px);background:-o-linear-gradient(top, rgba(0,0,0,0.07),rgba(0,0,0,0) 3px);background:-webkit-linear-gradient(top, rgba(0,0,0,0.07),rgba(0,0,0,0) 3px);background:linear-gradient(to bottom, rgba(0,0,0,0.07),rgba(0,0,0,0) 3px)}.main .sidebar.sommaire ul li.current ul a{padding-left:calc(11% + 30px)}.content-cols .main .content-container{width:79%;margin-left:1.5%}.home .main .sidebar{margin-top:30px;border-top:1px solid #FFF}.home .main .sidebar h3:first-child{margin-top:0}.full-content-wrapper .tutorial-list article{width:46%;float:left}.topic-list .topic .topic-description{background-size:0 0}.topic-list .topic .topic-description[style]:before{display:block;position:absolute;content:" ";right:0;background-image:inherit;background-repeat:no-repeat;background-position:top right;background-size:80px 80px;height:100%;width:80px;margin-top:-5px;-webkit-mask-box-image:-webkit-linear-gradient(right, #000, transparent);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=20);opacity:0.2}.topic-message{margin:0 0 25px}.topic-message .user:after,.topic-message .message:after{content:" ";display:block;position:absolute;top:10px;height:0;width:0;border:20px solid transparent;border-left:0}.topic-message .user{position:absolute;padding-top:60px;top:0;left:0}.topic-message .user:after{left:60px;border-right-color:#D2D4D6}.topic-message .message{margin-left:80px}.topic-message .message:after{top:9px;left:-19px;border-right-color:#FDFDFD}.pagination{border:1px solid #d2d5d6}.content-wrapper{margin:0 0 0 1.5%}.full-content-wrapper{margin:0 0 0 2%}.enable-mobile-menu #modals .modal{-moz-box-shadow:0 2px 7px rgba(0,0,0,0.7);-webkit-box-shadow:0 2px 7px rgba(0,0,0,0.7);box-shadow:0 2px 7px rgba(0,0,0,0.7)}.enable-mobile-menu #modals .modal .modal-title{line-height:50px}.enable-mobile-menu #modals .modal [type=submit]:hover,.enable-mobile-menu #modals .modal [type=submit]:focus,.enable-mobile-menu #modals .modal .btn:hover,.enable-mobile-menu #modals .modal .btn:focus{color:#EEE !important;background:#084561 !important}}@media only screen and (min-width: 1140px){.wide{display:inline}table .wide{display:table-cell}.header-container .header-menu{width:40%;margin-left:5%}.full-content-wrapper .tutorial-list article{width:29.3%}}.header-logo-link{background-size:100%;background-image:url("../images/logo@2x.png")}.ico,.ico-after:after,.breadcrumb ul li:not(:last-child):after{background-size:40px 3000px !important;background-image:url('../images/sprite@2x-sdc8bfa9a21.png') !important}.js.enable-mobile-menu .page-container .mobile-menu-btn:after{background-position:0 -1640px}.logbox .notifs-links .ico-link .notif-text.ico-messages{background-position:0 -1680px}.logbox .notifs-links .ico-link .notif-text.ico-notifs{background-position:0 -1960px}.logbox .notifs-links .ico-link .notif-text.ico-alerts{background-position:0 -120px}.logbox .notifs-links .ico-link .notif-text.ico-gear{background-position:0 -1200px}.breadcrumb ul li:not(:last-child):after{background-position:0 -160px}.search form button:after{background-position:0 -2320px}.main .content-container h2.ico-articles:after{background-position:0 -440px}.main .content-container h2.ico-tutorials:after{background-position:0 -2800px}.main .content-container .article-content .information.ico-after:after,.main .content-container .message-content .information.ico-after:after{background-position:0 -1480px}.main .content-container .article-content .question.ico-after:after,.main .content-container .message-content .question.ico-after:after{background-position:0 -2120px}.main .content-container .article-content .error.ico-after:after,.main .content-container .message-content .error.ico-after:after{background-position:0 -1160px}.main .content-container .article-content .warning.ico-after:after,.main .content-container .message-content .warning.ico-after:after{background-position:0 -2960px}.ico-after.online:after,.ico-after.view:after{background-position:0 -2920px}.ico-after.online.blue:after,.ico-after.view.blue:after{background-position:0 -2840px}.ico-after.online.light:after,.ico-after.view.light:after{background-position:0 -2880px}.ico-after.edit:after{background-position:0 -1120px}.ico-after.edit.blue:after{background-position:0 -1040px}.ico-after.edit.light:after{background-position:0 -1080px}.ico-after.alert:after{background-position:0 -80px}.ico-after.alert.blue:after{background-position:0 0}.ico-after.alert.light:after{background-position:0 -40px}.ico-after.cite:after{background-position:0 -680px}.ico-after.cite.blue:after{background-position:0 -600px}.ico-after.cite.light:after{background-position:0 -640px}.ico-after.tick:after{background-position:0 -2760px}.ico-after.tick.green:after{background-position:0 -2680px}.ico-after.tick.light:after{background-position:0 -2720px}.ico-after.upvote:after{background-position:0 -2640px}.ico-after.upvote.voted:after{background-position:0 -2600px}.ico-after.downvote:after{background-position:0 -2560px}.ico-after.downvote.voted:after{background-position:0 -2520px}.ico-after.lock:after{background-position:0 -1600px}.ico-after.lock.blue:after{background-position:0 -1520px}.ico-after.lock.light:after{background-position:0 -1560px}.ico-after.more:after{background-position:0 -1800px}.ico-after.more.blue:after{background-position:0 -1720px}.ico-after.more.light:after{background-position:0 -1760px}.ico-after.cross:after{background-position:0 -880px}.ico-after.cross.blue:after{background-position:0 -720px}.ico-after.cross.red:after{background-position:0 -800px}.ico-after.cross.light:after{background-position:0 -760px}.ico-after.cross.white:after{background-position:0 -840px}.ico-after.pin:after{background-position:0 -2080px}.ico-after.pin.blue:after{background-position:0 -2000px}.ico-after.pin.light:after{background-position:0 -2040px}.ico-after.beta:after{background-position:0 -560px}.ico-after.beta.blue:after{background-position:0 -480px}.ico-after.beta.light:after{background-position:0 -520px}.ico-after.offline:after,.ico-after.arrow-right:after{background-position:0 -400px}.ico-after.offline.blue:after,.ico-after.arrow-right.blue:after{background-position:0 -320px}.ico-after.offline.light:after,.ico-after.arrow-right.light:after{background-position:0 -360px}.ico-after.arrow-left:after{background-position:0 -280px}.ico-after.arrow-left.blue:after{background-position:0 -200px}.ico-after.arrow-left.light:after{background-position:0 -240px}.ico-after.move:after{background-position:0 -1920px}.ico-after.move.blue:after{background-position:0 -1840px}.ico-after.move.light:after{background-position:0 -1880px}.ico-after.star:after{background-position:0 -2480px}.ico-after.star.yellow:after{background-position:0 -2440px}.ico-after.star.blue:after{background-position:0 -2360px}.ico-after.star.light:after{background-position:0 -2400px}.ico-after.download:after{background-position:0 -1000px}.ico-after.download.blue:after{background-position:0 -920px}.ico-after.download.light:after{background-position:0 -960px}.ico-after.import:after{background-position:0 -1440px}.ico-after.import.blue:after{background-position:0 -1360px}.ico-after.import.light:after{background-position:0 -1400px}.ico-after.history:after{background-position:0 -1320px}.ico-after.history.blue:after{background-position:0 -1240px}.ico-after.history.light:after{background-position:0 -1280px}.ico-after.rss:after{background-position:0 -2280px}.ico-after.rss.blue:after{background-position:0 -2160px}.ico-after.rss.orange:after{background-position:0 -2240px}.ico-after.rss.light:after{background-position:0 -2200px}.codehilite .hll{background-color:#ffc}.codehilite{background:#f8f8f8}.codehilite .c{color:#408080;font-style:italic}.codehilite .err{border:1px solid red}.codehilite .k{color:#008000;font-weight:bold}.codehilite .o{color:#666}.codehilite .cm{color:#408080;font-style:italic}.codehilite .cp{color:#bc7a00}.codehilite .c1{color:#408080;font-style:italic}.codehilite .cs{color:#408080;font-style:italic}.codehilite .gd{color:#a00000}.codehilite .ge{font-style:italic}.codehilite .gr{color:red}.codehilite .gh{color:#000080;font-weight:bold}.codehilite .gi{color:#00a000}.codehilite .go{color:gray}.codehilite .gp{color:#000080;font-weight:bold}.codehilite .gs{font-weight:bold}.codehilite .gu{color:#800080;font-weight:bold}.codehilite .gt{color:#0040d0}.codehilite .kc{color:#008000;font-weight:bold}.codehilite .kd{color:#008000;font-weight:bold}.codehilite .kn{color:#008000;font-weight:bold}.codehilite .kp{color:green}.codehilite .kr{color:#008000;font-weight:bold}.codehilite .kt{color:#b00040}.codehilite .m{color:#666}.codehilite .s{color:#ba2121}.codehilite .na{color:#7d9029}.codehilite .nb{color:green}.codehilite .nc{color:#0000FF;font-weight:bold}.codehilite .no{color:#800}.codehilite .nd{color:#a2f}.codehilite .ni{color:#999999;font-weight:bold}.codehilite .ne{color:#D2413A;font-weight:bold}.codehilite .nf{color:blue}.codehilite .nl{color:#a0a000}.codehilite .nn{color:#0000FF;font-weight:bold}.codehilite .nt{color:#008000;font-weight:bold}.codehilite .nv{color:#19177c}.codehilite .ow{color:#AA22FF;font-weight:bold}.codehilite .w{color:#bbb}.codehilite .mf{color:#666}.codehilite .mh{color:#666}.codehilite .mi{color:#666}.codehilite .mo{color:#666}.codehilite .sb{color:#ba2121}.codehilite .sc{color:#ba2121}.codehilite .sd{color:#BA2121;font-style:italic}.codehilite .s2{color:#ba2121}.codehilite .se{color:#BB6622;font-weight:bold}.codehilite .sh{color:#ba2121}.codehilite .si{color:#BB6688;font-weight:bold}.codehilite .sx{color:green}.codehilite .sr{color:#b68}.codehilite .s1{color:#ba2121}.codehilite .ss{color:#19177c}.codehilite .bp{color:green}.codehilite .vc{color:#19177c}.codehilite .vg{color:#19177c}.codehilite .vi{color:#19177c}.codehilite .il{color:#666}.codehilitetable{width:100% !important;table-layout:fixed;border-color:rgba(0,0,0,0.15)}.codehilitetable td{padding:0}.codehilitetable .linenos{background-color:#fbfbfc;border-right:1px solid #ececf0;width:46px}.codehilitetable .codehilite,.codehilitetable .linenos{padding-top:15px;padding-bottom:15px}.codehilitetable .linenodiv pre{text-align:right;padding-right:emCalc(6px);color:#bebec5}.codehilitetable .codehilite pre{padding-left:emCalc(6px)}.codehilitetable .codehilite{width:100%;height:auto;overflow:auto}.codehilitetable .codehilite pre{white-space:pre;overflow:auto;overflow:auto}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.dropdown{display:none !important}}
+/*! normalize.css v1.1.2 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}html,button,input,select,textarea{font-family:sans-serif}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em;margin:1em 0}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.67em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}blockquote{margin:1em 40px}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}p,pre{margin:1em 0}code,kbd,pre,samp{font-family:monospace,serif;_font-family:'courier new',monospace;font-size:1em}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:before,q:after{content:'';content:none}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}dl,menu,ol,ul{margin:1em 0}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ul,nav ol{list-style:none;list-style-image:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure{margin:0}form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;*overflow:visible}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;*height:13px;*width:13px}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}html,body,button,input,select,textarea{font-family:"Segoe UI","Trebuchet MS",Helvetica,"Helvetica Neue",Arial,sans-serif;color:#222}.wf-active html,.no-js html,.wf-active body,.no-js body,.wf-active button,.no-js button,.wf-active input,.no-js input,.wf-active select,.no-js select,.wf-active textarea,.no-js textarea{font-family:"Source Sans Pro","Segoe UI","Trebuchet MS",Helvetica,"Helvetica Neue",Arial,sans-serif}html{height:100%;width:100%;font-size:62.5%;overflow-x:hidden}body{background:#f7f7f7;font-size:14px;font-size:1.4rem;line-height:1.7em;min-height:100%;width:100%}.page-container,.main-container{min-height:100%;background:#f7f7f7}.content-container{margin-bottom:50px}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}a{color:#1088bf;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}a:hover{color:#d68807;text-decoration:none}.chromeframe{margin:0;background:#ccc;color:#000;padding:0.2em 0;text-align:center}.mobile-menu,.mobile-menu-btn{display:none}.ico{background-image:url('../images/sprite@2x-sdc8bfa9a21.png');background-repeat:no-repeat}.ico-after{position:relative}.ico-after:after{content:" ";display:block;position:absolute;top:0;left:0;width:16px;height:16px;background-image:url('../images/sprite@2x-sdc8bfa9a21.png');background-repeat:no-repeat}.a11y{display:block;width:0;height:0;text-indent:-9999px}.ir{background-color:transparent;border:0;overflow:hidden;*text-indent:-9999px}.ir:before{content:"";display:block;width:0;height:150%}.hidden{display:none !important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.clearfix:before,.clearfix:after{content:" ";display:table}.clearfix:after{clear:both}.clearfix{*zoom:1}.header-container header .accessibility{list-style:none;margin:0;padding:0 2.5%;background:rgba(0,0,0,0.2);overflow:hidden;height:0}.header-container header .accessibility.focused{height:auto}.header-container header .accessibility li{display:inline;margin:0;padding:0}.header-container header .accessibility li a{display:inline-block;padding:0 7px}.header-container header .accessibility li a:hover,.header-container header .accessibility li a:focus{color:#084561;background-color:#fff}.header-container header{background:#084561;border-bottom:3px solid #f8ad32}.header-container header a,.header-container header button{text-decoration:none;color:#FFF;-moz-transition-property:background;-o-transition-property:background;-webkit-transition-property:background;transition-property:background;-moz-transition-duration:0.15s;-o-transition-duration:0.15s;-webkit-transition-duration:0.15s;transition-duration:0.15s}.header-container header a:focus,.header-container header button:focus{outline:none}.header-logo{text-align:center;margin:0;padding:0;width:100%}.header-logo-link{display:block;margin:0 auto;text-indent:-9999px;width:100%;max-width:240px;height:60px;background:url("../images/logo.png") no-repeat center center;background-size:100% auto}.header-logo-link.oldie{width:240px}.header-logo-link:hover,.header-logo-link:focus{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);opacity:0.7}.dropdown{display:none;position:absolute;text-align:left;top:50px;left:0;right:0;background-color:#396a81;margin:0;padding:10px 2.5%;font-size:14px;font-size:1.4rem;border-bottom:3px solid #f8ad32;z-index:50}.dropdown .dropdown-title{text-transform:uppercase;color:#FFF}.dropdown .dropdown-list{width:100%;padding:0}.dropdown .dropdown-list>li{width:20%;float:left}.dropdown .dropdown-list>li.dropdown-empty-message{color:rgba(255,255,255,0.5);text-align:center;line-height:60px;background:none !important}.dropdown .dropdown-list>li ul{margin:0 0 10px;padding:0}.dropdown .dropdown-list>li ul li{position:relative}.dropdown .dropdown-list>li ul li a{display:block;width:95%;height:25px;line-height:25px;color:#95d7f5;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.dropdown .dropdown-list>li ul li a:hover,.dropdown .dropdown-list>li ul li a:focus{text-indent:3%;background-color:rgba(0,0,0,0.3)}.dropdown .dropdown-link-all{display:block;clear:both;text-align:center;height:30px;line-height:30px;border-top:1px solid #274a5a;background-color:#396a81;-moz-transition-property:color,background-color;-o-transition-property:color,background-color;-webkit-transition-property:color,background-color;transition-property:color,background-color}.dropdown .dropdown-link-all:first-child{border-top:0 !important;border-bottom:1px solid #274a5a}.dropdown .dropdown-link-all:hover,.dropdown .dropdown-link-all:focus{color:#95d7f5;background-color:#274a5a;border-top:1px solid #396a81}.active+.dropdown{display:block}.header-container .header-menu{height:60px}.header-container .header-menu .header-menu-list{margin:0;padding:0}.header-container .header-menu .header-menu-list>li{display:block;float:left;width:33.3%}.header-container .header-menu .header-menu-list>li>a{display:block;position:relative;text-align:center;line-height:60px;text-transform:uppercase;font-size:1.5px;font-size:1.5rem;text-shadow:rgba(0,0,0,0.75) 0 0 3px}.header-container .header-menu .header-menu-list>li>a:hover,.header-container .header-menu .header-menu-list>li>a:focus,.header-container .header-menu .header-menu-list>li>a.active{background:#396a81}.header-container .header-menu .header-menu-list>li>a.current:before{content:" ";display:block;position:absolute;bottom:0;left:0;right:0;height:2px;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px;border-radius:2px 2px 0 0;background-color:#f8ad32}.header-container .header-menu .header-menu-list>li>a.current.active:before{height:0}.logbox{background:rgba(255,255,255,0.05)}.logbox .notifs-links{margin-right:60px}.logbox .notifs-links .ico-link{display:block;position:relative;width:33.3%;height:60px;line-height:60px;float:left}.logbox .notifs-links .ico-link .notif-count{display:block;position:absolute;z-index:1;top:50%;right:50%;margin:-20px -22px 0 0;padding:0 5px;height:16px;line-height:14px;background:#c0392b;-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px}.logbox .notifs-links .ico-link .notif-text{display:block;position:absolute;text-indent:-9999px;height:22px;width:22px;top:50%;left:50%;margin:-11px 0 0 -11px}.logbox .notifs-links .ico-link .notif-text.ico-messages{background-position:0 -3360px}.logbox .notifs-links .ico-link .notif-text.ico-notifs{background-position:0 -3920px}.logbox .notifs-links .ico-link .notif-text.ico-alerts{background-position:0 -240px}.logbox .notifs-links .ico-link .notif-text.ico-gear{background-position:0 -2400px}.logbox .notifs-links .ico-link:hover,.logbox .notifs-links .ico-link:focus,.logbox .notifs-links .ico-link.active{background:#396a81}.logbox .dropdown{overflow:hidden}.logbox .dropdown .dropdown-title{display:block;width:100%;height:35px;line-height:37px;text-align:center;border-bottom:1px solid #274a5a;background-color:#396a81}.logbox .dropdown,.logbox .dropdown .dropdown-list{margin:0;padding:0;list-style:none;background-color:#19526c}.logbox .dropdown li,.logbox .dropdown .dropdown-list li{display:block;width:100%;height:60px}.logbox .dropdown li a,.logbox .dropdown .dropdown-list li a{display:block;overflow:hidden;position:relative;height:100%;width:100%}.logbox .dropdown li a,.logbox .dropdown li a:hover,.logbox .dropdown li a:focus,.logbox .dropdown li a.read:hover,.logbox .dropdown li a.read:focus,.logbox .dropdown .dropdown-list li a,.logbox .dropdown .dropdown-list li a:hover,.logbox .dropdown .dropdown-list li a:focus,.logbox .dropdown .dropdown-list li a.read:hover,.logbox .dropdown .dropdown-list li a.read:focus{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1;-moz-transition-property:opacity,background-color;-o-transition-property:opacity,background-color;-webkit-transition-property:opacity,background-color;transition-property:opacity,background-color}.logbox .dropdown li a:hover,.logbox .dropdown li a:focus,.logbox .dropdown .dropdown-list li a:hover,.logbox .dropdown .dropdown-list li a:focus{background-color:#396a81}.logbox .dropdown li a:hover .username,.logbox .dropdown li a:focus .username,.logbox .dropdown .dropdown-list li a:hover .username,.logbox .dropdown .dropdown-list li a:focus .username{text-shadow:rgba(0,0,0,0.5) 0 0 5px}.logbox .dropdown li a:hover .date,.logbox .dropdown li a:focus .date,.logbox .dropdown .dropdown-list li a:hover .date,.logbox .dropdown .dropdown-list li a:focus .date{color:#95D7F5}.logbox .dropdown li a.read,.logbox .dropdown .dropdown-list li a.read{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5}.logbox .dropdown li .avatar,.logbox .dropdown .dropdown-list li .avatar{float:left;height:30px;width:30px}.logbox .dropdown li .username,.logbox .dropdown .dropdown-list li .username{display:block;float:left;margin:4px 0 0 7px;color:#95D7F5;width:50%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.logbox .dropdown li .date,.logbox .dropdown .dropdown-list li .date{color:#5196b6;float:right;padding:4px 10px 0 0;-moz-transition-property:color;-o-transition-property:color;-webkit-transition-property:color;transition-property:color}.logbox .dropdown li .topic,.logbox .dropdown .dropdown-list li .topic{display:block;position:absolute;bottom:0;left:0;overflow:hidden;height:25px;padding:4px 7px 2px;text-overflow:ellipsis;white-space:nowrap;width:95%;width:calc(100% - 14px)}.logbox .dropdown li:nth-child(2n+1),.logbox .dropdown li:nth-child(2n+1) form button,.logbox .dropdown .dropdown-list li:nth-child(2n+1),.logbox .dropdown .dropdown-list li:nth-child(2n+1) form button{background-color:#084561}.logbox .my-account{display:block;height:60px;width:60px;float:right}.logbox .my-account .username{display:none}.logbox .my-account .avatar{background:#396a81}.logbox .dropdown.my-account-dropdown a,.logbox .dropdown.my-account-dropdown button{padding-left:10px}.logbox .dropdown.my-account-dropdown button{width:100%;height:30px;line-height:28px;background:transparent;text-align:left;border:0}.logbox .dropdown.my-account-dropdown button:hover,.logbox .dropdown.my-account-dropdown button:focus{background:#396a81}.logbox.unlogged a{display:block;width:50%;text-align:center;float:left;line-height:60px;height:60px}.logbox.unlogged a:hover,.logbox.unlogged a:focus{background-color:#396a81}.avatar{height:60px;width:60px;background-color:#FFF}.sub-header{background:#EEE}.breadcrumb{display:none}.search{display:block;position:relative}.search form input,.search form button{float:left;border:none;background:rgba(255,255,255,0.25);height:40px;-moz-transition-property:background;-o-transition-property:background;-webkit-transition-property:background;transition-property:background;-moz-transition-duration:0.15s;-o-transition-duration:0.15s;-webkit-transition-duration:0.15s;transition-duration:0.15s}.search form input:hover,.search form input:focus,.search form button:hover,.search form button:focus{outline:none;background-color:rgba(255,255,255,0.75)}.search form input{height:30px;padding:5px 3%;width:70%}.search form button{width:12%;text-indent:-9999px}.search form button:after{display:block;content:" ";position:absolute;top:12px;left:50%;margin-left:-8px;height:16px;width:16px;background-position:0 -4640px}.search .search-more{display:block;float:left;height:40px;font-family:Arial, sans-serif;line-height:40px;width:12%;text-align:center;font-weight:bold;text-decoration:none;font-size:24px;background:#fff;color:#084561;-moz-transition:background 0.15s;-o-transition:background 0.15s;-webkit-transition:background 0.15s;transition:background 0.15s}.search .search-more:hover,.search .search-more:focus{background:rgba(255,255,255,0.7)}.alert-box{position:relative;padding:8px 15px;margin:0 0 15px 2%;color:#FFF;text-shadow:rgba(0,0,0,0.2) 0 0 2px}.alert-box .close-alert-box{display:block;position:absolute;top:12px;right:15px;height:20px;width:20px;text-indent:-9999px;text-decoration:none}.alert-box .close-alert-box-text{width:auto;text-indent:0;top:8px}.alert-box.info,.alert-box.success{background:#27ae60}.alert-box.error{background:#c0392b}.alert-box.alert,.alert-box.warning{background:#e67e22}.alert-box a{color:#EEE}.content-wrapper .alert-box{margin:0 0 20px}.main .sidebar{padding:0 0 10px;background:#f0f0f0;border-bottom:1px solid #FFF;color:#424242;width:105%;margin:0 0 0 -2.7%}.main .sidebar .new-btn{display:block;height:40px;padding-left:11.5%;text-decoration:none;text-indent:25px;line-height:40px;font-size:16px;font-size:1.6rem;position:relative;color:#1088bf;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.main .sidebar .new-btn:first-child{margin-top:31px}.main .sidebar .new-btn:hover,.main .sidebar .new-btn:focus{background:#fff}.main .sidebar .new-btn:after{top:12px;left:11.5%}.main .sidebar h3,.main .sidebar h4{font-weight:normal;margin:0;padding:0}.main .sidebar h3{font-size:18px;font-size:1.8rem;line-height:38px;line-height:3.8rem;color:#084561;border-bottom:1px solid #f8ad32;margin-top:30px;text-transform:uppercase}.main .sidebar h4{padding-top:20px;font-size:17px;font-size:1.7rem}.main .sidebar h4 a{text-decoration:none;color:#424242}.main .sidebar h4[data-num]{position:relative;padding-left:calc(5% + 25px)}.main .sidebar h4[data-num]:before{content:attr(data-num);position:absolute;margin-left:-35px;text-align:right;width:50px}.main .sidebar h3+ul{margin:7px 0}.main .sidebar ul{margin:0;padding:0;list-style:none;width:100%}.main .sidebar ul li{position:relative;padding:0 0 0 2.5%;-moz-transition:background 0.15s;-o-transition:background 0.15s;-webkit-transition:background 0.15s;transition:background 0.15s}.main .sidebar ul li:not(.inactive):hover,.main .sidebar ul li a:focus{background:#fff;outline:none}.main .sidebar ul li:not(.inactive):hover .ico-after.action-hover,.main .sidebar ul li a:focus .ico-after.action-hover{display:block}.main .sidebar ul li a,.main .sidebar ul li button,.main .sidebar ul li.inactive span{display:block;padding-left:25px;padding-right:10px;text-decoration:none;color:#0079b2;overflow:hidden;height:30px;line-height:30px;font-size:14px;font-size:1.4rem;text-overflow:ellipsis;white-space:nowrap;border:0;text-align:left;background:transparent}.main .sidebar ul li a[data-num],.main .sidebar ul li button[data-num],.main .sidebar ul li.inactive span[data-num]{position:relative}.main .sidebar ul li a[data-num]:after,.main .sidebar ul li button[data-num]:after,.main .sidebar ul li.inactive span[data-num]:after{content:attr(data-num) ".";position:absolute;left:0;width:18px;text-align:right;color:#424242}.main .sidebar ul li a.unread,.main .sidebar ul li button.unread,.main .sidebar ul li.inactive span.unread{font-weight:bold}.main .sidebar ul li a.ico-after:after,.main .sidebar ul li button.ico-after:after,.main .sidebar ul li.inactive span.ico-after:after{top:7px;left:0;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);opacity:0.7}.main .sidebar ul li a.ico-after:hover:after,.main .sidebar ul li a.ico-after:focus:after,.main .sidebar ul li button.ico-after:hover:after,.main .sidebar ul li button.ico-after:focus:after,.main .sidebar ul li.inactive span.ico-after:hover:after,.main .sidebar ul li.inactive span.ico-after:focus:after{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.main .sidebar ul li a.ico-after.action-hover,.main .sidebar ul li button.ico-after.action-hover,.main .sidebar ul li.inactive span.ico-after.action-hover{position:absolute;display:none;overflow:visible;top:0;padding:0;z-index:1;width:30px;height:30px;text-indent:-9999px;border-left:1px solid transparent;background:#fff;right:-32px}.main .sidebar ul li a.ico-after.action-hover[data-title]:hover:before,.main .sidebar ul li button.ico-after.action-hover[data-title]:hover:before,.main .sidebar ul li.inactive span.ico-after.action-hover[data-title]:hover:before{content:attr(data-title);display:block;position:absolute;background:#fff;color:#555;top:0;left:35px;height:27px;line-height:27px;line-height:2.7rem;text-indent:0;padding:0 15px;border:1px solid #EEE;-moz-box-shadow:rgba(0,0,0,0.5) 0 0 3px;-webkit-box-shadow:rgba(0,0,0,0.5) 0 0 3px;box-shadow:rgba(0,0,0,0.5) 0 0 3px}.main .sidebar ul li a.ico-after.action-hover:after,.main .sidebar ul li button.ico-after.action-hover:after,.main .sidebar ul li.inactive span.ico-after.action-hover:after{left:5px}.main .sidebar ul li.inactive span{color:#555;font-style:italic}.main .sidebar ul li .last-answer{display:none}.main .sidebar ul li button{width:100%;line-height:28px}.main .sidebar ul li li{padding:0}.main .sidebar ul li li a{position:relative;color:#084561;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.main .sidebar ul li li a:hover,.main .sidebar ul li li a:focus{color:#0079B2;background:#fff;margin-left:-11px}.main .sidebar ul li li a:hover:before,.main .sidebar ul li li a:focus:before{content:"> "}.main .sidebar.sommaire h4{border-bottom:1px solid #d8dada;padding-bottom:5px;padding-right:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.main .sidebar.sommaire h4+ul>li:first-child{margin-top:5px}.main .sidebar.sommaire ul li.current{margin-top:0 !important;padding-top:5px;margin-bottom:5px;background-color:#F4F6F6}.main .sidebar.sommaire ul li.current ul{margin-top:5px;padding-top:5px;padding-bottom:5px;margin-left:-25px;width:calc(105% + 25px);background:-moz-linear-gradient(top, rgba(0,0,0,0.07),rgba(0,0,0,0) 3px);background:-o-linear-gradient(top, rgba(0,0,0,0.07),rgba(0,0,0,0) 3px);background:-webkit-linear-gradient(top, rgba(0,0,0,0.07),rgba(0,0,0,0) 3px);background:linear-gradient(to bottom, rgba(0,0,0,0.07),rgba(0,0,0,0) 3px)}.main .sidebar.sommaire ul li.current ul a{padding-left:50px}.main .content-container{padding-top:30px}.main .content-container h1,.main .content-container h2{font-size:22px;font-size:2.2rem;line-height:38px;line-height:3.8rem;color:#084561;font-weight:normal;border-bottom:1px solid #f8ad32;margin:1px 0 15px}.main .content-container h1.illu,.main .content-container h2.illu{padding-left:60px}.main .content-container h1.ico-after,.main .content-container h2.ico-after{padding-left:80px}.main .content-container h1.ico-after:after,.main .content-container h2.ico-after:after{width:80px;height:40px;margin-left:21px}.main .content-container h1.ico-articles:after,.main .content-container h2.ico-articles:after{background-position:0 -880px}.main .content-container h1.ico-tutorials:after,.main .content-container h2.ico-tutorials:after{background-position:0 -5600px}.main .content-container h1.illu img,.main .content-container h2.illu img{position:absolute;margin:-6px 0 0 -60px;border:1px solid #cdd0d1;width:50px;height:50px}.main .content-container h1:not(:first-child),.main .content-container h2:not(:first-child){margin-top:50px}.main .content-container .subtitle{font-size:18px;font-size:1.8rem;color:#999;margin-top:-15px;margin-bottom:15px;padding:10px 0;font-weight:normal;border-bottom:1px solid #EEE}.main .content-container .member-item .avatar{margin-top:-2px;height:20px;width:20px;border:1px solid #CCC}.main .content-container .member-item:hover .avatar{border-color:#999}.main.home .content-container{margin-top:0}.tutorial-list article,.main .article-content .tutorial-list article{min-height:60px;padding:20px 2%;border-bottom:1px solid #e0e4e5}.tutorial-list article:nth-child(2n+1),.main .article-content .tutorial-list article:nth-child(2n+1){background-color:rgba(255,255,255,0.8)}.tutorial-list article,.tutorial-list article h3,.tutorial-list article a h3,.tutorial-list article h3 a,.main .article-content .tutorial-list article,.main .article-content .tutorial-list article h3,.main .article-content .tutorial-list article a h3,.main .article-content .tutorial-list article h3 a{color:#424242;font-weight:normal}.tutorial-list article a h3:hover,.tutorial-list article a h3:focus,.tutorial-list article h3 a:hover,.tutorial-list article h3 a:focus,.main .article-content .tutorial-list article a h3:hover,.main .article-content .tutorial-list article a h3:focus,.main .article-content .tutorial-list article h3 a:hover,.main .article-content .tutorial-list article h3 a:focus{text-decoration:underline}.tutorial-list article h3,.main .article-content .tutorial-list article h3{margin:0;padding:0;font-size:20px;font-size:2.0rem;height:27px;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tutorial-list article a,.main .article-content .tutorial-list article a{text-decoration:none}.tutorial-list article .article-metadata,.main .article-content .tutorial-list article .article-metadata{margin:0 0 5px;padding:0;color:#ee8709}.tutorial-list article .article-metadata a,.main .article-content .tutorial-list article .article-metadata a{color:#ee8709}.tutorial-list article .article-metadata a:hover,.tutorial-list article .article-metadata a:focus,.main .article-content .tutorial-list article .article-metadata a:hover,.main .article-content .tutorial-list article .article-metadata a:focus{text-decoration:underline}.tutorial-list article .article-illu,.main .article-content .tutorial-list article .article-illu{display:block;width:100%;height:100px;overflow:hidden;background-repeat:no-repeat;background-position:center center;-moz-background-size:cover;-o-background-size:cover;-webkit-background-size:cover;background-size:cover}.tutorial-list article .article-illu img,.main .article-content .tutorial-list article .article-illu img{width:100%;height:100%;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0}.tutorial-list article .resume,.main .article-content .tutorial-list article .resume{margin:20px 0 0;padding:0}.tutorial-list article .tutorial-img,.main .article-content .tutorial-list article .tutorial-img{float:left}.tutorial-list article .tutorial-infos,.main .article-content .tutorial-list article .tutorial-infos{margin:7px 0 0 70px}.taglist{list-style:none;padding:0;margin:-14px 0 15px;height:30px;line-height:30px}.taglist li{float:right}.taglist li a{display:block;text-decoration:none;padding:0 10px;background:#FBFBFB;color:#aaa9a7;margin-left:1px;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.taglist li a:before{content:"#"}.taglist li a:hover,.taglist li a:focus{background:#FFF;color:#0e77a8;border-bottom:1px solid #0e77a8}.content-wrapper,.full-content-wrapper{margin:0 2%}.small-content-wrapper{width:90%;max-width:500px;margin:20px auto}.authors{color:#9c9c9c;padding-bottom:10px;border-bottom:1px solid #e0e4e5;margin-bottom:20px !important}.authors .authors-label{display:inline-block}.authors ul{display:inline-block;list-style:none;padding:0;margin:0}.authors ul li{display:inline-block;margin:0}.authors ul li .avatar{height:28px;width:28px;border:1px solid #cdd0d1;margin-right:3px;margin-top:-4px}.authors ul li a{display:block;text-decoration:none;color:#1088bf;height:36px;line-height:36px;padding:0 8px;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.authors ul li a:hover,.authors ul li a:focus{background:#DDD;color:#084561}.authors ul li .info{padding-left:5px;color:#777}.pagination{list-style:none;margin:0;padding:0;border-top:1px solid #d2d5d6;border-bottom:1px solid #d2d5d6;background:#FBFBFB;height:40px;margin-bottom:20px !important}.pagination li{float:left}.pagination li a{display:block;text-align:center;text-decoration:none;color:#084561;min-width:45px;height:40px;line-height:40px;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.pagination li a.current{height:38px;color:#808080;background:#F4F6F6;margin-top:-1px;border-left:1px solid #d2d5d6;border-bottom:3px solid #d2d5d6;border-right:2px solid #d2d5d6}.pagination li a.ico-after:after{margin-top:12px}.pagination li a[href]:hover,.pagination li a[href]:focus{background:#d2d5d6}.pagination li.prev a,.pagination li.next a{padding:0 15px}.pagination li.prev .ico-after{padding-left:30px}.pagination li.prev .ico-after:after{margin-left:8px}.pagination li.next{float:right}.pagination li.next .ico-after{padding-right:30px}.pagination li.next .ico-after:after{right:8px;left:auto}.pagination.pagination-top li a.current{margin-top:0;border-top:3px solid #d2d5d6;border-bottom:none;height:35px;line-height:35px;padding-bottom:3px}.pagination.pagination-chapter{margin-left:0}.pagination.pagination-chapter li{max-width:45%}.pagination.pagination-chapter a{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.topic-list{margin-top:50px !important;margin-bottom:50px !important}.topic-list .topic{position:relative;height:81px;line-height:25px;border-top:1px solid #FFF;border-bottom:1px solid #CCC;background:#eff9fe;overflow:hidden}.topic-list .topic:first-child:after{display:block;content:" ";width:100%;height:1px;background:#CCC;margin-top:-2px}.topic-list .topic:nth-child(2n){background:none}.topic-list .topic:nth-child(2n).unread{background:#feeed5}.topic-list .topic.unread{background:#fde8c6}.topic-list .topic:hover:before,.topic-list .topic.active:before{content:" ";display:block;position:absolute;background:#0e77a8;height:100%;width:5px}.topic-list .topic:hover.unread:before,.topic-list .topic.active.unread:before{background:#f8ad32}.topic-list a{text-decoration:none;color:#0e77a8}.topic-list a:hover,.topic-list a:focus{color:#0e77a8;text-decoration:underline;outline:none}.topic-list .topic-infos,.topic-list .topic-description,.topic-list .topic-answers,.topic-list .topic-last-answer{display:block;float:left;padding:4px 0;margin:0}.topic-list .topic-infos{width:5%}.topic-list .topic-infos input[type=checkbox]{margin:29px 25% 0}.topic-list .topic-infos .ico-after{display:block;text-indent:-9999px}.topic-list .topic-infos .ico-after:after{margin:4px 0 0 15px}.topic-list .topic-description{position:relative;width:60%}.topic-list .topic-description .topic-title-link:hover,.topic-list .topic-description .topic-title-link:after{text-decoration:none}.topic-list .topic-description .topic-title-link:hover .topic-title,.topic-list .topic-description .topic-title-link:after .topic-title{text-decoration:underline}.topic-list .topic-description .topic-title,.topic-list .topic-description .topic-subtitle{display:block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin:0;padding:0}.topic-list .topic-description .topic-title{font-size:16px;font-size:1.6rem}.topic-list .topic-description .topic-subtitle{height:24px;line-height:1.3em;color:#777}.topic-list .topic-description .topic-members{margin:0;color:#777}.topic-list .topic-description .topic-tag:before{content:"#"}.topic-list .topic-answers{width:13%;text-align:center;padding-top:25px}.topic-list .topic-last-answer{width:22%}.topic-list .topic-last-answer .topic-no-last-answer{display:block;margin-top:24px;color:#084561;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5}.no-cssmask .topic-list .topic-description[style]:before{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=10);opacity:0.1}.forum-list .group-title{width:100%;height:50px;margin-top:30px !important;clear:both;border-bottom:1px solid #CCC;color:#f8ad32}.forum-list .topic{height:60px}.forum-list .topic-description{padding-left:1.5%}.forum-list .topic-description .topic-title{font-weight:normal}.forum-list .topic-answers{padding-top:17px}.forum-list .topic-answers span{display:block;float:left;width:50%}.forum-list .topic-last-answer{width:18%}.forum-list .topic-last-answer .topic-no-last-answer{margin-top:13px}.forum-list .topic-last-answer .forum-last-message{color:#777;display:block}.forum-list .topic-last-answer .forum-last-message-title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.main .content-container .content-wrapper{max-width:960px;margin:0 auto}.main .content-container .content-wrapper.article-content,.main .content-container .content-wrapper.authors{padding-left:2%;padding-right:2%}.main .content-container .article-content p,.main .content-container .article-content ul:not(.pagination){font-family:"Liberation Serif","Times New Roman",Times,Georgia,FreeSerif,serif}.main .content-container .article-content,.main .content-container .message-content{margin-top:20px;color:#424242}.main .content-container .article-content h2,.main .content-container .article-content h2 a,.main .content-container .article-content h3,.main .content-container .article-content h3 a,.main .content-container .message-content h2,.main .content-container .message-content h2 a,.main .content-container .message-content h3,.main .content-container .message-content h3 a{color:#ee8709;margin-top:40px;text-decoration:none}.main .content-container .article-content h2 a:hover,.main .content-container .article-content h2 a:focus,.main .content-container .article-content h3 a:hover,.main .content-container .article-content h3 a:focus,.main .content-container .message-content h2 a:hover,.main .content-container .message-content h2 a:focus,.main .content-container .message-content h3 a:hover,.main .content-container .message-content h3 a:focus{text-decoration:underline}.main .content-container .article-content h2,.main .content-container .message-content h2{font-size:22px;font-size:2.2rem;line-height:50px;margin-bottom:20px;background:#FFF;border-top:1px solid #e0e4e5;padding-left:1%;font-weight:400}.main .content-container .article-content h3,.main .content-container .message-content h3{font-size:20px;font-size:2.0rem;margin-bottom:14px}.main .content-container .article-content h4,.main .content-container .message-content h4{font-size:18px;font-size:1.8rem;margin-bottom:12px}.main .content-container .article-content .actions-title,.main .content-container .message-content .actions-title{float:right;margin:-60px 10px 0 0}.main .content-container .article-content .actions-title .btn,.main .content-container .message-content .actions-title .btn{height:30px;line-height:30px;margin-left:3px;text-transform:uppercase;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);opacity:0.7}.main .content-container .article-content .actions-title .btn.ico-after:after,.main .content-container .message-content .actions-title .btn.ico-after:after{margin-top:7px}.main .content-container .article-content .actions-title .btn:hover,.main .content-container .article-content .actions-title .btn:focus,.main .content-container .message-content .actions-title .btn:hover,.main .content-container .message-content .actions-title .btn:focus{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.main .content-container .article-content .information,.main .content-container .article-content .question,.main .content-container .article-content .error,.main .content-container .article-content .warning,.main .content-container .article-content .spoiler,.main .content-container .message-content .information,.main .content-container .message-content .question,.main .content-container .message-content .error,.main .content-container .message-content .warning,.main .content-container .message-content .spoiler{margin:25px 0;padding:7px 15px 7px 45px}.main .content-container .article-content .information.ico-after:after,.main .content-container .article-content .question.ico-after:after,.main .content-container .article-content .error.ico-after:after,.main .content-container .article-content .warning.ico-after:after,.main .content-container .article-content .spoiler.ico-after:after,.main .content-container .message-content .information.ico-after:after,.main .content-container .message-content .question.ico-after:after,.main .content-container .message-content .error.ico-after:after,.main .content-container .message-content .warning.ico-after:after,.main .content-container .message-content .spoiler.ico-after:after{position:absolute;top:50%;left:23px;margin:-11px 0 0 -11px;height:22px;width:22px}.main .content-container .article-content .information,.main .content-container .message-content .information{background:#daeaee}.main .content-container .article-content .information.ico-after:after,.main .content-container .message-content .information.ico-after:after{background-position:0 -2960px}.main .content-container .article-content .question,.main .content-container .message-content .question{background:#e2daee}.main .content-container .article-content .question.ico-after:after,.main .content-container .message-content .question.ico-after:after{background-position:0 -4240px}.main .content-container .article-content .error,.main .content-container .message-content .error{background:#eedada}.main .content-container .article-content .error.ico-after:after,.main .content-container .message-content .error.ico-after:after{background-position:0 -2320px}.main .content-container .article-content .warning,.main .content-container .message-content .warning{background:#eee7da}.main .content-container .article-content .warning.ico-after:after,.main .content-container .message-content .warning.ico-after:after{background-position:0 -5920px}.main .content-container .article-content .spoiler-title,.main .content-container .message-content .spoiler-title{display:block;background:#EEE;margin-top:15px;padding:3px 15px 3px 40px;text-decoration:none;border-bottom:1px solid #DDD;color:#555}.main .content-container .article-content .spoiler-title.ico-after:after,.main .content-container .message-content .spoiler-title.ico-after:after{margin:8px 0 0 10px}.main .content-container .article-content .spoiler-title:nth-last-child(2),.main .content-container .message-content .spoiler-title:nth-last-child(2){margin-bottom:15px}.main .content-container .article-content .spoiler-title:hover,.main .content-container .message-content .spoiler-title:hover{text-decoration:underline}.main .content-container .article-content .spoiler,.main .content-container .message-content .spoiler{margin-top:0;padding-left:15px;background:#EEE}.main .content-container .article-content figure,.main .content-container .message-content figure{margin:25px 0;max-width:100%;padding:10px;background:#DDD;text-align:center}.main .content-container .article-content figure img,.main .content-container .article-content figure video,.main .content-container .article-content figure pre,.main .content-container .article-content figure code,.main .content-container .article-content figure table,.main .content-container .article-content figure blockquote,.main .content-container .article-content figure embed,.main .content-container .article-content figure video,.main .content-container .message-content figure img,.main .content-container .message-content figure video,.main .content-container .message-content figure pre,.main .content-container .message-content figure code,.main .content-container .message-content figure table,.main .content-container .message-content figure blockquote,.main .content-container .message-content figure embed,.main .content-container .message-content figure video{max-width:100%;margin:0 auto;text-align:left}.main .content-container .article-content figure img,.main .content-container .article-content figure video,.main .content-container .article-content figure pre,.main .content-container .article-content figure code,.main .content-container .message-content figure img,.main .content-container .message-content figure video,.main .content-container .message-content figure pre,.main .content-container .message-content figure code{display:block}.main .content-container .article-content figure figcaption,.main .content-container .message-content figure figcaption{display:block;padding-top:10px}.main .content-container .reactions-title{margin:50px 0 20px;color:#084561;border-bottom:1px solid #f8ad32;text-transform:uppercase;font-weight:normal;font-size:22px;font-size:2.2rem;line-height:30px}.wf-active .main .content-container .article-content p,.wf-active .main .content-container .article-content ul:not(.pagination){font-family:"Droid Serif","Liberation Serif","Times New Roman",Times,Georgia,FreeSerif,serif}.js .spoiler{display:none}table{margin:15px 0;border-top:1px solid #DDD}table thead{background:#DDD;color:#084561}table th,table td{text-align:left;padding:5px 15px 5px 7px;border-right:1px solid #DDD}table th:first-child,table td:first-child{border-left:1px solid #DDD}table tbody tr{border-bottom:1px solid #DDD}table tbody tr:nth-child(2n+1){background:#F7F7F7}table.fullwidth{width:100%}.topic-message{position:relative}.topic-message.helpful .message{background-color:#e9f9dc}.topic-message.helpful .message:after{border-right-color:#e9f9dc}.topic-message .user .avatar-link{display:block;height:58px;width:58px;z-index:0;position:absolute;top:0;border:1px solid #DDD}.topic-message .user .avatar-link[href]:hover,.topic-message .user .avatar-link[href]:focus{border-color:#FFF;overflow:hidden;-moz-box-shadow:rgba(0,0,0,0.3) 0 1px 7px;-webkit-box-shadow:rgba(0,0,0,0.3) 0 1px 7px;box-shadow:rgba(0,0,0,0.3) 0 1px 7px}.topic-message .user .avatar-link img{height:58px;width:58px}.topic-message .user .badge{display:block;width:60px;height:25px;line-height:25px;text-align:center;text-transform:uppercase;color:#EEE;text-shadow:rgba(0,0,0,0.25) 0 0 3px;background:#777}.topic-message .user .badge.staff{background:#48a200}.topic-message .user .user-metadata{width:60px;height:25px}.topic-message .user .user-metadata a{display:block;float:left;border:1px solid #D2D5D6;border-top:0;text-align:center;background-color:#edefef;text-decoration:none;color:#424242;height:25px;line-height:26px;width:28px;color:#777;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.topic-message .user .user-metadata a:first-child{border-right:0;width:29px}.topic-message .user .user-metadata a:hover,.topic-message .user .user-metadata a:focus{border-bottom-width:1px;border-bottom-color:#777;background:#FFF}.topic-message .user .user-metadata a.positive{color:#48a200}.topic-message .user .user-metadata a.negative{color:#c0392b}.topic-message .message{position:relative;background-color:#FDFDFD;border:1px solid #D2D5D6;border-right-width:2px;border-bottom-width:3px;min-height:75px}.topic-message .message .message-metadata{display:inline-block;font-size:14px;font-size:1.4rem;margin-left:5px}.topic-message .message .message-metadata a{display:block;float:left;color:#999;text-decoration:none;height:30px;line-height:30px;padding:0 5px;border-bottom:1px solid #D2D5D6;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.topic-message .message .message-metadata a:hover,.topic-message .message .message-metadata a:focus{border-bottom:1px solid #0e77a8;color:#0e77a8;outline:none}.topic-message .message .message-metadata .username{color:#484848;font-size:16px;font-size:1.6rem;margin-right:3px}.topic-message .message .message-metadata .date{line-height:32px}.topic-message .message .message-actions{margin:0;padding:0;list-style:none;position:absolute;top:0;right:0;text-transform:uppercase}.topic-message .message .message-actions li{float:left}.topic-message .message .message-content{clear:both;margin:0 10px 0;padding-top:1px}.topic-message .message .message-content>p:first-child{margin-top:7px}.topic-message .message .message-content .message-hidden-content{display:none}.topic-message .message .message-content .message-edited,.topic-message .message .message-content .message-hidden,.topic-message .message .message-content .message-helpful{padding:3px 0 0}.topic-message .message .message-content .message-edited.ico-after,.topic-message .message .message-content .message-hidden.ico-after,.topic-message .message .message-content .message-helpful.ico-after{text-indent:20px}.topic-message .message .message-content .message-edited.ico-after:after,.topic-message .message .message-content .message-hidden.ico-after:after,.topic-message .message .message-content .message-helpful.ico-after:after{margin:7px 0}.topic-message .message .message-content .message-edited,.topic-message .message .message-content .message-hidden{font-style:italic;color:#999}.topic-message .message .message-content .message-edited:after,.topic-message .message .message-content .message-hidden:after{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5}.topic-message .message .message-content .message-hidden{margin-top:1px}.topic-message .message .message-content .message-helpful{color:#48A200;text-indent:20px}.topic-message .message .message-content textarea{margin:10px 0 10px -1px;background-color:transparent;min-height:150px}.topic-message .message .markdown-help .open-markdown-help{display:block;position:absolute;bottom:0;left:8px}.topic-message .message .markdown-help .open-markdown-help .close-markdown-help-text{display:none}.topic-message .message .markdown-help .markdown-help-more{display:none;background:#EEE;padding:15px;margin-bottom:5px}.topic-message .message .markdown-help .markdown-help-more pre{margin:0}.topic-message .message .markdown-help .markdown-help-more.show-markdown-help{display:block}.topic-message .message .markdown-help .show-markdown-help+.open-markdown-help .close-markdown-help-text{display:inline}.topic-message .message .markdown-help .show-markdown-help+.open-markdown-help .open-markdown-help-text{display:none}.topic-message .message .message-bottom{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:-moz-box;display:flex;-webkit-box-align:start;-moz-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start;min-height:30px}.topic-message .message .message-bottom .signature{border-top:1px solid #D2D5D6;padding:3px 0 0 10px;margin:0 10px 0 0;font-size:12px;font-size:1.2rem;color:#999;flex:1}.topic-message .message .message-bottom .signature p{margin:0;padding:0}.topic-message .message .message-bottom .signature a{color:#999;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.topic-message .message .message-bottom .signature a:hover,.topic-message .message .message-bottom .signature a:focus{text-decoration:none;color:#555}.topic-message .message .message-bottom .message-karma{margin-left:auto;margin-bottom:-2px}.topic-message .message .message-bottom .message-karma a{border-bottom-width:3px}.topic-message .message .message-bottom .message-karma .tick{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.topic-message .message .message-bottom .message-karma .tick:hover,.topic-message .message .message-bottom .message-karma .tick:focus{color:#555}.topic-message .message .message-bottom .message-karma .tick.active{color:#48a200}.topic-message .message .message-bottom .message-karma .tick.active:after{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.topic-message .message .message-bottom .message-karma .upvote{color:#48a200}.topic-message .message .message-bottom .message-karma .downvote{color:#c0392b}.topic-message .message .message-bottom .message-karma .voted{font-weight:bold}.topic-message .message .message-bottom .message-karma .voted:after{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.topic-message .message .message-buttons{margin:0 0 0 10px;padding:0;list-style:none;border-bottom:none}.topic-message .message .message-buttons a{text-indent:-9999px;width:0}.topic-message .message .message-buttons a:after{left:12px !important}.topic-message .message .message-submit{margin-left:auto;margin-right:10px}.topic-message .message .message-actions,.topic-message .message .message-buttons,.topic-message .message .message-karma,.topic-message .message .message-submit{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:-moz-box;display:flex}.topic-message .message .message-actions a,.topic-message .message .message-actions span,.topic-message .message .message-actions button,.topic-message .message .message-buttons a,.topic-message .message .message-buttons span,.topic-message .message .message-buttons button,.topic-message .message .message-karma a,.topic-message .message .message-karma span,.topic-message .message .message-karma button,.topic-message .message .message-submit a,.topic-message .message .message-submit span,.topic-message .message .message-submit button{display:block;float:left;margin-left:3px;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.topic-message .message .message-actions a.ico-after,.topic-message .message .message-actions span.ico-after,.topic-message .message .message-actions button.ico-after,.topic-message .message .message-buttons a.ico-after,.topic-message .message .message-buttons span.ico-after,.topic-message .message .message-buttons button.ico-after,.topic-message .message .message-karma a.ico-after,.topic-message .message .message-karma span.ico-after,.topic-message .message .message-karma button.ico-after,.topic-message .message .message-submit a.ico-after,.topic-message .message .message-submit span.ico-after,.topic-message .message .message-submit button.ico-after{padding-left:30px}.topic-message .message .message-actions a:after,.topic-message .message .message-actions span:after,.topic-message .message .message-actions button:after,.topic-message .message .message-buttons a:after,.topic-message .message .message-buttons span:after,.topic-message .message .message-buttons button:after,.topic-message .message .message-karma a:after,.topic-message .message .message-karma span:after,.topic-message .message .message-karma button:after,.topic-message .message .message-submit a:after,.topic-message .message .message-submit span:after,.topic-message .message .message-submit button:after{top:7px;left:7px;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5}.topic-message .message .message-actions a,.topic-message .message .message-actions span,.topic-message .message .message-buttons a,.topic-message .message .message-buttons span,.topic-message .message .message-karma a,.topic-message .message .message-karma span,.topic-message .message .message-submit a,.topic-message .message .message-submit span{border-bottom:1px solid #D2D5D6;text-decoration:none;color:#999;height:29px;line-height:30px;padding:0 10px}.topic-message .message .message-actions a,.topic-message .message .message-buttons a,.topic-message .message .message-karma a,.topic-message .message .message-submit a{cursor:pointer}.topic-message .message .message-actions a:hover,.topic-message .message .message-actions a:focus,.topic-message .message .message-buttons a:hover,.topic-message .message .message-buttons a:focus,.topic-message .message .message-karma a:hover,.topic-message .message .message-karma a:focus,.topic-message .message .message-submit a:hover,.topic-message .message .message-submit a:focus{border-bottom-color:#0e77a8;outline:none}.topic-message .message .message-actions a:hover:after,.topic-message .message .message-actions a:focus:after,.topic-message .message .message-buttons a:hover:after,.topic-message .message .message-buttons a:focus:after,.topic-message .message .message-karma a:hover:after,.topic-message .message .message-karma a:focus:after,.topic-message .message .message-submit a:hover:after,.topic-message .message .message-submit a:focus:after{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.topic-message .message .message-actions a:hover,.topic-message .message .message-actions a:focus,.topic-message .message .message-buttons a:hover,.topic-message .message .message-buttons a:focus,.topic-message .message .message-karma button:hover,.topic-message .message .message-karma button:focus{color:#555;text-decoration:none}form.topic-message{margin-top:50px}.page-footer{background:#042332;height:50px;line-height:50px;border-top:3px solid #f8ad32;font-size:14px;font-size:1.4rem}.page-footer .wrapper{max-width:960px;margin:0 auto}.page-footer p{float:left;color:#EEE;text-transform:uppercase;margin:0}.page-footer ul{list-style:none;float:right;margin:0;padding:0}.page-footer ul li{display:inline-block;margin-left:25px}.page-footer ul li a{text-decoration:none;color:#EEE;text-transform:uppercase;border-bottom:1px solid transparent}.page-footer ul li a:hover,.page-footer ul li a:focus{border-bottom-color:#f8ad32}.modal{display:none}#modals .modal{position:fixed;z-index:50;width:auto !important;top:0;right:0;bottom:0;left:0;background:#EEE;min-height:220px;font-size:16px;font-size:1.6rem}#modals .modal .modal-title{display:block;border-bottom:3px solid #f8ad32;line-height:53px;height:50px;text-indent:15px;margin-bottom:20px;background:#084561;color:#FFF;font-size:1.6rem;font-size:16px;text-transform:uppercase;text-shadow:rgba(0,0,0,0.75) 0 0 3px}#modals .modal .modal-title.ico-after{text-indent:40px}#modals .modal .modal-title.ico-after:after{margin:18px 0 0 15px}#modals .modal p,#modals .modal input,#modals .modal select,#modals .modal textarea{margin:10px 15px}#modals .modal p:not([type=checkbox]):not([type=radio]),#modals .modal input:not([type=checkbox]):not([type=radio]),#modals .modal select:not([type=checkbox]):not([type=radio]),#modals .modal textarea:not([type=checkbox]):not([type=radio]){width:calc(98% - 32px) !important}#modals .modal label{margin:0 15px}#modals .modal textarea{margin-top:0}#modals .modal [type=submit],#modals .modal .btn{position:absolute;width:50%;height:50px;line-height:50px;bottom:0;right:0;margin:0 !important;padding:0 !important;text-align:center;background:none !important;border-top:1px solid #CCC;color:#333}#modals .modal .btn-submit,#modals .modal [type=submit]{height:51px;color:#084561;font-weight:bold}#modals .modal .btn-cancel{right:auto;left:0;border-right:1px solid #CCC;color:#555}.enable-mobile-menu #modals .modal{top:25px;right:25px;bottom:25px;left:25px;-moz-box-shadow:0 0 5px #000;-webkit-box-shadow:0 0 5px #000;box-shadow:0 0 5px #000}.enable-mobile-menu #modals .modal.modal-small{top:50%;bottom:auto;height:220px;margin:-110px auto 0;max-width:400px}.enable-mobile-menu #modals .modal.modal-medium{top:50%;bottom:auto;height:250px;margin:-125px auto 0;max-width:400px}.enable-mobile-menu #modals .modal.modal-medium textarea{height:80px}.enable-mobile-menu #modals-overlay{position:fixed;display:none;z-index:49;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,0.7)}.ico-after.view:after{background-position:0 -5840px}.ico-after.view.blue:after{background-position:0 -5680px}.ico-after.edit:after{background-position:0 -2240px}.ico-after.alert:after{background-position:0 -160px}.ico-after.cite:after{background-position:0 -1360px}.ico-after.tick:after{background-position:0 -5520px}.ico-after.tick.green:after{background-position:0 -5360px}.ico-after.upvote:after{background-position:0 -5280px}.ico-after.upvote.voted:after{background-position:0 -5200px}.ico-after.downvote:after{background-position:0 -5120px}.ico-after.downvote.voted:after{background-position:0 -5040px}.ico-after.lock:after{background-position:0 -3200px}.ico-after.lock.blue:after{background-position:0 -3040px}.ico-after.cross:after{background-position:0 -1760px}.ico-after.cross.blue:after{background-position:0 -1440px}.ico-after.cross.red:after{background-position:0 -1600px}.ico-after.cross.white:after{background-position:0 -1680px}.ico-after.pin:after{background-position:0 -4160px}.ico-after.pin.blue:after{background-position:0 -4000px}.ico-after.arrow-right:after{background-position:0 -800px}.ico-after.arrow-right.blue:after{background-position:0 -640px}.ico-after.star:after{background-position:0 -4960px}.ico-after.star.yellow:after{background-position:0 -4880px}.ico-after.star.blue:after{background-position:0 -4720px}.footer-container footer{color:#424242;padding:20px 0}.screen,.wide{display:none}.content-container form,#modals form{width:100%}.content-container form p,#modals form p{position:relative}.content-container fieldset,#modals fieldset{border-top:1px solid #DDD;border-bottom:3px solid #DDD;background:#EFEFEF;padding:0 4%}.content-container fieldset legend,#modals fieldset legend{padding:0 10px;border-top:1px solid #DDD;border-bottom:3px solid #DDD;background:#EFEFEF}.content-container label,#modals label{display:block;color:#555;height:30px;line-height:30px}.content-container label .asteriskField,#modals label .asteriskField{color:#C0392B;margin-left:4px}.content-container .form-error,#modals .form-error{display:block;font-size:13px;color:#C0392B}.content-container input,.content-container textarea,#modals input,#modals textarea{border:1px solid #D2D5D6}.content-container input:focus,.content-container textarea:focus,#modals input:focus,#modals textarea:focus{outline-color:#999}.content-container input.field-error,.content-container input:invalid,.content-container textarea.field-error,.content-container textarea:invalid,#modals input.field-error,#modals input:invalid,#modals textarea.field-error,#modals textarea:invalid{border-color:#C0392B}.content-container input.field-error:focus,.content-container input:invalid:focus,.content-container textarea.field-error:focus,.content-container textarea:invalid:focus,#modals input.field-error:focus,#modals input:invalid:focus,#modals textarea.field-error:focus,#modals textarea:invalid:focus{outline-color:#C0392B}.content-container input[disabled],.content-container textarea[disabled],#modals input[disabled],#modals textarea[disabled]{background:#DDD !important;color:#555}.content-container input,.content-container textarea,.content-container button,.content-container .btn,#modals input,#modals textarea,#modals button,#modals .btn{-webkit-appearance:none;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.content-container input:not([type=submit]):not([type=reset]):not([type=radio]):not([type=checkbox]),#modals input:not([type=submit]):not([type=reset]):not([type=radio]):not([type=checkbox]){width:calc(98% - 2px);padding:0 1%}.content-container textarea,#modals textarea{width:calc(98% - 2px);padding:10px 1%;font-family:Courier, "Lucida Sans Typewriter", "Lucida Typewriter", "DejaVu Sans Mono", monospace}.content-container input,.content-container button,.content-container .btn,#modals input,#modals button,#modals .btn{display:block;height:30px}.content-container input.ico-after,.content-container button.ico-after,.content-container .btn.ico-after,#modals input.ico-after,#modals button.ico-after,#modals .btn.ico-after{padding-left:30px}.content-container input.ico-after:after,.content-container button.ico-after:after,.content-container .btn.ico-after:after,#modals input.ico-after:after,#modals button.ico-after:after,#modals .btn.ico-after:after{margin:12px 0 0 7px}.content-container input[type=submit],.content-container button,.content-container .btn,#modals input[type=submit],#modals button,#modals .btn{height:40px;line-height:40px;cursor:pointer}.content-container input[type=radio],.content-container input[type=checkbox],#modals input[type=radio],#modals input[type=checkbox]{float:left;margin-right:5px;height:15px;width:15px;border:1px solid #BBB;background:#FCFCFC}.content-container input[type=radio]:checked,.content-container input[type=checkbox]:checked,#modals input[type=radio]:checked,#modals input[type=checkbox]:checked{background:#555}.content-container [type=submit],.content-container button,.content-container .btn,#modals [type=submit],#modals button,#modals .btn{color:#DDD;padding:0 15px;border:none;float:right;text-decoration:none;margin-left:1px;outline:none}.content-container [type=submit],.content-container .btn-submit,#modals [type=submit],#modals .btn-submit{color:#FFF;background:#084561}.content-container [type=submit]:not([disabled]):hover,.content-container [type=submit]:not([disabled]):focus,.content-container .btn-submit:not([disabled]):hover,.content-container .btn-submit:not([disabled]):focus,#modals [type=submit]:not([disabled]):hover,#modals [type=submit]:not([disabled]):focus,#modals .btn-submit:not([disabled]):hover,#modals .btn-submit:not([disabled]):focus{background:#396A81}.content-container .btn-cancel,#modals .btn-cancel{background:#c0392b}.content-container .btn-cancel:not([disabled]):hover,.content-container .btn-cancel:not([disabled]):focus,#modals .btn-cancel:not([disabled]):hover,#modals .btn-cancel:not([disabled]):focus{background:#e74c3c}.content-container .btn-grey,#modals .btn-grey{background:#EEE;color:#555}.content-container .btn-grey:not([disabled]):hover,.content-container .btn-grey:not([disabled]):focus,#modals .btn-grey:not([disabled]):hover,#modals .btn-grey:not([disabled]):focus{background:#CCC;color:#333}.content-container [disabled],#modals [disabled]{cursor:default;background:#F7F7F7;color:#CCC}.content-container .form-sub-link,#modals .form-sub-link{display:block;display:inline-block;margin-top:8px}.content-container .checkbox,#modals .checkbox{padding:10px 0}.content-container .checkbox input,#modals .checkbox input{margin-top:8px}.zform-toolbar{margin:0;padding:2px;list-style-position:initial;list-style-image:none;list-style-type:none;border-bottom:none}.zform-toolbar a,.zform-toolbar button{display:block;float:left;cursor:pointer;background-color:#FFF;border-bottom:1px solid transparent;text-decoration:none;color:#999;height:27px;line-height:30px;padding:0 10px;margin-left:1px;text-indent:-9999px;width:0}.zform-toolbar a .zform-popup,.zform-toolbar button .zform-popup{text-indent:0;line-height:20px}.zform-toolbar a.ico-after,.zform-toolbar button.ico-after{padding-left:30px}.zform-toolbar a:after,.zform-toolbar button:after{top:7px;left:12px;display:none}.zform-toolbar button{padding:0 15px;height:30px;border-top:none;border-right:none;border-left:none}.zform-toolbar button[type=submit]{background:#084561;border-bottom-color:#084561;color:#DDD}.zform-toolbar button[type=submit]:hover,.zform-toolbar button[type=submit]:focus{color:#FFF;background:#396A81;border-bottom-color:#396A81}.zform-toolbar a:hover,.zform-toolbar a:focus,.zform-toolbar button:hover,.zform-toolbar button:focus{border-bottom-color:#1088bf;outline:none;background-color:#EEE}.zform-button{background-repeat:no-repeat;background-position:center center}.zform-button-bold{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAwklEQVQoz2P4z4AfMlBLQXlC+fmS/wXvs+tT1ye8j5wfLIBhQnF95v+s/SBWxPyQ/17nMRTk1qf+TwYr8K/3++/4H0NBen38/2igAl8Bt/tu/y3mYyhIqI/8H3zfp971vMt/s/1YfBFRH/zfCyxhMt/iv9p5eQE0Bf71vv8dwQq0BdT+6/4XL0BT4FYPtBlqtMx/zf8C9WgKbOsd/uuDPSddoPKf/z2XAooCmwST9br71fbL90v2C+/n7edUoHpc4IYASlr8ehOQ9V8AAAAASUVORK5CYII=")}.zform-button-italic{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAcUlEQVQoz2P4z4AfMlBbQXZD6oeE/5Efgg/gNCHuQeT/wAScJsQYhP/3/4DHipAJQf/dFuBR4PPA879tAE4FXgau/20+4PGF4wSX/0YL8CiweGDxXysApwIzB9P/Gv9xBpRJg+4BtQPyByQ30DguMCEAC2D/O2OrpxIAAAAASUVORK5CYII=")}.zform-button-strike{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAn0lEQVQoz2P4z4AfMlBTQYlgwczstNTyhJmRu7EqyHuXVQ6iI8oD/2NRkJuW9j+5A8L2wGZCukvC/+j/ITN9jf8z2LtgtSJyd+j/wP8e/23PmKEqKC8t/w+D8f9t/ksguRvJBH9BCG2Upn3X6L/cGQwr3NLsy2Fsmf9idzEU2KaZ/9eHmiLyjr8cQ4FJmu47tTPy5ZJpwuW8HTSKC+wQAFs6/D/QOXeIAAAAAElFTkSuQmCC")}.zform-button-abbr{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACTUlEQVR42pWR4UtTYRTGB/0FgyBckZREI8SyElEEEyW0RJoxbaK2raYmaVMnt6ZYzpbTudqW091arqZoKYEVjWgFFRhCg77Ymt7J3d6522rh9yJ6eufHcOXOt3Nenuf8nveIRH9V10wY7dMEre4wNM7gN1G61TYtPB6aJ7g8F0cDG21J20DDrkDp5D3NngTkjlhhWmK1i6DB+vldLZvYXjsaQ5WZ6LYsVk7ER1rGA5AbPw7LeheLFaME5YPhyS2JG1zxgyp7ENX9/pJkr32jedD4cAilA6uL/xXXOWNjcjuBzPgJJy3CDu3b827rBxPM7wcgu9OPalfFtnKbIlZqJ8wxK/EVWYiv0ExmCwYjTZsatr48azEtXIM3NI/eF904brv588TYGlSTcRSZCeonBFx69BU17BoOGfjNTepmZMN6bwesC17I7wrQTMVRMERMybe867xJ5RZwxhnDgZ5VJmW0ClvJj86nr9B4P458w+vfeUZenJzn9PGsilJU2SPYx3BNqcSxYmMB8vW5OKy/ipwrjl8U15fdx+OUPYobzxKQMiFkdnLilAT5gxExxfXVUNTTjg1c/36Gmz13T0AbjbRbu+z/53VyDbxfwQqQj69B2sNtZN2j45jKkQgqzBHsvBhMnZ/ilpVZCEzPvyNbH0KWjhNT3L1062rHlICjdCZpDpalNKC4TZW3Ihh4kkCVLYqsrhVIdSsoN4Wh9XxB/e0ojnRzkKgDm5vQ3xVTXDZTu4xd7ctJXL/kQpChWxmJJrBOhesZ6iU2Q7kk/gOYnkYcn8opfQAAAABJRU5ErkJggg==")}.zform-button-key{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABe0lEQVR42pWSQW5TQQyGv/GMX1KVsmJLeggEO+ACCHEJWOQKBSo19ADZpoIFN0CIY9BK0G1DuyebIlGSzNgsXt5LiKia/tJItmR/M7894dPnLy/NbGTmgHOzAkECEsKrF8+fHaWc8+jRwwfc3dnB3W5uD8Llr0uOT76NgKNkZpydjXn65DGb6uvxCXe2twFIZsbWVgeAfr9Pp9NBRDAzZrMZe6/fkHMGwN3Z7d2nqpTfV39qQClGShUABwcDut0u+/tvGQzeMZ1OyTkjqgDUc4KUFLOrBlDQpsCtPmZtLFHap4s3gISbNRYK1QIQYyTGiLu38ap8AahUKVZWLcR/AOvxOkA1Lu2sWogxIiLM53NE5FpAPQNbbkE11UmMYMZwOMRKqfP/AVSx1oIZKWk7nKYwiBCv+QeaEt5YsDULm0hVKcWWMyCEek0imwEqXdpxd0QC309PgbBBu9Pr9ZhMJjXgx3h8+P7Dxz1uqYvz80MWV94Ddrm9LoCffwHdG70wvg5ZlgAAAABJRU5ErkJggg==")}.zform-button-sup{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABLElEQVR42mNgGDkgZMoDhdJVzy+0bH75wbfrbgPJBiTPe7wBqFHBq+1WQ8P65//JdknirIcXUuY9eoAhUV5efqC4uPhAbm7ugbS0tAPx8fEK4eHhB/z8/A64uroeAKmxr7jWEDbp3gXznEsGGAYANQcANX9ISUn5D9Q8ASQG1NwA1LzAxsZGwbroSoBT9bUFJhkXBAyTLzjoxZ9VwDAEaLMDUPP/yMjI/0DNBTCbQcC79eaB9LkP/yfPevA/bOLdDzj9CHT2hMDAwP9ubm7/gTYLkBxIQJsFQJpdXFz+GxkZTSDZAJCzgTYXWFtb/zcwMPivoKDgQLTN0AArAPE1NTUnAF3wX0JC4oOgoKABsTYfADkbqNkAaPMBoOYDQM0HuLi4DrCwsBgMzjwCAMHEeHCN9BV5AAAAAElFTkSuQmCC")}.zform-button-sub{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABLElEQVR42mNgGD6gvLz8QHFx8YHc3NwDaWlpB+Lj4xXCw8MP+Pn5HXB1dT1A0ACg5gCg5g8pKSn/gZongMSAmhuAmhfY2NgoEOUKoM0OQM3/IyMj/wM1FxBlMzoAOntCYGDgfzc3t/9AmwVINgBoswBIs4uLy38jI6MJJBsAcjbQ5gJra+v/BgYG/xUUFBxA4iFTHiiUrnp+oWXzyw++XXcbsNoMDbACEF9TU3MC0AX/JSQkPggKChokz3u8AahRwavtVkPD+uf/cdl8AORsoGYDoM0HgJoPADUf4OLiOsDCwmIAUpc46+GFlHmPHpCVVuwrrjWETbp3wTznkgHJmq2LrgQ4VV9bYJJxQcAw+YKDXvxZBZIM8G69eSB97sP/ybMe/A+bePfD4MlDAC7MeHCrEeunAAAAAElFTkSuQmCC")}.zform-button-center{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAfElEQVR42mP8z4AfMDFQqoAFRJT//8fwBwx/g+EvMP7FsJeRgYHxPzEmMDDkZP+eAtMNhTnHpoJkiDMh9T+yzQh4iwQ3BGf/moKsF2hWziMS3OD9H9Xu31D4mRg3MPwHQ9Ns/f+a/1X+y/2X/C/yn/8/93/2bIgMI8WxCQClCFYAGIFCIgAAAABJRU5ErkJggg==")}.zform-button-right{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAY0lEQVR42mP8z4AfMDFQqoAFRJT//8fwBwx/g+EvMP7FsJeRgYHxPzEmQEDS/99QnTB4hmgTUv8j24yAt0h0g/t/hF6Iec+JNsH7P6rdv6HwM4lu0Pr/G64bEq5/iDGBYGQBABNITB8iVnJIAAAAAElFTkSuQmCC")}.zform-button-ul{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA1UlEQVR42mNgGBQgZ/7jgqm7Xj8A0aTqZQERmtIcBQqibPJAJsiACeXl5dlAesrfv38Z/vz5w/D792+GX79+gemfP3+C2WvXrmWkigsGCUiZ+aigc9PLByE9d8kLRCUx1gIZIRb5N5Ic4ECMi4vLBgbUFFCAIeMfP37A2bdu3UIEYkDHrYKSxY8fuFZeG6qBaJt/qSB+2r0H1nmXyAxEdZ4CAwVucEo8CgxEIyOjbGBATYGlOhCNnBpBqROYShnhBty58WUCSDOUZjh37txUIDWVLt4HAP/ViGJIIAyXAAAAAElFTkSuQmCC")}.zform-button-ol{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA70lEQVR42mNgoAbImf9YZdHhd//JNgCkmSIDYIbA2OXl5dlA/L+kpOR/QUHB/+zs7P+pqan/ExIS/kdGRv4PDg7+j9UFiw5S6Aqywdz9b//P2vP6f8TEeypkGxLae0+ld8tL8rwQ1HVHpXPTc7jmuLi47IiIiP+BgYH/vby8/js7O/+3sbH5b2Ji8l9XV/e/mpoaqkVt65//b1zz9H/NqqcDFIjlyx7/L136+H/x4sfkuwCk2TrvEvmxANIMc4GRkVG2trb2fxUVlf9ycnL/xcXF/wsJCf3n4eH5z87O/p+Zmfk/hu0gbFd0pYPu4QcAKY588QFUIAIAAAAASUVORK5CYII=")}.zform-button-quote{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABH0lEQVR42mNgGDQgon2HEBAvBeKfQPwfD94FxCrYDNi48uCt/7///P2PD2w5eR9kyG0gZkPWzAPEf/7++/f/w7d//19++vf/2cd//5+8//f/4bt//++9+ff/9qu//++8ghheveA4yBAzZAPkcqYeAEu+AGp89uHf/8dAzQ/e/vt/F6r5+ou//68+gxjQueosyABvrAY8BWp+9A6q+fW//7deQjRfAWq++AS3AXAvgJx/H2jrndd//98Ear72/O//y0DNF56ADPgDNqB20QmQAZZYAxFkCDIAuebC479gg9ECkRNXNP6BRdncHVfhBr3//APMB4pfxhqNONLGnefvvsI0fgfiWlISVu/MbVdAGr8AcSGpqVIJiO8BcQrD8AcAGopyopBVAH0AAAAASUVORK5CYII=")}.zform-button-link{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAA6UlEQVQoz2P4z4AfMtBJgR13Vmnru3n/ax7mmOdI1Nyd97/1XVapHTdUgRGbT9fE/y/+3/1/8H/jvepDN3/c/X/k/8T/Pl1GbGAFhn7FH66+i9jm/Sf1/6T/lf9T/3v/idi24mHxB0M/iAldTd8np/tz2X/e+//c/0P/1/63/+zPNTm96btRF1iBbmb6+2klQTsdf7n9DwRCt/+Ov4J2TitJf6+bCVagqel7vff9qrfr/k//X/i/Akiu+7/qbe973+uammAFasz2Bl73U75kf8/+GR4X7pz9Kft7yhev+/YGasz0C0mKFAAASj0PpKVVf4oAAAAASUVORK5CYII=")}.zform-button-image{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAB8ElEQVQ4y6WTPWtUQRSGnzP33r33Jgu7kI1hI1GSgGARxFRG/4CFhY1VUlhI+oCNP8LfIKaz0MpCLEz+QUCwCIQVQc0X+dhsNtm5O3PGImbJboIIGaabmeec9533SAiB66wYYPnj2mtVmT8pNLPuilsDNZIYsoQ3L57OLsUAGmThyaOJ0SzLRCT6Z8WOgnddPnzZeA6cAU6spmmayfLqAR32aMk6k2M75EkTF5T9o5xvGxWGwl1iRnj5bBKvIj0JhQNjIoxAYbaYrO2Qln7QtC2cd8RpytREne+NYaqlGqoDHgAoYIxgwy6l5IDD0ybWdyicw4U2aZrStjkjuSEQesb0A0QITrG+S8dZTruWQh1eAekS1BMb4eLPmZ7R4QyQMUqrPUwgwarHOo9IiXarTLk0ThQZCHJZQghnEsrRTX5tbVPJNhkaNqTiON4fYnurTr0yRWzkcg7CRUByg/H8Pj/XVqiWfyPek3RGuTW9QDmr41X7YtHXwfreIl4Vr8odu8vcxG0UaGxu8+n4FXqkqCrweaCDEBDg8exS7yCaOeSkvUe2+ZXaw0Xmo6Qvmec+xgByRV59XsXnVWxt+oo8DpiYJdJEu5V7Yw9A5C8qnO9Lj50riCMJPUAplnfvVxpzhQ8z/zOccQSJ4S2AXHec/wAGb9qTrxXEvwAAAABJRU5ErkJggg==")}.zform-button-attention{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACJklEQVR42qVTTUiUYRB+vh93dX903bKUYMNlMWHJBC1WW8GjZVCnfpa6Fp1i6dilQwcJglgrDEKiQqhDRYWVCEsSFJ0Ksh8zKjJZ3V0WU3G/73tnpoNrFGkZzmHmMDPPPM8wA6zRtJUSuXSHISSvhLnALJ21Xc9ouTp9JQAhSblqd0VdG7viQnz0v2hlh+PBqaH272TPiF0Ylcl72/MTd1qCq2bAxNcqQgm/puswvUF46hNBIT6zqulTj9ubMw9jJGSJNXVB7Gy/sJ2TLze3qc8DW5v/yUCYb/gakzqrOXwcuoXxR1fBTgaBppMGE/f+FSAzGEuUVbdFvZv3YeFrEiKACFCc6IE/0g13bUf8w5WGxLIAmcGYj5lTnvABsMoDXOoWAbMDLo6hqvEgmPjsu0th3x8ATNzvCe1f564Ow8ndBiAoD3iWhMHKXERFTQiVWw5tUkXn1G+HNHl/R0SY39btTpu08BLO9GUwA3pZOeZzs3B7GYYhMCo7Yfj3YrS31SZLRVtO58f1xaPhAV/DcVN4DjT7HBAGIPg08h7TbyYBCCAMVRiGps+jJpZ0Kcs5DwDat7ut3UZV04MNHSmo2SdwstcXJbFARAME0A2BJjZECLqxHuX1PXjdl8DM2Mgek4n6ApHDAADT1w7T11YSpy3JLzn5uQ9oLtTtPIbCaPqcKcTp7NMTR4QYTIxfIzkEshwoywFZDshSIFuBHAIrAit6sdZvxg9QwSUHEnNo0gAAAABJRU5ErkJggg==")}.zform-button-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACU0lEQVR42q2T7U9SYRjG/VvgQys313pbc81WW80EBT1EICDiIdMjNlojTcdhptlWzoY0PzS11F618kumMWPlS7bUXpmWx0ohTsGK0HNAIN0V0oK51E9e2/Xt+f2ePffuJyVls+MqLxfOUWXmT1QJM6MnuWm9jvtIaphJUmV2FimEG8JuQznxhaLYn7ZGhIcciLwfR2RsGPzDLriMxXhbQLCvNFJiXXi2lOIX7ndheeYDovYHiHZaEW29hN93W7A0aoe32ohxlZh/qchcLZkzGAQx2MPd7sQy40T06gUErBbMN1YhfMWCSBONcMMZhB/dgfskidFjhzwj8gOChCAG075aM5acE/EbF200/BdNCNUZVpU7SyLccwNvJBkYlGXQCcFn6gQT7LmJaHcrAg0V+KGVrdmFChJ8Yw28lko8JdKZhIAp1Ycij3sQtVkQOG/EevEqs+GnCjDf2gyHZE8oIZgmtaHF7naE640InSvZUOArVmO+pRkD0h1JwVSRmvE31GDRSoM7rYkfXLMqCQK11XBVm2AXpSWf4CxU0IxchFB3BwJ6OfzFef/BrEIMNj8Pwc5rGJbuQn/WtuQQ32llgtc6wuMu0yF4rz0+MJ9a+hdU5oCVx2C5FHxHGyYLZSuwp1e0VbBqFybys4kx5RF+9rgawVvt+FVPw0uq8E2jhL/ODP56G6Y0uejLSuVj8Nrb+EJxmHh+9CA7nrcP36tM8Dddjvdr5Sk8y965ArPrwv8yJNsvHJSmmx3EXuZJ7m5uQLSd689JY/rEqebezC3CTf+9fwCiP9Om7nIiOAAAAABJRU5ErkJggg==")}.zform-button-question{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACZUlEQVR42r2SXUiTURjH34K6CbryIgi62FXQVezOZLM2isLSQbFljVpOvOgmRelmQUblkD7VssFGgRSrtQyKUvrYLEdI5XQfVtIWS833Zeac22xra/+e854FE7vppgN/zsPz/P7Ped7zHkEoW6mLxnXpzvqelNWwlOrQI3W+JBZTTq4RI/xtLVrrry12HkbO04vizBBQ/Az8Kolilst5roMxjF1mTpzVOzN3LEDaD/wYA+YfA5IDiN/kEh08tzQmM4xlHtk8d0Z/LmlvBvJBggaBqW7gy2WIV00IG9QIH1Qjbm8CvvUAX7s4QyzzMK8gWnRZfB8Gki+AGRsw60DG14HQ/iqaxoms/xJGddvI2EdN7MC0jbPkEU/psoJ0Wk/fGQDm3DQqQdJtKjoJctHI/ciHehE1aYAFF68xhrHkEU/WQpi1HKBLogaJR1S4z4vzD1AUXYi01NEklUD2CTV4SI3dnEnQfSCA6da9EGLNNTks+GjcNwQRmCAlB+j05wS95mJx8imvMUZmfYi11OQET4PWLnYdJ/ADkBsBUl66aS8y/lsI1ikRrFVSnpqkPXIeP0dklnk8Zq2d/YiNbxu1g5KtlUD6Tflx2t8DBRLGuQqjJKphgvYgJFsbmId5/zwFxctDqr5I+zGCYiR6PIiWYq5CfBiJgW5ET+zDqyM77jHPssdkVW2pllwXCE4j+c6NgL4Sn0zbMdmgwaRZg4+N2qzXWH13c8X6KsI3rXjKE22GG8ViBFL/FYSMauxWbNhJaWWZtpaMq1eYw0171obNuxA6qsGQQfWsZFgj/MNaVXaSQvif6zcxVDmUf47DnQAAAABJRU5ErkJggg==")}.zform-button-information,.zform-button-infoblocks{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACl0lEQVR42q2T7U9SURzH/VvgT+je3rQ2fdFcmw2StBeZNUwTtZWuwmywSjERnwAFbAiGmg+UT1CSIiRwJSPkITT15sAM2trqDWQty29H2jA35yvP9nl3v5/f+Z57TlbWUa983Qr3jCYiyVOF2VMt/mSOwpfMViyw2Qqv5ORDhntomKddFpxWhhIVvUH0OmMYZTbTGO1RCLWvQUtmE7TULjgwTKYKclsDqZbJVdj8CfRMxyAzv8eD4WUoLaswuzbQOBoBXTmRoq9P7JfkqcOc3LbF+G7Y8iYBCQndGQhhyPMRQ+4N3DYFIe4PwTS7DtnTIOgyc5wuHeZkBLnKRWm53g+r7zPqBiIQkwo3DQF8/7mdptrgQ3WPD+LHfgy8iuJC80tQRf3SjCCnzcca7TGoLSxu9QZQY/CjWu9Dn3MdJkJlN/MPnYfUCkE7vQK60MBmBCdkzNb4wifU9QXJpLeoeuQlHzPYXTsEkcaN8s45ggvXdG6YmSgoQddWRkBLnVtj3s10191JFVoPCXkQiX1D6sc2yjqcKG134ApBpHJgZJ4I+Kr/BXZWb2chf7aEKp0Xoi43rqrn8C76lQh+oUQxgxLSW9hsQ20PA7UtDPpsx14FutYmLVY6MeSKoUrDQKR0webbwO8/O+kKwQ9fUCyzEizofh5B4d1RImjfO0T6xhiHFpnj90cCMNnXUKZ0QNgyjUvyKRQ3WHCxfgJF9eNoHfGT3ztPti+P03w5Z99doISDgmMFxpRk0AfjzArEejfZ8gtcbrSiRuOA1hKCuI8BzWtIkfDBt5EqNAqogu7E+XuTUE8t4YmbJayhwxpGfp0ZFK8xQfObBIe+B/qclksJOiVUvoql+M1JiteUJBNZguQ4v4F75K/3L7zz0NlKPuwgAAAAAElFTkSuQmCC")}.zform-button-secret{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACfUlEQVR42m1Sz2sTQRh9u9nml02M2hoapaZNtaIg4q0eBMEeRPGg3jyJhyK00EvpsZBr/wqhAfHQs3fBglRa0EYTm5YYFEqKSRvTJDs7s77ZbdpYHfiYmW++7817b8bAiZHL5fqVUnNSygnGWQYYvxgrjuMszs7O/u6tN3o3S0tLN9m8nEqlRuLxOEzTBPdot9uoVqvY5iDQ4/n5+fV/ANjcz8O1TCYzZts2KpUKms2mvh2WZSGZTHp1+Xx+k7kbCwsLLb03uwBMvhwaGhoTQqBYLG41Go0010Edel0oFH5qYLIbo5Tpbp/VXTA5EY1GUSqVwKaHMzMz5R515Ww2e69cLufT6bRX+z+AQa2Zt+n19klzdU6z0zVkO/iXB+V3z92V0jh29iKe5kfXVxFwBVzpwHX8EELi1fotz9RkuIYHF1ZxdWrN8Bm4Lp4+uUs0E0Ygwvk+oIhthfUhDRKQTgPZySbzwmvZfP3+WIK+SRc6u29ghQZgGP0s7AMiCaYVcLAHuf8NdusHlHOAyMg0XLvTA0CKUPomG/WNj9R5Colrt1F5u8j+8xi+M4n61w0C1BBLnyFhCVfYvQDCk+GSamL8CszgAN1RkB2JT7sRDMNGIjOCdjPE2gOPVRfA+wcu3dWoWmvt8zpZfOCJA9VW6LRI1SWzwhfUi999uUp5PccM9EajUkLichqB6DkC2Bh9NoVRwYb9HZzOpBDc7/MZUO4JANtDVY72YIMAMSBMI60g8xqgjlatCtFsIDYcp93Kl90LoCWELr5A5FIARjDkP6HJl1CUZrcQazWosEOi0vdLG38EwCfZWp7zvfA+jjgM52jmD/M/lpT+WgNx/AHLKabZiPgg0gAAAABJRU5ErkJggg==")}.zform-button-blockcode,.zform-button-monospace{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABD0lEQVR42mNgGAVYgWHPQ36yNRt0PuD3nPf0WMSq5x9gYnGbX3/wXvz8GEgOr2b9tntCHrOfHiva9vq//9yn92DiIate3ivb/eY/SE679o4QVs16Lfciole//F649dV/v1lP76kX3JBGkpMOWPTsHkguYunz70C5CBTNug132cKXP/9YueMNUMGz36o514zRLdAsv2UMkivd9PJ/4MzHHxWSrrChKFAvvhkROv/p96xVL/579D24Jx93SRpJTtp76qN7ILmgmY++A+UisHpDMeWKkG3DnWOpi5/+d225Cw8Dr0mP7mWseP4fJCcXfVEIb0DKRFzgtyy/ecy78x48FvynPPxgU3vnGEhuNJFjAgDXGIoQBpiXVgAAAABJRU5ErkJggg==")}.zform-button-titles{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAApklEQVQoz73QsQ2EMAwFUEsUNDRUVJeKLh1VdE2qSIiGAikZxBNkAja4Cf4iLOI1uCjkdKkokSvrP9lO6KT7okeAjx4eWzhpCQ4WJp6k53GvJnjZcLUplhS/RyipwCZrAQZTDhQPNVhlORxbNjwdOgcD9zVYxJUJGmMOeu5q4MQW8NvdcVsDK6YAhWt3y80f2JhOg07PVGFAjy62ofkQaKfXU199X1/TU/Qkt2QxeAAAAABJRU5ErkJggg==")}.zform-button-title1{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAApklEQVQoz73QsQ2EMAwFUEsUNDRUVJeKLh1VdE2qSIiGAikZxBNkAja4Cf4iLOI1uCjkdKkokSvrP9lO6KT7okeAjx4eWzhpCQ4WJp6k53GvJnjZcLUplhS/RyipwCZrAQZTDhQPNVhlORxbNjwdOgcD9zVYxJUJGmMOeu5q4MQW8NvdcVsDK6YAhWt3y80f2JhOg07PVGFAjy62ofkQaKfXU199X1/TU/Qkt2QxeAAAAABJRU5ErkJggg==")}.zform-button-title2{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAwklEQVQoz73QsQ2DMBAF0JMoaBARiiIqXER07lxZNK4sIRoKJHuCTMAETJANmOBvkAnYIBPcGsQCh5ISXfmfvs9HK50PXQLc5OAw+JU6b2GgJyXlXEO0R4PjAbs3UKwqudST+Dy4qCIYuI9A48nS1yEomxtnTQQ9d4sdzahHtUjeaYHsm+YRdGxjg0S9geKdIZXHDpZNBGE13uLXSklO/x0M6wgE7lw0oRwJaKF2A2bSUJDhm8KXCG/PWwyarzv1+fwAYArrjnYCa/AAAAAASUVORK5CYII=")}.zform-button-title3{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAxElEQVQoz73QsanDMBSF4cPzAxdx4KkSBKxKnTpXIo0qg3GTwmBPkAk0gSbIBpngbuAJsshZ46Z4wmXK8LcfpzhQfA5fAWtZZZVlU8zbKEliGUJ4enHTsbBykX+fJFIRdl/cbnmAhbcKogxU+F5h72Y/wI3za8wpxzy8AhWut3Jmlw8wc6wLQTwVCtN3e8tmqmBkqsDLhTaYu6Ltf4lcQWKswMkfTT6xvTbhh7gqoEglyiBhU7jNipHu0ZbmiQem7139uTdX8exNUqtqywAAAABJRU5ErkJggg==")}.zform-button-title4{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAt0lEQVQoz73QsQ2DMBAFUEsUNAiJiipXRNfRUSE3rty4oYhkBmGCmyAbZILbgAnYgAluDXIBJ6SiRNdY+k/fPpvVnI+5BESKrDOsph8Ce3b0CZob0q8hSuTdayxbXOIE/AceCTjuNoAvmOsDPKSfw+hHN3ZzqwCfYGuuDtBLSA0t3wUtLBovxZJTAkF8Ao0CKGtb2WLKp6xJwItLABlkP+Wcfa/wpE/jVtfEAVjLt/UyMnTdV5/PG1Cu8REDzPeUAAAAAElFTkSuQmCC")}.zform-button-table{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAByElEQVR42q2TzytEURTHv/Pe85sFGVPIRpHflKYRC8rCilCKspKlvZVY8H/IQhQldiyEyUSKUhKxUH7MTH7LNO/+cO6b8d4bWRCn3jvv3nfO53zvufcCfzSPes1tPUxIiVEuRakQAlwATHmuviUYeefh4EzSvNifGa7wGwogpBzr9+cV/qby5MJ5vfIWgGhW8srFLFVmVIXBJG9y0/E09/lvvGUapskzXABpUYeqR35U/S1GUMbhANSiyeZ3wj8CdDcXIO4GsCRA2WBbERaDdxho9dlzS6E79AeccfQ5lqrAJAA1EoZOwbth6LqG5VAYHg3Qkkkre6SOYtIoo6okG3HzyxJUFwzdg16/l4Ij6PEXpShwj8+vn8GYSFUgaWxQubWDCClIeCtAcyAGnRqVVl2cSQXdAKJJJY8Su5q82DiKorPBORbrhxEEKvORl2WF4/TqCTkZhquJIkHTNY+VrOzT0xSdBWD75MEGlnvT7Z1LABhL9IDkdtQVYvM4ivZaR8FyKIK+gNceKwV6cmlOD2gJtWW5uLl/R7kvC5e3r/ZdqClJt5LcJoQUrl2Qwan5s8Y4Fzlqf9XDqS+mdXnYt4fp8SW2iv+wD9RSCSl9jwFVAAAAAElFTkSuQmCC")}.zform-button-math{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAs0lEQVQoz2P4z4AfMhCpoNGh8X/d/+oz5UeLz+T/yPqfchTDhLrz+/6XnSnqye3JmJzcEzsfQ0GlQff/Cf9zHCC8sP1Y3FBQP/9/2v0EATyOTDk/+39kAR4FsQkR74Nm4VQQIxB2P/A2nnAIXe9/xrMHwjb5j6EgOMHvvMdpEMsC6Ez992gKggx83ru/cay3qTfvN7qv918L3ZveCa77HfZb7Tfdb7hfd7/mfrV+UuOCAgUAOHoB5MLjQikAAAAASUVORK5CYII=")}.zform-button-footnote{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABlUlEQVR42qWTx05CURCGeQCfwBIX+gY+i23v3qCIEevCaMB7uY0LF9SoxF5iiSshlmCjG2kixRghajQRrjuJ+T3XFRukOMkkM2dyvjP/nIxKVWSL9uWC6j82v7AE+/IqZucXGmoCSLY55PIy1je3YbHOdVUNEMwSvgoFyJ+f2NrZhVmyrVUF4AQzZFnGbShMIDIczmMIoiVTMYDhRby9vePiyg1fIIjnl1dcu71geRNEi7X8XBhOQCabhc8f+PVA8Abph0eEozEFQLqR/p4LzXBIpdMIEQmKjFA4gmgsRs4ecBdPYNG+At5k2S0JoIwcuRDHfSIJt8eDRDIFhhNhoBjQjECkiAoAJQEGmkU4EsPpmQtGRc5T9neQfRqtRMptRV4CQF5ye/2gWeF7QDu04Tq/xBOBUEY2X9EvzNAMTGYr2js6e0jaxJNvzX3kcORwYlpPdZcFGCgWupHxPRLWKXmvut/q8fiQz+UxOaVHJU0o+pqL8npelLB/cAjd6MRJTfuh1gyu6IbHXCRsqXVJG4m3lir+AKcgCFAzJG3uAAAAAElFTkSuQmCC")}div.zform-popup{top:18px;z-index:100;background:transparent;background-color:#fff;background-image:linear-gradient(to center top, #ebebe5 8%,#f9f9f6 75%);border:1px solid #CCCCCC;border-radius:3px;padding:2px}.zform-code-col{display:inline-block;vertical-align:top;margin:2px;min-width:100px}.zform-code-col>span{display:block;color:#2677C9;cursor:pointer}.zform-code-col>span[data-zform-selected='true']{color:blue;font-weight:bold}.zform-code-col>span:hover,.zform-code-col>span:focus{color:#C87B02}#zform-modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:#000;opacity:0.5;filter:alpha(opacity=50);display:none;z-index:99}#zform-modal-wrapper{position:fixed;top:0;left:0;width:100%;height:100%;display:none;margin-top:10%;text-align:center;z-index:100}#zform-modal-wrapper>div{display:inline-block;background:#f4f6f6;border:1px solid #555;border-radius:2px;box-shadow:0 2px 26px rgba(0,0,0,0.3),0 0 0 1px rgba(0,0,0,0.1)}#zform-modal-wrapper>div>header{background:#084561;color:#fff;font-weight:bold;line-height:27px;text-align:left;padding-left:6px;padding-right:6px;white-space:nowrap}#zform-modal-wrapper>div>footer{background:#e7ebec;text-align:right;padding-right:6px;line-height:32px;border-top:2px solid #d1d4d5}#zform-modal-wrapper>div>footer>a{cursor:pointer}#zform-modal-wrapper section{display:block;margin:8px;min-width:200px;min-height:50px}.zform-modal label{display:inline-block;width:70px;text-align:left}@media only screen and (max-width: 760px){html.dropdown-active{overflow:hidden}html.dropdown-active .page-container{width:100%}html.dropdown-active .main-container{display:none}.header-menu-dropdown{display:none !important}.dropdown{width:100%;top:180px;bottom:0;border-bottom:none}.dropdown .dropdown-list{overflow:auto;position:absolute;top:36px;bottom:50px}.dropdown .dropdown-link-all{position:absolute;left:0;right:0;bottom:0;height:50px;line-height:50px}form.forum-message .message{padding-top:0 !important}.message-actions a{width:0px}.message-bottom .message-karma a{border-bottom-width:1px !important}.message-submit{display:block !important;width:calc(100% - 16px);margin:0 8px !important}.message-submit button{float:left;display:block;width:49.5%}.message-submit button[type=submit]{float:right}}@media only screen and (max-width: 959px){body{background:#222}body:not(.swipping) .page-container,body:not(.swipping) .mobile-menu{-moz-transition-property:-moz-transform;-o-transition-property:-o-transform;-webkit-transition-property:-webkit-transform;transition-property:transform;-moz-transition-duration:0.3s;-o-transition-duration:0.3s;-webkit-transition-duration:0.3s;transition-duration:0.3s;-moz-transition-timing-function:ease;-o-transition-timing-function:ease;-webkit-transition-timing-function:ease;transition-timing-function:ease}body.swipping *{-moz-user-select:-moz-none;-ms-user-select:none;-webkit-user-select:none;user-select:none;-webkit-pointer-events:none;-moz-pointer-events:none;pointer-events:none}.js .page-container{position:absolute;z-index:10;-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.js .mobile-menu{display:block;position:absolute;position:fixed;overflow-x:hidden;overflow-y:auto;z-index:1;-moz-transform:translate3d(-20%, 0, 0);-ms-transform:translate3d(-20%, 0, 0);-o-transform:translate3d(-20%, 0, 0);-webkit-transform:translate3d(-20%, 0, 0);transform:translate3d(-20%, 0, 0);width:90%;height:100%;padding-bottom:20px;background:#222;-moz-user-select:-moz-none;-ms-user-select:none;-webkit-user-select:none;user-select:none}.js .mobile-menu .search{height:50px;position:relative;top:0;left:0;width:100%}.js .mobile-menu .search input{color:#EEE;background-color:#333;width:76%;height:30px;padding:10px 5%;font-size:16px;font-size:1.6rem}.js .mobile-menu .search input:hover,.js .mobile-menu .search input:focus{padding-bottom:7px;border-bottom:3px solid #084561;background-color:#333}.js .mobile-menu .search button{display:none}.js .mobile-menu .search .search-more{background-color:#3F3F3F;width:14%;height:50px;line-height:50px;color:#CCC}.js .mobile-menu .mobile-menu-bloc,.js .mobile-menu .mobile-menu-link{width:90%;line-height:40px;text-indent:0}.js .mobile-menu .mobile-menu-bloc{margin:0 5% 15px}.js .mobile-menu .mobile-menu-bloc:nth-child(2){margin-top:15px}.js .mobile-menu .mobile-menu-bloc ul,.js .mobile-menu .mobile-menu-bloc li{margin:0;padding:0}.js .mobile-menu .mobile-menu-bloc .mobile-menu-link{margin:0;width:100%}.js .mobile-menu .mobile-menu-bloc:not(.mobile-show-ico) .ico-after:after{display:none}.js .mobile-menu .mobile-menu-bloc[data-title]:before{display:block;content:attr(data-title);height:30px;font-size:14px;font-size:1.4rem;text-transform:uppercase;padding-bottom:3px;border-bottom:2px solid #3F3F3F;font-weight:bold;color:#666}.js .mobile-menu .mobile-menu-bloc.mobile-show-ico .ico-after{padding-left:30px;width:calc(100% - 30px)}.js .mobile-menu .mobile-menu-bloc.mobile-show-ico .ico-after:after{top:12px;left:2px}.js .mobile-menu .mobile-menu-link{display:block;height:40px;text-decoration:none;color:#CCC;font-size:16px;font-size:1.6rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.js .mobile-menu .mobile-menu-link.mobile-menu-sublink{width:90%;margin:0 0 0 10%}.js .mobile-menu .mobile-menu-link.mobile-menu-bloc[data-title]{height:80px}.js .mobile-menu .mobile-menu-link.mobile-menu-bloc:not([data-title]){margin-bottom:0}.js .mobile-menu .mobile-menu-link:not(:last-child):not(.mobile-menu-bloc){border-bottom:1px solid #2C2C2C}.js .mobile-menu .mobile-menu-link[data-prefix]:before{content:"[" attr(data-prefix) "] "}.js .mobile-menu .mobile-menu-link.unread{font-weight:bold;color:#EEE}.js .mobile-menu .mobile-menu-link img{float:left;margin:5px 5px 5px 0;width:30px;height:30px}.js .mobile-menu .mobile-menu-link .label{padding:0 0 0 50px}.js .mobile-menu .mobile-menu-link img+.label{padding:0 0 0 10px}.js.show-mobile-menu{width:100%}.js.show-mobile-menu body{position:fixed}.js.show-mobile-menu .page-container{height:100%;-moz-transform:translate3d(90%, 0, 0);-ms-transform:translate3d(90%, 0, 0);-o-transform:translate3d(90%, 0, 0);-webkit-transform:translate3d(90%, 0, 0);transform:translate3d(90%, 0, 0);overflow:hidden;-moz-box-shadow:0 0 7px rgba(0,0,0,0.25);-webkit-box-shadow:0 0 7px rgba(0,0,0,0.25);box-shadow:0 0 7px rgba(0,0,0,0.25)}.js.show-mobile-menu .mobile-menu{-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.js.enable-mobile-menu .mobile-menu-hide{display:none}.js.enable-mobile-menu .page-container .mobile-menu-bloc,.js.enable-mobile-menu .page-container .mobile-menu-link,.js.enable-mobile-menu .page-container .search{display:none}.js.enable-mobile-menu .page-container .mobile-menu-btn+.header-logo{margin-left:0}.js.enable-mobile-menu .page-container .mobile-menu-btn{display:block;float:left;height:50px;width:50px}.js.enable-mobile-menu .page-container .mobile-menu-btn:after{display:block;content:" ";position:absolute;top:15px;left:13px;height:22px;width:22px;background-image:url('../images/sprite@2x-sdc8bfa9a21.png');background-repeat:no-repeat;background-position:0 -3280px}.page-container .header-logo{width:40px;height:50px;margin-left:50px;float:left}.page-container .header-logo-link{background-image:url("../images/logo-mobile@2x.png") !important;background-size:100%;width:100%;height:100%}.page-container .header-logo-link:after{display:block;content:attr(data-title);position:absolute;top:0;left:95px;right:155px;line-height:50px;text-indent:0;text-align:left;font-weight:normal;font-size:17px;font-size:1.7rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:200px}.page-container .header-container .header-menu{height:30px}.page-container .header-container .header-menu .header-menu-list{padding-top:50px}.page-container .header-container .header-menu .header-menu-list>li>a{line-height:50px}.page-container .logbox{float:right;width:150px;background:none}.page-container .logbox .notifs-links{width:100%}.page-container .logbox .notifs-links .ico-link{height:50px;width:50px}.page-container .logbox .dropdown{top:50px}.page-container .logbox .dropdown.my-account-dropdown .dropdown-list{bottom:0}.page-container .logbox .dropdown.my-account-dropdown .dropdown-list li{height:45px;line-height:45px}.page-container .logbox.unlogged{font-size:13px;font-size:1.3rem}.page-container .logbox.unlogged a{background-color:rgba(255,255,255,0.1);line-height:30px;height:30px;margin:10px 0;width:74px;margin-right:1px}html:not(.enable-mobile-menu) .header-container{border-bottom:1px solid #CCC}html:not(.enable-mobile-menu) .page-container .header-logo{margin-left:10px}html:not(.enable-mobile-menu) .page-container .header-logo-link:after{left:55px;right:205px}html:not(.enable-mobile-menu) .logbox .notifs-links .ico-link,html:not(.enable-mobile-menu) .logbox .my-account{position:absolute;top:0;right:0;height:50px;width:50px}html:not(.enable-mobile-menu) .logbox .notifs-links .ico-link .avatar,html:not(.enable-mobile-menu) .logbox .my-account .avatar{height:50px;width:50px}html:not(.enable-mobile-menu) .logbox .notifs-links :nth-child(1) .ico-link{right:150px}html:not(.enable-mobile-menu) .logbox .notifs-links :nth-child(2) .ico-link{right:100px}html:not(.enable-mobile-menu) .logbox .notifs-links :nth-child(3) .ico-link,html:not(.enable-mobile-menu) .logbox .notifs-links .ico-link:nth-child(3){right:50px}html:not(.enable-mobile-menu) .logbox.unlogged{position:absolute;top:0;right:0}.main{width:100%}.main .content-container .content-col:not(:first-child),.main .sidebar{margin-top:50px}.home .main .content-container article{padding:20px 4%}.main .sidebar{width:102.5%}.main .sidebar h3,.main .sidebar h4,.main .sidebar ul li{padding-left:5.5%}.main .sidebar h3 a,.main .sidebar h4 a,.main .sidebar ul li a{white-space:normal}.content-col-2:not(:first-child),.content-col-3:not(:first-child){margin-top:50px}.header-menu-dropdown{display:none !important}.topic-list .topic{background:none !important}.main .content-container .topic-message{padding:20px 0}.main .content-container .topic-message .user{position:absolute;top:7px;z-index:10;width:100%}.main .content-container .topic-message .user .avatar-link{float:left;display:none}.main .content-container .topic-message .user .badge{float:left;height:20px;line-height:20px;font-size:12px;width:50px;margin-left:10px}.main .content-container .topic-message .user .user-metadata{float:right;width:140px;margin-right:10px}.main .content-container .topic-message .user .user-metadata a{float:left;height:20px;line-height:20px;border-bottom:none;width:68px}.main .content-container .topic-message .message{border-right:0;border-left:0;padding-top:65px}.main .content-container .topic-message .message .message-metadata{position:absolute;top:0;left:0;right:10px;z-index:15;height:30px;line-height:30px}.main .content-container .topic-message .message .message-metadata .date{float:right}.main .content-container .topic-message .message .message-actions{margin:35px 10px 0 0}.main .content-container .topic-message .message .message-actions a{text-indent:-9999px}.main .content-container .topic-message .message .message-actions a:after{left:12px}.main .content-container .topic-message .message .message-bottom{min-height:0}.main .content-container .topic-message .message .message-bottom .signature{display:none}.main .content-container .topic-message .message .message-bottom .message-karma{position:absolute;top:35px;left:10px}.main .content-container .topic-message .message .message-bottom .message-karma a{margin-right:1px;margin-left:0}.main .content-container .topic-message .message .message-bottom .message-karma .tick{text-indent:-9999px;margin-right:1px}.main .content-container .topic-message .message .message-bottom .message-karma .tick:after{left:12px}.main .content-container .topic-message .message .message-bottom .message-karma .upvote,.main .content-container .topic-message .message .message-bottom .message-karma .downvote{padding:0 7px;text-align:center;min-width:30px}.main .content-container .topic-message .message .message-bottom .message-karma .upvote:after,.main .content-container .topic-message .message .message-bottom .message-karma .downvote:after{display:none}.main .content-container .article-content p,.main .content-container .article-content ul:not(.pagination){font-size:15px;font-size:1.5rem;font-size:1.8ex}.main .content-container .content-wrapper h1,.main .content-container .content-wrapper h2,.main .content-container .content-wrapper h3,.main .content-container .content-wrapper h4,.main .content-container .content-wrapper h5,.main .content-container .content-wrapper h6,.main .content-container .content-wrapper .subtitle,.main .content-container .content-wrapper .authors,.main .content-container .content-wrapper p{padding-left:15px;padding-right:15px}.page-footer{text-align:center;height:auto}.page-footer p{border-bottom:1px solid #5b3a03}.page-footer p,.page-footer ul{display:block;float:none}.page-footer ul{line-height:30px}.page-footer ul li{margin:0 5px}}@media only screen and (min-width: 760px){.dropdown{-moz-box-shadow:0 5px 7px rgba(0,0,0,0.3);-webkit-box-shadow:0 5px 7px rgba(0,0,0,0.3);box-shadow:0 5px 7px rgba(0,0,0,0.3)}.header-right .dropdown{width:350px;left:auto;padding:0}.header-right .dropdown .dropdown-list{max-height:270px;overflow-x:hidden;overflow-y:auto}.header-right .dropdown .dropdown-list::-webkit-scrollbar{width:10px;height:10px}.header-right .dropdown .dropdown-list::-webkit-scrollbar-track{background-color:#06354a}.header-right .dropdown .dropdown-list::-webkit-scrollbar-thumb{background-color:#396a81;border:1px solid #06354a;-moz-transition:all 0.15s;-o-transition:all 0.15s;-webkit-transition:all 0.15s;transition:all 0.15s}.header-right .dropdown .dropdown-list::-webkit-scrollbar-thumb:hover{background-color:#5196b6}.header-right .dropdown .dropdown-list::-webkit-scrollbar-thumb:active{background-color:#71b4d3}.header-right .dropdown.my-account-dropdown{width:230px}}@media only screen and (min-width: 960px){html,body,.page-container{height:100%}.main-container{min-height:calc(100% - 146px)}.screen{display:inline}.wrapper{width:95%;margin:0 2.5%}.header-container{z-index:1;position:relative;-moz-box-shadow:0 0 4px rgba(0,0,0,0.3);-webkit-box-shadow:0 0 4px rgba(0,0,0,0.3);box-shadow:0 0 4px rgba(0,0,0,0.3)}.header-container header{background-image:-moz-linear-gradient(left, rgba(0,0,0,0) 20%,rgba(255,255,255,0.07) 40%,rgba(255,255,255,0.07) 60%,rgba(0,0,0,0) 80%);background-image:-o-linear-gradient(left, rgba(0,0,0,0) 20%,rgba(255,255,255,0.07) 40%,rgba(255,255,255,0.07) 60%,rgba(0,0,0,0) 80%);background-image:-webkit-linear-gradient(left, rgba(0,0,0,0) 20%,rgba(255,255,255,0.07) 40%,rgba(255,255,255,0.07) 60%,rgba(0,0,0,0) 80%);background-image:linear-gradient(to right, rgba(0,0,0,0) 20%,rgba(255,255,255,0.07) 40%,rgba(255,255,255,0.07) 60%,rgba(0,0,0,0) 80%)}.header-logo{float:left;text-align:left;width:240px}.header-container .header-menu{float:left;width:34%;margin-left:.5%}.header-container .header-menu .header-menu-list>li>a{max-width:150px;font-size:1.6rem;font-size:16px}.dropdown{top:60px}.has-dropdown{position:relative;text-indent:-7px}.has-dropdown:after{content:" ";display:block;position:absolute;top:47%;left:83%;height:0;width:0;border:6px solid transparent;border-top:6px solid rgba(255,255,255,0.7)}.has-dropdown:hover:after,.has-dropdown:focus:after,.has-dropdown.active:after{border-top:6px solid #FFF}.logbox .dropdown.my-account-dropdown ul li{height:30px;line-height:30px}.lt-ie9 .dropdown{top:90px}.header-right{float:right;width:230px}.header-right .dropdown{right:2.5%}.breadcrumb{position:relative;display:block;float:left;width:calc(100% - 230px);height:30px}.breadcrumb:after{content:" ";display:block;position:absolute;top:0;right:0;width:50px;height:100%;background-image:-moz-linear-gradient(left, rgba(231,235,236,0),rgba(231,235,236,0.75));background-image:-o-linear-gradient(left, rgba(231,235,236,0),rgba(231,235,236,0.75));background-image:-webkit-linear-gradient(left, rgba(231,235,236,0),rgba(231,235,236,0.75));background-image:linear-gradient(to right, rgba(231,235,236,0),rgba(231,235,236,0.75))}.breadcrumb ul{margin:0;padding:0;list-style:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.breadcrumb ul li{position:relative;display:inline-block;padding-right:30px;line-height:30px}.breadcrumb ul li a{text-decoration:none;color:#084561}.breadcrumb ul li a:hover,.breadcrumb ul li a:focus{text-decoration:underline;outline:none}.breadcrumb ul li:not(:last-child):after{display:block;position:absolute;top:0;right:7px;content:" ";height:30px;width:15px;background-image:url('../images/sprite@2x-sdc8bfa9a21.png');background-repeat:no-repeat;background-position:0 -320px;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=20);opacity:0.2}.search:before{content:" ";display:block;position:absolute;left:-20px;height:30px;width:20px;background:-moz-linear-gradient(right, rgba(0,0,0,0.03),rgba(0,0,0,0));background:-o-linear-gradient(right, rgba(0,0,0,0.03),rgba(0,0,0,0));background:-webkit-linear-gradient(right, rgba(0,0,0,0.03),rgba(0,0,0,0));background:linear-gradient(to left, rgba(0,0,0,0.03),rgba(0,0,0,0))}.search form input{padding:8px 10px;height:14px;width:150px}.search form button{height:30px;line-height:30px;width:30px}.search form button:after{top:7px}.search .search-more{width:30px;height:30px;line-height:30px}body.no-sidebar .main .content-container{width:100%}body.no-sidebar .main .sidebar{display:none}.main{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:-moz-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-moz-box-orient:horizontal;-moz-box-direction:reverse;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;height:100%;margin-left:0;padding-left:2.5%}.main .content-container{width:80%;margin-right:0}.main .content-container h1,.main .content-container h2{margin-left:1px}.main .content-container .content-col-2{width:49.5%;margin:0 0 0 1%}.main .content-container .content-col-3{width:32%;margin:0 0 0 2%}.main .content-container .content-col-2,.main .content-container .content-col-3{float:left}.main .content-container .content-col-2:first-child,.main .content-container .content-col-3:first-child{margin:0}.main .sidebar{width:22.5%;border-bottom:none}.main .sidebar h3,.main .sidebar h4,.main .sidebar ul li{padding-left:11.5%}.main .sidebar h3:first-child{margin-top:31px}.main .sidebar h4[data-num]{padding-left:calc(11% + 25px)}.main .sidebar h4[data-num]:before{left:11%}.main .sidebar.sommaire ul li.current ul{margin-left:calc(-11% - 10px);width:calc(111% + 10px);background:-moz-linear-gradient(top, rgba(0,0,0,0.07),rgba(0,0,0,0) 3px);background:-o-linear-gradient(top, rgba(0,0,0,0.07),rgba(0,0,0,0) 3px);background:-webkit-linear-gradient(top, rgba(0,0,0,0.07),rgba(0,0,0,0) 3px);background:linear-gradient(to bottom, rgba(0,0,0,0.07),rgba(0,0,0,0) 3px)}.main .sidebar.sommaire ul li.current ul a{padding-left:calc(11% + 30px)}.content-cols .main .content-container{width:79%;margin-left:1.5%}.home .main .sidebar{margin-top:30px;border-top:1px solid #FFF}.home .main .sidebar h3:first-child{margin-top:0}.full-content-wrapper .tutorial-list article{width:46%;float:left}.topic-list .topic .topic-description{background-size:0 0}.topic-list .topic .topic-description[style]:before{display:block;position:absolute;content:" ";right:0;background-image:inherit;background-repeat:no-repeat;background-position:top right;background-size:80px 80px;height:100%;width:80px;margin-top:-5px;-webkit-mask-box-image:-webkit-linear-gradient(right, #000, transparent);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=20);opacity:0.2}.topic-message{margin:0 0 25px}.topic-message .user:after,.topic-message .message:after{content:" ";display:block;position:absolute;top:10px;height:0;width:0;border:20px solid transparent;border-left:0}.topic-message .user{position:absolute;padding-top:60px;top:0;left:0}.topic-message .user:after{left:60px;border-right-color:#D2D4D6}.topic-message .message{margin-left:80px}.topic-message .message:after{top:9px;left:-19px;border-right-color:#FDFDFD}.pagination{border:1px solid #d2d5d6}.content-wrapper{margin:0 0 0 1.5%}.full-content-wrapper{margin:0 0 0 2%}.enable-mobile-menu #modals .modal{-moz-box-shadow:0 2px 7px rgba(0,0,0,0.7);-webkit-box-shadow:0 2px 7px rgba(0,0,0,0.7);box-shadow:0 2px 7px rgba(0,0,0,0.7)}.enable-mobile-menu #modals .modal .modal-title{line-height:50px}.enable-mobile-menu #modals .modal [type=submit]:hover,.enable-mobile-menu #modals .modal [type=submit]:focus,.enable-mobile-menu #modals .modal .btn:hover,.enable-mobile-menu #modals .modal .btn:focus{color:#EEE !important;background:#084561 !important}}@media only screen and (min-width: 1140px){.wide{display:inline}table .wide{display:table-cell}.header-container .header-menu{width:40%;margin-left:5%}.full-content-wrapper .tutorial-list article{width:29.3%}}.header-logo-link{background-size:100%;background-image:url("../images/logo@2x.png")}.ico,.ico-after:after,.breadcrumb ul li:not(:last-child):after{background-size:40px 3000px !important;background-image:url('../images/sprite@2x-sdc8bfa9a21.png') !important}.js.enable-mobile-menu .page-container .mobile-menu-btn:after{background-position:0 -1640px}.logbox .notifs-links .ico-link .notif-text.ico-messages{background-position:0 -1680px}.logbox .notifs-links .ico-link .notif-text.ico-notifs{background-position:0 -1960px}.logbox .notifs-links .ico-link .notif-text.ico-alerts{background-position:0 -120px}.logbox .notifs-links .ico-link .notif-text.ico-gear{background-position:0 -1200px}.breadcrumb ul li:not(:last-child):after{background-position:0 -160px}.search form button:after{background-position:0 -2320px}.main .content-container h2.ico-articles:after{background-position:0 -440px}.main .content-container h2.ico-tutorials:after{background-position:0 -2800px}.main .content-container .article-content .information.ico-after:after,.main .content-container .message-content .information.ico-after:after{background-position:0 -1480px}.main .content-container .article-content .question.ico-after:after,.main .content-container .message-content .question.ico-after:after{background-position:0 -2120px}.main .content-container .article-content .error.ico-after:after,.main .content-container .message-content .error.ico-after:after{background-position:0 -1160px}.main .content-container .article-content .warning.ico-after:after,.main .content-container .message-content .warning.ico-after:after{background-position:0 -2960px}.ico-after.online:after,.ico-after.view:after{background-position:0 -2920px}.ico-after.online.blue:after,.ico-after.view.blue:after{background-position:0 -2840px}.ico-after.online.light:after,.ico-after.view.light:after{background-position:0 -2880px}.ico-after.edit:after{background-position:0 -1120px}.ico-after.edit.blue:after{background-position:0 -1040px}.ico-after.edit.light:after{background-position:0 -1080px}.ico-after.alert:after{background-position:0 -80px}.ico-after.alert.blue:after{background-position:0 0}.ico-after.alert.light:after{background-position:0 -40px}.ico-after.cite:after{background-position:0 -680px}.ico-after.cite.blue:after{background-position:0 -600px}.ico-after.cite.light:after{background-position:0 -640px}.ico-after.tick:after{background-position:0 -2760px}.ico-after.tick.green:after{background-position:0 -2680px}.ico-after.tick.light:after{background-position:0 -2720px}.ico-after.upvote:after{background-position:0 -2640px}.ico-after.upvote.voted:after{background-position:0 -2600px}.ico-after.downvote:after{background-position:0 -2560px}.ico-after.downvote.voted:after{background-position:0 -2520px}.ico-after.lock:after{background-position:0 -1600px}.ico-after.lock.blue:after{background-position:0 -1520px}.ico-after.lock.light:after{background-position:0 -1560px}.ico-after.more:after{background-position:0 -1800px}.ico-after.more.blue:after{background-position:0 -1720px}.ico-after.more.light:after{background-position:0 -1760px}.ico-after.cross:after{background-position:0 -880px}.ico-after.cross.blue:after{background-position:0 -720px}.ico-after.cross.red:after{background-position:0 -800px}.ico-after.cross.light:after{background-position:0 -760px}.ico-after.cross.white:after{background-position:0 -840px}.ico-after.pin:after{background-position:0 -2080px}.ico-after.pin.blue:after{background-position:0 -2000px}.ico-after.pin.light:after{background-position:0 -2040px}.ico-after.beta:after{background-position:0 -560px}.ico-after.beta.blue:after{background-position:0 -480px}.ico-after.beta.light:after{background-position:0 -520px}.ico-after.offline:after,.ico-after.arrow-right:after{background-position:0 -400px}.ico-after.offline.blue:after,.ico-after.arrow-right.blue:after{background-position:0 -320px}.ico-after.offline.light:after,.ico-after.arrow-right.light:after{background-position:0 -360px}.ico-after.arrow-left:after{background-position:0 -280px}.ico-after.arrow-left.blue:after{background-position:0 -200px}.ico-after.arrow-left.light:after{background-position:0 -240px}.ico-after.move:after{background-position:0 -1920px}.ico-after.move.blue:after{background-position:0 -1840px}.ico-after.move.light:after{background-position:0 -1880px}.ico-after.star:after{background-position:0 -2480px}.ico-after.star.yellow:after{background-position:0 -2440px}.ico-after.star.blue:after{background-position:0 -2360px}.ico-after.star.light:after{background-position:0 -2400px}.ico-after.download:after{background-position:0 -1000px}.ico-after.download.blue:after{background-position:0 -920px}.ico-after.download.light:after{background-position:0 -960px}.ico-after.import:after{background-position:0 -1440px}.ico-after.import.blue:after{background-position:0 -1360px}.ico-after.import.light:after{background-position:0 -1400px}.ico-after.history:after{background-position:0 -1320px}.ico-after.history.blue:after{background-position:0 -1240px}.ico-after.history.light:after{background-position:0 -1280px}.ico-after.rss:after{background-position:0 -2280px}.ico-after.rss.blue:after{background-position:0 -2160px}.ico-after.rss.orange:after{background-position:0 -2240px}.ico-after.rss.light:after{background-position:0 -2200px}.codehilite .hll{background-color:#ffc}.codehilite{background:#f8f8f8}.codehilite .c{color:#408080;font-style:italic}.codehilite .err{border:1px solid red}.codehilite .k{color:#008000;font-weight:bold}.codehilite .o{color:#666}.codehilite .cm{color:#408080;font-style:italic}.codehilite .cp{color:#bc7a00}.codehilite .c1{color:#408080;font-style:italic}.codehilite .cs{color:#408080;font-style:italic}.codehilite .gd{color:#a00000}.codehilite .ge{font-style:italic}.codehilite .gr{color:red}.codehilite .gh{color:#000080;font-weight:bold}.codehilite .gi{color:#00a000}.codehilite .go{color:gray}.codehilite .gp{color:#000080;font-weight:bold}.codehilite .gs{font-weight:bold}.codehilite .gu{color:#800080;font-weight:bold}.codehilite .gt{color:#0040d0}.codehilite .kc{color:#008000;font-weight:bold}.codehilite .kd{color:#008000;font-weight:bold}.codehilite .kn{color:#008000;font-weight:bold}.codehilite .kp{color:green}.codehilite .kr{color:#008000;font-weight:bold}.codehilite .kt{color:#b00040}.codehilite .m{color:#666}.codehilite .s{color:#ba2121}.codehilite .na{color:#7d9029}.codehilite .nb{color:green}.codehilite .nc{color:#0000FF;font-weight:bold}.codehilite .no{color:#800}.codehilite .nd{color:#a2f}.codehilite .ni{color:#999999;font-weight:bold}.codehilite .ne{color:#D2413A;font-weight:bold}.codehilite .nf{color:blue}.codehilite .nl{color:#a0a000}.codehilite .nn{color:#0000FF;font-weight:bold}.codehilite .nt{color:#008000;font-weight:bold}.codehilite .nv{color:#19177c}.codehilite .ow{color:#AA22FF;font-weight:bold}.codehilite .w{color:#bbb}.codehilite .mf{color:#666}.codehilite .mh{color:#666}.codehilite .mi{color:#666}.codehilite .mo{color:#666}.codehilite .sb{color:#ba2121}.codehilite .sc{color:#ba2121}.codehilite .sd{color:#BA2121;font-style:italic}.codehilite .s2{color:#ba2121}.codehilite .se{color:#BB6622;font-weight:bold}.codehilite .sh{color:#ba2121}.codehilite .si{color:#BB6688;font-weight:bold}.codehilite .sx{color:green}.codehilite .sr{color:#b68}.codehilite .s1{color:#ba2121}.codehilite .ss{color:#19177c}.codehilite .bp{color:green}.codehilite .vc{color:#19177c}.codehilite .vg{color:#19177c}.codehilite .vi{color:#19177c}.codehilite .il{color:#666}.codehilitetable{width:100% !important;table-layout:fixed;border-color:rgba(0,0,0,0.15)}.codehilitetable td{padding:0}.codehilitetable .linenos{background-color:#fbfbfc;border-right:1px solid #ececf0;width:46px}.codehilitetable .codehilite,.codehilitetable .linenos{padding-top:15px;padding-bottom:15px}.codehilitetable .linenodiv pre{text-align:right;padding-right:emCalc(6px);color:#bebec5}.codehilitetable .codehilite pre{padding-left:emCalc(6px)}.codehilitetable .codehilite{width:100%;height:auto;overflow:auto}.codehilitetable .codehilite pre{white-space:pre;overflow:auto;overflow:auto}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.dropdown{display:none !important}}
diff --git a/assets/css/scss/_all-supports.scss b/assets/css/scss/_all-supports.scss
index cab7f78d3f..0fd0bd4083 100644
--- a/assets/css/scss/_all-supports.scss
+++ b/assets/css/scss/_all-supports.scss
@@ -1859,6 +1859,42 @@ table {
}
}
+ .markdown-help {
+ .open-markdown-help {
+ display: block;
+ position: absolute;
+ bottom: 0;
+ left: 8px;
+
+ .close-markdown-help-text {
+ display: none;
+ }
+ }
+
+ .markdown-help-more {
+ display: none;
+ background: #EEE;
+ padding: 15px;
+ margin-bottom: 5px;
+
+ pre {
+ margin: 0;
+ }
+
+ &.show-markdown-help {
+ display: block;
+ }
+ }
+ .show-markdown-help + .open-markdown-help {
+ .close-markdown-help-text {
+ display: inline;
+ }
+ .open-markdown-help-text {
+ display: none;
+ }
+ }
+ }
+
.message-bottom {
@include display(flex);
@include align-items(flex-start);
diff --git a/assets/js/custom/find-solved-topics.js b/assets/js/custom/find-solved-topics.js
new file mode 100644
index 0000000000..b19ef9d605
--- /dev/null
+++ b/assets/js/custom/find-solved-topics.js
@@ -0,0 +1,11 @@
+/* ===== Zeste de Savoir ====================================================
+ Author: Alex-D / Alexandre Demode
+ ---------------------------------
+ Search for solved topics when create a new topic
+ ========================================================================== */
+
+var $solvedTopicsElem = $('main [data-solved-topics-url]');
+if($solvedTopicsElem.length > 0){
+ var solvedTopicsUrl = $solvedTopicsElem.attr('data-solved-topics-url');
+ // TODO : back-end HS, impossible de dev ça pour l'instant
+}
\ No newline at end of file
diff --git a/assets/js/custom/karma-ajax.js b/assets/js/custom/karma-ajax.js
new file mode 100644
index 0000000000..86b172ee36
--- /dev/null
+++ b/assets/js/custom/karma-ajax.js
@@ -0,0 +1,28 @@
+/* ===== Zeste de Savoir ====================================================
+ Author: Alex-D / Alexandre Demode
+ ---------------------------------
+ Manage karma AJAX requests (+1/-1 on messages)
+ ========================================================================== */
+
+$('.upvote, .downvote').click(function(e){
+ var $thumb = $(this),
+ $karma = $thumb.parents('.message-karma:first'),
+ $otherThumb = $thumb.hasClass('downvote')
+ ? $karma.children('.upvote')
+ : $karma.children('.downvote');
+
+ $.ajax({
+ url: $thumb.attr('href'),
+ type: 'GET', // TODO : use POST method (CSRF in GET)
+ dataType: 'json',
+ success: function(data){
+ $karma.children('.upvote').text("+" + data.upvotes);
+ $karma.children('.downvote').text("-" + data.downvotes);
+ $thumb.toggleClass('voted');
+ $otherThumb.removeClass('voted');
+ }
+ });
+
+ e.stopPropagation();
+ e.preventDefault();
+});
\ No newline at end of file
diff --git a/assets/js/custom/markdown-help.js b/assets/js/custom/markdown-help.js
new file mode 100644
index 0000000000..11d3063cd6
--- /dev/null
+++ b/assets/js/custom/markdown-help.js
@@ -0,0 +1,25 @@
+/* ===== Zeste de Savoir ====================================================
+ Author: Alex-D / Alexandre Demode
+ ---------------------------------
+ Ugly markdown help block management
+ TEMP : Add this to the future awesome Markdown editor directly
+ ========================================================================== */
+
+$('.md-editor').each(function(){
+ var $help = $('<div/>', {
+ 'class': 'markdown-help',
+ 'html': '<div class="markdown-help-more">' +
+ '<pre><code>**gras** \n*italique* \n \n> citation \n+ liste a puces </code></pre>' +
+ '<a href="URL_A_METTRE">Voir la documentation complète</a></div>' +
+ '<a href="#open-markdown-help" class="open-markdown-help btn btn-grey ico-after view">'+
+ '<span class="close-markdown-help-text">Masquer</span>' +
+ '<span class="open-markdown-help-text">Afficher</span> l\'aide Markdown' +
+ '</a>'
+ });
+ $(this).after($help);
+ $('.open-markdown-help, .close-markdown-help', $help).click(function(e){
+ $('.markdown-help-more', $help).toggleClass('show-markdown-help');
+ e.preventDefault();
+ e.stopPropagation();
+ });
+});
\ No newline at end of file
diff --git a/templates/forum/topic/new.html b/templates/forum/topic/new.html
index bf3e8540c0..49efc26a3c 100644
--- a/templates/forum/topic/new.html
+++ b/templates/forum/topic/new.html
@@ -25,7 +25,9 @@
{% block content %}
- {% crispy form %}
+ <div data-solved-topics-url="{% url "zds.forum.views.complete_topic" %}">
+ {% crispy form %}
+ </div>
{% if text %}
{% include "misc/previsualization.part.html" %}
diff --git a/templates/tutorial/tutorial/view.html b/templates/tutorial/tutorial/view.html
index 8a1969da42..66c915d754 100644
--- a/templates/tutorial/tutorial/view.html
+++ b/templates/tutorial/tutorial/view.html
@@ -173,18 +173,37 @@ <h3>Validation</h3>
{% endif %}
{% if tutorial.in_validation %}
- <li>
- <a href="#valid-publish" class="open-modal ico-after tick green">Valider et publier</a>
- <div class="modal modal-small" id="valid-publish">
- {% crispy formValid %}
- </div>
- </li>
- <li>
- <a href="#reject" class="open-modal ico-after cross red">Rejeter</a>
- <div class="modal modal-small" id="reject">
- {% crispy formReject %}
- </div>
- </li>
+ {% if validation.is_pending %}
+ <li>
+ <a href="{% url "zds.tutorial.views.reservation" validation.pk %}" class="ico-after lock blue">Réserver</a>
+ </li>
+ {% elif validation.is_pending_valid %}
+ {% if validation.validator = user %}
+ <li>
+ <a href="{% url "zds.tutorial.views.reservation" validation.pk %}" class="open-modal ico-after lock blue">
+ Se retirer
+ </a>
+ </li>
+ <li>
+ <a href="#valid-publish" class="open-modal ico-after tick green">Valider et publier</a>
+ <div class="modal modal-small" id="valid-publish">
+ {% crispy formValid %}
+ </div>
+ </li>
+ <li>
+ <a href="#reject" class="open-modal ico-after cross red">Rejeter</a>
+ <div class="modal modal-small" id="reject">
+ {% crispy formReject %}
+ </div>
+ </li>
+ {% else %}
+ <li>
+ <a href="{% url "zds.tutorial.views.reservation" validation.pk %}" class="open-modal ico-after lock blue">
+ Réservé par {{ validation.validator.username }}, le retirer
+ </a>
+ </li>
+ {% endif %}
+ {% endif %}
{% endif %}
</ul>
</div>
diff --git a/zds/settings.py b/zds/settings.py
index a8c154c47e..98798cc7ff 100644
--- a/zds/settings.py
+++ b/zds/settings.py
@@ -129,6 +129,8 @@
'js/custom/keyboard-navigation.js',
'js/custom/message-hidden.js',
'js/custom/spoiler.js',
+ 'js/custom/karma-ajax.js',
+ 'js/custom/markdown-help.js',
),
'output_filename': 'js/main.js'
}
|
geopandas__geopandas-2172 | Empty overlay intersection causes error
The new implementation of ``overlay`` generates an error if the intersection is empty. Here is a reproducible code:
```python
import geopandas as gpd
from geopandas.tools import overlay
from shapely.geometry import Polygon
polys1 = gpd.GeoSeries([Polygon([(0,0), (2,0), (2,2), (0,2)]),Polygon([(2,2), (4,2), (4,4), (2,4)])])
polys2 = gpd.GeoSeries([Polygon([(-1,-1), (-3,-1), (-3,-3), (-1,-3)]),Polygon([(-3,-3), (-5,-3), (-5,-5), (-3,-5)])])
df1 = gpd.GeoDataFrame({'geometry': polys1, 'df1':[1,2]}, crs={'init': 'epsg:4326', 'no_defs': True})
df2 = gpd.GeoDataFrame({'geometry': polys2, 'df2':[1,2]}, crs={'init': 'epsg:4326', 'no_defs': True})
gpd.tools.overlay(df1, df2, 'intersection')
```
I will try to provide a PR tonight.
| [
{
"content": "import warnings\nfrom functools import reduce\n\nimport numpy as np\nimport pandas as pd\n\nfrom geopandas import GeoDataFrame, GeoSeries\nfrom geopandas.array import _check_crs, _crs_mismatch_warn\n\n\ndef _ensure_geometry_column(df):\n \"\"\"\n Helper function to ensure the geometry column... | [
{
"content": "import warnings\nfrom functools import reduce\n\nimport numpy as np\nimport pandas as pd\n\nfrom geopandas import GeoDataFrame, GeoSeries\nfrom geopandas.array import _check_crs, _crs_mismatch_warn\n\n\ndef _ensure_geometry_column(df):\n \"\"\"\n Helper function to ensure the geometry column... | diff --git a/geopandas/tests/test_overlay.py b/geopandas/tests/test_overlay.py
index 1efee5dd2c..058da69b10 100644
--- a/geopandas/tests/test_overlay.py
+++ b/geopandas/tests/test_overlay.py
@@ -723,3 +723,14 @@ def test_non_overlapping(how):
)
assert_geodataframe_equal(result, expected)
+
+
+def test_no_intersection():
+ # overlapping bounds but non-overlapping geometries
+ gs = GeoSeries([Point(x, x).buffer(0.1) for x in range(3)])
+ gdf1 = GeoDataFrame({"foo": ["a", "b", "c"]}, geometry=gs)
+ gdf2 = GeoDataFrame({"bar": ["1", "3", "5"]}, geometry=gs.translate(1))
+
+ expected = GeoDataFrame(columns=["foo", "bar", "geometry"])
+ result = overlay(gdf1, gdf2, how="intersection")
+ assert_geodataframe_equal(result, expected, check_index_type=False)
diff --git a/geopandas/tools/overlay.py b/geopandas/tools/overlay.py
index 7973e2124b..75dcb55097 100644
--- a/geopandas/tools/overlay.py
+++ b/geopandas/tools/overlay.py
@@ -65,6 +65,8 @@ def _overlay_intersection(df1, df2):
right_index=True,
suffixes=("_1", "_2"),
)
+ result["__idx1"] = None
+ result["__idx2"] = None
return result[
result.columns.drop(df1.geometry.name).tolist() + [df1.geometry.name]
]
|
paperless-ngx__paperless-ngx-1666 | [BUG] Wrong version number string within docker 1.9.1
### Description
After a successful pull and deploy via docker with https://ghcr.io/paperless-ngx/paperless-ngx:1.9.1 the version string on the paperless-ngx Web-UI is still 1.9.0.

### Steps to reproduce
1. Pull the new version via docker, docker-compose or portainer via https://ghcr.io/paperless-ngx/paperless-ngx and tag 1.9.1
2. Access the Web-UI.
3. Login
4. Find the version string on the lower left side.
### Webserver logs
_No response_
### Paperless-ngx version
1.9.1
### Host OS
Alpine Linux x86-64
### Installation method
Docker - official image
### Browser
Chrome
### Configuration changes
_No response_
### Other
_No response_
| [
{
"content": "from typing import Final\nfrom typing import Tuple\n\n__version__: Final[Tuple[int, int, int]] = (1, 9, 0)\n# Version string like X.Y.Z\n__full_version_str__: Final[str] = \".\".join(map(str, __version__))\n# Version string like X.Y\n__major_minor_version_str__: Final[str] = \".\".join(map(str, __... | [
{
"content": "from typing import Final\nfrom typing import Tuple\n\n__version__: Final[Tuple[int, int, int]] = (1, 9, 2)\n# Version string like X.Y.Z\n__full_version_str__: Final[str] = \".\".join(map(str, __version__))\n# Version string like X.Y\n__major_minor_version_str__: Final[str] = \".\".join(map(str, __... | diff --git a/src-ui/src/environments/environment.prod.ts b/src-ui/src/environments/environment.prod.ts
index 92f388ec872..48ea3f98822 100644
--- a/src-ui/src/environments/environment.prod.ts
+++ b/src-ui/src/environments/environment.prod.ts
@@ -5,7 +5,7 @@ export const environment = {
apiBaseUrl: document.baseURI + 'api/',
apiVersion: '2',
appTitle: 'Paperless-ngx',
- version: '1.9.0',
+ version: '1.9.2',
webSocketHost: window.location.host,
webSocketProtocol: window.location.protocol == 'https:' ? 'wss:' : 'ws:',
webSocketBaseUrl: base_url.pathname + 'ws/',
diff --git a/src/paperless/version.py b/src/paperless/version.py
index 1642e3f8932..d196c358db2 100644
--- a/src/paperless/version.py
+++ b/src/paperless/version.py
@@ -1,7 +1,7 @@
from typing import Final
from typing import Tuple
-__version__: Final[Tuple[int, int, int]] = (1, 9, 0)
+__version__: Final[Tuple[int, int, int]] = (1, 9, 2)
# Version string like X.Y.Z
__full_version_str__: Final[str] = ".".join(map(str, __version__))
# Version string like X.Y
|
conda__conda-build-389 | MD5 checking argument not passed to update_index
I was happy to see that there was a `-c` argument to `conda index` which forces it to use md5 hashes instead of file modification times. However, looks like `main_index.py` never passes that argument on to the `update_index()` function, i.e.,
``` python
...
update_index(path, verbose=(not args.quiet), force=args.force)
...
```
should actually be:
``` python
...
update_index(path, verbose=(not args.quiet), force=args.force, check_md5=args.check_md5)
...
```
| [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport argparse\nimport os\nfrom locale import getpreferredencoding\nfrom os.path import abspath\n\nfrom conda.compat import PY3\n\nfrom conda_build.index import update_index\n\n\ndef main():\n p = argparse.ArgumentParser(\n ... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport argparse\nimport os\nfrom locale import getpreferredencoding\nfrom os.path import abspath\n\nfrom conda.compat import PY3\n\nfrom conda_build.index import update_index\n\n\ndef main():\n p = argparse.ArgumentParser(\n ... | diff --git a/conda_build/main_index.py b/conda_build/main_index.py
index e3a9b10c16..47310e8dd6 100644
--- a/conda_build/main_index.py
+++ b/conda_build/main_index.py
@@ -40,7 +40,7 @@ def main():
dir_paths = [path.decode(getpreferredencoding()) for path in dir_paths]
for path in dir_paths:
- update_index(path, verbose=(not args.quiet), force=args.force)
+ update_index(path, verbose=(not args.quiet), force=args.force, check_md5=args.check_md5)
if __name__ == '__main__':
|
adamchainz__django-perf-rec-266 | perf.yml files created with executable bit set
I've just spotted that my test.perf.yml are marked executable in git, which is surprising as they're YAML files (which aren't executable).
As far as I know, none of the the developers are using Windows (only a mixture of macOS and Linux), so I'm not expecting this to be a platform thing on our end.
Is this expected?
| [
{
"content": "import errno\nimport os\n\nimport yaml\nfrom django.core.files import locks\n\n\nclass KVFile:\n def __init__(self, file_name):\n self.file_name = file_name\n self.data = self.load(file_name)\n\n def __len__(self):\n return len(self.data)\n\n LOAD_CACHE = {}\n\n @c... | [
{
"content": "import errno\nimport os\n\nimport yaml\nfrom django.core.files import locks\n\n\nclass KVFile:\n def __init__(self, file_name):\n self.file_name = file_name\n self.data = self.load(file_name)\n\n def __len__(self):\n return len(self.data)\n\n LOAD_CACHE = {}\n\n @c... | diff --git a/HISTORY.rst b/HISTORY.rst
index d82a49d6..3b783c05 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -1,6 +1,12 @@
History
=======
+* Create YAML files as non-executable. This will not be applied to existing
+ files, modify their permissions if necessary, or delete and recreate.
+
+ Thanks to Peter Law for the report in `Issue #264
+ <https://github.com/adamchainz/django-perf-rec/issues/264>`__.
+
4.6.0 (2020-05-20)
------------------
diff --git a/src/django_perf_rec/yaml.py b/src/django_perf_rec/yaml.py
index cde60fa5..0740835c 100644
--- a/src/django_perf_rec/yaml.py
+++ b/src/django_perf_rec/yaml.py
@@ -54,7 +54,7 @@ def set_and_save(self, key, value):
if self.data.get(key, object()) == value:
return
- fd = os.open(self.file_name, os.O_RDWR | os.O_CREAT)
+ fd = os.open(self.file_name, os.O_RDWR | os.O_CREAT, mode=0o666)
with os.fdopen(fd, "r+") as fp:
locks.lock(fd, locks.LOCK_EX)
|
encode__httpx-139 | API design question - `Response.url`
Currently our `Response.url` attribute exposes a `URL` instance.
This is a breaking change from the requests API where it just exposes a plain string.
It's feasible that we should instead only be exposing plain string URLs, in order to aim for drop-in replacement API compatibility w/ requests, *and* in order to keep the API surface area low.
Options here are:
* Expose `request.url` as a URL instance. (Richer information, URL class is also useful in its own right.)
* Expose `request.url` as a str. (Better API compat. Lower API surface area to maintain.)
* Expose `request.url` as a str, and `request.urlinfo` as a URL instance. (Better API compat. High API surface area.)
| [
{
"content": "import cgi\nimport email.message\nimport json as jsonlib\nimport typing\nimport urllib.request\nfrom collections.abc import MutableMapping\nfrom http.cookiejar import Cookie, CookieJar\nfrom urllib.parse import parse_qsl, urlencode\n\nimport chardet\nimport rfc3986\n\nfrom .config import USER_AGEN... | [
{
"content": "import cgi\nimport email.message\nimport json as jsonlib\nimport typing\nimport urllib.request\nfrom collections.abc import MutableMapping\nfrom http.cookiejar import Cookie, CookieJar\nfrom urllib.parse import parse_qsl, urlencode\n\nimport chardet\nimport rfc3986\n\nfrom .config import USER_AGEN... | diff --git a/httpx/models.py b/httpx/models.py
index 710c0303df..9cbdc250e2 100644
--- a/httpx/models.py
+++ b/httpx/models.py
@@ -204,7 +204,7 @@ def __hash__(self) -> int:
return hash(str(self))
def __eq__(self, other: typing.Any) -> bool:
- return isinstance(other, URL) and str(self) == str(other)
+ return isinstance(other, (URL, str)) and str(self) == str(other)
def __str__(self) -> str:
return self.components.unsplit()
diff --git a/tests/models/test_url.py b/tests/models/test_url.py
index 5f5208ca92..70089e0f1f 100644
--- a/tests/models/test_url.py
+++ b/tests/models/test_url.py
@@ -25,6 +25,12 @@ def test_url():
assert new.scheme == "http"
+def test_url_eq_str():
+ url = URL("https://example.org:123/path/to/somewhere?abc=123#anchor")
+ assert url == "https://example.org:123/path/to/somewhere?abc=123#anchor"
+ assert str(url) == url
+
+
def test_url__params():
url = URL("https://example.org:123/path/to/somewhere", params={"a": "123"})
assert str(url) == "https://example.org:123/path/to/somewhere?a=123"
|
LMFDB__lmfdb-2975 | Could not download the elliptic curves of norm conductor 1
From the feedback page:
I could not download the elliptic curves of norm conductor 1 into a magma file.
Please respond to brumer@fordham.edu
| [
{
"content": "# -*- coding: utf-8 -*-\n# This Blueprint is about Elliptic Curves over Number Fields\n# Authors: Harald Schilly and John Cremona\n\nimport ast, re, StringIO, time\nfrom operator import mul\nfrom urllib import quote, unquote\n\nfrom flask import render_template, request, url_for, redirect, flash, ... | [
{
"content": "# -*- coding: utf-8 -*-\n# This Blueprint is about Elliptic Curves over Number Fields\n# Authors: Harald Schilly and John Cremona\n\nimport ast, re, StringIO, time\nfrom operator import mul\nfrom urllib import quote, unquote\n\nfrom flask import render_template, request, url_for, redirect, flash, ... | diff --git a/lmfdb/ecnf/main.py b/lmfdb/ecnf/main.py
index 9b365cbc9b..5dc161bd3f 100644
--- a/lmfdb/ecnf/main.py
+++ b/lmfdb/ecnf/main.py
@@ -378,7 +378,7 @@ def show_ecnf(nf, conductor_label, class_label, number):
learnmore=learnmore_list())
def download_search(info):
- dltype = info['submit']
+ dltype = info['Submit']
delim = 'bracket'
com = r'\\' # single line comment start
com1 = '' # multiline comment start
|
liqd__a4-meinberlin-488 | Login with username
It is currently not possible to login with username, only with email. This *was* possible with the old meinberlin that was based on a3. So the login flow of established users breaks even though we migrated all accounts.
| [
{
"content": "\"\"\"\nDjango settings for meinberlin project.\n\nGenerated by 'django-admin startproject' using Django 1.8.17.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.8/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/... | [
{
"content": "\"\"\"\nDjango settings for meinberlin project.\n\nGenerated by 'django-admin startproject' using Django 1.8.17.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.8/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/... | diff --git a/meinberlin/settings/base.py b/meinberlin/settings/base.py
index e5c634d93e..8be4c29c06 100644
--- a/meinberlin/settings/base.py
+++ b/meinberlin/settings/base.py
@@ -218,7 +218,7 @@
)
ACCOUNT_ADAPTER = 'apps.users.adapters.AccountAdapter'
-ACCOUNT_AUTHENTICATION_METHOD = 'email'
+ACCOUNT_AUTHENTICATION_METHOD = 'username_email'
ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 3
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
|
pyg-team__pytorch_geometric-8179 | Dataset is not undirected
### 🐛 Describe the bug
Dataset is not undirected, despite passing ``to_undirected=True`` flag.
```python
# !pip install pyg-nightly
from torch_geometric.datasets import CitationFull
from torch_geometric.utils import is_undirected
edge_index = CitationFull(root=".", name="Cora_ML", to_undirected=True).edge_index
is_undirected(edge_index)
```
The above outputs: *False*
### Environment
* PyG version: 2.4.0.dev20231010
* PyTorch version: 2.0.1+cu118
* OS: Colab
* Python version: 3.10.12
* CUDA/cuDNN version: 11.8
* How you installed PyTorch and PyG (`conda`, `pip`, source): pip
* Any other relevant information (*e.g.*, version of `torch-scatter`):
| [
{
"content": "import os.path as osp\nfrom typing import Callable, Optional\n\nimport torch\n\nfrom torch_geometric.data import InMemoryDataset, download_url\nfrom torch_geometric.io import read_npz\n\n\nclass CitationFull(InMemoryDataset):\n r\"\"\"The full citation network datasets from the\n `\"Deep Gau... | [
{
"content": "import os.path as osp\nfrom typing import Callable, Optional\n\nimport torch\n\nfrom torch_geometric.data import InMemoryDataset, download_url\nfrom torch_geometric.io import read_npz\n\n\nclass CitationFull(InMemoryDataset):\n r\"\"\"The full citation network datasets from the\n `\"Deep Gau... | diff --git a/torch_geometric/datasets/citation_full.py b/torch_geometric/datasets/citation_full.py
index 70c2d6f51b76..a1a305ce064b 100644
--- a/torch_geometric/datasets/citation_full.py
+++ b/torch_geometric/datasets/citation_full.py
@@ -98,7 +98,8 @@ def raw_file_names(self) -> str:
@property
def processed_file_names(self) -> str:
- return 'data.pt'
+ suffix = 'undirected' if self.to_undirected else 'directed'
+ return f'data_{suffix}.pt'
def download(self):
download_url(self.url.format(self.name), self.raw_dir)
|
getsentry__sentry-5094 | Webhook data does not have event id
Webhook data contains issue id only. It would be nice to have event id as well.
Discussed with @mattrobenolt on IRC. Documenting it here with this issue.
| [
{
"content": "from __future__ import absolute_import\n\nimport logging\nimport six\nimport sentry\n\nfrom django import forms\nfrom django.conf import settings\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom sentry.exceptions import PluginError\nfrom sentry.plugins.bases import notify\nfrom sen... | [
{
"content": "from __future__ import absolute_import\n\nimport logging\nimport six\nimport sentry\n\nfrom django import forms\nfrom django.conf import settings\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom sentry.exceptions import PluginError\nfrom sentry.plugins.bases import notify\nfrom sen... | diff --git a/src/sentry/plugins/sentry_webhooks/plugin.py b/src/sentry/plugins/sentry_webhooks/plugin.py
index 3bfac698fc4bf4..f25c7546a3a559 100644
--- a/src/sentry/plugins/sentry_webhooks/plugin.py
+++ b/src/sentry/plugins/sentry_webhooks/plugin.py
@@ -87,6 +87,8 @@ def get_group_data(self, group, event):
}
data['event'] = dict(event.data or {})
data['event']['tags'] = event.get_tags()
+ data['event']['event_id'] = event.event_id
+ data['event']['id'] = event.id
return data
def get_webhook_urls(self, project):
diff --git a/tests/sentry/plugins/sentry_webhooks/test_plugin.py b/tests/sentry/plugins/sentry_webhooks/test_plugin.py
index ab49c75257a14f..a2e7f05226f948 100644
--- a/tests/sentry/plugins/sentry_webhooks/test_plugin.py
+++ b/tests/sentry/plugins/sentry_webhooks/test_plugin.py
@@ -23,7 +23,7 @@ def test_simple_notification(self):
responses.add(responses.POST, 'http://example.com')
group = self.create_group(message='Hello world')
- event = self.create_event(group=group, message='Hello world', tags={'level': 'warning'})
+ event = self.create_event(group=group, message='Hello world', tags={'level': 'warning'}, id=24)
rule = Rule.objects.create(project=self.project, label='my rule')
@@ -39,3 +39,5 @@ def test_simple_notification(self):
assert payload['level'] == 'warning'
assert payload['message'] == 'Hello world'
+ assert payload['event']['id'] == 24
+ assert payload['event']['event_id'] == event.event_id
|
joke2k__faker-435 | Published packages include docs/ as a module
The published wheel and sdist on PyPI for at least version 0.7.5 include `docs/__init__.py` as a top-level module in addition to `faker`. This conflicts with some other packages we use (PyICU) and seems like bad package hygiene, especially since the `docs` dir in this repository is definitely not a module. My guess is that a `__init__.py` made it in there on the maintainer's machine before running `setup.py` and it was erroneously discovered as a module.
We're going to republish the package to our own internal repository, but I think it would help the community to `git clean` as necessary and re-publish a new version, and consider adding necessary exclusions to the `setup.py` or `MANIFEST.in`.
| [
{
"content": "#!/usr/bin/env python\n# coding=utf-8\n\nimport os\nimport io\n\nfrom setuptools import setup, find_packages\n\nhere = os.path.abspath(os.path.dirname(__file__))\nREADME = io.open(os.path.join(here, 'README.rst'), encoding=\"utf8\").read()\n\n\nversion = '0.7.5'\n\n# this module can be zip-safe if... | [
{
"content": "#!/usr/bin/env python\n# coding=utf-8\n\nimport os\nimport io\n\nfrom setuptools import setup, find_packages\n\nhere = os.path.abspath(os.path.dirname(__file__))\nREADME = io.open(os.path.join(here, 'README.rst'), encoding=\"utf8\").read()\n\n\nversion = '0.7.5'\n\n# this module can be zip-safe if... | diff --git a/setup.py b/setup.py
index a4582f7970..7584c0187b 100644
--- a/setup.py
+++ b/setup.py
@@ -51,7 +51,7 @@
author_email='joke2k@gmail.com',
url='https://github.com/joke2k/faker',
license='MIT License',
- packages=find_packages(),
+ packages=find_packages(exclude=("docs",)),
platforms=["any"],
test_suite='faker.tests',
zip_safe=zip_safe,
|
aio-libs__aiohttp-1854 | Sub app middlewares are called before main app,
## Long story short
According to http://aiohttp.readthedocs.io/en/stable/web.html#nested-applications,
`[I]f URL is '/admin/something' middlewares from [main application] are applied first and [sub application] middlewares are the next in the call chain.`
It turns out it's actually the other way.
## Steps to reproduce
Run this code saved as foo.py:
```python
#!/usr/bin/python3 -tt
import aiohttp
import aiohttp.web
async def middleware1(app, next_handler):
async def handler(request):
print("middleware1")
return await next_handler(request)
return handler
async def middleware2(app, next_handler):
async def handler(request):
print("middleware2")
return await next_handler(request)
return handler
async def middleware3(app, next_handler):
async def handler(request):
print("middleware3")
return await next_handler(request)
return handler
app = aiohttp.web.Application(
middlewares=[middleware1])
subapp1 = aiohttp.web.Application(middlewares=[middleware2])
app.add_subapp("/foo", subapp1)
subapp2 = aiohttp.web.Application(middlewares=[middleware3])
subapp1.add_subapp("/foo/bar", subapp2)
aiohttp.web.run_app(app, host='127.0.0.1', port=4096)
```
And the run `wget http://127.0.0.1:4096/foo/bar`.
### Current Result:
```
$ python3 foo.py
======== Running on http://127.0.0.1:4096 ========
(Press CTRL+C to quit)
middleware3
middleware2
middleware1
```
### Expected output:
```
$ python3 foo.py
======== Running on http://127.0.0.1:4096 ========
(Press CTRL+C to quit)
middleware1
middleware2
middleware3
```
## Your environment
Ubuntu Xenial (python 3.5.2) with aiohttp 2.0.7
| [
{
"content": "import asyncio\nimport os\nimport socket\nimport stat\nimport sys\nimport warnings\nfrom argparse import ArgumentParser\nfrom collections import Iterable, MutableMapping\nfrom importlib import import_module\n\nfrom yarl import URL\n\nfrom . import (hdrs, web_exceptions, web_fileresponse, web_middl... | [
{
"content": "import asyncio\nimport os\nimport socket\nimport stat\nimport sys\nimport warnings\nfrom argparse import ArgumentParser\nfrom collections import Iterable, MutableMapping\nfrom importlib import import_module\n\nfrom yarl import URL\n\nfrom . import (hdrs, web_exceptions, web_fileresponse, web_middl... | diff --git a/CHANGES.rst b/CHANGES.rst
index 7283d2b4cd8..432137c526c 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -31,6 +31,8 @@ Changes
- Do not unquote `+` in match_info values #1816
+- Fix sub-application middlewares resolution order #1853
+
2.0.7 (2017-04-12)
------------------
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index c6bfe84e2d1..16a0f6ea48c 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -1,4 +1,4 @@
-
+Contributors
------------
A. Jesse Jiryu Davis
Adam Mills
@@ -42,7 +42,7 @@ Chris AtLee
Chris Laws
Chris Moore
Christopher Schmitt
-Contributors
+Damien Nadé
Daniel García
Daniel Nelson
Danny Song
@@ -174,4 +174,4 @@ Yuriy Shatrov
Yury Selivanov
Yusuke Tsutsumi
Марк Коренберг
-Семён Марьясин
\ No newline at end of file
+Семён Марьясин
diff --git a/aiohttp/web.py b/aiohttp/web.py
index 54b7e2fd8f0..1ce388b06b1 100644
--- a/aiohttp/web.py
+++ b/aiohttp/web.py
@@ -288,7 +288,7 @@ def _handle(self, request):
if resp is None:
handler = match_info.handler
- for app in match_info.apps:
+ for app in match_info.apps[::-1]:
for factory in app._middlewares:
handler = yield from factory(app, handler)
|
pymodbus-dev__pymodbus-1604 | pymodbus.server does not listen on modbus port
<!--
Before opening a new issue, make sure you do the following:
- Check that your issue isn't already filed: https://github.com/pymodbus-dev/pymodbus/issues
- Check the discussions forum https://github.com/pymodbus-dev/pymodbus/discussions
- Prepare a short, runnable example that reproduce the issue with the latest development version of Pymodbus
-->
### Versions
- Python: 3.11.3
- OS: Fedora 37
- Pymodbus: 3.3.1
### Pymodbus Specific
- Server: tcp
### Description
- start pymodbus server:
```
pymodbus.server --verbose run -u 1
__________ .______. _________
\______ \___.__. _____ ____ __| _/\_ |__ __ __ ______ / _____/ ______________ __ ___________
| ___< | |/ \ / _ \ / __ | | __ \| | \/ ___/ \_____ \_/ __ \_ __ \ \/ // __ \_ __ \\
| | \___ | Y Y ( <_> ) /_/ | | \_\ \ | /\___ \ / \ ___/| | \/\ /\ ___/| | \/
|____| / ____|__|_| /\____/\____ | |___ /____//____ > /_______ /\___ >__| \_/ \___ >__|
\/ \/ \/ \/ \/ \/ \/ \/
SERVER >
```
- try to connect to port 5020 or check which process is listening on port 5020
- current result
- server does not listen on port 5020
| [
{
"content": "\"\"\"Repl server main.\"\"\"\nimport asyncio\nimport json\nimport logging\nimport sys\nfrom enum import Enum\nfrom pathlib import Path\nfrom typing import List\n\nimport typer\n\nfrom pymodbus import pymodbus_apply_logging_config\nfrom pymodbus.framer.socket_framer import ModbusSocketFramer\nfrom... | [
{
"content": "\"\"\"Repl server main.\"\"\"\nimport asyncio\nimport json\nimport logging\nimport sys\nfrom enum import Enum\nfrom pathlib import Path\nfrom typing import List\n\nimport typer\n\nfrom pymodbus import pymodbus_apply_logging_config\nfrom pymodbus.framer.socket_framer import ModbusSocketFramer\nfrom... | diff --git a/pymodbus/repl/server/main.py b/pymodbus/repl/server/main.py
index 1c72e9b0a..bb01e64d7 100644
--- a/pymodbus/repl/server/main.py
+++ b/pymodbus/repl/server/main.py
@@ -198,10 +198,10 @@ def run(
**web_app_config,
**modbus_config,
)
+ loop.run_until_complete(app.run_async(repl))
if repl:
loop.run_until_complete(run_repl(app))
else:
- loop.run_until_complete(app.run_async(repl))
loop.run_forever()
|
quantumlib__Cirq-5072 | [cirqflow] `KeyValueExecutableSpec` should provide a `to_dict` method / override `__getitem__`
**Is your feature request related to a use case or problem? Please describe.**
`cg.KeyValueExecutableSpec` provides a nice `from_dict()` method to convert a dict into a `Tuple[Tuple[str, Any], ...]` which is hashable. This is useful when constructing the executable spec. However, using the executable spec during analysis of the results forces one to use the stored tuples, which is cumbersome.
**Describe the solution you'd like**
The class should provide a similar `to_dict` method which can convert the stored `key_value_pairs` to a dictionary and return -- which are much easier to work with. Though the method would be a simple `return dict(self.key_value_pairs)`, there might be some value in explicitly having it on the class. We can also consider providing a custom `__getitem__` method.
**What is the urgency from your perspective for this issue? Is it blocking important work?**
P1 - I need this no later than the next release (end of quarter)
cc @mpharrigan
| [
{
"content": "# Copyright 2021 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright 2021 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/cirq-google/cirq_google/workflow/quantum_executable.py b/cirq-google/cirq_google/workflow/quantum_executable.py
index a84fbf13b47..6287f2ea291 100644
--- a/cirq-google/cirq_google/workflow/quantum_executable.py
+++ b/cirq-google/cirq_google/workflow/quantum_executable.py
@@ -53,6 +53,9 @@ class KeyValueExecutableSpec(ExecutableSpec):
executable_family: str
key_value_pairs: Tuple[Tuple[str, Any], ...] = ()
+ def to_dict(self) -> Dict[str, Any]:
+ return dict(self.key_value_pairs)
+
@classmethod
def _json_namespace_(cls) -> str:
return 'cirq.google'
diff --git a/cirq-google/cirq_google/workflow/quantum_executable_test.py b/cirq-google/cirq_google/workflow/quantum_executable_test.py
index 96f17d66f72..ecfcbff8c99 100644
--- a/cirq-google/cirq_google/workflow/quantum_executable_test.py
+++ b/cirq-google/cirq_google/workflow/quantum_executable_test.py
@@ -63,6 +63,18 @@ def test_kv_executable_spec():
hash(KeyValueExecutableSpec(executable_family='', key_value_pairs=[('name', 'test')]))
+def test_dict_round_trip():
+ input_dict = dict(name='test', idx=5)
+
+ kv = KeyValueExecutableSpec.from_dict(
+ input_dict, executable_family='cirq_google.algo_benchmarks.example'
+ )
+
+ actual_dict = kv.to_dict()
+
+ assert input_dict == actual_dict
+
+
def test_kv_repr():
kv = _get_example_spec()
cirq.testing.assert_equivalent_repr(kv, global_vals={'cirq_google': cirq_google})
|
secdev__scapy-924 | scapy import fail: NameError: name 'get_working_if' is not defined
Hello,
On an Ubuntu 16.04.3 LTS, when launching `scapy` CLI or importing `scapy.route` without any interface in use, I got the following error:
```Python
Traceback (most recent call last):
File "/usr/local/bin/scapy", line 25, in <module>
interact()
File "tools/scapy/scapy/main.py", line 421, in interact
init_session(session_name, mydict)
File "tools/scapy/scapy/main.py", line 293, in init_session
scapy_builtins = {k: v for k, v in six.iteritems(importlib.import_module(".all", "scapy").__dict__) if _validate_local(k)}
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "tools/scapy/scapy/all.py", line 25, in <module>
from scapy.route import *
File "tools/scapy/scapy/route.py", line 195, in <module>
conf.iface = get_working_if()
NameError: name 'get_working_if' is not defined
```
A bisect leads to the recent commit fd50b349263256e0aaa69780937ae02d4f4ee46c, more likely to [this code](https://github.com/secdev/scapy/commit/fd50b349263256e0aaa69780937ae02d4f4ee46c#diff-3fc486d3e1085d11c80c20bab07375f2R194)
I'm not sure to correctly understand for this code snippet and how it works on the different OS. This is why I prefer opening an issue :smiley:
| [
{
"content": "## This file is part of Scapy\n## See http://www.secdev.org/projects/scapy for more informations\n## Copyright (C) Philippe Biondi <phil@secdev.org>\n## This program is published under a GPLv2 license\n\n\"\"\"\nRouting and handling of network interfaces.\n\"\"\"\n\nfrom __future__ import absolute... | [
{
"content": "## This file is part of Scapy\n## See http://www.secdev.org/projects/scapy for more informations\n## Copyright (C) Philippe Biondi <phil@secdev.org>\n## This program is published under a GPLv2 license\n\n\"\"\"\nRouting and handling of network interfaces.\n\"\"\"\n\nfrom __future__ import absolute... | diff --git a/scapy/route.py b/scapy/route.py
index 580fe01216a..986b00d4d18 100644
--- a/scapy/route.py
+++ b/scapy/route.py
@@ -11,7 +11,7 @@
from scapy.utils import atol, ltoa, itom, pretty_routes
from scapy.config import conf
from scapy.error import Scapy_Exception, warning
-from scapy.arch import WINDOWS
+from scapy.arch import WINDOWS, get_working_if
import scapy.consts
import scapy.modules.six as six
|
dbt-labs__dbt-core-8922 | [CT-3210] [Bug] Error using `dbt list --select` when there is a cross-project model that is `version=0` in the parent project
### Is this a new bug in dbt-core?
- [X] I believe this is a new bug in dbt-core
- [X] I have searched the existing issues, and I could not find an existing issue for this bug
### Current Behavior
When you attempt to reference a model version 0, you get a stack trace error.
### Expected Behavior
We should allow you to set model version to be 0.
### Steps To Reproduce
1. On parent/hub project, add a versioned model with `v: 0`
2. On the child/spoke project, attempt to reference that versioned model in a model:
`select * from {{ ref('example_hub', 'my_second_dbt_model', v=0) }}`
3. run `dbt list --select anything`
Outstanding question - is this only affecting cross-project refs? Or all refs to a model with `v: 0`?
### Relevant log output
_No response_
### Environment
```markdown
- OS:
- Python:
- dbt:
```
### Which database adapter are you using with dbt?
_No response_
### Additional Context
_No response_
| [
{
"content": "from dataclasses import dataclass, field\nfrom datetime import datetime\nfrom typing import Optional, List\n\nfrom dbt.contracts.graph.unparsed import NodeVersion\nfrom dbt.node_types import NodeType, AccessType\n\n\n@dataclass\nclass ModelNodeArgs:\n name: str\n package_name: str\n ident... | [
{
"content": "from dataclasses import dataclass, field\nfrom datetime import datetime\nfrom typing import Optional, List\n\nfrom dbt.contracts.graph.unparsed import NodeVersion\nfrom dbt.node_types import NodeType, AccessType\n\n\n@dataclass\nclass ModelNodeArgs:\n name: str\n package_name: str\n ident... | diff --git a/.changes/unreleased/Fixes-20231026-002536.yaml b/.changes/unreleased/Fixes-20231026-002536.yaml
new file mode 100644
index 00000000000..f14c9ec0e0b
--- /dev/null
+++ b/.changes/unreleased/Fixes-20231026-002536.yaml
@@ -0,0 +1,6 @@
+kind: Fixes
+body: Add version to fqn when version==0
+time: 2023-10-26T00:25:36.259356-05:00
+custom:
+ Author: aranke
+ Issue: "8836"
diff --git a/core/dbt/contracts/graph/node_args.py b/core/dbt/contracts/graph/node_args.py
index d1f4770b184..18b286b2ecc 100644
--- a/core/dbt/contracts/graph/node_args.py
+++ b/core/dbt/contracts/graph/node_args.py
@@ -33,7 +33,8 @@ def unique_id(self) -> str:
@property
def fqn(self) -> List[str]:
fqn = [self.package_name, self.name]
- if self.version:
+ # Test for None explicitly because version can be 0
+ if self.version is not None:
fqn.append(f"v{self.version}")
return fqn
diff --git a/tests/unit/test_contracts_graph_node_args.py b/tests/unit/test_contracts_graph_node_args.py
index f3f2d323d9a..958dfa11d72 100644
--- a/tests/unit/test_contracts_graph_node_args.py
+++ b/tests/unit/test_contracts_graph_node_args.py
@@ -14,7 +14,7 @@ def test_model_node_args_unique_id_with_version(self) -> None:
package_name="package",
identifier="identifier",
schema="schema",
- version="1",
+ version=1,
)
assert model_node_args.unique_id == "model.package.name.v1"
@@ -33,6 +33,16 @@ def test_model_node_args_fqn_with_version(self) -> None:
package_name="package",
identifier="identifier",
schema="schema",
- version="1",
+ version=1,
)
assert model_node_args.fqn == ["package", "name", "v1"]
+
+ def test_model_node_args_fqn_with_version_zero(self) -> None:
+ model_node_args = ModelNodeArgs(
+ name="name",
+ package_name="package",
+ identifier="identifier",
+ schema="schema",
+ version=0,
+ )
+ assert model_node_args.fqn == ["package", "name", "v0"]
|
holoviz__panel-1349 | GridBox ncols not honored when rendering from a callable
#297 ## ALL software version info
```
In [3]: param.__version__
Out[3]: '1.10.0a2'
In [4]: pn.__version__
Out[4]: '0.10.0a2'
```
#### Description of expected behavior and the observed behavior
When a `GridBox` is first rendered dynamically (from a callable) then it first renders with only one column. After updating then the `ncols` parameter is respected.
#### Complete, minimal, self-contained example code that reproduces the issue
```
import random
import param
import panel as pn
pn.extension()
class Test(param.Parameterized):
ncols = param.Integer(default=6)
@param.depends('ncols')
def grid(self):
rcolor = lambda: "#%06x" % random.randint(0, 0xFFFFFF)
return pn.GridBox(*[pn.pane.HTML(background=rcolor(), width=50, height=50) for i in range(24)], ncols=self.ncols)
def panel(self):
return pn.Column(
self.param.ncols,
self.grid,
)
t = Test()
t.panel()
```
#### Screenshots or screencasts of the bug in action

| [
{
"content": "\"\"\"\nDefines Layout classes which may be used to arrange panes and widgets\nin flexible ways to build complex dashboards.\n\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n\nfrom collections import defaultdict, namedtuple\n\nimport param\n\nfrom bokeh.models import Co... | [
{
"content": "\"\"\"\nDefines Layout classes which may be used to arrange panes and widgets\nin flexible ways to build complex dashboards.\n\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n\nfrom collections import defaultdict, namedtuple\n\nimport param\n\nfrom bokeh.models import Co... | diff --git a/panel/layout/base.py b/panel/layout/base.py
index 6d79b53b96..0558896638 100644
--- a/panel/layout/base.py
+++ b/panel/layout/base.py
@@ -247,7 +247,7 @@ def clone(self, *objects, **params):
% type(self).__name__)
p = dict(self.param.get_param_values(), **params)
del p['objects']
- return type(self)(*objects, **params)
+ return type(self)(*objects, **p)
def append(self, obj):
"""
diff --git a/panel/tests/layout/test_base.py b/panel/tests/layout/test_base.py
index 9a104928ed..7c74365603 100644
--- a/panel/tests/layout/test_base.py
+++ b/panel/tests/layout/test_base.py
@@ -402,6 +402,46 @@ def test_layout_clone_kwargs(panel):
assert clone.sizing_mode == 'stretch_height'
+@pytest.mark.parametrize('panel', [Column, Row])
+def test_layout_clone_no_args_no_kwargs(panel):
+ div1 = Div()
+ div2 = Div()
+ layout = panel(div1, div2, width=400, sizing_mode='stretch_height')
+ clone = layout.clone()
+
+ assert layout.objects[0].object is clone.objects[0].object
+ assert layout.objects[1].object is clone.objects[1].object
+
+ assert clone.width == 400
+ assert clone.sizing_mode == 'stretch_height'
+
+
+@pytest.mark.parametrize('panel', [Column, Row])
+def test_layout_clone_objects_in_kwargs(panel):
+ div1 = Div()
+ div2 = Div()
+ layout = panel(div1, div2)
+ clone = layout.clone(
+ objects=(div2, div1),
+ width=400, sizing_mode='stretch_height'
+ )
+
+ assert layout.objects[0].object is clone.objects[1].object
+ assert layout.objects[1].object is clone.objects[0].object
+
+ assert clone.width == 400
+ assert clone.sizing_mode == 'stretch_height'
+
+
+@pytest.mark.parametrize('panel', [Column, Row])
+def test_layout_clone_objects_in_args_and_kwargs(panel):
+ div1 = Div()
+ div2 = Div()
+ layout = panel(div1, div2)
+ with pytest.raises(ValueError):
+ layout.clone(div1, objects=div1)
+
+
def test_widgetbox(document, comm):
widget_box = WidgetBox("WidgetBox")
|
hydroshare__hydroshare-4798 | Change Mezzanine Form to Disallow Username Changes
**Describe the feature you'd like and what it will do**
The internal mezzanine form for the admin account should be altered to no longer allow username changes if possible, since doing so breaks the resource.
**Why is this feature important?**
This will be policy moving forward, that usernames cannot be changed.
I will work with Scott to see if this change is feasible.
| [
{
"content": "from django import forms\nfrom django.contrib.auth.admin import UserAdmin\nfrom django.contrib.auth.forms import UserCreationForm\nfrom django.contrib.gis import admin\nfrom django.contrib.contenttypes.admin import GenericTabularInline\nfrom django.utils.translation import ugettext_lazy as _\n\nfr... | [
{
"content": "from django import forms\nfrom django.contrib.auth.admin import UserAdmin\nfrom django.contrib.auth.forms import UserCreationForm\nfrom django.contrib.gis import admin\nfrom django.contrib.contenttypes.admin import GenericTabularInline\nfrom django.utils.translation import ugettext_lazy as _\n\nfr... | diff --git a/hs_core/admin.py b/hs_core/admin.py
index c46ed5c40a..ad38afaaae 100755
--- a/hs_core/admin.py
+++ b/hs_core/admin.py
@@ -14,6 +14,7 @@ def __init__(self, *args, **kwargs):
self.fields['email'] = forms.EmailField(label=_("E-mail"), max_length=75)
UserAdmin.add_form = UserCreationFormExtended
+UserAdmin.readonly_fields = ('username',)
UserAdmin.add_fieldsets = (
(None, {
'classes': ('wide',),
|
Chia-Network__chia-blockchain-15508 | [Bug] Module `chia.wallet.puzzles.clawback` not found
### What happened?
When installing `1.8.2-rc3` or `master` via `pip`, the module `chia.wallet.puzzles.clawback` is missing. The files are not included because the packages are not listed in `setup.py`. This is also true of the `prefarm` sibling package.
### Version
1.8.2-rc3
### What platform are you using?
Linux
### What ui mode are you using?
CLI
### Relevant log output
```shell
$ pip install git+https://github.com/chia-network/chia-blockchain
Collecting git+https://github.com/chia-network/chia-blockchain
Cloning https://github.com/chia-network/chia-blockchain to /tmp/pip-req-build-m26feywu
Running command git clone --filter=blob:none --quiet https://github.com/chia-network/chia-blockchain /tmp/pip-req-build-m26feywu
Resolved https://github.com/chia-network/chia-blockchain to commit 49140b2b3c0c128f2464c0b4e50c496e7029939d
Running command git submodule update --init --recursive -q
[snip]
$ python3
>>> import chia.wallet.wallet
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.11/site-packages/chia/wallet/wallet.py", line 23, in <module>
from chia.wallet.coin_selection import select_coins
File "/usr/local/lib/python3.11/site-packages/chia/wallet/coin_selection.py", line 10, in <module>
from chia.wallet.wallet_coin_record import WalletCoinRecord
File "/usr/local/lib/python3.11/site-packages/chia/wallet/wallet_coin_record.py", line 11, in <module>
from chia.wallet.puzzles.clawback.metadata import ClawbackMetadata, ClawbackVersion
ModuleNotFoundError: No module named 'chia.wallet.puzzles.clawback'
```
| [
{
"content": "from __future__ import annotations\n\nimport os\nimport sys\n\nfrom setuptools import setup\n\ndependencies = [\n \"aiofiles==23.1.0\", # Async IO for files\n \"anyio==3.6.2\",\n \"boto3==1.26.148\", # AWS S3 for DL s3 plugin\n \"blspy==1.0.16\", # Signature library\n \"chiavdf==... | [
{
"content": "from __future__ import annotations\n\nimport os\nimport sys\n\nfrom setuptools import setup\n\ndependencies = [\n \"aiofiles==23.1.0\", # Async IO for files\n \"anyio==3.6.2\",\n \"boto3==1.26.148\", # AWS S3 for DL s3 plugin\n \"blspy==1.0.16\", # Signature library\n \"chiavdf==... | diff --git a/setup.py b/setup.py
index f46b99d318ad..98339d93856f 100644
--- a/setup.py
+++ b/setup.py
@@ -118,6 +118,8 @@
"chia.wallet",
"chia.wallet.db_wallet",
"chia.wallet.puzzles",
+ "chia.wallet.puzzles.clawback",
+ "chia.wallet.puzzles.prefarm",
"chia.wallet.cat_wallet",
"chia.wallet.did_wallet",
"chia.wallet.nft_wallet",
|
pulp__pulpcore-2245 | PulpImporter assumes tempfiles can always go to /tmp
This issue is a copy of https://pulp.plan.io/issues/8610 , to allow us to backport the fix from core/3.17 into 14/15/16 correctly.
**Version**
core/3.14+
**Describe the bug**
importer.pulp_import uses tempfile.TemporaryDirectory() in places like this:
https://github.com/pulp/pulpcore/blob/master/pulpcore/app/tasks/importer.py#L118
If your /tmp is small, and your export is Large, this can cause Bad Things to happen.
We should perhas set dir= to the workers work-directory?
| [
{
"content": "import hashlib\nimport json\nimport os\nimport re\nimport subprocess\nimport tempfile\nimport tarfile\nfrom gettext import gettext as _\nfrom logging import getLogger\n\nfrom django.core.files.storage import default_storage\nfrom django.db.models import F\n\nfrom pkg_resources import DistributionN... | [
{
"content": "import hashlib\nimport json\nimport os\nimport re\nimport subprocess\nimport tempfile\nimport tarfile\nfrom gettext import gettext as _\nfrom logging import getLogger\n\nfrom django.core.files.storage import default_storage\nfrom django.db.models import F\n\nfrom pkg_resources import DistributionN... | diff --git a/CHANGES/2247.bugfix b/CHANGES/2247.bugfix
new file mode 100644
index 0000000000..851f66d2af
--- /dev/null
+++ b/CHANGES/2247.bugfix
@@ -0,0 +1,4 @@
+PulpImporter now unpacks into the task-worker's working directory rather than /tmp. Unpacking
+large files into /tmp could cause the operation to fail, or even cause stability issues for
+Pulp instance, due to running /tmp out of space.
+
diff --git a/pulpcore/app/tasks/importer.py b/pulpcore/app/tasks/importer.py
index 173e8b4e41..1974e7f73a 100644
--- a/pulpcore/app/tasks/importer.py
+++ b/pulpcore/app/tasks/importer.py
@@ -373,7 +373,7 @@ def validate_and_assemble(toc_filename):
)
CreatedResource.objects.create(content_object=the_import)
- with tempfile.TemporaryDirectory() as temp_dir:
+ with tempfile.TemporaryDirectory(dir=".") as temp_dir:
with tarfile.open(path, "r:gz") as tar:
tar.extractall(path=temp_dir)
|
pennersr__django-allauth-2978 | 0.46.0 Apple provider test broken
Hi! When trying to package 0.46.0 for Arch Linux I ran into failing tests which appear to be pyjwt related:
```
Creating test database for alias 'default'...
System check identified some issues:
WARNINGS:
openid.OpenIDNonce: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
HINT: Configure the DEFAULT_AUTO_FIELD setting or the AppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
openid.OpenIDStore: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
HINT: Configure the DEFAULT_AUTO_FIELD setting or the AppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
System check identified 2 issues (0 silenced).
....................................................................................................E.E..................................................................................................................................../build/python-django-allauth/src/python-django-allauth-0.46.0/allauth/socialaccount/
tests.py:87: UserWarning: Cannot test provider evernote, no oauth mock
warnings.warn("Cannot test provider %s, no oauth mock" % self.provider.id)
..................................................................................................................................................................................xx.........................................................................................../build/python-django-allauth/src/python-django-a
llauth-0.46.0/allauth/socialaccount/tests.py:87: UserWarning: Cannot test provider trello, no oauth mock
warnings.warn("Cannot test provider %s, no oauth mock" % self.provider.id)
./build/python-django-allauth/src/python-django-allauth-0.46.0/allauth/socialaccount/tests.py:55: UserWarning: Cannot test provider trello, no oauth mock
warnings.warn("Cannot test provider %s, no oauth mock" % self.provider.id)
......................................................................................
======================================================================
ERROR: test_apple_finish (allauth.socialaccount.providers.apple.tests.AppleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build/python-django-allauth/src/python-django-allauth-0.46.0/allauth/socialaccount/providers/apple/tests.py", line 231, in test_apple_finish
resp = self.login(self.get_mocked_response())
File "/build/python-django-allauth/src/python-django-allauth-0.46.0/allauth/socialaccount/providers/apple/tests.py", line 210, in login
resp = self.client.get(resp.url)
File "/usr/lib/python3.9/site-packages/django/test/client.py", line 742, in get
response = super().get(path, data=data, secure=secure, **extra)
File "/usr/lib/python3.9/site-packages/django/test/client.py", line 396, in get
return self.generic('GET', path, secure=secure, **{
File "/usr/lib/python3.9/site-packages/django/test/client.py", line 473, in generic
return self.request(**r)
File "/usr/lib/python3.9/site-packages/django/test/client.py", line 719, in request
self.check_exception(response)
File "/usr/lib/python3.9/site-packages/django/test/client.py", line 580, in check_exception
raise exc_value
File "/usr/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/build/python-django-allauth/src/python-django-allauth-0.46.0/allauth/socialaccount/providers/oauth2/views.py", line 77, in view
return self.dispatch(request, *args, **kwargs)
File "/build/python-django-allauth/src/python-django-allauth-0.46.0/allauth/socialaccount/providers/oauth2/views.py", line 134, in dispatch
token = self.adapter.parse_token(access_token)
File "/build/python-django-allauth/src/python-django-allauth-0.46.0/allauth/socialaccount/providers/apple/views.py", line 92, in parse_token
identity_data = self.get_verified_identity_data(data["id_token"])
File "/build/python-django-allauth/src/python-django-allauth-0.46.0/allauth/socialaccount/providers/apple/views.py", line 67, in get_verified_identity_data
identity_data = jwt.decode(
TypeError: decode() got an unexpected keyword argument 'verify'
======================================================================
ERROR: test_login (allauth.socialaccount.providers.apple.tests.AppleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/django/test/utils.py", line 387, in inner
return func(*args, **kwargs)
File "/build/python-django-allauth/src/python-django-allauth-0.46.0/allauth/socialaccount/tests.py", line 167, in test_login
resp = self.login(
File "/build/python-django-allauth/src/python-django-allauth-0.46.0/allauth/socialaccount/providers/apple/tests.py", line 210, in login
resp = self.client.get(resp.url)
File "/usr/lib/python3.9/site-packages/django/test/client.py", line 742, in get
response = super().get(path, data=data, secure=secure, **extra)
File "/usr/lib/python3.9/site-packages/django/test/client.py", line 396, in get
return self.generic('GET', path, secure=secure, **{
File "/usr/lib/python3.9/site-packages/django/test/client.py", line 473, in generic
return self.request(**r)
File "/usr/lib/python3.9/site-packages/django/test/client.py", line 719, in request
self.check_exception(response)
File "/usr/lib/python3.9/site-packages/django/test/client.py", line 580, in check_exception
raise exc_value
File "/usr/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/build/python-django-allauth/src/python-django-allauth-0.46.0/allauth/socialaccount/providers/oauth2/views.py", line 77, in view
return self.dispatch(request, *args, **kwargs)
File "/build/python-django-allauth/src/python-django-allauth-0.46.0/allauth/socialaccount/providers/oauth2/views.py", line 134, in dispatch
token = self.adapter.parse_token(access_token)
File "/build/python-django-allauth/src/python-django-allauth-0.46.0/allauth/socialaccount/providers/apple/views.py", line 92, in parse_token
identity_data = self.get_verified_identity_data(data["id_token"])
File "/build/python-django-allauth/src/python-django-allauth-0.46.0/allauth/socialaccount/providers/apple/views.py", line 67, in get_verified_identity_data
identity_data = jwt.decode(
TypeError: decode() got an unexpected keyword argument 'verify'
----------------------------------------------------------------------
Ran 593 tests in 8.129s
FAILED (errors=2, expected failures=2)
Destroying test database for alias 'default'...
test_account_refresh_token_saved_next_login (allauth.socialaccount.providers.edx.tests.EdxTests)
test_account_refresh_token_saved_next_login (allauth.socialaccount.providers.edx.tests.EdxTests)
test_account_tokens (allauth.socialaccount.providers.edx.tests.EdxTests)
test_login (allauth.socialaccount.providers.edx.tests.EdxTests)
```
On Arch Linux we currently have:
* pyjwt 2.2.0
* requests 2.26.0
* requests-oauthlib 1.3.0
* openid 3.2.0
* django 3.2.9
| [
{
"content": "import json\nimport requests\nfrom datetime import timedelta\n\nfrom django.http import HttpResponseNotAllowed, HttpResponseRedirect\nfrom django.urls import reverse\nfrom django.utils import timezone\nfrom django.utils.http import urlencode\nfrom django.views.decorators.csrf import csrf_exempt\n\... | [
{
"content": "import json\nimport requests\nfrom datetime import timedelta\n\nfrom django.http import HttpResponseNotAllowed, HttpResponseRedirect\nfrom django.urls import reverse\nfrom django.utils import timezone\nfrom django.utils.http import urlencode\nfrom django.views.decorators.csrf import csrf_exempt\n\... | diff --git a/allauth/socialaccount/providers/apple/views.py b/allauth/socialaccount/providers/apple/views.py
index 873ba110fc..82a62348ee 100644
--- a/allauth/socialaccount/providers/apple/views.py
+++ b/allauth/socialaccount/providers/apple/views.py
@@ -68,7 +68,6 @@ def get_verified_identity_data(self, id_token):
id_token,
public_key,
algorithms=["RS256"],
- verify=True,
audience=allowed_auds,
issuer="https://appleid.apple.com",
)
|
Textualize__rich-2225 | Missing whitespace in traceback
In tracebacks sometimes there is a missing blank line between traceback frames. Not sure what causes it.
| [
{
"content": "from __future__ import absolute_import\n\nimport os\nimport platform\nimport sys\nfrom dataclasses import dataclass, field\nfrom traceback import walk_tb\nfrom types import ModuleType, TracebackType\nfrom typing import Any, Callable, Dict, Iterable, List, Optional, Sequence, Type, Union\n\nfrom py... | [
{
"content": "from __future__ import absolute_import\n\nimport os\nimport platform\nimport sys\nfrom dataclasses import dataclass, field\nfrom traceback import walk_tb\nfrom types import ModuleType, TracebackType\nfrom typing import Any, Callable, Dict, Iterable, List, Optional, Sequence, Type, Union\n\nfrom py... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 638ede8d3..5001a075c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed recursion error in Jupyter progress bars https://github.com/Textualize/rich/issues/2047
- Complex numbers are now identified by the highlighter https://github.com/Textualize/rich/issues/2214
- Fix crash on IDLE and forced is_terminal detection to False because IDLE can't do escape codes https://github.com/Textualize/rich/issues/2222
+- Fixed missing blank line in traceback rendering https://github.com/Textualize/rich/issues/2206
### Changed
diff --git a/rich/traceback.py b/rich/traceback.py
index 8f092c661..5feefb93b 100644
--- a/rich/traceback.py
+++ b/rich/traceback.py
@@ -584,7 +584,7 @@ def render_locals(frame: Frame) -> Iterable[ConsoleRenderable]:
)
excluded = False
- first = frame_index == 1
+ first = frame_index == 0
frame_filename = frame.filename
suppressed = any(frame_filename.startswith(path) for path in self.suppress)
diff --git a/tests/test_traceback.py b/tests/test_traceback.py
index e6b4de3f1..c4994c87b 100644
--- a/tests/test_traceback.py
+++ b/tests/test_traceback.py
@@ -1,4 +1,5 @@
import io
+import re
import sys
import pytest
@@ -21,10 +22,17 @@
def test_handler():
console = Console(file=io.StringIO(), width=100, color_system=None)
expected_old_handler = sys.excepthook
+
+ def level1():
+ level2()
+
+ def level2():
+ return 1 / 0
+
try:
old_handler = install(console=console)
try:
- 1 / 0
+ level1()
except Exception:
exc_type, exc_value, traceback = sys.exc_info()
sys.excepthook(exc_type, exc_value, traceback)
@@ -32,6 +40,30 @@ def test_handler():
print(repr(rendered_exception))
assert "Traceback" in rendered_exception
assert "ZeroDivisionError" in rendered_exception
+
+ frame_blank_line_possible_preambles = (
+ # Start of the stack rendering:
+ "╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮",
+ # Each subsequent frame (starting with the file name) should then be preceded with a blank line:
+ "│" + (" " * 98) + "│",
+ )
+ for frame_start in re.finditer(
+ "^│ .+rich/tests/test_traceback\.py:",
+ rendered_exception,
+ flags=re.MULTILINE,
+ ):
+ frame_start_index = frame_start.start()
+ for preamble in frame_blank_line_possible_preambles:
+ preamble_start, preamble_end = (
+ frame_start_index - len(preamble) - 1,
+ frame_start_index - 1,
+ )
+ if rendered_exception[preamble_start:preamble_end] == preamble:
+ break
+ else:
+ pytest.fail(
+ f"Frame {frame_start[0]} doesn't have the expected preamble"
+ )
finally:
sys.excepthook = old_handler
assert old_handler == expected_old_handler
|
netbox-community__netbox-1517 | No field to edit Cluster comments
### Issue type
[ ] Feature request <!-- Requesting the implementation of a new feature -->
[X] Bug report <!-- Reporting unexpected or erroneous behavior -->
[ ] Documentation <!-- Proposing a modification to the documentation -->
### Environment
* Python version: 3.5.2
* NetBox version: origin/dev-2.2 e93129f1
### Description
When you view Clusters you can see there is a 'comments' field. However, when you create a Cluster there is no field to enter the comments. Ditto when you click Edit on an existing cluster (e.g. `/virtualization/clusters/1/edit/`).
| [
{
"content": "from __future__ import unicode_literals\n\nfrom mptt.forms import TreeNodeChoiceField\n\nfrom django import forms\nfrom django.db.models import Count\n\nfrom dcim.constants import IFACE_FF_VIRTUAL, VIFACE_FF_CHOICES\nfrom dcim.formfields import MACAddressFormField\nfrom dcim.models import Device, ... | [
{
"content": "from __future__ import unicode_literals\n\nfrom mptt.forms import TreeNodeChoiceField\n\nfrom django import forms\nfrom django.db.models import Count\n\nfrom dcim.constants import VIFACE_FF_CHOICES\nfrom dcim.formfields import MACAddressFormField\nfrom dcim.models import Device, Interface, Platfor... | diff --git a/netbox/virtualization/forms.py b/netbox/virtualization/forms.py
index 73d6e7445a9..0d247c303ed 100644
--- a/netbox/virtualization/forms.py
+++ b/netbox/virtualization/forms.py
@@ -49,10 +49,11 @@ class Meta:
#
class ClusterForm(BootstrapMixin, CustomFieldForm):
+ comments = CommentField(widget=SmallTextarea)
class Meta:
model = Cluster
- fields = ['name', 'type', 'group']
+ fields = ['name', 'type', 'group', 'comments']
class ClusterCSVForm(forms.ModelForm):
|
qtile__qtile-4228 | Configured keyboards limited to 3
### The issue:
In my config I've defined 4 keyboard layouts, however in the widget on the bar, it never reaches the fourth layout when left-clicking. When the third layout is removed (moving the fourth into the third position) it is suddenly accessible so it's not a problem with the layout itself. I don't notice any logs that would apply to this.
```
widget.KeyboardLayout(
font = defaults['font'],
fontsize = defaults['fontsize'],
configured_keyboards = ['us', 'es', 'semimak-jq', 'mtgap'],
display_map = { #makes everything lowercase
'us': 'us',
'es': 'es',
'workman': 'wm',
'semimak': 'sm',
'mtgap': 'mt',
}
),
```
From my config, I defined us, es, semimak-jq, and mtgap, but I can never rotate onto mtgap unless I remove semimak-jq. When I manually set the layout with setxkbmap, it is correctly displayed as 'mt' in the widget, I just can't rotate onto it via left-click on the widget.
Qtile Version: 0.22.1, X11
### Required:
- [X] I have searched past issues to see if this bug has already been reported.
| [
{
"content": "# Copyright (c) 2013 Jacob Mourelos\n# Copyright (c) 2014 Shepilov Vladislav\n# Copyright (c) 2014-2015 Sean Vig\n# Copyright (c) 2014 Tycho Andersen\n# Copyright (c) 2019 zordsdavini\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associa... | [
{
"content": "# Copyright (c) 2013 Jacob Mourelos\n# Copyright (c) 2014 Shepilov Vladislav\n# Copyright (c) 2014-2015 Sean Vig\n# Copyright (c) 2014 Tycho Andersen\n# Copyright (c) 2019 zordsdavini\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associa... | diff --git a/libqtile/widget/keyboardlayout.py b/libqtile/widget/keyboardlayout.py
index 102db17dd9..057875b864 100644
--- a/libqtile/widget/keyboardlayout.py
+++ b/libqtile/widget/keyboardlayout.py
@@ -60,7 +60,7 @@ def set_keyboard(self, layout: str, options: str | None) -> None:
class _X11LayoutBackend(_BaseLayoutBackend):
- kb_layout_regex = re.compile(r"layout:\s+(?P<layout>\w+)")
+ kb_layout_regex = re.compile(r"layout:\s+(?P<layout>[\w-]+)")
kb_variant_regex = re.compile(r"variant:\s+(?P<variant>\w+)")
def get_keyboard(self) -> str:
|
mabel-dev__opteryx-1689 | 🪲 VIEWs load error should be in debug mode only
### Thank you for taking the time to report a problem with Opteryx.
_To help us to respond to your request we ask that you try to provide the below detail about the bug._
**Describe the bug** _A clear and specific description of what the bug is. What the error, incorrect or unexpected behaviour was._
**Expected behaviour** _A clear and concise description of what you expected to happen._
**Sample Code/Statement** _If you can, please submit the SQL statement or Python code snippet, or a representative example using the sample datasets._
~~~sql
~~~
**Additional context** _Add any other context about the problem here, for example what you have done to try to diagnose or workaround the problem._
| [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, s... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, s... | diff --git a/opteryx/planner/views/__init__.py b/opteryx/planner/views/__init__.py
index a5187a557..54c77f303 100644
--- a/opteryx/planner/views/__init__.py
+++ b/opteryx/planner/views/__init__.py
@@ -20,7 +20,7 @@ def _load_views():
with open("views.json", "rb") as defs:
return orjson.loads(defs.read())
except Exception as err:
- print(f"[OPTERYX] Unable to open views definition file. {err}")
+ # DEBUG:: log (f"[OPTERYX] Unable to open views definition file. {err}")
return {}
|
AlexsLemonade__refinebio-471 | Expose transformation option to API
### Context
https://github.com/AlexsLemonade/refinebio-frontend/issues/208
### Problem or idea
We want a dropdown to change the transformation option, but the API currently doesn't support changing that value.
### Solution or next step
I think transformation just needs to be added to the DataSetSerializer
### New Issue Checklist
- [x] The title is short and descriptive.
- [x] You have explained the context that led you to write this issue.
- [x] You have reported a problem or idea.
- [x] You have proposed a solution or next step.
| [
{
"content": "from rest_framework import serializers\nfrom rest_framework_hstore.fields import HStoreField\nfrom data_refinery_common.models import ProcessorJob, DownloaderJob, SurveyJob\nfrom data_refinery_common.models import (\n Experiment,\n ExperimentAnnotation,\n Sample,\n SampleAnnotation,\n ... | [
{
"content": "from rest_framework import serializers\nfrom rest_framework_hstore.fields import HStoreField\nfrom data_refinery_common.models import ProcessorJob, DownloaderJob, SurveyJob\nfrom data_refinery_common.models import (\n Experiment,\n ExperimentAnnotation,\n Sample,\n SampleAnnotation,\n ... | diff --git a/api/data_refinery_api/serializers.py b/api/data_refinery_api/serializers.py
index be703bfcc..88e9a34ce 100644
--- a/api/data_refinery_api/serializers.py
+++ b/api/data_refinery_api/serializers.py
@@ -416,6 +416,7 @@ class Meta:
'id',
'data',
'aggregate_by',
+ 'scale_by',
'is_processing',
'is_processed',
'is_available',
|
internetarchive__openlibrary-6157 | Include full url in "Report a problem" emails
### Describe the problem that you'd like solved
Currently the "Report a problem" form sends the user's URL, but doesn't include any parameters. So staff only sees e.g. `/search` instead of `/search?q=harry+potter`. This makes it harder to debug issues.
### Proposal & Constraints
<!-- What is the proposed solution / implementation? Is there a precedent of this approach succeeding elsewhere? -->
<!-- Which suggestions or requirements should be considered for how feature needs to appear or be implemented? -->
### Additional context
Currently, the `Report a Problem` link in the footer includes the path, but not the parameters!
Related code:
- The link in the footer: https://github.com/internetarchive/openlibrary/blob/8a1e17358c107e665bc653b689c3f50fb329f2c2/openlibrary/templates/lib/nav_foot.html#L44
- The spot this parameter is passed to the support form: https://github.com/internetarchive/openlibrary/blob/8a1e17358c107e665bc653b689c3f50fb329f2c2/openlibrary/templates/support.html#L54-L56
- The form's post endpoint: https://github.com/internetarchive/openlibrary/blob/39962157c12465d050e43458444aba9a59661c8d/openlibrary/plugins/openlibrary/support.py#L65
### Stakeholders
@seabelis
| [
{
"content": "from typing import List, Union, Tuple, Any\n\nimport web\nimport json\nimport babel\nimport babel.core\nimport babel.dates\nfrom collections import defaultdict\nimport re\nimport random\nimport xml.etree.ElementTree as etree\nimport datetime\nimport logging\nfrom html.parser import HTMLParser\nfro... | [
{
"content": "from typing import List, Union, Tuple, Any\n\nimport web\nimport json\nimport babel\nimport babel.core\nimport babel.dates\nfrom collections import defaultdict\nimport re\nimport random\nimport xml.etree.ElementTree as etree\nimport datetime\nimport logging\nfrom html.parser import HTMLParser\nfro... | diff --git a/openlibrary/plugins/upstream/utils.py b/openlibrary/plugins/upstream/utils.py
index 881804c6631..9ec1e654dc5 100644
--- a/openlibrary/plugins/upstream/utils.py
+++ b/openlibrary/plugins/upstream/utils.py
@@ -937,6 +937,7 @@ class Request:
path = property(lambda self: web.ctx.path)
home = property(lambda self: web.ctx.home)
domain = property(lambda self: web.ctx.host)
+ fullpath = property(lambda self: web.ctx.fullpath)
@property
def canonical_url(self):
diff --git a/openlibrary/templates/lib/nav_foot.html b/openlibrary/templates/lib/nav_foot.html
index c4b5b268f77..0b8c90296fc 100644
--- a/openlibrary/templates/lib/nav_foot.html
+++ b/openlibrary/templates/lib/nav_foot.html
@@ -41,7 +41,7 @@ <h2>$:_('Develop')</h2>
<h2>$:_('Help')</h2>
<ul>
<li><a href="/help">$_('Help Center')</a></li>
- <li><a href="/contact?path=$request.path" title="$_('Problems')">$_('Report A Problem')</a></li>
+ <li><a href="/contact?$:urlencode(dict(path=request.fullpath))" title="$_('Problems')">$_('Report A Problem')</a></li>
<li><a href="/help/faq/editing" title="$_('Suggest Edits')">$_('Suggesting Edits')</a></li>
</ul>
<aside id="footer-icons">
|
ivy-llc__ivy-13216 | iscomplexobj
Was mentioned here #11223, but it's open for almost a month now 😅
| [
{
"content": "# local\nimport ivy\nfrom ivy.functional.frontends.jax.func_wrapper import (\n to_ivy_arrays_and_back,\n)\nfrom ivy.functional.frontends.jax.numpy import (\n promote_types_of_jax_inputs as promote_jax_arrays,\n)\n\n\n@to_ivy_arrays_and_back\ndef allclose(a, b, rtol=1e-05, atol=1e-08, equal_n... | [
{
"content": "# local\nimport ivy\nfrom ivy.functional.frontends.jax.func_wrapper import (\n to_ivy_arrays_and_back,\n)\nfrom ivy.functional.frontends.jax.numpy import (\n promote_types_of_jax_inputs as promote_jax_arrays,\n)\n\n\n@to_ivy_arrays_and_back\ndef allclose(a, b, rtol=1e-05, atol=1e-08, equal_n... | diff --git a/ivy/functional/frontends/jax/numpy/logic.py b/ivy/functional/frontends/jax/numpy/logic.py
index ff1b7db94a9f7..400f8c5b669fe 100644
--- a/ivy/functional/frontends/jax/numpy/logic.py
+++ b/ivy/functional/frontends/jax/numpy/logic.py
@@ -209,3 +209,14 @@ def isrealobj(x: any):
@to_ivy_arrays_and_back
def iscomplex(x: any):
return ivy.bitwise_invert(ivy.isreal(x))
+
+
+@to_ivy_arrays_and_back
+def iscomplexobj(x):
+ if x.ndim == 0:
+ return ivy.is_complex_dtype(ivy.dtype(x))
+ for ele in x:
+ if ivy.is_complex_dtype(ivy.dtype(ele)):
+ return True
+ else:
+ return False
\ No newline at end of file
diff --git a/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_logic.py b/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_logic.py
index e7d73071a572d..30e4fef02f0bc 100644
--- a/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_logic.py
+++ b/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_logic.py
@@ -938,3 +938,30 @@ def test_jax_numpy_isrealobj(
on_device=on_device,
x=x[0],
)
+
+
+# iscomplexobj
+@handle_frontend_test(
+ fn_tree="jax.numpy.iscomplexobj",
+ dtype_and_x=helpers.dtype_and_values(
+ available_dtypes=helpers.get_dtypes("valid"),
+ ),
+ test_with_out=st.just(False),
+)
+def test_jax_numpy_iscomplexobj(
+ dtype_and_x,
+ frontend,
+ on_device,
+ *,
+ fn_tree,
+ test_flags,
+):
+ input_dtype, x = dtype_and_x
+ helpers.test_frontend_function(
+ input_dtypes=input_dtype,
+ frontend=frontend,
+ test_flags=test_flags,
+ fn_tree=fn_tree,
+ on_device=on_device,
+ x=x[0],
+ )
|
mirumee__ariadne-799 | Support Starlette 0.18.0
Was just released: https://github.com/encode/starlette/releases/tag/0.18.0
and currently the dependency is pinned at `<0.18.0`.
| [
{
"content": "#! /usr/bin/env python\nimport os\nfrom setuptools import setup\n\nCLASSIFIERS = [\n \"Development Status :: 4 - Beta\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\... | [
{
"content": "#! /usr/bin/env python\nimport os\nfrom setuptools import setup\n\nCLASSIFIERS = [\n \"Development Status :: 4 - Beta\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6e031eacd..d7a27d961 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
## 0.15.0 (unreleased)
- Updated `graphql-core` requirement to 3.2.0.
+- Bumped `starlette` support to 0.18.
- Drop Python 3.6 support.
- Added basic support for `OPTIONS` HTTP request.
- Refactor `ariadne.asgi.GraphQL` to make it easier to customize JSON response.
diff --git a/requirements.txt b/requirements.txt
index 7581b1ddd..353cc7b5e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -12,7 +12,7 @@ idna==3.3
# via anyio
sniffio==1.2.0
# via anyio
-starlette==0.17.1
+starlette==0.18.0
# via ariadne (setup.py)
typing-extensions==4.1.1
# via ariadne (setup.py)
diff --git a/setup.py b/setup.py
index a2f3f8492..7c250ae56 100755
--- a/setup.py
+++ b/setup.py
@@ -33,7 +33,7 @@
include_package_data=True,
install_requires=[
"graphql-core>=3.2.0,<3.3",
- "starlette<0.18",
+ "starlette<0.19",
"typing_extensions>=3.6.0",
],
extras_require={"asgi-file-uploads": ["python-multipart>=0.0.5"]},
|
jupyterhub__jupyterhub-2510 | Deleting and recreating a named server results in lost name in GUI
<!--
Welcome to Zero to JupyterHub!
Before filing an issue, please search through the issues to see
if your question has been discussed before. If you
need more information after searching, feel
free to message us on the gitter channel. Many
JupyterHub community members watch the gitter channel
so you will have the benefit of other users' experience
as well as the JupyterHub team.
If you still wish to file an issue, please submit
as much detail about your issue as possible. If
you think it would be helpful, include a
scrubbed version of your `config.yaml` file. We've put
a place below where you can paste this in.
*** WARNING ***
Make sure you remove all sensitive information that's
in your `config.yaml` file, as GitHub is a public space.
Please remove at *least* the following fields:
* any special keys under auth
* proxy.secretToken
* hub.cookieSecret
If you post any sensitive information we reserve the
right to edit your comment in order to remove it.
-->
## Description
I've been working on a POC for my place of work to examine the feasibility of using JupyterHub to serve Jupyter Notebook/Lab servers with custom images containing a Python SDK we're working on.
Recently, I've been working on testing out named servers. In that process, I've discovered that if you delete a named server from the browser GUI, then recreate it in (in any fashion, whether by the REST API or through the GUI), that server will no longer appear listed.
## To reproduce
1. Create a named server:

2. Delete it:

3. Create it again: `curl -X POST -H "Authorization: token a_very_secret_token" "http://my.host.domain/hub/api/users/pmende/servers/serverA"`
Now the user's Hub Control Panel/Home still no longer lists the server (i.e., it is identical to the image after 2, above), but there is definitely a running pod with the server name:
```
$ kubectl get pods -n jhub
NAME READY STATUS RESTARTS AGE
hub-949c864ff-v7dx2 1/1 Running 0 18m
jupyter-pmende-2dserver-41 1/1 Running 0 3m44s
proxy-c88fd6f59-s8k82 1/1 Running 0 18m
```
## Hub creation
`helm upgrade --install jhub jupyterhub/jupyterhub --namespace jhub --version=0.9-8ed2f81 --values config.yaml`
## Contents of `config.yaml`
```
#########################
# Networking Config #
#########################
proxy:
secretToken: "mysupersecrettoken"
service:
type: NodePort
nodePorts:
http: 31212
chp:
resources:
requests:
memory: 0
cpu: 0
ingress:
enabled: true
hosts:
- my.host.domain
rules:
http:
- paths: /hub/api
backend:
serviceName: hub
servicePort: 8081
#########################
# Hardware/Image Config #
#########################
singleuser:
image:
name: jupyter/scipy-notebook
tag: 59b402ce701d
cpu:
guarantee: 0.25
limit: 0.5
memory:
guarantee: "256M"
limit: "320M"
profileList:
- display_name: "Default"
description: "0.25 CPU; 256M Ram"
default: True
- display_name: "BIG"
description: "0.5 Whole CPUs, 512M Ram"
kubespawner_override:
cpu_guarantee: 0.5
cpu_limit: 0.75
mem_guarantee: "512M"
mem_limit: "640M"
#########################
# Hub Config #
#########################
hub:
allowNamedServers: true
extraConfig: |
c.JupyterHub.admin_access = True
c.JupyterHub.api_tokens = {
"a_very_secret_token": "pmende"
}
```
| [
{
"content": "\"\"\"User handlers\"\"\"\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\nimport asyncio\nimport json\nfrom datetime import datetime\nfrom datetime import timedelta\nfrom datetime import timezone\n\nfrom async_generator import aclosing\nfrom ... | [
{
"content": "\"\"\"User handlers\"\"\"\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\nimport asyncio\nimport json\nfrom datetime import datetime\nfrom datetime import timedelta\nfrom datetime import timezone\n\nfrom async_generator import aclosing\nfrom ... | diff --git a/jupyterhub/apihandlers/users.py b/jupyterhub/apihandlers/users.py
index 8250e2ce46..1c633723a6 100644
--- a/jupyterhub/apihandlers/users.py
+++ b/jupyterhub/apihandlers/users.py
@@ -427,6 +427,7 @@ def _remove_spawner(f=None):
return
self.log.info("Deleting spawner %s", spawner._log_name)
self.db.delete(spawner.orm_spawner)
+ user.spawners.pop(server_name, None)
self.db.commit()
if server_name:
diff --git a/jupyterhub/tests/test_named_servers.py b/jupyterhub/tests/test_named_servers.py
index ab7a600267..0f6809c10a 100644
--- a/jupyterhub/tests/test_named_servers.py
+++ b/jupyterhub/tests/test_named_servers.py
@@ -162,8 +162,10 @@ async def test_delete_named_server(app, named_servers):
)
r.raise_for_status()
assert r.status_code == 204
- # low-level record is now removes
+ # low-level record is now removed
assert servername not in user.orm_spawners
+ # and it's still not in the high-level wrapper dict
+ assert servername not in user.spawners
async def test_named_server_disabled(app):
|
iterative__dvc-5067 | dvc version: does not follow symlinks
# Bug Report
## Description
This is the `dvc version` output, where it says the cache directory is `nfs4 on storage:/home` and cache type is `symlink`.
```
DVC version: 1.10.2 (pip)
---------------------------------
Platform: Python 3.8.3 on Linux-5.4.0-54-generic-x86_64-with-glibc2.10
Supports: All remotes
Cache types: symlink
Cache directory: nfs4 on storage:/home
Caches: local
Remotes: s3
Workspace directory: nfs4 on storage:/home
Repo: dvc, git
```
However, I do have a `~/.config/dvc/config` file that overrides this:
```
[core]
experiments = true
[cache]
type = "reflink,symlink,copy"
protected = true
dir = /home/jc/ssd_cache/dvc_cache
[feature]
parametrization = true
```
And the actual cache dir is `/home/jc/ssd_cache/dvc_cache` as I've specified instead of `nfs4 on storage:/home`
| [
{
"content": "import itertools\nimport os\nimport pathlib\nimport platform\nimport uuid\n\nfrom dvc.exceptions import DvcException, NotDvcRepoError\nfrom dvc.repo import Repo\nfrom dvc.scm.base import SCMError\nfrom dvc.system import System\nfrom dvc.tree import TREES, get_tree_cls, get_tree_config\nfrom dvc.ut... | [
{
"content": "import itertools\nimport os\nimport pathlib\nimport platform\nimport uuid\n\nfrom dvc.exceptions import DvcException, NotDvcRepoError\nfrom dvc.repo import Repo\nfrom dvc.scm.base import SCMError\nfrom dvc.system import System\nfrom dvc.tree import TREES, get_tree_cls, get_tree_config\nfrom dvc.ut... | diff --git a/dvc/info.py b/dvc/info.py
index 4d8cbf8119..e7c05f05e8 100644
--- a/dvc/info.py
+++ b/dvc/info.py
@@ -142,7 +142,8 @@ def get_fs_type(path):
for part in psutil.disk_partitions(all=True)
}
- path = pathlib.Path(path)
+ # need to follow the symlink: https://github.com/iterative/dvc/issues/5065
+ path = pathlib.Path(path).resolve()
for parent in itertools.chain([path], path.parents):
if parent in partition:
|
napari__napari-3498 | Napari bundle app crashes
## 🐛 Bug
Napari just shows a message stating "App has crashed" and starts open applications like crazy until killing all of them and it stops by killing Naparis
## To Reproduce
Steps to reproduce the behavior:
1. Open napari
2. Click on Plugins -> Install/Uninstall Package(s)..
3. Install plugins and uninstall them until app crashes
## Expected behavior
App should not crash
## Actual results
Napari starts acting like crazy opening Naparis endlessly. I need to uninstall to use it again as as soon as I want to open it, party starts all over again
## Environment
MacOS Big Sur 11.6 - napari 0.4.11rc4
This is also reproducible in napari 0.4.11
<img width="1714" alt="Screen Shot 2021-09-24 at 11 50 41 AM" src="https://user-images.githubusercontent.com/63799148/134734701-e1e476b9-20a5-4135-a398-fa0986994ecb.png">
| [
{
"content": "\"\"\"\nnapari command line viewer.\n\"\"\"\nimport argparse\nimport logging\nimport os\nimport runpy\nimport sys\nimport warnings\nfrom ast import literal_eval\nfrom pathlib import Path\nfrom textwrap import wrap\nfrom typing import Any, Dict, List\n\n\nclass InfoAction(argparse.Action):\n def... | [
{
"content": "\"\"\"\nnapari command line viewer.\n\"\"\"\nimport argparse\nimport logging\nimport os\nimport runpy\nimport sys\nimport warnings\nfrom ast import literal_eval\nfrom pathlib import Path\nfrom textwrap import wrap\nfrom typing import Any, Dict, List\n\n\nclass InfoAction(argparse.Action):\n def... | diff --git a/napari/__main__.py b/napari/__main__.py
index ffa09c27a1e..802e0f2d79e 100644
--- a/napari/__main__.py
+++ b/napari/__main__.py
@@ -421,6 +421,13 @@ def main():
'conda install -c conda-forge python.app'
)
warnings.warn(msg)
+
+ # Prevent https://github.com/napari/napari/issues/3415
+ if sys.platform == "darwin" and sys.version_info >= (3, 8):
+ import multiprocessing
+
+ multiprocessing.set_start_method('fork')
+
_run()
|
Pylons__pyramid-3677 | threading.Thread.setDaemon has been deprecated in favor of setting daemon attribute directly in Python 3.10
https://github.com/Pylons/pyramid/blob/8061fce297cc7117d3e6e2b39e47512c7db2904f/src/pyramid/scripts/pserve.py#L234
Ref : python/cpython#25174
| [
{
"content": "# (c) 2005 Ian Bicking and contributors; written for Paste\n# (http://pythonpaste.org) Licensed under the MIT license:\n# http://www.opensource.org/licenses/mit-license.php\n#\n# For discussion of daemonizing:\n# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731\n#\n# Code taken also ... | [
{
"content": "# (c) 2005 Ian Bicking and contributors; written for Paste\n# (http://pythonpaste.org) Licensed under the MIT license:\n# http://www.opensource.org/licenses/mit-license.php\n#\n# For discussion of daemonizing:\n# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731\n#\n# Code taken also ... | diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index d527b1a042..96fb6fd76f 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -353,4 +353,6 @@ Contributors
- Sergey Maranchuk, 2020/04/18
-- Thibault Ravera, 2020/06/03
\ No newline at end of file
+- Thibault Ravera, 2020/06/03
+
+- Karthikeyan Singaravelan, 2021/08/24
diff --git a/src/pyramid/scripts/pserve.py b/src/pyramid/scripts/pserve.py
index 6906a0410f..1bcf6c543e 100644
--- a/src/pyramid/scripts/pserve.py
+++ b/src/pyramid/scripts/pserve.py
@@ -231,7 +231,7 @@ def open_browser():
webbrowser.open(url)
t = threading.Thread(target=open_browser)
- t.setDaemon(True)
+ t.daemon = True
t.start()
if self.args.reload and not hupper.is_active():
|
gratipay__gratipay.com-2792 | broken facebook link when no user_name
If all we have is a user_id, we construct the URL improperly. In that case we need:
`http://facebook.com/profile.php?id=$ID`
But we have:
`http://facebook.com/None`
broken facebook link when no user_name
If all we have is a user_id, we construct the URL improperly. In that case we need:
`http://facebook.com/profile.php?id=$ID`
But we have:
`http://facebook.com/None`
| [
{
"content": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom gratipay.elsewhere import PlatformOAuth2\nfrom gratipay.elsewhere._extractors import key\n\n\nclass Facebook(PlatformOAuth2):\n\n # Platform attributes\n name = 'facebook'\n display_name = 'Facebook... | [
{
"content": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom gratipay.elsewhere import PlatformOAuth2\nfrom gratipay.elsewhere._extractors import key\n\n\nclass Facebook(PlatformOAuth2):\n\n # Platform attributes\n name = 'facebook'\n display_name = 'Facebook... | diff --git a/gratipay/elsewhere/facebook.py b/gratipay/elsewhere/facebook.py
index f69328bffd..fe6fba15c8 100644
--- a/gratipay/elsewhere/facebook.py
+++ b/gratipay/elsewhere/facebook.py
@@ -9,7 +9,7 @@ class Facebook(PlatformOAuth2):
# Platform attributes
name = 'facebook'
display_name = 'Facebook'
- account_url = 'https://www.facebook.com/{user_name}'
+ account_url = 'https://www.facebook.com/profile.php?id={user_id}'
# Auth attributes
auth_url = 'https://www.facebook.com/dialog/oauth'
|
pydantic__pydantic-6364 | pydantic.v1.parse_obj_as internally uses pydantic.main.create_model instead of pydantic.v1.main.create_model
### Initial Checks
- [X] I confirm that I'm using Pydantic V2 installed directly from the `main` branch, or equivalent
### Description
I was trying to migrate my codebase from V1 to V2 (mostly by replacing `import pydantic` with `import pydantic.v1`) and noticed that `pydantic.v1.parse_obj_as` was not working as intended and was leading to the following error:
```
Traceback (most recent call last):
File "/Users/sharathhuddar/workspace/django-rest-api/core/tests/test_types.py", line 177, in test_non_https_url
parse_obj_as(HttpsUrl, url)
File "/Users/sharathhuddar/workspace/django-rest-api/django-rest-api-3.7/lib/python3.7/site-packages/pydantic/v1/tools.py", line 37, in parse_obj_as
model_type = _get_parsing_type(type_, type_name=type_name) # type: ignore[arg-type]
File "/Users/sharathhuddar/workspace/django-rest-api/django-rest-api-3.7/lib/python3.7/site-packages/pydantic/v1/tools.py", line 30, in _get_parsing_type
return create_model(type_name, __root__=(type_, ...))
File "/Users/sharathhuddar/workspace/django-rest-api/django-rest-api-3.7/lib/python3.7/site-packages/pydantic/main.py", line 1319, in create_model
return meta(__model_name, resolved_bases, namespace, __pydantic_reset_parent_namespace__=False, **kwds)
File "/Users/sharathhuddar/workspace/django-rest-api/django-rest-api-3.7/lib/python3.7/site-packages/pydantic/_internal/_model_construction.py", line 96, in __new__
namespace, config_wrapper.ignored_types, class_vars, base_field_names
File "/Users/sharathhuddar/workspace/django-rest-api/django-rest-api-3.7/lib/python3.7/site-packages/pydantic/_internal/_model_construction.py", line 279, in inspect_namespace
raise TypeError("To define root models, use `pydantic.RootModel` rather than a field called '__root__'")
TypeError: To define root models, use `pydantic.RootModel` rather than a field called '__root__'
```
On inspecting the source code, I noticed that `parse_obj_as` calls `_get_parsing_type` which inturn calls `pydantic.main.create_model` instead of `pydantic.v1.main.create_model`
The issue gets resolved on updating the import statement in `pydantic.v1.tools._get_parsing_type: 24` from `from pydantic.main import create_model` to `from pydantic.v1.main import create_model`
### Example Code
_No response_
### Python, Pydantic & OS Version
```Text
python -c "import pydantic.version; print(pydantic.version.version_info())"
pydantic version: 2.0
pydantic-core version: 2.0.1 release build profile
install path: /Users/sharathhuddar/workspace/django-rest-api/django-rest-api-3.7/lib/python3.7/site-packages/pydantic
python version: 3.7.12 (default, Nov 22 2022, 14:45:00) [Clang 13.1.6 (clang-1316.0.21.2.5)]
platform: Darwin-22.2.0-x86_64-i386-64bit
optional deps. installed: ['email-validator', 'typing-extensions']
```
Selected Assignee: @lig
| [
{
"content": "import json\nfrom functools import lru_cache\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, Callable, Optional, Type, TypeVar, Union\n\nfrom .parse import Protocol, load_file, load_str_bytes\nfrom .types import StrBytes\nfrom .typing import display_as_type\n\n__all__ = ('parse_f... | [
{
"content": "import json\nfrom functools import lru_cache\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, Callable, Optional, Type, TypeVar, Union\n\nfrom .parse import Protocol, load_file, load_str_bytes\nfrom .types import StrBytes\nfrom .typing import display_as_type\n\n__all__ = ('parse_f... | diff --git a/changes/6361-SharathHuddar.md b/changes/6361-SharathHuddar.md
new file mode 100644
index 00000000000..2897d88ff21
--- /dev/null
+++ b/changes/6361-SharathHuddar.md
@@ -0,0 +1 @@
+Importing create_model in tools.py through relative path instead of absolute path - so that it doesn't import V2 code when copied over to V2 branch
diff --git a/pydantic/tools.py b/pydantic/tools.py
index 9cdb4538eb5..45be27704cb 100644
--- a/pydantic/tools.py
+++ b/pydantic/tools.py
@@ -21,7 +21,7 @@ def _generate_parsing_type_name(type_: Any) -> str:
@lru_cache(maxsize=2048)
def _get_parsing_type(type_: Any, *, type_name: Optional[NameFactory] = None) -> Any:
- from pydantic.main import create_model
+ from .main import create_model
if type_name is None:
type_name = _generate_parsing_type_name
|
getsentry__sentry-python-1554 | Redis integration tests have side effects
### How do you use Sentry?
Self-hosted/on-premise
### Version
1.9.2
### Steps to Reproduce
While working on https://github.com/getsentry/sentry-python/pull/1543, I noticed the following:
1. Checked out `sentry-sdk` for development.
2. Installed redis:
```
fakeredis==1.9.0
redis==3.5.3
redis-py-cluster==2.1.3
````
3. Run redis integration tests twice, in different order:
```bash
# first rediscluster, then redis
pytest 'tests/integrations/rediscluster/test_rediscluster.py::test_rediscluster_basic[RedisCluster]' tests/integrations/redis/test_redis.py::test_basic
# first redis, then rediscluster
pytest tests/integrations/redis/test_redis.py::test_basic 'tests/integrations/rediscluster/test_rediscluster.py::test_rediscluster_basic[RedisCluster]'
### Expected Result
Both test runs pass.
### Actual Result
The second test run
```bash
pytest tests/integrations/redis/test_redis.py::test_basic 'tests/integrations/rediscluster/test_rediscluster.py::test_rediscluster_basic[RedisCluster]'
```
fails with
```pytest
tests/integrations/redis/test_redis.py . [ 50%]
tests/integrations/rediscluster/test_rediscluster.py F [100%]
============================================================================================================================================ FAILURES =============================================================================================================================================
______________________________________________________________________________________________________________________________ test_rediscluster_basic[RedisCluster] ______________________________________________________________________________________________________________________________
tests/integrations/rediscluster/test_rediscluster.py:29: in test_rediscluster_basic
(crumb,) = event["breadcrumbs"]["values"]
E ValueError: not enough values to unpack (expected 1, got 0)
```
| [
{
"content": "from __future__ import absolute_import\n\nfrom sentry_sdk import Hub\nfrom sentry_sdk.utils import capture_internal_exceptions, logger\nfrom sentry_sdk.integrations import Integration, DidNotEnable\n\nfrom sentry_sdk._types import MYPY\n\nif MYPY:\n from typing import Any, Sequence\n\n_SINGLE_K... | [
{
"content": "from __future__ import absolute_import\n\nfrom sentry_sdk import Hub\nfrom sentry_sdk.utils import capture_internal_exceptions, logger\nfrom sentry_sdk.integrations import Integration, DidNotEnable\n\nfrom sentry_sdk._types import MYPY\n\nif MYPY:\n from typing import Any, Sequence\n\n_SINGLE_K... | diff --git a/sentry_sdk/integrations/redis.py b/sentry_sdk/integrations/redis.py
index a4434a3f01..fc4e9cc7c2 100644
--- a/sentry_sdk/integrations/redis.py
+++ b/sentry_sdk/integrations/redis.py
@@ -131,7 +131,6 @@ def patch_redis_client(cls, is_cluster):
This function can be used to instrument custom redis client classes or
subclasses.
"""
-
old_execute_command = cls.execute_command
def sentry_patched_execute_command(self, name, *args, **kwargs):
diff --git a/tests/conftest.py b/tests/conftest.py
index 61f25d98ee..7479a3e213 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -19,6 +19,7 @@
from sentry_sdk.transport import Transport
from sentry_sdk.envelope import Envelope
from sentry_sdk.utils import capture_internal_exceptions
+from sentry_sdk.integrations import _installed_integrations # noqa: F401
from tests import _warning_recorder, _warning_recorder_mgr
@@ -165,6 +166,17 @@ def inner(event):
return inner
+@pytest.fixture
+def reset_integrations():
+ """
+ Use with caution, sometimes we really need to start
+ with a clean slate to ensure monkeypatching works well,
+ but this also means some other stuff will be monkeypatched twice.
+ """
+ global _installed_integrations
+ _installed_integrations.clear()
+
+
@pytest.fixture
def sentry_init(monkeypatch_test_transport, request):
def inner(*a, **kw):
diff --git a/tests/integrations/rediscluster/test_rediscluster.py b/tests/integrations/rediscluster/test_rediscluster.py
index 7442490b2e..9be21a2953 100644
--- a/tests/integrations/rediscluster/test_rediscluster.py
+++ b/tests/integrations/rediscluster/test_rediscluster.py
@@ -11,8 +11,8 @@
rediscluster_classes.append(rediscluster.StrictRedisCluster)
-@pytest.fixture(scope="module", autouse=True)
-def monkeypatch_rediscluster_classes():
+@pytest.fixture(autouse=True)
+def monkeypatch_rediscluster_classes(reset_integrations):
try:
pipeline_cls = rediscluster.ClusterPipeline
diff --git a/tests/integrations/sanic/test_sanic.py b/tests/integrations/sanic/test_sanic.py
index f8fdd696bc..808c6f14c3 100644
--- a/tests/integrations/sanic/test_sanic.py
+++ b/tests/integrations/sanic/test_sanic.py
@@ -1,5 +1,5 @@
+import os
import sys
-
import random
import asyncio
from unittest.mock import Mock
@@ -18,6 +18,20 @@
@pytest.fixture
def app():
+ if SANIC_VERSION < (19,):
+ """
+ Older Sanic versions 0.8 and 18 bind to the same fixed port which
+ creates problems when we run tests concurrently.
+ """
+ old_test_client = Sanic.test_client.__get__
+
+ def new_test_client(self):
+ client = old_test_client(self, Sanic)
+ client.port += os.getpid() % 100
+ return client
+
+ Sanic.test_client = property(new_test_client)
+
if SANIC_VERSION >= (20, 12):
# Build (20.12.0) adds a feature where the instance is stored in an internal class
# registry for later retrieval, and so add register=False to disable that
|
spyder-ide__spyder-20541 | Error when trying to add directories in PythonPath Manager
## Description
### What steps will reproduce the problem?
<!--- You can use Markdown here --->
Installed selenium with pip. Try adding /sitepackages in the tools in spyder, but doesn't work.
### Traceback
```python-traceback
Traceback (most recent call last):
File "/Applications/Spyder.app/Contents/Resources/lib/python3.9/spyder/plugins/pythonpath/widgets/pathmanager.py", line 169, in <lambda>
triggered=lambda x: self.add_path())
File "/Applications/Spyder.app/Contents/Resources/lib/python3.9/spyder/plugins/pythonpath/widgets/pathmanager.py", line 456, in add_path
if self.listwidget.row(self.user_header) < 0:
RuntimeError: wrapped C/C++ object of type QListWidgetItem has been deleted
```
## Versions
* Spyder version: 5.4.2 93124668b (standalone)
* Python version: 3.9.14 64-bit
* Qt version: 5.15.2
* PyQt5 version: 5.15.7
* Operating System: Darwin 22.2.0
### Dependencies
```
# Mandatory:
atomicwrites >=1.2.0 : 1.4.1 (OK)
chardet >=2.0.0 : 5.1.0 (OK)
cloudpickle >=0.5.0 : 2.2.0 (OK)
cookiecutter >=1.6.0 : 2.1.1 (OK)
diff_match_patch >=20181111 : 20200713 (OK)
intervaltree >=3.0.2 : 3.1.0 (OK)
IPython >=7.31.1;<9.0.0 : 8.8.0 (OK)
jedi >=0.17.2;<0.19.0 : 0.18.2 (OK)
jellyfish >=0.7 : 0.9.0 (OK)
jsonschema >=3.2.0 : 4.17.3 (OK)
keyring >=17.0.0 : 23.13.1 (OK)
nbconvert >=4.0 : 7.2.8 (OK)
numpydoc >=0.6.0 : 1.5.0 (OK)
parso >=0.7.0;<0.9.0 : 0.8.3 (OK)
pexpect >=4.4.0 : 4.8.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
psutil >=5.3 : 5.9.4 (OK)
pygments >=2.0 : 2.14.0 (OK)
pylint >=2.5.0;<3.0 : 2.15.10 (OK)
pylint_venv >=2.1.1 : None (OK)
pyls_spyder >=0.4.0 : 0.4.0 (OK)
pylsp >=1.7.1;<1.8.0 : 1.7.1 (OK)
pylsp_black >=1.2.0 : 1.2.1 (OK)
qdarkstyle >=3.0.2;<3.1.0 : 3.0.3 (OK)
qstylizer >=0.2.2 : 0.2.2 (OK)
qtawesome >=1.2.1 : 1.2.2 (OK)
qtconsole >=5.4.0;<5.5.0 : 5.4.0 (OK)
qtpy >=2.1.0 : 2.3.0 (OK)
rtree >=0.9.7 : 1.0.1 (OK)
setuptools >=49.6.0 : 66.0.0 (OK)
sphinx >=0.6.6 : 5.1.1 (OK)
spyder_kernels >=2.4.2;<2.5.0 : 2.4.2 (OK)
textdistance >=4.2.0 : 4.5.0 (OK)
three_merge >=0.1.1 : 0.1.1 (OK)
watchdog >=0.10.3 : 2.2.1 (OK)
zmq >=22.1.0 : 24.0.1 (OK)
# Optional:
cython >=0.21 : 0.29.33 (OK)
matplotlib >=3.0.0 : 3.6.3 (OK)
numpy >=1.7 : 1.24.1 (OK)
pandas >=1.1.1 : 1.5.2 (OK)
scipy >=0.17.0 : 1.10.0 (OK)
sympy >=0.7.3 : 1.11.1 (OK)
# Spyder plugins:
spyder_terminal.terminalplugin 1.2.2 : 1.2.2 (OK)
```
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n\n\"\"\"Spyder path manager.\"\"\"\n\n# Standard library imports\nfrom collections import OrderedDict\nimport os\nimport os.path as osp\nimp... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n\n\"\"\"Spyder path manager.\"\"\"\n\n# Standard library imports\nfrom collections import OrderedDict\nimport os\nimport os.path as osp\nimp... | diff --git a/spyder/plugins/pythonpath/widgets/pathmanager.py b/spyder/plugins/pythonpath/widgets/pathmanager.py
index 3422d2963b4..2a2d7b1e7f8 100644
--- a/spyder/plugins/pythonpath/widgets/pathmanager.py
+++ b/spyder/plugins/pythonpath/widgets/pathmanager.py
@@ -244,6 +244,10 @@ def editable_top_row(self):
def setup(self):
"""Populate list widget."""
self.listwidget.clear()
+ self.headers.clear()
+ self.project_header = None
+ self.user_header = None
+ self.system_header = None
# Project path
if self.project_path:
|
kivy__kivy-5983 | Rotating Scatter does not dispatch on_transform_with_touch
### Versions
* Python 3.6.1 + Kivy 1.10 on Windows
* Python 3.6.4 + recent master on Linux
### Description
1. Rotating Scatter does not dispatch the on_transform_with_touch event
2. Translating Scatter with `do_translation=False` still dispatches the on_transform_with_touch event
### Code and Logs
```python
from kivy.base import runTouchApp
from kivy.lang import Builder
runTouchApp(Builder.load_string('''
Scatter:
size_hint: None, None
pos: 200, 200
do_scale: False
do_translation: False
on_transform_with_touch: print("!!! Transform")
canvas:
Color:
rgba: 1, 0, 0, 1
Rectangle:
pos: 0, 0
size: self.size
'''))
```
| [
{
"content": "'''\nScatter\n=======\n\n.. image:: images/scatter.gif\n :align: right\n\n:class:`Scatter` is used to build interactive widgets that can be translated,\nrotated and scaled with two or more fingers on a multitouch system.\n\nScatter has its own matrix transformation: the modelview matrix is chan... | [
{
"content": "'''\nScatter\n=======\n\n.. image:: images/scatter.gif\n :align: right\n\n:class:`Scatter` is used to build interactive widgets that can be translated,\nrotated and scaled with two or more fingers on a multitouch system.\n\nScatter has its own matrix transformation: the modelview matrix is chan... | diff --git a/kivy/uix/scatter.py b/kivy/uix/scatter.py
index b8a4b65982..85b9eee8ab 100644
--- a/kivy/uix/scatter.py
+++ b/kivy/uix/scatter.py
@@ -476,6 +476,8 @@ def transform_with_touch(self, touch):
return changed
angle = radians(new_line.angle(old_line)) * self.do_rotation
+ if angle:
+ changed = True
self.apply_transform(Matrix().rotate(angle, 0, 0, 1), anchor=anchor)
if self.do_scale:
|
mesonbuild__meson-1538 | VS 2017 backend emits bad WindowsTargetPlatformVersion value
When I tried generating a VS 2017 solution, the generated app.vcxproj contained this:
```
<WindowsTargetPlatformVersion>10.0.14393.0\</WindowsTargetPlatformVersion>
```
Which then causes errors in other `.targets` files attempting to do a numeric comparison against that.
This value is probably taken straight from one of these environment variables:
```
WindowsSDKLibVersion=10.0.14393.0\
WindowsSDKVersion=10.0.14393.0\
```
The trailing backslash is a bit suspect, but may be there intentionally so it can be concatenated to
```
WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\
```
directly.
| [
{
"content": "# Copyright 2014-2016 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless req... | [
{
"content": "# Copyright 2014-2016 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless req... | diff --git a/authors.txt b/authors.txt
index 64792a20cc0c..0c575e723f0d 100644
--- a/authors.txt
+++ b/authors.txt
@@ -72,3 +72,4 @@ Aaron Small
Joe Baldino
Peter Harris
Roger Boerdijk
+melak47
diff --git a/mesonbuild/backend/vs2017backend.py b/mesonbuild/backend/vs2017backend.py
index 8301790de2a2..35d56f3c3b32 100644
--- a/mesonbuild/backend/vs2017backend.py
+++ b/mesonbuild/backend/vs2017backend.py
@@ -24,4 +24,4 @@ def __init__(self, build):
self.platform_toolset = 'v141'
self.vs_version = '2017'
# WindowsSDKVersion should be set by command prompt.
- self.windows_target_platform_version = os.getenv('WindowsSDKVersion', None)
+ self.windows_target_platform_version = os.getenv('WindowsSDKVersion', None).rstrip('\\')
|
encode__starlette-195 | Check directory exists when instantiating `StaticFiles`
The `StaticFiles` application should ensure that the directory exists at the point it is instantiated.
(With an optional switch to turn this behavior off)
| [
{
"content": "import os\nimport stat\n\nfrom aiofiles.os import stat as aio_stat\n\nfrom starlette.responses import FileResponse, PlainTextResponse, Response\nfrom starlette.types import ASGIInstance, Receive, Scope, Send\n\n\nclass StaticFiles:\n def __init__(self, *, directory: str) -> None:\n self.... | [
{
"content": "import os\nimport stat\n\nfrom aiofiles.os import stat as aio_stat\n\nfrom starlette.responses import FileResponse, PlainTextResponse, Response\nfrom starlette.types import ASGIInstance, Receive, Scope, Send\n\n\nclass StaticFiles:\n def __init__(self, *, directory: str, check_dir: bool = True)... | diff --git a/docs/staticfiles.md b/docs/staticfiles.md
index 448cc3b92..cc8db5e79 100644
--- a/docs/staticfiles.md
+++ b/docs/staticfiles.md
@@ -1,7 +1,12 @@
-Starlette also includes a `StaticFiles` class for serving a specific directory:
+Starlette also includes a `StaticFiles` class for serving files in a given directory:
-* `StaticFiles(directory)` - Serve any files in the given `directory`.
+### StaticFiles
+
+Signature: `StaticFiles(directory, check_dir=True)`
+
+* `directory` - A string denoting the directory path
+* `check_dir` - Ensure that the directory exists upon instantiation. Defaults to `True`
You can combine this ASGI application with Starlette's routing to provide
comprehensive static file serving.
diff --git a/starlette/staticfiles.py b/starlette/staticfiles.py
index 8a7527a61..ec2418ef7 100644
--- a/starlette/staticfiles.py
+++ b/starlette/staticfiles.py
@@ -8,7 +8,9 @@
class StaticFiles:
- def __init__(self, *, directory: str) -> None:
+ def __init__(self, *, directory: str, check_dir: bool = True) -> None:
+ if check_dir and not os.path.isdir(directory):
+ raise RuntimeError("Directory '%s' does not exist" % directory)
self.directory = directory
self.config_checked = False
diff --git a/tests/test_staticfiles.py b/tests/test_staticfiles.py
index 9d12de894..84f33682d 100644
--- a/tests/test_staticfiles.py
+++ b/tests/test_staticfiles.py
@@ -54,9 +54,16 @@ def test_staticfiles_with_missing_file_returns_404(tmpdir):
assert response.text == "Not Found"
+def test_staticfiles_instantiated_with_missing_directory(tmpdir):
+ with pytest.raises(RuntimeError) as exc:
+ path = os.path.join(tmpdir, "no_such_directory")
+ app = StaticFiles(directory=path)
+ assert "does not exist" in str(exc)
+
+
def test_staticfiles_configured_with_missing_directory(tmpdir):
path = os.path.join(tmpdir, "no_such_directory")
- app = StaticFiles(directory=path)
+ app = StaticFiles(directory=path, check_dir=False)
client = TestClient(app)
with pytest.raises(RuntimeError) as exc:
client.get("/example.txt")
@@ -68,7 +75,7 @@ def test_staticfiles_configured_with_file_instead_of_directory(tmpdir):
with open(path, "w") as file:
file.write("<file content>")
- app = StaticFiles(directory=path)
+ app = StaticFiles(directory=path, check_dir=False)
client = TestClient(app)
with pytest.raises(RuntimeError) as exc:
client.get("/example.txt")
|
netbox-community__netbox-15136 | API call to add VPN tunnel fails: group field is required
### Deployment Type
Self-hosted
### NetBox Version
v3.7.2
### Python Version
3.11
### Steps to Reproduce
```
$ curl -s -i http://netbox-test.lein.io/api/vpn/tunnels/ \
-H "Authorization: Token 176d4c04ccc8f2a549ea6fd393567d9da5a796ff" \
-H "Content-type: application/json" \
-H "Accept: application/json; indent=4" \
-d '{"name":"TestTunnel", "encapsulation":"ipsec-tunnel", "status":"active"}'
```
### Expected Behavior
Tunnel "TestTunnel" is added successfully.
### Observed Behavior
```
HTTP/1.1 400 Bad Request
API-Version: 3.7
...
{
"group": [
"This field is required."
]
}
```
Adding the same tunnel in GUI is successful (using only those three mandatory fields).
### Workaround
Create a tunnel group like "TEMP", then add `"group":1` (where 1 is the group ID) in the create call, and finally edit the resulted tunnel to remove the TEMP group.
| [
{
"content": "from django.contrib.contenttypes.models import ContentType\nfrom drf_spectacular.utils import extend_schema_field\nfrom rest_framework import serializers\n\nfrom ipam.api.nested_serializers import NestedIPAddressSerializer, NestedRouteTargetSerializer\nfrom ipam.models import RouteTarget\nfrom net... | [
{
"content": "from django.contrib.contenttypes.models import ContentType\nfrom drf_spectacular.utils import extend_schema_field\nfrom rest_framework import serializers\n\nfrom ipam.api.nested_serializers import NestedIPAddressSerializer, NestedRouteTargetSerializer\nfrom ipam.models import RouteTarget\nfrom net... | diff --git a/netbox/vpn/api/serializers.py b/netbox/vpn/api/serializers.py
index dedcbfbf5f7..5f6fcd5f771 100644
--- a/netbox/vpn/api/serializers.py
+++ b/netbox/vpn/api/serializers.py
@@ -46,7 +46,10 @@ class TunnelSerializer(NetBoxModelSerializer):
status = ChoiceField(
choices=TunnelStatusChoices
)
- group = NestedTunnelGroupSerializer()
+ group = NestedTunnelGroupSerializer(
+ required=False,
+ allow_null=True
+ )
encapsulation = ChoiceField(
choices=TunnelEncapsulationChoices
)
diff --git a/netbox/vpn/tests/test_api.py b/netbox/vpn/tests/test_api.py
index eb0520c8bff..64c175fe5bb 100644
--- a/netbox/vpn/tests/test_api.py
+++ b/netbox/vpn/tests/test_api.py
@@ -105,7 +105,6 @@ def setUpTestData(cls):
{
'name': 'Tunnel 6',
'status': TunnelStatusChoices.STATUS_DISABLED,
- 'group': tunnel_groups[1].pk,
'encapsulation': TunnelEncapsulationChoices.ENCAP_GRE,
},
]
|
OpenCTI-Platform__connectors-214 | [cybercrime-tracker] connector fails due to unchecked None
## Description
Cybercrime tracker connector fails while determining if the last run interval has been exceeded.
## Environment
1. OS (where OpenCTI server runs): Debian Buster 10.7
2. OpenCTI version: 4.0.x
3. OpenCTI client: pycti
4. Other environment details:
## Reproducible Steps
Steps to create the smallest reproducible scenario:
1. Setup the connector in accordance its the README (docker)
2. `docker-compose up`
3. See "ERROR" logs
```
Attaching to cybercrime-tracker_connector-cybercrimetracker_1
connector-cybercrimetracker_1 | INFO:root:Listing Threat-Actors with filters null.
connector-cybercrimetracker_1 | INFO:root:Connector registered with ID:cybercrime
connector-cybercrimetracker_1 | INFO:root:Starting ping alive thread
connector-cybercrimetracker_1 | INFO:root:Fetching data CYBERCRIME-TRACKER.NET...
connector-cybercrimetracker_1 | INFO:root:Listing Marking-Definitions with filters [{"key": "definition", "values": "TLP:WHITE"}].
connector-cybercrimetracker_1 | INFO:root:Connector last run: 2020-12-21 05:57:36
connector-cybercrimetracker_1 | ERROR:root:'>' not supported between instances of 'int' and 'NoneType'
```
This error seems to occur when [determining if it's time to run](https://github.com/OpenCTI-Platform/connectors/blob/master/cybercrime-tracker/src/cybercrime-tracker.py#L163).
## Expected Output
I expected the Data page to display the number of messages queued from this source.
## Actual Output
0 messages queued
| [
{
"content": "import os\nimport yaml\nimport time\nimport feedparser\nimport stix2\nimport datetime\n\nfrom pycti import OpenCTIConnectorHelper, get_config_variable\nfrom pycti.utils.opencti_stix2_utils import OpenCTIStix2Utils, SimpleObservable\nfrom pygrok import Grok\nfrom urllib.parse import urlparse, quote... | [
{
"content": "import os\nimport yaml\nimport time\nimport feedparser\nimport stix2\nimport datetime\n\nfrom pycti import OpenCTIConnectorHelper, get_config_variable\nfrom pycti.utils.opencti_stix2_utils import OpenCTIStix2Utils, SimpleObservable\nfrom pygrok import Grok\nfrom urllib.parse import urlparse, quote... | diff --git a/cybercrime-tracker/src/cybercrime-tracker.py b/cybercrime-tracker/src/cybercrime-tracker.py
index f19ad605ae..d72f552802 100644
--- a/cybercrime-tracker/src/cybercrime-tracker.py
+++ b/cybercrime-tracker/src/cybercrime-tracker.py
@@ -56,7 +56,7 @@ def __init__(self):
config,
)
self.interval = get_config_variable(
- "CYBERCRIMETRACKER_INTERVAL",
+ "CYBERCRIME_TRACKER_INTERVAL",
["cybercrime-tracker", "interval"],
config,
isNumber=True,
|
PaddlePaddle__PaddleNLP-2877 | Support more model outputs for BERT/ERNIE/RoBERTa
<!-- Demo: https://github.com/PaddlePaddle/PaddleNLP/pull/26 -->
### PR types
<!-- One of [ New features | Bug fixes | Function optimization | Performance optimization | Breaking changes | Others ] -->
New features
### PR changes
<!-- One of [ Models | APIs | Docs | Others ] -->
APIs
### Description
<!-- Describe what this PR does -->
#2583 is reverted because of compatibility, this PR fix and then push it again.
| [
{
"content": "# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.\n# Copyright 2020 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the L... | [
{
"content": "# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.\n# Copyright 2020 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the L... | diff --git a/paddlenlp/transformers/model_outputs.py b/paddlenlp/transformers/model_outputs.py
index c74f431e8e1a..8882d647ec57 100644
--- a/paddlenlp/transformers/model_outputs.py
+++ b/paddlenlp/transformers/model_outputs.py
@@ -91,7 +91,7 @@ def _transformer_encoder_fwd(self,
if output_attentions:
all_attentions.append(outputs[-1])
if cache is not None:
- new_caches.append(outputs[1])
+ new_caches.append(outputs[0])
if self.norm is not None:
output = self.norm(output)
|
django-cms__django-cms-2886 | cms.utils.i18n.get_fallback_languages may fail if LANGUAGES has more languages than CMS_LANGUAGES
Reported via IRC.
Use case: Show the admin interface in English (for users that configured their browser to English), but CMS pages should only be in German or French.
In the use case above, settings might be something like:
``` python
LANGUAGES = [
('en', 'English'),
('de', 'Deutsch'),
('fr', 'French'),
]
CMS_LANGUAGES = {
1: [
{
'code': 'de',
'name': gettext('Deutsch'),
'public': True,
},
{
'code': 'fr',
'name': gettext('French'),
'fallbacks': ['de',],
'public': False,
},
],
'default': {
'fallbacks': ['de',],
'redirect_on_fallback':True,
'public': False,
'hide_untranslated': False,
}
}
```
`'en'` is in `LANGUAGES` but not in `CMS_LANGUAGES`.
Now if `cms.utils.i18n.get_fallback_languages` is called with `'en'` as argument (that happens for example if you try to add a page in the admin with the admin UI in English, as the add view tries to log the page change in the current active language, not language of the page. This triggers a call to `get_fallback_languages` with English as the argument) it raises a `LanguageError` as `'en'` is not available to the CMS.
cms.utils.i18n.get_fallback_languages may fail if LANGUAGES has more languages than CMS_LANGUAGES
Reported via IRC.
Use case: Show the admin interface in English (for users that configured their browser to English), but CMS pages should only be in German or French.
In the use case above, settings might be something like:
``` python
LANGUAGES = [
('en', 'English'),
('de', 'Deutsch'),
('fr', 'French'),
]
CMS_LANGUAGES = {
1: [
{
'code': 'de',
'name': gettext('Deutsch'),
'public': True,
},
{
'code': 'fr',
'name': gettext('French'),
'fallbacks': ['de',],
'public': False,
},
],
'default': {
'fallbacks': ['de',],
'redirect_on_fallback':True,
'public': False,
'hide_untranslated': False,
}
}
```
`'en'` is in `LANGUAGES` but not in `CMS_LANGUAGES`.
Now if `cms.utils.i18n.get_fallback_languages` is called with `'en'` as argument (that happens for example if you try to add a page in the admin with the admin UI in English, as the add view tries to log the page change in the current active language, not language of the page. This triggers a call to `get_fallback_languages` with English as the argument) it raises a `LanguageError` as `'en'` is not available to the CMS.
| [
{
"content": "# -*- coding: utf-8 -*-\nfrom contextlib import contextmanager\n\nfrom django.core.urlresolvers import get_resolver, LocaleRegexURLResolver\nfrom django.conf import settings\nfrom django.utils import translation\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom cms.exceptions import... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom contextlib import contextmanager\n\nfrom django.core.urlresolvers import get_resolver, LocaleRegexURLResolver\nfrom django.conf import settings\nfrom django.utils import translation\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom cms.exceptions import... | diff --git a/cms/tests/i18n.py b/cms/tests/i18n.py
index de84f8f698d..3e7231cb34c 100644
--- a/cms/tests/i18n.py
+++ b/cms/tests/i18n.py
@@ -3,6 +3,7 @@
from cms.test_utils.util.context_managers import SettingsOverride
from cms.utils import i18n
from django.utils.importlib import import_module
+from cms.utils.i18n import get_fallback_languages
class TestLanguages(SettingsOverrideTestCase):
@@ -275,6 +276,39 @@ def test_get_languages_undefined_site(self):
self.assertEqual(lang['hide_untranslated'], False)
+class TestLanguagesNotInCMSLanguages(SettingsOverrideTestCase):
+ settings_overrides = {
+ 'LANGUAGE_CODE': 'en',
+ 'LANGUAGES': [
+ ('en', 'English'),
+ ('de', 'German'),
+ ('fr', 'French')
+ ],
+ 'CMS_LANGUAGES': {
+ 1: [
+ {
+ 'code': 'de',
+ 'name': 'German',
+ 'public': True,
+ },
+ {
+ 'code': 'fr',
+ 'name': 'French',
+ 'public': True
+ }
+ ],
+ 'default': {
+ 'fallbacks': ['de', 'fr'],
+ }
+ },
+ 'SITE_ID': 1,
+ }
+
+ def test_get_fallback_languages(self):
+ languages = get_fallback_languages('en', 1)
+ self.assertEqual(languages, ['de', 'fr'])
+
+
class TestLanguageFallbacks(SettingsOverrideTestCase):
settings_overrides = {
diff --git a/cms/utils/i18n.py b/cms/utils/i18n.py
index 08a24f50a11..1c4a0cde0a4 100644
--- a/cms/utils/i18n.py
+++ b/cms/utils/i18n.py
@@ -152,7 +152,10 @@ def get_fallback_languages(language, site_id=None):
"""
returns a list of fallback languages for the given language
"""
- language = get_language_object(language, site_id)
+ try:
+ language = get_language_object(language, site_id)
+ except LanguageError:
+ language = get_languages(site_id)[0]
return language.get('fallbacks', [])
|
searx__searx-2167 | Results links open in the same tab
How to set searx to open links in a new tab?
| [
{
"content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n\"\"\"Searx preferences implementation.\n\"\"\"\n\n# pylint: disable=useless-object-inheritance\n\nfrom base64 import urlsafe_b64encode, urlsafe_b64decode\nfrom zlib import compress, decompress\nfrom sys import version\n\nfrom searx import settings, au... | [
{
"content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n\"\"\"Searx preferences implementation.\n\"\"\"\n\n# pylint: disable=useless-object-inheritance\n\nfrom base64 import urlsafe_b64encode, urlsafe_b64decode\nfrom zlib import compress, decompress\nfrom sys import version\n\nfrom searx import settings, au... | diff --git a/searx/preferences.py b/searx/preferences.py
index cb33bc5aa6..82b8f5224d 100644
--- a/searx/preferences.py
+++ b/searx/preferences.py
@@ -364,7 +364,7 @@ def __init__(self, themes, categories, engines, plugins):
choices=themes
),
'results_on_new_tab': MapSetting(
- False,
+ settings['ui'].get('results_on_new_tab', False),
map={
'0': False,
'1': True,
diff --git a/searx/settings.yml b/searx/settings.yml
index 6f9afd1390..d6ea53177d 100644
--- a/searx/settings.yml
+++ b/searx/settings.yml
@@ -25,6 +25,7 @@ ui:
default_locale : "" # Default interface locale - leave blank to detect from browser information or use codes from the 'locales' config section
theme_args :
oscar_style : logicodev # default style of oscar
+# results_on_new_tab: False # Open result links in a new tab by default
# categories_order :
# - general
# - files
|
encode__django-rest-framework-722 | PrimaryKeyRelatedField with OneToOneField serializes wrong object's id
```
class A(Model):
pass
class B(Model):
a = OneToOneField('A')
class ASerializer(Serializer):
b_id = PrimaryKeyRelatedField(source='b', null=True)
```
Now when an `A` is serialized, it will not have `B`'s `id`, but its own. I believe this is due to [this erroneous line in PrimaryKeyRelatedField](https://github.com/tomchristie/django-rest-framework/blob/018298deb89628b39e1caeceecb414c1e27310da/rest_framework/relations.py#L238). Once I remove that line, the correct value for `b_id` will be serialized.
| [
{
"content": "from __future__ import unicode_literals\nfrom django.core.exceptions import ObjectDoesNotExist, ValidationError\nfrom django.core.urlresolvers import resolve, get_script_prefix, NoReverseMatch\nfrom django import forms\nfrom django.forms import widgets\nfrom django.forms.models import ModelChoiceI... | [
{
"content": "from __future__ import unicode_literals\nfrom django.core.exceptions import ObjectDoesNotExist, ValidationError\nfrom django.core.urlresolvers import resolve, get_script_prefix, NoReverseMatch\nfrom django import forms\nfrom django.forms import widgets\nfrom django.forms.models import ModelChoiceI... | diff --git a/rest_framework/relations.py b/rest_framework/relations.py
index 0c108717fc..2a10e9af53 100644
--- a/rest_framework/relations.py
+++ b/rest_framework/relations.py
@@ -235,7 +235,6 @@ def field_to_native(self, obj, field_name):
pk = getattr(obj, self.source or field_name).pk
except ObjectDoesNotExist:
return None
- return self.to_native(obj.pk)
# Forward relationship
return self.to_native(pk)
diff --git a/rest_framework/tests/relations_pk.py b/rest_framework/tests/relations_pk.py
index d6ae317607..f08e18086a 100644
--- a/rest_framework/tests/relations_pk.py
+++ b/rest_framework/tests/relations_pk.py
@@ -407,14 +407,14 @@ def setUp(self):
target.save()
new_target = OneToOneTarget(name='target-2')
new_target.save()
- source = NullableOneToOneSource(name='source-1', target=target)
+ source = NullableOneToOneSource(name='source-1', target=new_target)
source.save()
def test_reverse_foreign_key_retrieve_with_null(self):
queryset = OneToOneTarget.objects.all()
serializer = NullableOneToOneTargetSerializer(queryset, many=True)
expected = [
- {'id': 1, 'name': 'target-1', 'nullable_source': 1},
- {'id': 2, 'name': 'target-2', 'nullable_source': None},
+ {'id': 1, 'name': 'target-1', 'nullable_source': None},
+ {'id': 2, 'name': 'target-2', 'nullable_source': 1},
]
self.assertEqual(serializer.data, expected)
|
django-cms__django-cms-1768 | cms.utils.i18n.get_fallback_languages may fail if LANGUAGES has more languages than CMS_LANGUAGES
Reported via IRC.
Use case: Show the admin interface in English (for users that configured their browser to English), but CMS pages should only be in German or French.
In the use case above, settings might be something like:
``` python
LANGUAGES = [
('en', 'English'),
('de', 'Deutsch'),
('fr', 'French'),
]
CMS_LANGUAGES = {
1: [
{
'code': 'de',
'name': gettext('Deutsch'),
'public': True,
},
{
'code': 'fr',
'name': gettext('French'),
'fallbacks': ['de',],
'public': False,
},
],
'default': {
'fallbacks': ['de',],
'redirect_on_fallback':True,
'public': False,
'hide_untranslated': False,
}
}
```
`'en'` is in `LANGUAGES` but not in `CMS_LANGUAGES`.
Now if `cms.utils.i18n.get_fallback_languages` is called with `'en'` as argument (that happens for example if you try to add a page in the admin with the admin UI in English, as the add view tries to log the page change in the current active language, not language of the page. This triggers a call to `get_fallback_languages` with English as the argument) it raises a `LanguageError` as `'en'` is not available to the CMS.
cms.utils.i18n.get_fallback_languages may fail if LANGUAGES has more languages than CMS_LANGUAGES
Reported via IRC.
Use case: Show the admin interface in English (for users that configured their browser to English), but CMS pages should only be in German or French.
In the use case above, settings might be something like:
``` python
LANGUAGES = [
('en', 'English'),
('de', 'Deutsch'),
('fr', 'French'),
]
CMS_LANGUAGES = {
1: [
{
'code': 'de',
'name': gettext('Deutsch'),
'public': True,
},
{
'code': 'fr',
'name': gettext('French'),
'fallbacks': ['de',],
'public': False,
},
],
'default': {
'fallbacks': ['de',],
'redirect_on_fallback':True,
'public': False,
'hide_untranslated': False,
}
}
```
`'en'` is in `LANGUAGES` but not in `CMS_LANGUAGES`.
Now if `cms.utils.i18n.get_fallback_languages` is called with `'en'` as argument (that happens for example if you try to add a page in the admin with the admin UI in English, as the add view tries to log the page change in the current active language, not language of the page. This triggers a call to `get_fallback_languages` with English as the argument) it raises a `LanguageError` as `'en'` is not available to the CMS.
cms.utils.i18n.get_fallback_languages may fail if LANGUAGES has more languages than CMS_LANGUAGES
Reported via IRC.
Use case: Show the admin interface in English (for users that configured their browser to English), but CMS pages should only be in German or French.
In the use case above, settings might be something like:
``` python
LANGUAGES = [
('en', 'English'),
('de', 'Deutsch'),
('fr', 'French'),
]
CMS_LANGUAGES = {
1: [
{
'code': 'de',
'name': gettext('Deutsch'),
'public': True,
},
{
'code': 'fr',
'name': gettext('French'),
'fallbacks': ['de',],
'public': False,
},
],
'default': {
'fallbacks': ['de',],
'redirect_on_fallback':True,
'public': False,
'hide_untranslated': False,
}
}
```
`'en'` is in `LANGUAGES` but not in `CMS_LANGUAGES`.
Now if `cms.utils.i18n.get_fallback_languages` is called with `'en'` as argument (that happens for example if you try to add a page in the admin with the admin UI in English, as the add view tries to log the page change in the current active language, not language of the page. This triggers a call to `get_fallback_languages` with English as the argument) it raises a `LanguageError` as `'en'` is not available to the CMS.
| [
{
"content": "# -*- coding: utf-8 -*-\nfrom contextlib import contextmanager\n\nfrom django.core.urlresolvers import get_resolver, LocaleRegexURLResolver\nfrom django.conf import settings\nfrom django.utils import translation\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom cms.exceptions import... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom contextlib import contextmanager\n\nfrom django.core.urlresolvers import get_resolver, LocaleRegexURLResolver\nfrom django.conf import settings\nfrom django.utils import translation\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom cms.exceptions import... | diff --git a/cms/tests/i18n.py b/cms/tests/i18n.py
index 579224462a1..8f10c1815fa 100644
--- a/cms/tests/i18n.py
+++ b/cms/tests/i18n.py
@@ -1,5 +1,7 @@
from cms.test_utils.testcases import SettingsOverrideTestCase
from cms.utils import i18n
+from cms.utils.i18n import get_fallback_languages
+
class TestLanguages(SettingsOverrideTestCase):
@@ -269,3 +271,36 @@ def test_get_languages_undefined_site(self):
for lang in result:
self.assertEqual(lang['public'], True)
self.assertEqual(lang['hide_untranslated'], False)
+
+
+class TestLanguagesNotInCMSLanguages(SettingsOverrideTestCase):
+ settings_overrides = {
+ 'LANGUAGE_CODE': 'en',
+ 'LANGUAGES': [
+ ('en', 'English'),
+ ('de', 'German'),
+ ('fr', 'French')
+ ],
+ 'CMS_LANGUAGES': {
+ 1: [
+ {
+ 'code': 'de',
+ 'name': 'German',
+ 'public': True,
+ },
+ {
+ 'code': 'fr',
+ 'name': 'French',
+ 'public': True
+ }
+ ],
+ 'default': {
+ 'fallbacks': ['de', 'fr'],
+ }
+ },
+ 'SITE_ID': 1,
+ }
+
+ def test_get_fallback_languages(self):
+ languages = get_fallback_languages('en', 1)
+ self.assertEqual(languages, ['de', 'fr'])
diff --git a/cms/utils/i18n.py b/cms/utils/i18n.py
index 68868947a75..ed5f6165168 100644
--- a/cms/utils/i18n.py
+++ b/cms/utils/i18n.py
@@ -162,7 +162,10 @@ def get_fallback_languages(language, site_id=None):
"""
returns a list of fallback languages for the given language
"""
- language = get_language_object(language, site_id)
+ try:
+ language = get_language_object(language, site_id)
+ except LanguageError:
+ language = get_languages(site_id)[0]
return language.get('fallbacks', [])
|
spack__spack-20572 | improve installation of Zoltran: imposing +int64 constrains on parmetis
<!--*Please add a concise summary of your suggestion here.*-->
### Rationale
zoltan spec has a variant called `int64` which imposes the corresponding constrain on metis.
https://github.com/spack/spack/blob/6947951aaf9954b1dfd12ca7a9266d7335f07105/var/spack/repos/builtin/packages/zoltan/package.py#L37-L44
The same constrain must be applied to parmetis.
<!--*Is your feature request related to a problem? Please describe it!*-->
### Description
I guess a solution can be something like
```
depends_on('parmetis@4:', when='+parmetis')
depends_on('parmetis@4: +int64', when='+parmetis+int64')
```
<!--*Describe the solution you'd like and the alternatives you have considered.*-->
### Additional information
<!--*Add any other context about the feature request here.*-->
I guess this happens because parmetis package has been recently updated and `int64` has been added. Because there was no such an option in parmetis for a long time people came up with a workaround by specifying `metis+int64` explicitly in their script. The parametis update brings an inconsistency because `int64` is off by default in parmetis, however, and the ''legacy'' workaround imposes `int64` on metis.
My spack version is 0.16.0
### General information
- [x] I have run `spack --version` and reported the version of Spack
- [x] I have searched the issues of this repo and believe this is not a duplicate
<!--If you want to ask a question about the tool (how to use it, what it can currently do, etc.), try the `#general` channel on our Slack first. We have a welcoming community and chances are you'll get your reply faster and without opening an issue.
Other than that, thanks for taking the time to contribute to Spack!
-->
| [
{
"content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\n\nfrom spack import *\nimport re\n\n\nclass Zoltan(AutotoolsPackage):\n \"\"\"The Zoltan lib... | [
{
"content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\n\nfrom spack import *\nimport re\n\n\nclass Zoltan(AutotoolsPackage):\n \"\"\"The Zoltan lib... | diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py
index 769ca81be67e4d..e96579d6c3b3cc 100644
--- a/var/spack/repos/builtin/packages/zoltan/package.py
+++ b/var/spack/repos/builtin/packages/zoltan/package.py
@@ -39,6 +39,7 @@ class Zoltan(AutotoolsPackage):
depends_on('mpi', when='+mpi')
+ depends_on('parmetis@4: +int64', when='+parmetis+int64')
depends_on('parmetis@4:', when='+parmetis')
depends_on('metis+int64', when='+parmetis+int64')
depends_on('metis', when='+parmetis')
|
Mailu__Mailu-2116 | Error 404 not found when opening admin after upgrade 1.8 to master
## Before you open your issue
- [X] Check if no issue or pull-request for this already exists.
- [X] Check [documentation](https://mailu.io/master/) and [FAQ](https://mailu.io/master/faq.html). (Tip, use the search function on the documentation page)
- [X] You understand `Mailu` is made by volunteers in their **free time** — be conscise, civil and accept that delays can occur.
- [X] The title of the issue should be short and simple. It should contain specific terms related to the actual issue. Be specific while writing the title.
## Environment & Versions
### Environment
- [X] docker-compose
### Versions
Before upgrade: Docker 1.8 images.
After upgrade: Docker master images (pulled 30 December 2021).
## Description
**Mailu 1.8** image redirects `/admin` to `/admin/ui`.
**Mailu master** image no longer redirects `/admin/ui` as the `ui` part in the URL has been removed according to [Tomcat 1929.enhacement](https://github.com/Mailu/Mailu/blob/master/towncrier/newsfragments/1929.enhancement):
> Removed the /admin/ prefix to reduce complexity of routing with Mailu. Admin is accessible directly via /admin instead of /admin/ui
After the upgrade from `1.8` to `master` and visiting the admin page, the browser still uses the cached URL `/admin/ui` and results in 404 not found.
## Replication Steps
1. Create 1.8 production environment on AMD64 platform using `mailu 1.8 Docker images`.
2. Make sure the Admin page works.
3. Remove docker containers (`docker-compose down`).
4. Recreate **all** containers at the same time using `mailu master Docker images`.
5. Open root mail domain. The browser uses the cached URL `admin/ui` and shows Error 404 not found.
Note: Tested with `TLS_FLAVOR=letsencrypt`, admin and roundcube and Firefox.
## Expected behaviour
Backwards compatibility after Mailu 1.8 upgrade without the need of removing browser caches.
## Front log
```
front_1 | <IP> - - [30/Dec/2021:10:14:35 +0000] "GET /admin/ui/ HTTP/2.0" 404 198 "https://mail.mydomain.nl/sso/login" "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0"
```
## Bugfix
Proposal is to redirect `/admin/ui` always to `/admin` to prevent browser caching problems after the upgrade.
| [
{
"content": "from mailu import models, utils\nfrom mailu.ui import ui, forms, access\n\nfrom flask import current_app as app\nimport flask\nimport flask_login\n\n\n@ui.route('/', methods=[\"GET\"])\n@access.authenticated\ndef index():\n return flask.redirect(flask.url_for('.user_settings'))\n\n@ui.route('/a... | [
{
"content": "from mailu import models, utils\nfrom mailu.ui import ui, forms, access\n\nfrom flask import current_app as app\nimport flask\nimport flask_login\n\n\n@ui.route('/', methods=[\"GET\"])\n@access.authenticated\ndef index():\n return flask.redirect(flask.url_for('.user_settings'))\n\n@ui.route('/u... | diff --git a/core/admin/mailu/ui/views/base.py b/core/admin/mailu/ui/views/base.py
index 01e168a1e..9b7614e1d 100644
--- a/core/admin/mailu/ui/views/base.py
+++ b/core/admin/mailu/ui/views/base.py
@@ -11,6 +11,10 @@
def index():
return flask.redirect(flask.url_for('.user_settings'))
+@ui.route('/ui/')
+def redirect_old_path():
+ return flask.redirect(flask.url_for('.index'), code=301)
+
@ui.route('/announcement', methods=['GET', 'POST'])
@access.global_admin
def announcement():
|
numba__numba-4034 | Make type.Optional string representation more friendly
<!--
Thanks for opening an issue! To help the Numba team handle your information
efficiently, please first ensure that there is no other issue present that
already describes the issue you have
(search at https://github.com/numba/numba/issues?&q=is%3Aissue).
For more general "how do I do X?" type questions, please speak to us in real
time on https://gitter.im/numba/numba or post to the Numba mailing list
https://groups.google.com/a/continuum.io/forum/#!forum/numba-users.
-->
## Feature request
For e.g. `types.Optional(types.float64)` the current `str()` is `?float64` which is fine, but it may be more helpful for users to produce something like:
`OptionalType(float64) i.e. type 'float64 or None'`
such that an error message might read e.g.:
```
Dict.value_type cannot be of type OptionalType(float64) i.e. type 'float64 or None'
```
instead of:
```
Dict.value_type cannot be of type ?float64
```
<!--
Please include details of the feature you would like to see, why you would
like to see it/the use case
-->
| [
{
"content": "from __future__ import print_function, division, absolute_import\n\nfrom .abstract import *\nfrom .common import *\nfrom ..typeconv import Conversion\nfrom ..errors import TypingError, LiteralTypingError\n\n\n\nclass PyObject(Dummy):\n \"\"\"\n A generic CPython object.\n \"\"\"\n\n de... | [
{
"content": "from __future__ import print_function, division, absolute_import\n\nfrom .abstract import *\nfrom .common import *\nfrom ..typeconv import Conversion\nfrom ..errors import TypingError, LiteralTypingError\n\n\n\nclass PyObject(Dummy):\n \"\"\"\n A generic CPython object.\n \"\"\"\n\n de... | diff --git a/docs/source/glossary.rst b/docs/source/glossary.rst
index 9fe07808e4c..e9df79622b6 100644
--- a/docs/source/glossary.rst
+++ b/docs/source/glossary.rst
@@ -67,6 +67,15 @@ Glossary
no faster than Python interpreted code, unless the Numba compiler can
take advantage of :term:`loop-jitting`.
+ ``OptionalType``
+ An ``OptionalType`` is effectively a type union of a ``type`` and ``None``.
+ They typically occur in practice due to a variable being set to ``None``
+ and then in a branch the variable being set to some other value. It's
+ often not possible at compile time to determine if the branch will execute
+ so to permit :term:`type inference` to complete, the type of the variable
+ becomes the union of a ``type`` (from the value) and ``None``,
+ i.e. ``OptionalType(type)``.
+
type inference
The process by which Numba determines the specialized types of all
values within a function being compiled. Type inference can fail
diff --git a/numba/tests/test_dicts.py b/numba/tests/test_dicts.py
index e607ee5d08e..5be862d4c14 100644
--- a/numba/tests/test_dicts.py
+++ b/numba/tests/test_dicts.py
@@ -137,7 +137,7 @@ def foo(choice):
with self.assertRaises(TypingError) as raises:
foo(True)
self.assertIn(
- "Dict.value_type cannot be of type ?float64",
+ "Dict.value_type cannot be of type OptionalType(float64)",
str(raises.exception),
)
@@ -151,7 +151,7 @@ def foo(choice):
with self.assertRaises(TypingError) as raises:
foo(True)
self.assertIn(
- "Dict.key_type cannot be of type ?float64",
+ "Dict.key_type cannot be of type OptionalType(float64)",
str(raises.exception),
)
diff --git a/numba/types/misc.py b/numba/types/misc.py
index b96dded0c1d..9dc1af9dd1d 100644
--- a/numba/types/misc.py
+++ b/numba/types/misc.py
@@ -209,7 +209,7 @@ def __init__(self, typ):
assert not isinstance(typ, (Optional, NoneType))
typ = unliteral(typ)
self.type = typ
- name = "?%s" % typ
+ name = "OptionalType(%s) i.e. the type '%s or None'" % (typ, typ)
super(Optional, self).__init__(name)
@property
|
ray-project__ray-3621 | [modin] Importing Modin before Ray can sometimes cause ImportError
### Describe the problem
<!-- Describe the problem clearly here. -->
When running Modin with Ray installed from source, I am sometimes running into `ImportError` and `ModuleNotFoundError` which is occurring when I am running a modified version of Modin. This forces me to modify Ray's source such that it does not try to use the Modin that is bundled with Ray.
I will work on a solution for this.
### Source code / logs
`import modin.pandas as pd`
```
Traceback (most recent call last):
File "/home/ubuntu/ray/python/ray/function_manager.py", line 165, in fetch_and_register_remote_function
function = pickle.loads(serialized_function)
ModuleNotFoundError: No module named 'modin.data_management.utils'
```
| [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport sys\n\nif \"pyarrow\" in sys.modules:\n raise ImportError(\"Ray must be imported before pyarrow because Ray \"\n \"requires a specific version... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport sys\n\nif \"pyarrow\" in sys.modules:\n raise ImportError(\"Ray must be imported before pyarrow because Ray \"\n \"requires a specific version... | diff --git a/python/ray/__init__.py b/python/ray/__init__.py
index ed024a107aa50..776c6d0367294 100644
--- a/python/ray/__init__.py
+++ b/python/ray/__init__.py
@@ -47,7 +47,7 @@
raise
modin_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "modin")
-sys.path.insert(0, modin_path)
+sys.path.append(modin_path)
from ray.raylet import ObjectID, _config # noqa: E402
from ray.profiling import profile # noqa: E402
|
great-expectations__great_expectations-1713 | Use cleaner solution for non-truncating division in python 2
Prefer `from __future__ import division` to `1.*x/y`
| [
{
"content": "import logging\nimport uuid\nfrom copy import deepcopy\n\nfrom marshmallow import (\n INCLUDE,\n Schema,\n ValidationError,\n fields,\n post_dump,\n post_load,\n validates_schema,\n)\nfrom ruamel.yaml import YAML\nfrom ruamel.yaml.comments import CommentedMap\n\nimport great_e... | [
{
"content": "import logging\nimport uuid\nfrom copy import deepcopy\n\nfrom marshmallow import (\n INCLUDE,\n Schema,\n ValidationError,\n fields,\n post_dump,\n post_load,\n validates_schema,\n)\nfrom ruamel.yaml import YAML\nfrom ruamel.yaml.comments import CommentedMap\n\nimport great_e... | diff --git a/great_expectations/data_context/types/base.py b/great_expectations/data_context/types/base.py
index 2d1e379ad28e..585f55b7ec86 100644
--- a/great_expectations/data_context/types/base.py
+++ b/great_expectations/data_context/types/base.py
@@ -227,6 +227,7 @@ class Meta:
keys=fields.Str(), values=fields.Dict(), allow_none=True
)
credentials = fields.Raw(allow_none=True)
+ spark_context = fields.Raw(allow_none=True)
@validates_schema
def validate_schema(self, data, **kwargs):
|
cython__cython-3429 | cdiv and cmod incorrect?
I was looking at the definitions of `cdiv` and `cmod` in Shadow.py. These seem to give incorrect results for some operands. For example, in C99:
```
4 / -4 == -1 4 % -4 == 0
4 / -2 == -2 4 % -2 == 0
4 / -1 == -4 4 % -1 == 0
```
But these functions would return:
```
cdiv(4, -4) == 0 cmod(4, -4) == 4
cdiv(4, -2) == -1 cmod(4, -2) == 2
cdiv(4, -1) == -3 cmod(4, -1) == 1
```
That's based on just running those definitions in the Python interpreter. Perhaps Cython handles them specially, and doesn't in fact give the incorrect results above. Still, why not include correct Python code? The following would work:
```
def cdiv(a, b):
if a < 0:
a = -a
b = -b
if b < 0:
return (a + b + 1) // b
return a // b
def cmod(a, b):
r = a % b
if (a*b) < 0 and r: r -= b
return r
```
Sorry if this is just me misunderstanding some magic behind the scenes stuff.
| [
{
"content": "# cython.* namespace for pure mode.\nfrom __future__ import absolute_import\n\n__version__ = \"3.0a0\"\n\ntry:\n from __builtin__ import basestring\nexcept ImportError:\n basestring = str\n\n\n# BEGIN shameless copy from Cython/minivect/minitypes.py\n\nclass _ArrayType(object):\n\n is_arr... | [
{
"content": "# cython.* namespace for pure mode.\nfrom __future__ import absolute_import\n\n__version__ = \"3.0a0\"\n\ntry:\n from __builtin__ import basestring\nexcept ImportError:\n basestring = str\n\n\n# BEGIN shameless copy from Cython/minivect/minitypes.py\n\nclass _ArrayType(object):\n\n is_arr... | diff --git a/Cython/Shadow.py b/Cython/Shadow.py
index b4c20c5b3dc..a0e014a1692 100644
--- a/Cython/Shadow.py
+++ b/Cython/Shadow.py
@@ -146,14 +146,16 @@ def compile(f):
# Special functions
def cdiv(a, b):
- q = a / b
- if q < 0:
- q += 1
- return q
+ if a < 0:
+ a = -a
+ b = -b
+ if b < 0:
+ return (a + b + 1) // b
+ return a // b
def cmod(a, b):
r = a % b
- if (a*b) < 0:
+ if (a * b) < 0 and r:
r -= b
return r
diff --git a/tests/run/cdivision_CEP_516.pyx b/tests/run/cdivision_CEP_516.pyx
index c8b24a0e1bc..fbd2def3abc 100644
--- a/tests/run/cdivision_CEP_516.pyx
+++ b/tests/run/cdivision_CEP_516.pyx
@@ -27,6 +27,9 @@ True
>>> [test_cdiv_cmod(a, b) for a, b in v]
[(1, 7), (-1, -7), (1, -7), (-1, 7)]
+>>> [test_cdiv_cmod(a, b) for a, b in [(4, -4), (4, -2), (4, -1)]]
+[(-1, 0), (-2, 0), (-4, 0)]
+
>>> all([mod_int_py(a,b) == a % b for a in range(-10, 10) for b in range(-10, 10) if b != 0])
True
>>> all([div_int_py(a,b) == a // b for a in range(-10, 10) for b in range(-10, 10) if b != 0])
|
ansible-collections__community.general-4809 | redhat_subscription module broken with RHEL 9
### Summary
When I try to ensure that a system does not have a subscription active, I get a failed task for a RHEL 9 system.
Example:
```yaml
- name: Ensure system subscription is absent
redhat_subscription:
state: absent
activationkey: "{{ sat_activationkey }}"
org_id: "{{ sat_organization }}"
```
fails for a RHEL9 host.
### Issue Type
Bug Report
### Component Name
redhat_subscription
### Ansible Version
```console (paste below)
$ ansible --version
```
### Community.general Version
```console (paste below)
$ ansible-galaxy collection list community.general
Collection Version
----------------- -------
community.general 5.0.0
```
### Configuration
```console (paste below)
$ ansible-config dump --only-changed
```
### OS / Environment
RHEL 9
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
```yaml
- name: Ensure system subscription is absent
redhat_subscription:
state: absent
activationkey: "{{ sat_activationkey }}"
org_id: "{{ sat_organization }}"
```
for a RHEL9 host, the task fails:
```
fatal: [servera]: FAILED! => {"changed": false, "cmd": "/sbin/subscription-manager unsubscribe --all", "msg": "", "rc": 1, "stderr": "", "stderr_lines": [], "stdout": "Usage: subscription-manager MODULE-NAME [MODULE-OPTIONS] [--help]\n\r\nPrimary Modules: \n\n attach Attach a specified subscription to the registered system, when system does not use Simple Content Access mode\n list List subscription and product information for this system\n refresh Pull the latest subscription data from the server\n register Register this system to the Customer Portal or another subscription management service\n release Configure which operating system release to use\n remove Remove all or specific subscriptions from this system\n status Show status information for this system's subscriptions and products\n unregister Unregister this system from the Customer Portal or another subscription management service\n\nOther Modules: \n\n addons Deprecated, see 'syspurpose'\n auto-attach Set if subscriptions are attached on a schedule (default of daily)\n clean Remove all local system and subscription data without affecting the server\n config List, set, or remove the configuration parameters in use by this system\n environments Display the environments available for a user\n facts View or update the detected system information\n identity Display the identity certificate for this system or request a new one\n import Import certificates which were provided outside of the tool\n orgs Display the organizations against which a user can register a system\n plugins View and configure with 'subscription-manager plugins'\n redeem Attempt to redeem a subscription for a preconfigured system\n repo-override Manage custom content repository settings\n repos List the repositories which this system is entitled to use\n role Deprecated, see 'syspurpose'\n service-level Deprecated, see 'syspurpose'\n syspurpose Convenient module for managing all system purpose settings\n usage Deprecated, see 'syspurpose'\n version Print version information\n\n", "stdout_lines": ["Usage: subscription-manager MODULE-NAME [MODULE-OPTIONS] [--help]", "", "Primary Modules: ", "", " attach Attach a specified subscription to the registered system, when system does not use Simple Content Access mode", " list List subscription and product information for this system", " refresh Pull the latest subscription data from the server", " register Register this system to the Customer Portal or another subscription management service", " release Configure which operating system release to use", " remove Remove all or specific subscriptions from this system", " status Show status information for this system's subscriptions and products", " unregister Unregister this system from the Customer Portal or another subscription management service", "", "Other Modules: ", "", " addons Deprecated, see 'syspurpose'", " auto-attach Set if subscriptions are attached on a schedule (default of daily)", " clean Remove all local system and subscription data without affecting the server", " config List, set, or remove the configuration parameters in use by this system", " environments Display the environments available for a user", " facts View or update the detected system information", " identity Display the identity certificate for this system or request a new one", " import Import certificates which were provided outside of the tool", " orgs Display the organizations against which a user can register a system", " plugins View and configure with 'subscription-manager plugins'", " redeem Attempt to redeem a subscription for a preconfigured system", " repo-override Manage custom content repository settings", " repos List the repositories which this system is entitled to use", " role Deprecated, see 'syspurpose'", " service-level Deprecated, see 'syspurpose'", " syspurpose Convenient module for managing all system purpose settings", " usage Deprecated, see 'syspurpose'", " version Print version information", ""]}
```
```yaml (paste below)
```
### Expected Results
I expected this to unsubscribe the host.
### Actual Results
```console (paste below)
"stdout_lines": [
"Usage: subscription-manager MODULE-NAME [MODULE-OPTIONS] [--help]",
"",
"Primary Modules: ",
"",
" attach Attach a specified subscription to the registered system, when system does not use Simple Content Access mode",
" list List subscription and product information for this system",
" refresh Pull the latest subscription data from the server",
" register Register this system to the Customer Portal or another subscription management service",
" release Configure which operating system release to use",
" remove Remove all or specific subscriptions from this system",
" status Show status information for this system's subscriptions and products",
" unregister Unregister this system from the Customer Portal or another subscription management service",
"",
"Other Modules: ",
"",
" addons Deprecated, see 'syspurpose'",
" auto-attach Set if subscriptions are attached on a schedule (default of daily)",
" clean Remove all local system and subscription data without affecting the server",
" config List, set, or remove the configuration parameters in use by this system",
" environments Display the environments available for a user",
" facts View or update the detected system information",
" identity Display the identity certificate for this system or request a new one",
" import Import certificates which were provided outside of the tool",
" orgs Display the organizations against which a user can register a system",
" plugins View and configure with 'subscription-manager plugins'",
" redeem Attempt to redeem a subscription for a preconfigured system",
" repo-override Manage custom content repository settings",
" repos List the repositories which this system is entitled to use",
" role Deprecated, see 'syspurpose'",
" service-level Deprecated, see 'syspurpose'",
" syspurpose Convenient module for managing all system purpose settings",
" usage Deprecated, see 'syspurpose'",
" version Print version information",
""
]
}
```
This appears to happen because in RHEL 9, `subscription-manager unsubscribe` is not a valid command sequence. There is not `unsubscribe` sub-command (but there is, in RHEL 8).
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct
| [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# James Laska (jlaska@redhat.com)\n#\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\n... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# James Laska (jlaska@redhat.com)\n#\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\n... | diff --git a/changelogs/fragments/4809-redhat_subscription-unsubscribe.yaml b/changelogs/fragments/4809-redhat_subscription-unsubscribe.yaml
new file mode 100644
index 00000000000..39a364d0072
--- /dev/null
+++ b/changelogs/fragments/4809-redhat_subscription-unsubscribe.yaml
@@ -0,0 +1,2 @@
+bugfixes:
+ - redhat_subscription - fix unsubscribing on RHEL 9 (https://github.com/ansible-collections/community.general/issues/4741).
diff --git a/plugins/modules/packaging/os/redhat_subscription.py b/plugins/modules/packaging/os/redhat_subscription.py
index 7bb540b3f13..7309ba7d66f 100644
--- a/plugins/modules/packaging/os/redhat_subscription.py
+++ b/plugins/modules/packaging/os/redhat_subscription.py
@@ -468,7 +468,7 @@ def unsubscribe(self, serials=None):
items = ["--all"]
if items:
- args = [SUBMAN_CMD, 'unsubscribe'] + items
+ args = [SUBMAN_CMD, 'remove'] + items
rc, stderr, stdout = self.module.run_command(args, check_rc=True)
return serials
diff --git a/tests/unit/plugins/modules/packaging/os/test_redhat_subscription.py b/tests/unit/plugins/modules/packaging/os/test_redhat_subscription.py
index 7f430ee72cb..8eb7ead6741 100644
--- a/tests/unit/plugins/modules/packaging/os/test_redhat_subscription.py
+++ b/tests/unit/plugins/modules/packaging/os/test_redhat_subscription.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
# Author: Jiri Hnidek (jhnidek@redhat.com)
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@@ -118,7 +119,7 @@ def test_without_required_parameters(capfd, patch_redhat_subscription):
(0, 'system identity: b26df632-25ed-4452-8f89-0308bfd167cb', '')
),
(
- ['/testbin/subscription-manager', 'unsubscribe', '--all'],
+ ['/testbin/subscription-manager', 'remove', '--all'],
{'check_rc': True},
(0, '', '')
),
@@ -755,7 +756,7 @@ def test_without_required_parameters(capfd, patch_redhat_subscription):
(
[
'/testbin/subscription-manager',
- 'unsubscribe',
+ 'remove',
'--serial=7807912223970164816',
],
{'check_rc': True},
|
mne-tools__mne-python-10487 | Argument `theme` of `raw.plot()` or config key does not work on macOS
As spotted following the discussion here https://github.com/mne-tools/mne-qt-browser/issues/83 the argument `theme` does not change the theme on either my macOS or Windows computer.
Sample code:
```
import mne
folder = mne.datasets.sample.data_path() / 'MEG' / 'sample'
raw = mne.io.read_raw(folder / 'sample_audvis_filt-0-40_raw.fif', preload=True)
raw.plot(theme='dark')
```
| [
{
"content": "\"\"\"Functions to plot raw M/EEG data.\"\"\"\n\n# Authors: Eric Larson <larson.eric.d@gmail.com>\n# Jaakko Leppakangas <jaeilepp@student.jyu.fi>\n# Daniel McCloy <dan.mccloy@gmail.com>\n#\n# License: Simplified BSD\n\nfrom functools import partial\nfrom collections import Ordere... | [
{
"content": "\"\"\"Functions to plot raw M/EEG data.\"\"\"\n\n# Authors: Eric Larson <larson.eric.d@gmail.com>\n# Jaakko Leppakangas <jaeilepp@student.jyu.fi>\n# Daniel McCloy <dan.mccloy@gmail.com>\n#\n# License: Simplified BSD\n\nfrom functools import partial\nfrom collections import Ordere... | diff --git a/mne/viz/raw.py b/mne/viz/raw.py
index 5f238139a68..07fe8aeac74 100644
--- a/mne/viz/raw.py
+++ b/mne/viz/raw.py
@@ -351,7 +351,8 @@ def plot_raw(raw, events=None, duration=10.0, start=0.0, n_channels=20,
bgcolor=bgcolor,
# Qt-specific
precompute=precompute,
- use_opengl=use_opengl)
+ use_opengl=use_opengl,
+ theme=theme)
fig = _get_browser(show=show, block=block, **params)
|
conda__conda-5009 | When lacking permissions to write, clone message should quote prefix.
When trying to install a new package into a location that the user lacks write permissions (read-only root), conda helpfully suggests cloning the environment into a new location:
```
CondaIOError: IO error: Missing write permissions in: C:\Program Files\Anaconda
#
# You don't appear to have the necessary permissions to install packages
# into the install area 'C:\Program Files\Anaconda'.
# However you can clone this environment into your home directory and
# then make changes to it.
# This may be done using the command:
#
# $ conda create -n my_deathstar --clone=C:\Program Files\Anaconda\envs\deathstar
```
As shown in the example above, this clone path may include spaces. This will be particularly common on Windows, where a global install will result in files written to Program Files, which a non-administrator user will not be able to write to, and contains spaces. Because the command presents a prefix, it should be quoted to guard against this case.
| [
{
"content": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom os.path import join\n\nfrom .common import name_prefix\nfrom ..base.context import context\nfrom ..exceptions import CondaIOError\n\n\ndef read_message(fn):\n res = []\n for envs_dir in context.envs_di... | [
{
"content": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom os.path import join\n\nfrom .common import name_prefix\nfrom ..base.context import context\nfrom ..exceptions import CondaIOError\n\n\ndef read_message(fn):\n res = []\n for envs_dir in context.envs_di... | diff --git a/conda/cli/help.py b/conda/cli/help.py
index 855c2d3ea7d..278681a4670 100644
--- a/conda/cli/help.py
+++ b/conda/cli/help.py
@@ -35,7 +35,7 @@ def root_read_only(command, prefix, json=False):
# then make changes to it.
# This may be done using the command:
#
-# $ conda create -n my_${name} --clone=${prefix}
+# $ conda create -n my_${name} --clone="${prefix}"
"""
msg = msg.replace('${root_dir}', context.root_prefix)
msg = msg.replace('${prefix}', prefix)
|
microsoft__torchgeo-1433 | USAVars Augmentation maps to 0
### Description
In the USAVars Datamodule, the default augmentation from NonGeoDatamodule is used. However, the dataset returns uint8 data, and it comes out of the augmentation still as uint8. This means you get an error when trying to train but also that your input images are just all zeros.
### Steps to reproduce
```
dm = USAVarsDataModule(root="path/to/usa_vars", batch_size=16)
dm.setup("fit")
dl = dm.train_dataloader()
batch = next(iter(dl))
aug_batch = dm.aug(batch)
print(aug_batch["image"].max())
```
### Version
'0.5.0.dev0'
| [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n\"\"\"USAVars dataset.\"\"\"\n\nimport glob\nimport os\nfrom collections.abc import Sequence\nfrom typing import Callable, Optional\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport raste... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n\"\"\"USAVars dataset.\"\"\"\n\nimport glob\nimport os\nfrom collections.abc import Sequence\nfrom typing import Callable, Optional\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport raste... | diff --git a/torchgeo/datasets/usavars.py b/torchgeo/datasets/usavars.py
index b27bffaaf4b..43369dfdcab 100644
--- a/torchgeo/datasets/usavars.py
+++ b/torchgeo/datasets/usavars.py
@@ -200,7 +200,7 @@ def _load_image(self, path: str) -> Tensor:
"""
with rasterio.open(path) as f:
array: "np.typing.NDArray[np.int_]" = f.read()
- tensor = torch.from_numpy(array)
+ tensor = torch.from_numpy(array).float()
return tensor
def _verify(self) -> None:
|
gammapy__gammapy-5254 | FluxPoints.write() is ignoring overwrite when file extension is not FITS
**Gammapy version**
1.2
**Bug description**
When writing a `FluxPoints` table (_.ecsv_) to file it is not possible to overwrite it.
**Expected behavior**
The `overwrite` argument should be taken into account.
**To Reproduce**
From any analysis get a `FluxPoints` instance (in my case it was from obtained from `LightCurveEstimator.run()`)
and call the `write()` method with `overwrite=True`.
You will get the following error,
`OSError: File xxxxxx.ecsv already exists. If you mean to replace it then use the argument "overwrite=True".`
**Other information**
The bug is here: https://github.com/gammapy/gammapy/blob/2475a006e02ac1497eccc362de61e68a5f7a10eb/gammapy/estimators/points/core.py#L270
It should be sufficient to pass the `overwrite` argument to `table.write()`, because the default (inherited from `astropy.table.Table.write()`) is `False`.
| [
{
"content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nimport logging\nfrom copy import deepcopy\nimport numpy as np\nfrom scipy import stats\nfrom scipy.interpolate import interp1d\nfrom scipy.optimize import minimize\nfrom astropy.io import fits\nfrom astropy.io.registry import IORegis... | [
{
"content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nimport logging\nfrom copy import deepcopy\nimport numpy as np\nfrom scipy import stats\nfrom scipy.interpolate import interp1d\nfrom scipy.optimize import minimize\nfrom astropy.io import fits\nfrom astropy.io.registry import IORegis... | diff --git a/gammapy/estimators/points/core.py b/gammapy/estimators/points/core.py
index 87dd6856c4..fb3aa0e7f5 100644
--- a/gammapy/estimators/points/core.py
+++ b/gammapy/estimators/points/core.py
@@ -267,7 +267,7 @@ def write(
table = self.to_table(sed_type=sed_type, format=format)
if ".fits" not in filename.suffixes:
- table.write(filename)
+ table.write(filename, overwrite=overwrite)
return
primary_hdu = fits.PrimaryHDU()
diff --git a/gammapy/estimators/points/tests/test_core.py b/gammapy/estimators/points/tests/test_core.py
index 867e35e17f..dc2e023f06 100644
--- a/gammapy/estimators/points/tests/test_core.py
+++ b/gammapy/estimators/points/tests/test_core.py
@@ -211,12 +211,14 @@ def test_write_fits(self, tmp_path, flux_points):
assert str(flux_points) == str(actual)
def test_write_ecsv(self, tmp_path, flux_points):
+ filename = tmp_path / "flux_points.ecsv"
+ filename.touch()
flux_points.write(
- tmp_path / "flux_points.ecsv",
+ filename,
sed_type=flux_points.sed_type_init,
overwrite=True,
)
- actual = FluxPoints.read(tmp_path / "flux_points.ecsv")
+ actual = FluxPoints.read(filename)
actual._data.pop("is_ul", None)
flux_points._data.pop("is_ul", None)
assert str(flux_points) == str(actual)
|
bookwyrm-social__bookwyrm-2387 | Internal Server Errors (e.g. on delete of user)
**Describe the bug**
Internal server error for some actions. I have set up a dockerless installation and am able to access the application and the admin pages. However, some actions create errors. For example:
**To Reproduce**
Steps to reproduce the behavior:
1. Clicking delete user after providing admin password. Browser shows internal server error. Error in application is:
```
Internal Server Error: /settings/reports/2/delete
Traceback (most recent call last):
File "/opt/bookwyrm/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/opt/bookwyrm/venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 204, in _get_response
response = response.render()
File "/opt/bookwyrm/venv/lib/python3.10/site-packages/django/template/response.py", line 105, in render
self.content = self.rendered_content
File "/opt/bookwyrm/venv/lib/python3.10/site-packages/django/template/response.py", line 81, in rendered_content
template = self.resolve_template(self.template_name)
File "/opt/bookwyrm/venv/lib/python3.10/site-packages/django/template/response.py", line 65, in resolve_template
return get_template(template, using=self.using)
File "/opt/bookwyrm/venv/lib/python3.10/site-packages/django/template/loader.py", line 19, in get_template
raise TemplateDoesNotExist(template_name, chain=chain)
django.template.exceptions.TemplateDoesNotExist: user_admin/user.html
```
| [
{
"content": "\"\"\" moderation via flagged posts and users \"\"\"\nfrom django.contrib.auth.decorators import login_required, permission_required\nfrom django.core.paginator import Paginator\nfrom django.core.exceptions import PermissionDenied\nfrom django.shortcuts import get_object_or_404, redirect\nfrom dja... | [
{
"content": "\"\"\" moderation via flagged posts and users \"\"\"\nfrom django.contrib.auth.decorators import login_required, permission_required\nfrom django.core.paginator import Paginator\nfrom django.core.exceptions import PermissionDenied\nfrom django.shortcuts import get_object_or_404, redirect\nfrom dja... | diff --git a/bookwyrm/tests/views/admin/test_reports.py b/bookwyrm/tests/views/admin/test_reports.py
index e93b343413..6b31175d8e 100644
--- a/bookwyrm/tests/views/admin/test_reports.py
+++ b/bookwyrm/tests/views/admin/test_reports.py
@@ -15,6 +15,7 @@
class ReportViews(TestCase):
"""every response to a get request, html or json"""
+ # pylint: disable=invalid-name
def setUp(self):
"""we need basic test data and mocks"""
self.factory = RequestFactory()
@@ -147,3 +148,16 @@ def test_delete_user(self, *_):
self.rat.refresh_from_db()
self.assertFalse(self.rat.is_active)
self.assertEqual(self.rat.deactivation_reason, "moderator_deletion")
+
+ def test_delete_user_error(self, *_):
+ """toggle whether a user is able to log in"""
+ self.assertTrue(self.rat.is_active)
+ request = self.factory.post("", {"password": "wrong password"})
+ request.user = self.local_user
+
+ result = views.moderator_delete_user(request, self.rat.id)
+ self.assertIsInstance(result, TemplateResponse)
+ validate_html(result.render())
+
+ self.rat.refresh_from_db()
+ self.assertTrue(self.rat.is_active)
diff --git a/bookwyrm/views/admin/reports.py b/bookwyrm/views/admin/reports.py
index a0b222ebe4..cf91299d97 100644
--- a/bookwyrm/views/admin/reports.py
+++ b/bookwyrm/views/admin/reports.py
@@ -128,7 +128,7 @@ def moderator_delete_user(request, user_id):
form.errors["password"] = ["Invalid password"]
data = {"user": user, "group_form": forms.UserGroupForm(), "form": form}
- return TemplateResponse(request, "user_admin/user.html", data)
+ return TemplateResponse(request, "settings/users/user.html", data)
@login_required
|
openai__gym-1708 | Bug in PixelObservationWrapper
Error log
```
env = PixelObservationWrapper(env, pixels_only=True)
File "/home/tsan/Desktop/gym/gym/wrappers/pixel_observation.py", line 89, in __init__
pixels = self.env.render(**render_kwargs)
File "/home/tsan/Desktop/gym/gym/core.py", line 233, in render
return self.env.render(mode, **kwargs)
TypeError: render() got an unexpected keyword argument 'pixels'
```
Can be reproduced by running
```
import gym
from gym.wrappers.pixel_observation import PixelObservationWrapper # pylint: disable=E0401
env = gym.make('Acrobot-v1')
env.reset()
env = PixelObservationWrapper(env, pixels_only=True)
env.step(0)
```
| [
{
"content": "\"\"\"An observation wrapper that augments observations by pixel values.\"\"\"\n\nimport collections\nimport copy\n\nimport numpy as np\n\nfrom gym import spaces\nfrom gym import ObservationWrapper\n\nSTATE_KEY = 'state'\n\n\nclass PixelObservationWrapper(ObservationWrapper):\n \"\"\"Augment ob... | [
{
"content": "\"\"\"An observation wrapper that augments observations by pixel values.\"\"\"\n\nimport collections\nimport copy\n\nimport numpy as np\n\nfrom gym import spaces\nfrom gym import ObservationWrapper\n\nSTATE_KEY = 'state'\n\n\nclass PixelObservationWrapper(ObservationWrapper):\n \"\"\"Augment ob... | diff --git a/gym/wrappers/pixel_observation.py b/gym/wrappers/pixel_observation.py
index 1c282771dbb..7641cbf84f9 100644
--- a/gym/wrappers/pixel_observation.py
+++ b/gym/wrappers/pixel_observation.py
@@ -86,7 +86,7 @@ def __init__(self,
pixels_spaces = {}
for pixel_key in pixel_keys:
- pixels = self.env.render(**render_kwargs)
+ pixels = self.env.render(**render_kwargs[pixel_key])
if np.issubdtype(pixels.dtype, np.integer):
low, high = (0, 255)
|
Parsl__parsl-613 | TorqueProvider fails on NSCC
The following patch is required in order to run the `TorqueProvider` on NSCC:
```
[nscc04] ~/libsubmit >git diff
diff --git a/libsubmit/providers/torque/template.py b/libsubmit/providers/torque/template.py
index a00ce7c..056c648 100644
--- a/libsubmit/providers/torque/template.py
+++ b/libsubmit/providers/torque/template.py
@@ -8,7 +8,6 @@ template_string = '''#!/bin/bash
#PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node}
#PBS -o ${submit_script_dir}/${jobname}.submit.stdout
#PBS -e ${submit_script_dir}/${jobname}.submit.stderr
-#PBS -v WORKER_LOGGING_LEVEL
${overrides}
export JOBNAME="${jobname}"
```
Otherwise, the job fails with `qsub: cannot send environment with the job`. Could we just merge the patch, or should we make this configurable somehow?
| [
{
"content": "template_string = '''#!/bin/bash\n\n#PBS -S /bin/bash\n#PBS -N ${jobname}\n#PBS -m n\n#PBS -k eo\n#PBS -l walltime=$walltime\n#PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node}\n#PBS -o ${submit_script_dir}/${jobname}.submit.stdout\n#PBS -e ${submit_script_dir}/${jobname}.submit.stderr\n#PBS -... | [
{
"content": "template_string = '''#!/bin/bash\n\n#PBS -S /bin/bash\n#PBS -N ${jobname}\n#PBS -m n\n#PBS -k eo\n#PBS -l walltime=$walltime\n#PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node}\n#PBS -o ${submit_script_dir}/${jobname}.submit.stdout\n#PBS -e ${submit_script_dir}/${jobname}.submit.stderr\n${over... | diff --git a/parsl/providers/torque/template.py b/parsl/providers/torque/template.py
index a00ce7c096..056c6485d2 100644
--- a/parsl/providers/torque/template.py
+++ b/parsl/providers/torque/template.py
@@ -8,7 +8,6 @@
#PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node}
#PBS -o ${submit_script_dir}/${jobname}.submit.stdout
#PBS -e ${submit_script_dir}/${jobname}.submit.stderr
-#PBS -v WORKER_LOGGING_LEVEL
${overrides}
export JOBNAME="${jobname}"
|
googleapis__python-bigquery-66 | Bigquery: Model reference repr seems wrong for model_id
For `ModelReference`'s repr use project_id against model_id
https://github.com/googleapis/python-bigquery/blob/be5c8b1ede9a2d762fd5574c32587d125eca4713/google/cloud/bigquery/model.py#L432-L435
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n#... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n#... | diff --git a/google/cloud/bigquery/model.py b/google/cloud/bigquery/model.py
index d39ec5f2f..a2510e86c 100644
--- a/google/cloud/bigquery/model.py
+++ b/google/cloud/bigquery/model.py
@@ -430,6 +430,6 @@ def __hash__(self):
return hash(self._key())
def __repr__(self):
- return "ModelReference(project='{}', dataset_id='{}', project_id='{}')".format(
+ return "ModelReference(project_id='{}', dataset_id='{}', model_id='{}')".format(
self.project, self.dataset_id, self.model_id
)
diff --git a/tests/unit/model/test_model.py b/tests/unit/model/test_model.py
index bbb93ef9e..90fc09e66 100644
--- a/tests/unit/model/test_model.py
+++ b/tests/unit/model/test_model.py
@@ -316,5 +316,5 @@ def test_repr(target_class):
got = repr(model)
assert got == (
"Model(reference=ModelReference("
- "project='my-proj', dataset_id='my_dset', project_id='my_model'))"
+ "project_id='my-proj', dataset_id='my_dset', model_id='my_model'))"
)
diff --git a/tests/unit/model/test_model_reference.py b/tests/unit/model/test_model_reference.py
index ff1d1df7d..39dabb55d 100644
--- a/tests/unit/model/test_model_reference.py
+++ b/tests/unit/model/test_model_reference.py
@@ -136,5 +136,5 @@ def test_repr(target_class):
got = repr(model)
assert (
got
- == "ModelReference(project='my-proj', dataset_id='my_dset', project_id='my_model')"
+ == "ModelReference(project_id='my-proj', dataset_id='my_dset', model_id='my_model')"
)
|
paperless-ngx__paperless-ngx-3161 | [BUG] mail consumption fails if action is delete and no criteria are given
### Description
A mail consumption rule containing no criteria and has the action "delete" fails with this messages:
```
today at 22:30:00[2023-04-24 22:30:00,569] [ERROR] [paperless_mail] Rule XXX.YYY: Error while processing rule: AND expects params
today at 22:30:00Traceback (most recent call last):
today at 22:30:00 File "/usr/src/paperless/src/paperless_mail/mail.py", line 290, in handle_mail_account
today at 22:30:00 total_processed_files += self.handle_mail_rule(
today at 22:30:00 File "/usr/src/paperless/src/paperless_mail/mail.py", line 357, in handle_mail_rule
today at 22:30:00 criterias_imap = AND(**criterias)
today at 22:30:00 File "/usr/local/lib/python3.9/site-packages/imap_tools/query.py", line 97, in __init__
today at 22:30:00 raise ValueError('{} expects params'.format(self.__class__.__name__))
today at 22:30:00ValueError: AND expects params
```
When switching to action "Tag" it is successful even with empty criteria. On the other hand, "Delete" action gives no error if any criteria is given.
See this screenshot with removed Name and Account information:

### Possible Cause
Looking at the code of [`make_criterias`](https://github.com/paperless-ngx/paperless-ngx/blob/dev/src/paperless_mail/mail.py#L364) in `mail.py` and the missing `get_criteria` of [`DeleteMailAction`](https://github.com/paperless-ngx/paperless-ngx/blob/dev/src/paperless_mail/mail.py#L100), it seems like in this special situation no criteria at all is given to [`LogicOperator()`](imap_tools/query.py) in [`imap_tools/query.py`](https://github.com/ikvk/imap_tools/blob/master/imap_tools/query.py) and thus resulting in the [`ValueError`](https://github.com/ikvk/imap_tools/blob/master/imap_tools/query.py#L97) from above.
This might also be the case for [`MoveMailAction`](https://github.com/paperless-ngx/paperless-ngx/blob/dev/src/paperless_mail/mail.py#L121) as `get_criteria` is missing there also.
### Steps to reproduce
1. Create mail-account
2. Create mail rule for this account
3. Leave fields empty for "from", "to", "subject" and "body" and set "maximum_age" to 0
4. Set "delete" as action
5. Save
6. Wait for the mail task cron to see the error message
7. Add any criteria or change action to "tag" will create no error
### Webserver logs
```bash
today at 22:30:00[2023-04-24 22:30:00,569] [ERROR] [paperless_mail] Rule XXX.YYY: Error while processing rule: AND expects params
today at 22:30:00Traceback (most recent call last):
today at 22:30:00 File "/usr/src/paperless/src/paperless_mail/mail.py", line 290, in handle_mail_account
today at 22:30:00 total_processed_files += self.handle_mail_rule(
today at 22:30:00 File "/usr/src/paperless/src/paperless_mail/mail.py", line 357, in handle_mail_rule
today at 22:30:00 criterias_imap = AND(**criterias)
today at 22:30:00 File "/usr/local/lib/python3.9/site-packages/imap_tools/query.py", line 97, in __init__
today at 22:30:00 raise ValueError('{} expects params'.format(self.__class__.__name__))
today at 22:30:00ValueError: AND expects params
```
### Browser logs
_No response_
### Paperless-ngx version
1.13.0
### Host OS
x86_64 on QNAP
### Installation method
Docker - official image
### Browser
Firefox
### Configuration changes
_No response_
### Other
_No response_
| [
{
"content": "import datetime\nimport itertools\nimport logging\nimport os\nimport re\nimport tempfile\nimport traceback\nfrom datetime import date\nfrom datetime import timedelta\nfrom fnmatch import fnmatch\nfrom typing import Dict\nfrom typing import List\nfrom typing import Union\n\nimport magic\nimport pat... | [
{
"content": "import datetime\nimport itertools\nimport logging\nimport os\nimport re\nimport tempfile\nimport traceback\nfrom datetime import date\nfrom datetime import timedelta\nfrom fnmatch import fnmatch\nfrom typing import Dict\nfrom typing import List\nfrom typing import Union\n\nimport magic\nimport pat... | diff --git a/src/paperless_mail/mail.py b/src/paperless_mail/mail.py
index d792b5a9776..1014e4035fa 100644
--- a/src/paperless_mail/mail.py
+++ b/src/paperless_mail/mail.py
@@ -381,7 +381,8 @@ def make_criterias(rule):
rule_query = get_rule_action(rule).get_criteria()
if isinstance(rule_query, dict):
- return AND(**rule_query, **criterias)
+ if len(rule_query) or len(criterias):
+ return AND(**rule_query, **criterias)
else:
return AND(rule_query, **criterias)
diff --git a/src/paperless_mail/tests/test_mail.py b/src/paperless_mail/tests/test_mail.py
index 1f482f3367c..4ad79563b78 100644
--- a/src/paperless_mail/tests/test_mail.py
+++ b/src/paperless_mail/tests/test_mail.py
@@ -612,6 +612,29 @@ def test_handle_mail_account_delete(self):
self.assertEqual(len(self.bogus_mailbox.messages), 1)
+ def test_handle_mail_account_delete_no_filters(self):
+
+ account = MailAccount.objects.create(
+ name="test",
+ imap_server="",
+ username="admin",
+ password="secret",
+ )
+
+ _ = MailRule.objects.create(
+ name="testrule",
+ account=account,
+ action=MailRule.MailAction.DELETE,
+ maximum_age=0,
+ )
+
+ self.assertEqual(len(self.bogus_mailbox.messages), 3)
+
+ self.mail_account_handler.handle_mail_account(account)
+ self.apply_mail_actions()
+
+ self.assertEqual(len(self.bogus_mailbox.messages), 0)
+
def test_handle_mail_account_flag(self):
account = MailAccount.objects.create(
name="test",
|
learningequality__kolibri-10078 | Kolibri 0.16 - Resources of type HTML5 and exercises are not displayed
## Observed behavior
This is a follow up to https://github.com/learningequality/kolibri/pull/9724#issuecomment-1408889097
In the latest develop build both exercises and html resources are not being displayed when a user is navigating through the Library.
## Expected behavior
It should be possible to preview the resource.
## Steps to reproduce the issue
1. Install the the following [0. 16 build ](https://buildkite.com/learningequality/kolibri-debian/builds/5813#018603a8-a7d9-4c79-98d0-e2a0db6a7c69) and import the QA channel.
2. Go to Library > QA Channel
3. Click on any resource withing the HTML5 folder or the Exercises folder
## Videos
HTML5:
https://user-images.githubusercontent.com/79847249/215529161-a0e88738-b221-416a-beea-cf0c6192450f.mp4
EXERCISES:
https://user-images.githubusercontent.com/79847249/215529190-28ecdf59-db72-4b3a-a6df-2c72ab2f395c.mp4
## Console error
```
pluginMediator.js:122 Kolibri Modules: kolibri.plugins.learn.app registered
pluginMediator.js:122 Kolibri Modules: kolibri.plugins.media_player.main registered
pluginMediator.js:122 Kolibri Modules: kolibri.plugins.pdf_viewer.main registered
pluginMediator.js:122 Kolibri Modules: kolibri.plugins.epub_viewer.main registered
pluginMediator.js:122 Kolibri Modules: kolibri.plugins.html5_viewer.main registered
vue.runtime.esm.js:5753 GET http://127.0.0.1:51957/content/static/hashi/hashi-0efeb19f7e4ded20c73f.html 404 (Not Found)
insertBefore @ vue.runtime.esm.js:5753
insert @ vue.runtime.esm.js:6083
(anonymous) @ vue.runtime.esm.js:6030
createElm @ vue.runtime.esm.js:5969
(anonymous) @ vue.runtime.esm.js:6560
Vue._update @ vue.runtime.esm.js:3963
updateComponent @ vue.runtime.esm.js:4081
Watcher.get @ vue.runtime.esm.js:4495
Watcher.run @ vue.runtime.esm.js:4570
flushSchedulerQueue @ vue.runtime.esm.js:4326
(anonymous) @ vue.runtime.esm.js:1989
flushCallbacks @ vue.runtime.esm.js:1915
Promise.then (async)
timerFunc @ vue.runtime.esm.js:1942
nextTick @ vue.runtime.esm.js:1999
(anonymous) @ vue.runtime.esm.js:4418
Watcher.update @ vue.runtime.esm.js:4560
Vue.$forceUpdate @ vue.runtime.esm.js:3984
forceRender @ vue.runtime.esm.js:3668
(anonymous) @ vue.runtime.esm.js:3690
(anonymous) @ vue.runtime.esm.js:336
vue.runtime.esm.js:5753 GET http://127.0.0.1:51957/content/static/hashi/hashi-0efeb19f7e4ded20c73f.html 404 (Not Found)
insertBefore @ vue.runtime.esm.js:5753
insert @ vue.runtime.esm.js:6083
(anonymous) @ vue.runtime.esm.js:6030
createElm @ vue.runtime.esm.js:5969
(anonymous) @ vue.runtime.esm.js:6260
patchVnode @ vue.runtime.esm.js:6363
(anonymous) @ vue.runtime.esm.js:6526
Vue._update @ vue.runtime.esm.js:3963
updateComponent @ vue.runtime.esm.js:4081
Watcher.get @ vue.runtime.esm.js:4495
Watcher.run @ vue.runtime.esm.js:4570
flushSchedulerQueue @ vue.runtime.esm.js:4326
(anonymous) @ vue.runtime.esm.js:1989
flushCallbacks @ vue.runtime.esm.js:1915
Promise.then (async)
timerFunc @ vue.runtime.esm.js:1942
nextTick @ vue.runtime.esm.js:1999
(anonymous) @ vue.runtime.esm.js:4418
Watcher.update @ vue.runtime.esm.js:4560
Dep.notify @ vue.runtime.esm.js:730
set @ vue.runtime.esm.js:1055
sharedPropertyDefinition.set @ vue.runtime.esm.js:4644
(anonymous) @ ContentPage.vue:312
pluginMediator.js:122 Kolibri Modules: kolibri.plugins.perseus_viewer.main registered
```
## Usage Details
Windows 10, Ubuntu - Chrome, Firefox
| [
{
"content": "\"\"\"\nWSGI config for the alternate origin server used for serving\nsandboxed content\n\"\"\"\nimport os\n\nimport kolibri.core.content\nfrom kolibri.core.content.utils import paths\nfrom kolibri.core.content.zip_wsgi import get_application\nfrom kolibri.utils.kolibri_whitenoise import DynamicWh... | [
{
"content": "\"\"\"\nWSGI config for the alternate origin server used for serving\nsandboxed content\n\"\"\"\nimport os\n\nimport kolibri.core.content\nfrom kolibri.core.content.utils import paths\nfrom kolibri.core.content.zip_wsgi import get_application\nfrom kolibri.utils.kolibri_whitenoise import DynamicWh... | diff --git a/kolibri/deployment/default/alt_wsgi.py b/kolibri/deployment/default/alt_wsgi.py
index b26d3f582ea..3b36a1469b5 100644
--- a/kolibri/deployment/default/alt_wsgi.py
+++ b/kolibri/deployment/default/alt_wsgi.py
@@ -32,7 +32,7 @@ def generate_alt_wsgi_application():
(alt_content_path, content_dir) for content_dir in content_dirs
]
+ [(paths.zip_content_static_root(), content_static_path)],
- app_paths=paths.get_zip_content_base_path(),
+ app_paths=[paths.get_zip_content_base_path()],
)
diff --git a/kolibri/plugins/learn/assets/src/views/ContentPage.vue b/kolibri/plugins/learn/assets/src/views/ContentPage.vue
index 8acc215d9bb..83e51a1fdc4 100644
--- a/kolibri/plugins/learn/assets/src/views/ContentPage.vue
+++ b/kolibri/plugins/learn/assets/src/views/ContentPage.vue
@@ -4,7 +4,7 @@
<template v-if="sessionReady">
<KContentRenderer
- v-if="!content.assessment"
+ v-if="!content.assessmentmetadata"
class="content-renderer"
:kind="content.kind"
:lang="content.lang"
@@ -54,9 +54,9 @@
:kind="content.kind"
:files="content.files"
:lang="content.lang"
- :randomize="content.randomize"
- :masteryModel="content.masteryModel"
- :assessmentIds="content.assessmentIds"
+ :randomize="content.assessmentmetadata.randomize"
+ :masteryModel="content.assessmentmetadata.mastery_model"
+ :assessmentIds="content.assessmentmetadata.assessment_item_ids"
:available="content.available"
:extraFields="extra_fields"
:progress="progress"
diff --git a/kolibri/plugins/learn/assets/src/views/TopicsContentPage.vue b/kolibri/plugins/learn/assets/src/views/TopicsContentPage.vue
index 87d5dd35fe3..ee38be1a418 100644
--- a/kolibri/plugins/learn/assets/src/views/TopicsContentPage.vue
+++ b/kolibri/plugins/learn/assets/src/views/TopicsContentPage.vue
@@ -60,7 +60,9 @@
data-test="contentPage"
:content="content"
:lessonId="lessonId"
- :style="{ backgroundColor: ( content.assessment ? '' : $themeTokens.textInverted ) }"
+ :style="{
+ backgroundColor: ( content.assessmentmetadata ? '' : $themeTokens.textInverted )
+ }"
:allowMarkComplete="allowMarkComplete"
@mounted="contentPageMounted = true"
@finished="$refs.activityBar && $refs.activityBar.animateNextSteps()"
|
docker__docker-py-3004 | installing latest 5.0.3 on windows machines is still using pywin32==227 but not pywin32==301
[Bump pywin32 from 227 to 301 ]( https://github.com/docker/docker-py/commit/e0d186d754693feb7d27c2352e455c5febb4a5cd) was already merged in to bump pywin32 from 227 to 301. But, when installing latest 5.0.3 on windows machines is resulting in install of pywin32==227
Most likely extras_require needs updated
https://github.com/docker/docker-py/blob/a48a5a9647761406d66e8271f19fab7fa0c5f582/setup.py#L19
Pywin32 upgrade
Fix issue #2902
@aiordache @ulyssessouza, please, accept this PR to fix this annoying bug
Don't pin to pywin32 227
The hard pin to 227 is keeping us from using docker with other projects that depend on a newer version of pywin32.
| [
{
"content": "#!/usr/bin/env python\n\nimport codecs\nimport os\n\nfrom setuptools import find_packages\nfrom setuptools import setup\n\nROOT_DIR = os.path.dirname(__file__)\nSOURCE_DIR = os.path.join(ROOT_DIR)\n\nrequirements = [\n 'websocket-client >= 0.32.0',\n 'requests >= 2.14.2, != 2.18.0',\n]\n\nex... | [
{
"content": "#!/usr/bin/env python\n\nimport codecs\nimport os\n\nfrom setuptools import find_packages\nfrom setuptools import setup\n\nROOT_DIR = os.path.dirname(__file__)\nSOURCE_DIR = os.path.join(ROOT_DIR)\n\nrequirements = [\n 'websocket-client >= 0.32.0',\n 'requests >= 2.14.2, != 2.18.0',\n]\n\nex... | diff --git a/requirements.txt b/requirements.txt
index a0eb53198..c74d8cea2 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -11,7 +11,7 @@ paramiko==2.10.1
pycparser==2.17
pyOpenSSL==18.0.0
pyparsing==2.2.0
-pywin32==301; sys_platform == 'win32'
+pywin32==304; sys_platform == 'win32'
requests==2.26.0
urllib3==1.26.5
websocket-client==0.56.0
diff --git a/setup.py b/setup.py
index db2d6ebc4..3be63ba65 100644
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,7 @@
extras_require = {
# win32 APIs if on Windows (required for npipe support)
- ':sys_platform == "win32"': 'pywin32==227',
+ ':sys_platform == "win32"': 'pywin32>=304',
# If using docker-py over TLS, highly recommend this option is
# pip-installed or pinned.
|
apluslms__a-plus-1299 | Binaryornot library sometimes incorrectly classifies PDF files as non-binary
When large PDF files are detected as non-binary data, the inspect submission page tries to render them and causes the page to load slowly.
| [
{
"content": "import itertools\nimport json\nimport logging\nfrom mimetypes import guess_type\nimport os\nfrom typing import IO, Dict, Iterable, List, Tuple, TYPE_CHECKING, Callable\nfrom urllib.parse import urlparse\n\nfrom binaryornot.check import is_binary\nfrom django.conf import settings\nfrom django.db im... | [
{
"content": "import itertools\nimport json\nimport logging\nfrom mimetypes import guess_type\nimport os\nfrom typing import IO, Dict, Iterable, List, Tuple, TYPE_CHECKING, Callable\nfrom urllib.parse import urlparse\n\nfrom binaryornot.check import is_binary\nfrom django.conf import settings\nfrom django.db im... | diff --git a/exercise/submission_models.py b/exercise/submission_models.py
index 2755d0554..ba6402a8c 100644
--- a/exercise/submission_models.py
+++ b/exercise/submission_models.py
@@ -832,6 +832,9 @@ def get_mime(self):
return guess_type(self.file_object.path)[0]
def is_passed(self):
+ if self.file_object.path.endswith(".pdf"):
+ # PDF files are sometimes incorrectly classified as non-binary by the 'binaryornot' library
+ return True
return is_binary(self.file_object.path)
|
ivy-llc__ivy-14663 | Fix generating_index_arrays.test_numpy_diag_indices
| | |
|---|---|
|paddle|<a href="https://github.com/unifyai/ivy/actions/runs/6413197943/job/17411744582"><img src=https://img.shields.io/badge/-failure-red></a>
|tensorflow|<a href="https://github.com/unifyai/ivy/actions/runs/6413197943/job/17411744582"><img src=https://img.shields.io/badge/-failure-red></a>
|torch|<a href="https://github.com/unifyai/ivy/actions/runs/6413197943/job/17411744582"><img src=https://img.shields.io/badge/-failure-red></a>
|numpy|<a href="https://github.com/unifyai/ivy/actions/runs/6413197943/job/17411744582"><img src=https://img.shields.io/badge/-failure-red></a>
|jax|<a href="https://github.com/unifyai/ivy/actions/runs/6413197943/job/17411744582"><img src=https://img.shields.io/badge/-failure-red></a>
| [
{
"content": "import ivy\nfrom ivy.functional.frontends.numpy.func_wrapper import (\n to_ivy_arrays_and_back,\n outputs_to_numpy_arrays,\n)\n\n\n@to_ivy_arrays_and_back\ndef indices(dimensions, dtype=int, sparse=False):\n dimensions = tuple(dimensions)\n N = len(dimensions)\n shape = (1,) * N\n ... | [
{
"content": "import ivy\nfrom ivy.functional.frontends.numpy.func_wrapper import (\n to_ivy_arrays_and_back,\n outputs_to_numpy_arrays,\n)\n\n\n@to_ivy_arrays_and_back\ndef indices(dimensions, dtype=int, sparse=False):\n dimensions = tuple(dimensions)\n N = len(dimensions)\n shape = (1,) * N\n ... | diff --git a/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py b/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py
index c0052ea95f611..5faf97413fe2f 100644
--- a/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py
+++ b/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py
@@ -30,10 +30,12 @@ def unravel_index(indices, shape, order="C"):
return tuple(ret)
-@outputs_to_numpy_arrays
+@to_ivy_arrays_and_back
def diag_indices(n, ndim=2):
- idx = ivy.arange(n, dtype=int)
- return (idx,) * ndim
+ idx = ivy.arange(n)
+ res = ivy.array((idx,) * ndim)
+ res = tuple(res.astype("int64"))
+ return res
@to_ivy_arrays_and_back
|
conda__conda-build-1088 | problems with GIT_DESCRIBE_NUMBER
Hello, my recipe is like:
```
package:
name: pkg
version: {{ GIT_DESCRIBE_TAG }}
source:
git_url: .
git_rev: conda_pkg
build:
number: {{ GIT_DESCRIBE_NUMBER }}
...
```
and is located in a git repo.
```
user@machine:pkg_git $ git status
On branch conda_pkg
Your branch is up-to-date with 'origin/conda_pkg'.
nothing to commit, working directory clean
```
If I perform a `conda build .`, this error is produced:
```
Traceback (most recent call last):
File "/home/user/anaconda3/bin/conda-build", line 5, in <module>
sys.exit(main())
File "/home/user/anaconda3/lib/python3.5/site-packages/conda_build/main_build.py", line 144, in main
args_func(args, p)
File "/home/user/anaconda3/lib/python3.5/site-packages/conda_build/main_build.py", line 389, in args_func
args.func(args, p)
File "/home/user/anaconda3/lib/python3.5/site-packages/conda_build/main_build.py", line 287, in execute
verbose=False, dirty=args.dirty)
File "/home/user/anaconda3/lib/python3.5/site-packages/conda_build/render.py", line 135, in render_recipe
verbose=verbose, dirty=dirty)
File "/home/user/anaconda3/lib/python3.5/site-packages/conda_build/render.py", line 87, in parse_or_try_download
metadata.parse_again(permit_undefined_jinja=False)
File "/home/user/anaconda3/lib/python3.5/site-packages/conda_build/metadata.py", line 377, in parse_again
self.meta = parse(self._get_contents(permit_undefined_jinja), path=self.meta_path)
File "/home/user/anaconda3/lib/python3.5/site-packages/conda_build/metadata.py", line 666, in _get_contents
env.globals.update(context_processor(self, path))
File "/home/user/anaconda3/lib/python3.5/site-packages/conda_build/jinja_context.py", line 130, in context_processor
ctx = get_environ(m=initial_metadata)
File "/home/user/anaconda3/lib/python3.5/site-packages/conda_build/environ.py", line 174, in get_dict
d.update(meta_vars(m))
File "/home/user/anaconda3/lib/python3.5/site-packages/conda_build/environ.py", line 276, in meta_vars
d['PKG_BUILDNUM'] = str(meta.build_number())
File "/home/user/anaconda3/lib/python3.5/site-packages/conda_build/metadata.py", line 454, in build_number
return int(self.get_value('build/number', 0))
ValueError: invalid literal for int() with base 10: ''
```
If I substitute:
```
build:
number: {{ GIT_DESCRIBE_NUMBER }}
```
with
```
build:
number: 0
```
it works and the package created is something like pkg-v0.2.2-76_g869cb67.tar.bz2
Stepping into `/home/user/anaconda3/lib/python3.5/site-packages/conda_build/metadata.py:454` it seems that GIT_DESCRIBE_NUMBER is `None`...
Do you have any idea on why `GIT_DESCRIBE_NUMBER` is not working?
Thanks
---
```
$ conda build --version
conda-build 1.21.3
$ conda --version
conda 4.1.6
```
| [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport os\nimport re\nimport sys\nfrom os.path import isdir, isfile, join\n\nfrom conda.compat import iteritems, PY3, text_type\nfrom conda.utils import memoized, md5_file\nimport conda.config as cc\nfrom conda.resolve import Matc... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport os\nimport re\nimport sys\nfrom os.path import isdir, isfile, join\n\nfrom conda.compat import iteritems, PY3, text_type\nfrom conda.utils import memoized, md5_file\nimport conda.config as cc\nfrom conda.resolve import Matc... | diff --git a/conda_build/metadata.py b/conda_build/metadata.py
index 56eb7f011a..a96c073f1c 100644
--- a/conda_build/metadata.py
+++ b/conda_build/metadata.py
@@ -451,7 +451,9 @@ def version(self):
return res
def build_number(self):
- return int(self.get_value('build/number', 0))
+ number = self.get_value('build/number', 0)
+ # build number can come back as None if no setting (or jinja intermediate)
+ return int(number) if number else 0
def ms_depends(self, typ='run'):
res = []
diff --git a/tests/test-recipes/metadata/_git_describe_number_branch/meta.yaml b/tests/test-recipes/metadata/_git_describe_number_branch/meta.yaml
new file mode 100644
index 0000000000..f8b22a7d59
--- /dev/null
+++ b/tests/test-recipes/metadata/_git_describe_number_branch/meta.yaml
@@ -0,0 +1,11 @@
+package:
+ name: git_describe_number_branch
+ version: {{ GIT_DESCRIBE_TAG }}
+
+source:
+ git_url: https://github.com/conda/conda_build_test_recipe
+ git_branch: 1.20.2+1
+
+build:
+ number: {{ GIT_DESCRIBE_NUMBER }}
+ string: {{ GIT_BUILD_STR }}
diff --git a/tests/test_build_recipes.py b/tests/test_build_recipes.py
index 7df353c140..2e67a3360d 100644
--- a/tests/test_build_recipes.py
+++ b/tests/test_build_recipes.py
@@ -377,3 +377,15 @@ def test_patch():
lines = modified.readlines()
assert lines[0] == '43770\n'
os.chdir(basedir)
+
+
+def test_git_describe_info_on_branch():
+ cmd = 'conda build --output {}'.format(os.path.join(metadata_dir, "_git_describe_number_branch"))
+ process = subprocess.Popen(cmd.split(),
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ output, error = process.communicate()
+ test_path = os.path.join(sys.prefix, "conda-bld", subdir,
+ "git_describe_number_branch-1.20.2-1_g82c6ba6.tar.bz2")
+ output = output.decode('utf-8').rstrip()
+ error = error.decode('utf-8')
+ assert test_path == output, error
|
beetbox__beets-3703 | Minor documentation correction: correct id3.org url
https://github.com/beetbox/beets/blob/master/docs/faq.rst#L303
refers to:
http://www.id3.org/id3v2.4.0-structure
as a reference url for a copy of the ID3v2.4 standard documentation, but this returns a "Not found" error. I've found 2 possibilities for the replacement:
https://id3.org/id3v2.4.0-structure
(with adverts) or
https://github.com/id3/ID3v2.4/raw/master/id3v2.40-structure.txt
(without adverts)
| [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import division, absolute_import, print_function\n\nAUTHOR = u'Adrian Sampson'\n\n# General configuration\n\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.extlinks']\n\nexclude_patterns = ['_build']\nsource_suffix = '.rst'\nmaster_doc = 'index'\n\nproje... | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import division, absolute_import, print_function\n\nAUTHOR = u'Adrian Sampson'\n\n# General configuration\n\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.extlinks']\n\nexclude_patterns = ['_build']\nsource_suffix = '.rst'\nmaster_doc = 'index'\n\nproje... | diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml
index 386571e5a4..633947fd3b 100644
--- a/.github/workflows/integration_test.yaml
+++ b/.github/workflows/integration_test.yaml
@@ -27,6 +27,10 @@ jobs:
run: |
tox -e int
+ - name: Check external links in docs
+ run: |
+ tox -e links
+
- name: Notify on failure
if: ${{ failure() }}
env:
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index d86c490b93..9600ee966b 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -28,7 +28,7 @@ Non-Programming
- Promote beets! Help get the word out by telling your friends, writing
a blog post, or discussing it on a forum you frequent.
-- Improve the `documentation <http://beets.readthedocs.org/>`__. It’s
+- Improve the `documentation`_. It’s
incredibly easy to contribute here: just find a page you want to
modify and hit the “Edit on GitHub” button in the upper-right. You
can automatically send us a pull request for your changes.
@@ -62,7 +62,7 @@ Getting the Source
^^^^^^^^^^^^^^^^^^
The easiest way to get started with the latest beets source is to use
-`pip <https://pip.pypa.io/>`__ to install an “editable” package. This
+`pip`_ to install an “editable” package. This
can be done with one command:
.. code-block:: bash
@@ -147,8 +147,7 @@ request and your code will ship in no time.
5. Add a changelog entry to ``docs/changelog.rst`` near the top of the
document.
6. Run the tests and style checker. The easiest way to run the tests is
- to use `tox <https://tox.readthedocs.org/en/latest/>`__. For more
- information on running tests, see :ref:`testing`.
+ to use `tox`_. For more information on running tests, see :ref:`testing`.
7. Push to your fork and open a pull request! We’ll be in touch shortly.
8. If you add commits to a pull request, please add a comment or
re-request a review after you push them since GitHub doesn’t
@@ -253,7 +252,7 @@ guidelines to follow:
Editor Settings
---------------
-Personally, I work on beets with `vim <http://www.vim.org/>`__. Here are
+Personally, I work on beets with `vim`_. Here are
some ``.vimrc`` lines that might help with PEP 8-compliant Python
coding::
@@ -318,7 +317,7 @@ To install the test dependencies, run ``python -m pip install .[test]``.
Or, just run a test suite with ``tox`` which will install them
automatically.
-.. _setup.py: https://github.com/beetbox/beets/blob/master/setup.py#L99`
+.. _setup.py: https://github.com/beetbox/beets/blob/master/setup.py
Writing Tests
-------------
@@ -352,9 +351,9 @@ others. See `unittest.mock`_ for more info.
.. _Python unittest: https://docs.python.org/2/library/unittest.html
.. _Codecov: https://codecov.io/github/beetbox/beets
.. _pytest-random: https://github.com/klrmn/pytest-random
-.. _tox: http://tox.readthedocs.org
-.. _detox: https://pypi.python.org/pypi/detox/
-.. _pytest: http://pytest.org
+.. _tox: https://tox.readthedocs.io/en/latest/
+.. _detox: https://pypi.org/project/detox/
+.. _pytest: https://docs.pytest.org/en/stable/
.. _Linux: https://github.com/beetbox/beets/actions
.. _Windows: https://ci.appveyor.com/project/beetbox/beets/
.. _`https://github.com/beetbox/beets/blob/master/setup.py#L99`: https://github.com/beetbox/beets/blob/master/setup.py#L99
@@ -364,3 +363,6 @@ others. See `unittest.mock`_ for more info.
.. _integration test: https://github.com/beetbox/beets/actions?query=workflow%3A%22integration+tests%22
.. _unittest.mock: https://docs.python.org/3/library/unittest.mock.html
.. _Python unittest: https://docs.python.org/2/library/unittest.html
+.. _documentation: https://beets.readthedocs.io/en/stable/
+.. _pip: https://pip.pypa.io/en/stable/
+.. _vim: https://www.vim.org/
diff --git a/docs/changelog.rst b/docs/changelog.rst
index 4a87f7f071..b370d117c5 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -189,7 +189,7 @@ Fixes:
* ``beet update`` will now confirm that the user still wants to update if
their library folder cannot be found, preventing the user from accidentally
wiping out their beets database.
- Thanks to :user:`logan-arens`.
+ Thanks to user: `logan-arens`.
:bug:`1934`
* :doc:`/plugins/bpd`: Fix the transition to next track when in consume mode.
Thanks to :user:`aereaux`.
@@ -1262,7 +1262,7 @@ And there are a few bug fixes too:
The last release, 1.3.19, also erroneously reported its version as "1.3.18"
when you typed ``beet version``. This has been corrected.
-.. _six: https://pythonhosted.org/six/
+.. _six: https://pypi.org/project/six/
1.3.19 (June 25, 2016)
@@ -2108,7 +2108,7 @@ As usual, there are loads of little fixes and improvements:
* The :ref:`config-cmd` command can now use ``$EDITOR`` variables with
arguments.
-.. _API changes: https://developer.echonest.com/forums/thread/3650
+.. _API changes: https://web.archive.org/web/20160814092627/https://developer.echonest.com/forums/thread/3650
.. _Plex: https://plex.tv/
.. _musixmatch: https://www.musixmatch.com/
@@ -2333,7 +2333,7 @@ The big new features are:
* A new :ref:`asciify-paths` configuration option replaces all non-ASCII
characters in paths.
-.. _Mutagen: https://bitbucket.org/lazka/mutagen
+.. _Mutagen: https://github.com/quodlibet/mutagen
.. _Spotify: https://www.spotify.com/
And the multitude of little improvements and fixes:
@@ -2588,7 +2588,7 @@ Fixes:
* :doc:`/plugins/convert`: Display a useful error message when the FFmpeg
executable can't be found.
-.. _requests: https://www.python-requests.org/
+.. _requests: https://requests.readthedocs.io/en/master/
1.3.3 (February 26, 2014)
@@ -2769,7 +2769,7 @@ As usual, there are also innumerable little fixes and improvements:
Bezman.
-.. _Acoustic Attributes: http://developer.echonest.com/acoustic-attributes.html
+.. _Acoustic Attributes: https://web.archive.org/web/20160701063109/http://developer.echonest.com/acoustic-attributes.html
.. _MPD: https://www.musicpd.org/
@@ -3119,7 +3119,7 @@ will automatically migrate your configuration to the new system.
header. Thanks to Uwe L. Korn.
* :doc:`/plugins/lastgenre`: Fix an error when using genre canonicalization.
-.. _Tomahawk: https://tomahawk-player.org/
+.. _Tomahawk: https://github.com/tomahawk-player/tomahawk
1.1b3 (March 16, 2013)
----------------------
@@ -3462,7 +3462,7 @@ begins today on features for version 1.1.
* Changed plugin loading so that modules can be imported without
unintentionally loading the plugins they contain.
-.. _The Echo Nest: http://the.echonest.com/
+.. _The Echo Nest: https://web.archive.org/web/20180329103558/http://the.echonest.com/
.. _Tomahawk resolver: https://beets.io/blog/tomahawk-resolver.html
.. _mp3gain: http://mp3gain.sourceforge.net/download.php
.. _aacgain: https://aacgain.altosdesign.com
@@ -3900,7 +3900,7 @@ plugin.
* The :doc:`/plugins/web` encapsulates a simple **Web-based GUI for beets**. The
current iteration can browse the library and play music in browsers that
- support `HTML5 Audio`_.
+ support HTML5 Audio.
* When moving items that are part of an album, the album art implicitly moves
too.
@@ -3917,8 +3917,6 @@ plugin.
* Fix crash when "copying" an art file that's already in place.
-.. _HTML5 Audio: http://www.w3.org/TR/html-markup/audio.html
-
1.0b9 (July 9, 2011)
--------------------
diff --git a/docs/conf.py b/docs/conf.py
index bb3e3d00f6..018ef53974 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -28,6 +28,13 @@
'stdlib': ('https://docs.python.org/3/library/%s.html', ''),
}
+linkcheck_ignore = [
+ r'https://github.com/beetbox/beets/issues/',
+ r'https://github.com/\w+$', # ignore user pages
+ r'.*localhost.*',
+ r'https://www.musixmatch.com/', # blocks requests
+]
+
# Options for HTML output
htmlhelp_basename = 'beetsdoc'
diff --git a/docs/dev/index.rst b/docs/dev/index.rst
index f1465494d6..63335160c7 100644
--- a/docs/dev/index.rst
+++ b/docs/dev/index.rst
@@ -7,7 +7,7 @@ in hacking beets itself or creating plugins for it.
See also the documentation for `MediaFile`_, the library used by beets to read
and write metadata tags in media files.
-.. _MediaFile: https://mediafile.readthedocs.io/
+.. _MediaFile: https://mediafile.readthedocs.io/en/latest/
.. toctree::
diff --git a/docs/dev/library.rst b/docs/dev/library.rst
index 77e218b939..071b780f3a 100644
--- a/docs/dev/library.rst
+++ b/docs/dev/library.rst
@@ -45,7 +45,7 @@ responsible for handling queries to retrieve stored objects.
.. automethod:: transaction
-.. _SQLite: https://sqlite.org/
+.. _SQLite: https://sqlite.org/index.html
.. _ORM: https://en.wikipedia.org/wiki/Object-relational_mapping
@@ -118,7 +118,7 @@ To make changes to either the database or the tags on a file, you
update an item's fields (e.g., ``item.title = "Let It Be"``) and then call
``item.write()``.
-.. _MediaFile: https://mediafile.readthedocs.io/
+.. _MediaFile: https://mediafile.readthedocs.io/en/latest/
Items also track their modification times (mtimes) to help detect when they
become out of sync with on-disk metadata, mainly to speed up the
diff --git a/docs/dev/plugins.rst b/docs/dev/plugins.rst
index 3328654e07..563775fd64 100644
--- a/docs/dev/plugins.rst
+++ b/docs/dev/plugins.rst
@@ -301,7 +301,7 @@ To access this value, say ``self.config['foo'].get()`` at any point in your
plugin's code. The `self.config` object is a *view* as defined by the `Confuse`_
library.
-.. _Confuse: https://confuse.readthedocs.org/
+.. _Confuse: https://confuse.readthedocs.io/en/latest/
If you want to access configuration values *outside* of your plugin's section,
import the `config` object from the `beets` module. That is, just put ``from
@@ -379,7 +379,7 @@ access to file tags. If you have created a descriptor you can add it through
your plugins ``add_media_field()`` method.
.. automethod:: beets.plugins.BeetsPlugin.add_media_field
-.. _MediaFile: https://mediafile.readthedocs.io/
+.. _MediaFile: https://mediafile.readthedocs.io/en/latest/
Here's an example plugin that provides a meaningless new field "foo"::
diff --git a/docs/faq.rst b/docs/faq.rst
index 9732a47259..eeab6c1ef7 100644
--- a/docs/faq.rst
+++ b/docs/faq.rst
@@ -2,10 +2,9 @@ FAQ
###
Here are some answers to frequently-asked questions from IRC and elsewhere.
-Got a question that isn't answered here? Try `IRC`_, the `discussion board`_, or
+Got a question that isn't answered here? Try the `discussion board`_, or
:ref:`filing an issue <bugs>` in the bug tracker.
-.. _IRC: irc://irc.freenode.net/beets
.. _mailing list: https://groups.google.com/group/beets-users
.. _discussion board: https://discourse.beets.io
@@ -119,7 +118,7 @@ Run a command like this::
pip install -U beets
-The ``-U`` flag tells `pip <https://pip.pypa.io/>`__ to upgrade
+The ``-U`` flag tells `pip`_ to upgrade
beets to the latest version. If you want a specific version, you can
specify with using ``==`` like so::
@@ -188,7 +187,9 @@ there to report a bug. Please follow these guidelines when reporting an issue:
If you've never reported a bug before, Mozilla has some well-written
`general guidelines for good bug
-reports <https://www.mozilla.org/bugs/>`__.
+reports`_.
+
+.. _general guidelines for good bug reports: https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines
.. _find-config:
@@ -300,8 +301,7 @@ a flag. There is no simple way to remedy this.)
…not change my ID3 tags?
------------------------
-Beets writes `ID3v2.4 <http://www.id3.org/id3v2.4.0-structure>`__ tags by
-default.
+Beets writes `ID3v2.4`_ tags by default.
Some software, including Windows (i.e., Windows Explorer and Windows
Media Player) and `id3lib/id3v2 <http://id3v2.sourceforge.net/>`__,
don't support v2.4 tags. When using 2.4-unaware software, it might look
@@ -311,6 +311,7 @@ To enable ID3v2.3 tags, enable the :ref:`id3v23` config option.
.. _invalid:
+.. _ID3v2.4: https://id3.org/id3v2.4.0-structure
…complain that a file is "unreadable"?
--------------------------------------
@@ -379,3 +380,4 @@ installed using pip, the command ``pip show -f beets`` can show you where
try `this Super User answer`_.
.. _this Super User answer: https://superuser.com/a/284361/4569
+.. _pip: https://pip.pypa.io/en/stable/
diff --git a/docs/guides/main.rst b/docs/guides/main.rst
index 2f05634d98..f1da16f502 100644
--- a/docs/guides/main.rst
+++ b/docs/guides/main.rst
@@ -64,7 +64,7 @@ beets`` if you run into permissions problems).
To install without pip, download beets from `its PyPI page`_ and run ``python
setup.py install`` in the directory therein.
-.. _its PyPI page: https://pypi.org/project/beets#downloads
+.. _its PyPI page: https://pypi.org/project/beets/#files
.. _pip: https://pip.pypa.io
The best way to upgrade beets to a new version is by running ``pip install -U
diff --git a/docs/plugins/absubmit.rst b/docs/plugins/absubmit.rst
index 64c77e0773..953335a143 100644
--- a/docs/plugins/absubmit.rst
+++ b/docs/plugins/absubmit.rst
@@ -62,6 +62,6 @@ file. The available options are:
.. _streaming_extractor_music: https://acousticbrainz.org/download
.. _FAQ: https://acousticbrainz.org/faq
.. _pip: https://pip.pypa.io
-.. _requests: https://docs.python-requests.org/en/master/
+.. _requests: https://requests.readthedocs.io/en/master/
.. _github: https://github.com/MTG/essentia
.. _AcousticBrainz: https://acousticbrainz.org
diff --git a/docs/plugins/beatport.rst b/docs/plugins/beatport.rst
index cbf5b4312c..6117c4a1f1 100644
--- a/docs/plugins/beatport.rst
+++ b/docs/plugins/beatport.rst
@@ -41,6 +41,6 @@ Configuration
This plugin can be configured like other metadata source plugins as described in :ref:`metadata-source-plugin-configuration`.
-.. _requests: https://docs.python-requests.org/en/latest/
+.. _requests: https://requests.readthedocs.io/en/master/
.. _requests_oauthlib: https://github.com/requests/requests-oauthlib
-.. _Beatport: https://beetport.com
+.. _Beatport: https://www.beatport.com/
diff --git a/docs/plugins/bpd.rst b/docs/plugins/bpd.rst
index 49563a73ae..2330bea70a 100644
--- a/docs/plugins/bpd.rst
+++ b/docs/plugins/bpd.rst
@@ -5,7 +5,7 @@ BPD is a music player using music from a beets library. It runs as a daemon and
implements the MPD protocol, so it's compatible with all the great MPD clients
out there. I'm using `Theremin`_, `gmpc`_, `Sonata`_, and `Ario`_ successfully.
-.. _Theremin: https://theremin.sigterm.eu/
+.. _Theremin: https://github.com/TheStalwart/Theremin
.. _gmpc: https://gmpc.wikia.com/wiki/Gnome_Music_Player_Client
.. _Sonata: http://sonata.berlios.de/
.. _Ario: http://ario-player.sourceforge.net/
@@ -13,7 +13,7 @@ out there. I'm using `Theremin`_, `gmpc`_, `Sonata`_, and `Ario`_ successfully.
Dependencies
------------
-Before you can use BPD, you'll need the media library called GStreamer (along
+Before you can use BPD, you'll need the media library called `GStreamer`_ (along
with its Python bindings) on your system.
* On Mac OS X, you can use `Homebrew`_. Run ``brew install gstreamer
@@ -22,14 +22,11 @@ with its Python bindings) on your system.
* On Linux, you need to install GStreamer 1.0 and the GObject bindings for
python. Under Ubuntu, they are called ``python-gi`` and ``gstreamer1.0``.
-* On Windows, you may want to try `GStreamer WinBuilds`_ (caveat emptor: I
- haven't tried this).
-
You will also need the various GStreamer plugin packages to make everything
work. See the :doc:`/plugins/chroma` documentation for more information on
installing GStreamer plugins.
-.. _GStreamer WinBuilds: https://www.gstreamer-winbuild.ylatuya.es/
+.. _GStreamer: https://gstreamer.freedesktop.org/download
.. _Homebrew: https://brew.sh
Usage
diff --git a/docs/plugins/convert.rst b/docs/plugins/convert.rst
index 6e9d00a11b..3bf892e0a4 100644
--- a/docs/plugins/convert.rst
+++ b/docs/plugins/convert.rst
@@ -189,7 +189,7 @@ can use the :doc:`/plugins/replaygain` to do this analysis. See the LAME
`documentation`_ and the `HydrogenAudio wiki`_ for other LAME configuration
options and a thorough discussion of MP3 encoding.
-.. _documentation: http://lame.sourceforge.net/using.php
+.. _documentation: https://lame.sourceforge.io/index.php
.. _HydrogenAudio wiki: https://wiki.hydrogenaud.io/index.php?title=LAME
.. _gapless: https://wiki.hydrogenaud.io/index.php?title=Gapless_playback
-.. _LAME: https://lame.sourceforge.net/
+.. _LAME: https://lame.sourceforge.io/index.php
diff --git a/docs/plugins/embyupdate.rst b/docs/plugins/embyupdate.rst
index 626fafa9df..1a8b7c7b10 100644
--- a/docs/plugins/embyupdate.rst
+++ b/docs/plugins/embyupdate.rst
@@ -18,7 +18,7 @@ To use the ``embyupdate`` plugin you need to install the `requests`_ library wit
With that all in place, you'll see beets send the "update" command to your Emby server every time you change your beets library.
.. _Emby: https://emby.media/
-.. _requests: https://docs.python-requests.org/en/latest/
+.. _requests: https://requests.readthedocs.io/en/master/
Configuration
-------------
diff --git a/docs/plugins/keyfinder.rst b/docs/plugins/keyfinder.rst
index 2ed2c1cec9..a5c64d39c7 100644
--- a/docs/plugins/keyfinder.rst
+++ b/docs/plugins/keyfinder.rst
@@ -31,5 +31,5 @@ configuration file. The available options are:
`initial_key` value.
Default: ``no``.
-.. _KeyFinder: https://www.ibrahimshaath.co.uk/keyfinder/
+.. _KeyFinder: http://www.ibrahimshaath.co.uk/keyfinder/
.. _keyfinder-cli: https://github.com/EvanPurkhiser/keyfinder-cli/
diff --git a/docs/plugins/kodiupdate.rst b/docs/plugins/kodiupdate.rst
index e60f503f2a..f521a80004 100644
--- a/docs/plugins/kodiupdate.rst
+++ b/docs/plugins/kodiupdate.rst
@@ -27,7 +27,7 @@ With that all in place, you'll see beets send the "update" command to your Kodi
host every time you change your beets library.
.. _Kodi: https://kodi.tv/
-.. _requests: https://docs.python-requests.org/en/latest/
+.. _requests: https://requests.readthedocs.io/en/master/
Configuration
-------------
diff --git a/docs/plugins/lastgenre.rst b/docs/plugins/lastgenre.rst
index 5fcdd2254a..dee4260de3 100644
--- a/docs/plugins/lastgenre.rst
+++ b/docs/plugins/lastgenre.rst
@@ -1,13 +1,10 @@
LastGenre Plugin
================
-The MusicBrainz database `does not contain genre information`_. Therefore, when
-importing and autotagging music, beets does not assign a genre. The
-``lastgenre`` plugin fetches *tags* from `Last.fm`_ and assigns them as genres
+
+The ``lastgenre`` plugin fetches *tags* from `Last.fm`_ and assigns them as genres
to your albums and items.
-.. _does not contain genre information:
- https://musicbrainz.org/doc/General_FAQ#Why_does_MusicBrainz_not_support_genre_information.3F
.. _Last.fm: https://last.fm/
Installation
@@ -72,7 +69,7 @@ nothing would ever be matched to a more generic node since all the specific
subgenres are in the whitelist to begin with.
-.. _YAML: https://www.yaml.org/
+.. _YAML: https://yaml.org/
.. _tree of nested genre names: https://raw.githubusercontent.com/beetbox/beets/master/beetsplug/lastgenre/genres-tree.yaml
diff --git a/docs/plugins/lyrics.rst b/docs/plugins/lyrics.rst
index fac07ad872..942497a7c9 100644
--- a/docs/plugins/lyrics.rst
+++ b/docs/plugins/lyrics.rst
@@ -26,7 +26,7 @@ already have them. The lyrics will be stored in the beets database. If the
``import.write`` config option is on, then the lyrics will also be written to
the files' tags.
-.. _requests: https://docs.python-requests.org/en/latest/
+.. _requests: https://requests.readthedocs.io/en/master/
Configuration
@@ -180,8 +180,7 @@ You also need to register for a Microsoft Azure Marketplace free account and
to the `Microsoft Translator API`_. Follow the four steps process, specifically
at step 3 enter ``beets`` as *Client ID* and copy/paste the generated
*Client secret* into your ``bing_client_secret`` configuration, alongside
-``bing_lang_to`` target `language code`_.
+``bing_lang_to`` target `language code`.
.. _langdetect: https://pypi.python.org/pypi/langdetect
-.. _Microsoft Translator API: https://www.microsoft.com/en-us/translator/getstarted.aspx
-.. _language code: https://msdn.microsoft.com/en-us/library/hh456380.aspx
+.. _Microsoft Translator API: https://docs.microsoft.com/en-us/azure/cognitive-services/translator/translator-how-to-signup
diff --git a/docs/plugins/plexupdate.rst b/docs/plugins/plexupdate.rst
index 92fc949d25..b6a2bf9207 100644
--- a/docs/plugins/plexupdate.rst
+++ b/docs/plugins/plexupdate.rst
@@ -25,7 +25,7 @@ With that all in place, you'll see beets send the "update" command to your Plex
server every time you change your beets library.
.. _Plex: https://plex.tv/
-.. _requests: https://docs.python-requests.org/en/latest/
+.. _requests: https://requests.readthedocs.io/en/master/
.. _documentation about tokens: https://support.plex.tv/hc/en-us/articles/204059436-Finding-your-account-token-X-Plex-Token
Configuration
diff --git a/docs/plugins/subsonicupdate.rst b/docs/plugins/subsonicupdate.rst
index 3549be091d..710d21f2cd 100644
--- a/docs/plugins/subsonicupdate.rst
+++ b/docs/plugins/subsonicupdate.rst
@@ -4,7 +4,7 @@ SubsonicUpdate Plugin
``subsonicupdate`` is a very simple plugin for beets that lets you automatically
update `Subsonic`_'s index whenever you change your beets library.
-.. _Subsonic: https://www.subsonic.org
+.. _Subsonic: http://www.subsonic.org/pages/index.jsp
To use ``subsonicupdate`` plugin, enable it in your configuration
(see :ref:`using-plugins`).
diff --git a/docs/plugins/web.rst b/docs/plugins/web.rst
index 65d4743fb7..85de48dd43 100644
--- a/docs/plugins/web.rst
+++ b/docs/plugins/web.rst
@@ -19,8 +19,6 @@ The Web interface depends on `Flask`_. To get it, just run ``pip install
flask``. Then enable the ``web`` plugin in your configuration (see
:ref:`using-plugins`).
-.. _Flask: https://flask.pocoo.org/
-
If you need CORS (it's disabled by default---see :ref:`web-cors`, below), then
you also need `flask-cors`_. Just type ``pip install flask-cors``.
@@ -47,9 +45,7 @@ Usage
-----
Type queries into the little search box. Double-click a track to play it with
-`HTML5 Audio`_.
-
-.. _HTML5 Audio: http://www.w3.org/TR/html-markup/audio.html
+HTML5 Audio.
Configuration
-------------
@@ -78,7 +74,7 @@ The Web backend is built using a simple REST+JSON API with the excellent
`Flask`_ library. The frontend is a single-page application written with
`Backbone.js`_. This allows future non-Web clients to use the same backend API.
-.. _Flask: https://flask.pocoo.org/
+
.. _Backbone.js: https://backbonejs.org
Eventually, to make the Web player really viable, we should use a Flash fallback
@@ -90,7 +86,7 @@ for unsupported formats/browsers. There are a number of options for this:
.. _audio.js: https://kolber.github.io/audiojs/
.. _html5media: https://html5media.info/
-.. _MediaElement.js: https://mediaelementjs.com/
+.. _MediaElement.js: https://www.mediaelementjs.com/
.. _web-cors:
@@ -262,3 +258,5 @@ Responds with the number of tracks and albums in the database. ::
"items": 5,
"albums": 3
}
+
+.. _Flask: https://flask.palletsprojects.com/en/1.1.x/
diff --git a/docs/reference/config.rst b/docs/reference/config.rst
index 46f14f2c5d..2f8cee3c9c 100644
--- a/docs/reference/config.rst
+++ b/docs/reference/config.rst
@@ -689,7 +689,7 @@ to one request per second.
.. _your own MusicBrainz database: https://musicbrainz.org/doc/MusicBrainz_Server/Setup
.. _main server: https://musicbrainz.org/
.. _limited: https://musicbrainz.org/doc/XML_Web_Service/Rate_Limiting
-.. _Building search indexes: https://musicbrainz.org/doc/MusicBrainz_Server/Setup#Building_search_indexes
+.. _Building search indexes: https://musicbrainz.org/doc/Development/Search_server_setup
.. _searchlimit:
diff --git a/tox.ini b/tox.ini
index cbf9530334..69308235dd 100644
--- a/tox.ini
+++ b/tox.ini
@@ -27,6 +27,12 @@ basepython = python2.7
deps = sphinx
commands = sphinx-build -W -q -b html docs {envtmpdir}/html {posargs}
+# checks all links in the docs
+[testenv:links]
+deps = sphinx
+allowlist_externals = /bin/bash
+commands = /bin/bash -c '! sphinx-build -b linkcheck docs {envtmpdir}/linkcheck | grep "broken\s"'
+
[testenv:int]
deps = {[_test]deps}
setenv = INTEGRATION_TEST = 1
|
bookwyrm-social__bookwyrm-878 | Can't create Invites
**Describe the bug**
When creating a new invite, the following appears:

Rest of the page is blank.
It appeared since the last update I did a few days ago (don't know at which commit exactly, sorry) and didn't change with the last one.
**Additional context**
It doesn't matter what I set for Expiry and Use limit.
Also, there's an invite in the list that has "Max uses: None" that I'm not sure where it comes from.
| [
{
"content": "\"\"\" using django model forms \"\"\"\nimport datetime\nfrom collections import defaultdict\n\nfrom django import forms\nfrom django.forms import ModelForm, PasswordInput, widgets\nfrom django.forms.widgets import Textarea\nfrom django.utils import timezone\nfrom django.utils.translation import g... | [
{
"content": "\"\"\" using django model forms \"\"\"\nimport datetime\nfrom collections import defaultdict\n\nfrom django import forms\nfrom django.forms import ModelForm, PasswordInput, widgets\nfrom django.forms.widgets import Textarea\nfrom django.utils import timezone\nfrom django.utils.translation import g... | diff --git a/bookwyrm/forms.py b/bookwyrm/forms.py
index 1a114e05f5..b159a89ef5 100644
--- a/bookwyrm/forms.py
+++ b/bookwyrm/forms.py
@@ -233,7 +233,7 @@ class Meta:
class CreateInviteForm(CustomForm):
class Meta:
model = models.SiteInvite
- exclude = ["code", "user", "times_used"]
+ exclude = ["code", "user", "times_used", "invitees"]
widgets = {
"expiry": ExpiryWidget(
choices=[
|
espnet__espnet-3022 | Error with using compute-fbank-feats.py
Hello! I tried to use script compute-fbank-feats.py to compute fbank features from wav, and tried to use it according to its documentation https://espnet.github.io/espnet/apis/utils_py.html#compute-fbank-feats-py
as folllows:
```
python3.7 utils/compute-fbank-feats.py scp:wav.scp ark:out.ark
```
but got an error:
```
File "utils/compute-fbank-feats.py", line 134, in <module>
main()
File "utils/compute-fbank-feats.py", line 128, in main
fmax=args.fmax,
File "/home/karina/.local/lib/python3.7/site-packages/espnet/transform/spectrogram.py", line 116, in logmelspectrogram
x_stft, fs=fs, n_mels=n_mels, n_fft=n_fft, fmin=fmin, fmax=fmax, eps=eps
File "/home/karina/.local/lib/python3.7/site-packages/espnet/transform/spectrogram.py", line 74, in stft2logmelspectrogram
fmax = fs / 2 if fmax is None else fmax
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'
```
wav.scp contains this text:
```
0 test.wav
```
Does anyone have ideas how to solve this error?
| [
{
"content": "#!/usr/bin/env python3\n\n# Copyright 2018 Nagoya University (Tomoki Hayashi)\n# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n\nimport argparse\nfrom distutils.util import strtobool\nimport logging\n\nimport kaldiio\nimport numpy\nimport resampy\n\nfrom espnet.transform.spectrogram i... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright 2018 Nagoya University (Tomoki Hayashi)\n# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n\nimport argparse\nfrom distutils.util import strtobool\nimport logging\n\nimport kaldiio\nimport numpy\nimport resampy\n\nfrom espnet.transform.spectrogram i... | diff --git a/utils/compute-fbank-feats.py b/utils/compute-fbank-feats.py
index 72feb1800c6..d5defc7d899 100755
--- a/utils/compute-fbank-feats.py
+++ b/utils/compute-fbank-feats.py
@@ -118,7 +118,7 @@ def main():
lmspc = logmelspectrogram(
x=array,
- fs=args.fs,
+ fs=args.fs if args.fs is not None else rate,
n_mels=args.n_mels,
n_fft=args.n_fft,
n_shift=args.n_shift,
|
Textualize__rich-2216 | Missing `f` prefix on f-strings
Some strings looks like they're meant to be f-strings but are missing the `f` prefix meaning variable interpolation won't happen.
https://github.com/Textualize/rich/blob/c979a1b16f27285b03fdb14f5e364ea36d7eba01/rich/pretty.py#L369
I found this issue automatically. I'm a bot. Beep Boop 🦊. See other issues I found in your repo [here](https://codereview.doctor/Textualize/rich)
| [
{
"content": "import builtins\nimport collections\nimport dataclasses\nimport inspect\nimport os\nimport sys\nfrom array import array\nfrom collections import Counter, UserDict, UserList, defaultdict, deque\nfrom dataclasses import dataclass, fields, is_dataclass\nfrom inspect import isclass\nfrom itertools imp... | [
{
"content": "import builtins\nimport collections\nimport dataclasses\nimport inspect\nimport os\nimport sys\nfrom array import array\nfrom collections import Counter, UserDict, UserList, defaultdict, deque\nfrom dataclasses import dataclass, fields, is_dataclass\nfrom inspect import isclass\nfrom itertools imp... | diff --git a/rich/pretty.py b/rich/pretty.py
index d3bac94e8..1c6b16716 100644
--- a/rich/pretty.py
+++ b/rich/pretty.py
@@ -366,7 +366,7 @@ def _get_braces_for_defaultdict(_object: DefaultDict[Any, Any]) -> Tuple[str, st
def _get_braces_for_array(_object: "array[Any]") -> Tuple[str, str, str]:
- return (f"array({_object.typecode!r}, [", "])", "array({_object.typecode!r})")
+ return (f"array({_object.typecode!r}, [", "])", f"array({_object.typecode!r})")
_BRACES: Dict[type, Callable[[Any], Tuple[str, str, str]]] = {
|
qtile__qtile-2082 | qtile top breaks when the terminal is too small
I just launched `qtile top` several times but it only worked once, and broke on the next runs:
```
$ qtile top --force-start
$ qtile top
Traceback (most recent call last):
File "libqtile/scripts/main.py", line 46, in main
options.func(options)
File "qtile/libqtile/scripts/top.py", line 158, in top
force_start=force_start)
File "/usr/lib/python3.7/curses/__init__.py", line 102, in wrapper
return func(stdscr, *args, **kwds)
File "libqtile/scripts/top.py", line 95, in get_stats
scr.addstr(cnt + 1, 0, '{:<3} {:<40} {:<30}'.format(index, filename, mem))
_curses.error: addwstr() returned ERR
```
Also I'm not sure what's happening, but I can't replicate this in another X session, whether I use PYTHONTRACEMALLOC or --force-start.
| [
{
"content": "# Copyright (c) 2015, Roger Duran\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, m... | [
{
"content": "# Copyright (c) 2015, Roger Duran\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, m... | diff --git a/libqtile/scripts/top.py b/libqtile/scripts/top.py
index 0777d21142..eb8da5b6a4 100644
--- a/libqtile/scripts/top.py
+++ b/libqtile/scripts/top.py
@@ -167,6 +167,9 @@ def top(opts):
print("Can't start tracemalloc on qtile, check the logs")
except KeyboardInterrupt:
exit(-1)
+ except curses.error:
+ print("Terminal too small for curses interface.")
+ raw_stats(client, limit=lines, force_start=force_start)
def add_subcommand(subparsers):
|
e2nIEE__pandapower-1738 | plotting.geo convert_gis_to_geodata leads to issue if run after convert_geodata_to_gis
```python
import pandapower.plotting.geo as geo
import pandapower.networks as pn
net = pn.mv_oberrhein()
geo.convert_geodata_to_gis(net)
geo.convert_gis_to_geodata(net)
```
results in `AttributeError: 'Series' object has no attribute 'geometry'`
| [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2022 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n\nimport sys\nfrom numpy import array, setdiff1d\n\nfrom pandapower.auxiliary import soft_dependency_error... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2022 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n\nimport sys\nfrom numpy import array, setdiff1d\n\nfrom pandapower.auxiliary import soft_dependency_error... | diff --git a/pandapower/plotting/geo.py b/pandapower/plotting/geo.py
index 729307093..1fbc1a490 100644
--- a/pandapower/plotting/geo.py
+++ b/pandapower/plotting/geo.py
@@ -77,7 +77,7 @@ def _transform_branch_geometry_to_coords(branch_geo):
:type branch_geo: geopandas.GeoDataFrame
:return: branch_geo - The given geodataframe with coords
"""
- branch_geo["coords"] = branch_geo["coords"].geometry.apply(lambda x: list(x.coords))
+ branch_geo["coords"] = branch_geo.geometry.apply(lambda x: list(x.coords))
return branch_geo
|
pwndbg__pwndbg-877 | Exceptions when running from folder with space and number in name
### Description
When debugging an application in a folder with a name that includes a space followed by `0<digit>`, a Python traceback is triggered on seemingly every command.
What I think is happening is that pwndbg runs the "info auxv" command in the background every time the user enters a command, and a regular expression in `auxv.py` incorrectly parses the "File name of executable" line, which in this case looks something like this:
```
31 AT_EXECFN File name of executable 0x7fffffffefde "/home/user/test/x 01/test"
```
There are probably other file- and folder-name patterns that can result in this behavior, too.
### Steps to reproduce
- Make a folder named, for example, "x 01"
- Put any debuggable binary in it (even a basic hello-world works)
- Open it in gdb
- Type "r" to run
- Every gdb command run while the binary is running will now trigger a Python traceback
Here's a full example session that shows everything (sorry that it's kind of long):
```
$ pwd
/home/user/test/x 01
$ cat test.c
#include <stdio.h>
#include <stdlib.h>
void main()
{
printf("Hello world\n");
getchar();
}
$ gcc -o test test.c
$ gdb test
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
pwndbg: loaded 191 commands. Type pwndbg [filter] for a list.
pwndbg: created $rebase, $ida gdb functions (can be used with print/break)
Reading symbols from test...
(No debugging symbols found in test)
pwndbg> r
Starting program: /home/user/test/x 01/test
Hello world
^C
Program received signal SIGINT, Interrupt.
0x00007ffff7ebe142 in __GI___libc_read (fd=0, buf=0x5555555596b0, nbytes=1024) at ../sysdeps/unix/sysv/linux/read.c:26
26 ../sysdeps/unix/sysv/linux/read.c: No such file or directory.
Exception occurred: Error: invalid literal for int() with base 0: '01' (<class 'ValueError'>)
For more info invoke `set exception-verbose on` and rerun the command
or debug it by yourself with `set exception-debugger on`
Python Exception <class 'ValueError'> invalid literal for int() with base 0: '01':
Exception occurred: Error: invalid literal for int() with base 0: '01' (<class 'ValueError'>)
For more info invoke `set exception-verbose on` and rerun the command
or debug it by yourself with `set exception-debugger on`
Python Exception <class 'ValueError'> invalid literal for int() with base 0: '01':
Exception occurred: Error: invalid literal for int() with base 0: '01' (<class 'ValueError'>)
For more info invoke `set exception-verbose on` and rerun the command
or debug it by yourself with `set exception-debugger on`
Python Exception <class 'ValueError'> invalid literal for int() with base 0: '01':
pwndbg> set exception-debugger on
Set whether to debug exceptions raised in Pwndbg commands to True
Traceback (most recent call last):
File "/home/user/pwndbg/pwndbg/pwndbg/events.py", line 165, in caller
func()
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/stack.py", line 79, in update
page = pwndbg.memory.Page(start, stop-start, 6 if not is_executable() else 7, 0, '[stack]')
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/stack.py", line 127, in is_executable
ehdr = pwndbg.elf.exe()
File "/home/user/pwndbg/pwndbg/pwndbg/proc.py", line 71, in wrapper
return func(*a, **kw)
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/elf.py", line 180, in exe
e = entry()
File "/home/user/pwndbg/pwndbg/pwndbg/proc.py", line 71, in wrapper
return func(*a, **kw)
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/elf.py", line 191, in entry
entry = pwndbg.auxv.get().AT_ENTRY
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/auxv.py", line 106, in get
return use_info_auxv() or walk_stack() or AUXV()
File "/home/user/pwndbg/pwndbg/pwndbg/auxv.py", line 121, in use_info_auxv
const, value = int(match.group(1)), int(match.group(2), 0)
ValueError: invalid literal for int() with base 0: '01'
If that is an issue, you can report it on https://github.com/pwndbg/pwndbg/issues
(Please don't forget to search if it hasn't been reported before)
To generate the report and open a browser, you may run `bugreport --run-browser`
PS: Pull requests are welcome
> /home/user/pwndbg/pwndbg/pwndbg/auxv.py(121)use_info_auxv()
-> const, value = int(match.group(1)), int(match.group(2), 0)
(Pdb) q
Traceback (most recent call last):
File "/home/user/pwndbg/pwndbg/pwndbg/prompt.py", line 33, in prompt_hook
pwndbg.events.after_reload(start=False)
File "/home/user/pwndbg/pwndbg/pwndbg/events.py", line 216, in after_reload
f()
File "/home/user/pwndbg/pwndbg/pwndbg/events.py", line 169, in caller
raise e
File "/home/user/pwndbg/pwndbg/pwndbg/events.py", line 165, in caller
func()
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/stack.py", line 79, in update
page = pwndbg.memory.Page(start, stop-start, 6 if not is_executable() else 7, 0, '[stack]')
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/stack.py", line 127, in is_executable
ehdr = pwndbg.elf.exe()
File "/home/user/pwndbg/pwndbg/pwndbg/proc.py", line 71, in wrapper
return func(*a, **kw)
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/elf.py", line 180, in exe
e = entry()
File "/home/user/pwndbg/pwndbg/pwndbg/proc.py", line 71, in wrapper
return func(*a, **kw)
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/elf.py", line 191, in entry
entry = pwndbg.auxv.get().AT_ENTRY
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/auxv.py", line 106, in get
return use_info_auxv() or walk_stack() or AUXV()
File "/home/user/pwndbg/pwndbg/pwndbg/auxv.py", line 121, in use_info_auxv
const, value = int(match.group(1)), int(match.group(2), 0)
ValueError: invalid literal for int() with base 0: '01'
pwndbg> info auxv
33 AT_SYSINFO_EHDR System-supplied DSO's ELF header 0x7ffff7fce000
16 AT_HWCAP Machine-dependent CPU capability hints 0xbfebfbff
6 AT_PAGESZ System page size 4096
17 AT_CLKTCK Frequency of times() 100
3 AT_PHDR Program headers for program 0x555555554040
4 AT_PHENT Size of program header entry 56
5 AT_PHNUM Number of program headers 13
7 AT_BASE Base address of interpreter 0x7ffff7fcf000
8 AT_FLAGS Flags 0x0
9 AT_ENTRY Entry point of program 0x555555555080
11 AT_UID Real user ID 1000
12 AT_EUID Effective user ID 1000
13 AT_GID Real group ID 1001
14 AT_EGID Effective group ID 1001
23 AT_SECURE Boolean, was exec setuid-like? 0
25 AT_RANDOM Address of 16 random bytes 0x7fffffffdff9
26 AT_HWCAP2 Extension of AT_HWCAP 0x0
31 AT_EXECFN File name of executable 0x7fffffffefde "/home/user/test/x 01/test"
15 AT_PLATFORM String identifying platform 0x7fffffffe009 "x86_64"
0 AT_NULL End of vector 0x0
Traceback (most recent call last):
File "/home/user/pwndbg/pwndbg/pwndbg/events.py", line 165, in caller
func()
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/stack.py", line 79, in update
page = pwndbg.memory.Page(start, stop-start, 6 if not is_executable() else 7, 0, '[stack]')
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/stack.py", line 127, in is_executable
ehdr = pwndbg.elf.exe()
File "/home/user/pwndbg/pwndbg/pwndbg/proc.py", line 71, in wrapper
return func(*a, **kw)
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/elf.py", line 180, in exe
e = entry()
File "/home/user/pwndbg/pwndbg/pwndbg/proc.py", line 71, in wrapper
return func(*a, **kw)
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/elf.py", line 191, in entry
entry = pwndbg.auxv.get().AT_ENTRY
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/auxv.py", line 106, in get
return use_info_auxv() or walk_stack() or AUXV()
File "/home/user/pwndbg/pwndbg/pwndbg/auxv.py", line 121, in use_info_auxv
const, value = int(match.group(1)), int(match.group(2), 0)
ValueError: invalid literal for int() with base 0: '01'
> /home/user/pwndbg/pwndbg/pwndbg/auxv.py(121)use_info_auxv()
-> const, value = int(match.group(1)), int(match.group(2), 0)
(Pdb)
```
### My setup
<!--
Show us your gdb/python/pwndbg/OS/IDA Pro version (depending on your case).
NOTE: We are currently supporting only Ubuntu installations.
It is known that pwndbg is not fully working e.g. on Arch Linux (the heap stuff is not working there).
If you would like to change this situation - help us improving pwndbg and supporting other distros!
This can be displayed in pwndbg through `version` command.
If it is somehow unavailable, use:
* `show version` - for gdb
* `py import sys; print(sys.version)` - for python
* pwndbg version/git commit id
-->
Platform: Linux-5.4.0-53-generic-x86_64-with-glibc2.29
Gdb: 9.2
Python: 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0]
Pwndbg: 1.1.0 build: 29f962c
Capstone: 4.0.1024
Unicorn: 1.0.2
This GDB was configured as follows:
configure --host=x86_64-linux-gnu --target=x86_64-linux-gnu
--with-auto-load-dir=$debugdir:$datadir/auto-load
--with-auto-load-safe-path=$debugdir:$datadir/auto-load
--with-expat
--with-gdb-datadir=/usr/share/gdb (relocatable)
--with-jit-reader-dir=/usr/lib/gdb (relocatable)
--without-libunwind-ia64
--with-lzma
--with-babeltrace
--without-intel-pt
--with-mpfr
--without-xxhash
--with-python=/usr (relocatable)
--without-guile
--disable-source-highlight
--with-separate-debug-dir=/usr/lib/debug (relocatable)
--with-system-gdbinit=/etc/gdb/gdbinit
("Relocatable" means the directory can be moved with the GDB installation
tree, and GDB will still find it.)
| [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport re\nimport sys\n\nimport gdb\n\nimport pwndbg.abi\nimport pwndbg.arch\nimport pwndbg.events\nimport pwndbg.info\nimport pwndbg.memory\nimport pwndbg.qemu\nimport pwndbg.regs\nimport pwndbg.stack\nimport pwndbg.typeinfo\n\nexample_... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport re\nimport sys\n\nimport gdb\n\nimport pwndbg.abi\nimport pwndbg.arch\nimport pwndbg.events\nimport pwndbg.info\nimport pwndbg.memory\nimport pwndbg.qemu\nimport pwndbg.regs\nimport pwndbg.stack\nimport pwndbg.typeinfo\n\nexample_... | diff --git a/pwndbg/auxv.py b/pwndbg/auxv.py
index 17e28b18f23..517c77ddd8b 100644
--- a/pwndbg/auxv.py
+++ b/pwndbg/auxv.py
@@ -113,7 +113,7 @@ def use_info_auxv():
auxv = AUXV()
for line in lines:
- match = re.match('([0-9]+) .* (0x[0-9a-f]+|[0-9]+)', line)
+ match = re.match('([0-9]+) .*? (0x[0-9a-f]+|[0-9]+)', line)
if not match:
print("Warning: Skipping auxv entry '{}'".format(line))
continue
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.