prompt
large_stringlengths
72
9.34k
completion
large_stringlengths
0
7.61k
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from django import forms from ncdjango.interfaces.arcgis.form_fields import SrField class PointForm(forms.Form): x = forms.FloatField()<|fim▁hole|> projection = SrField()<|fim▁end|>
y = forms.FloatField()
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from django import forms from ncdjango.interfaces.arcgis.form_fields import SrField class PointForm(forms.Form): <|fim_middle|> <|fim▁end|>
x = forms.FloatField() y = forms.FloatField() projection = SrField()
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*-<|fim▁hole|>from __future__ import unicode_literals from __future__ import print_function<|fim▁end|>
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved. # Use of this source code is governed by a BSD-style license (see the COPYING file). """ This package contains the qibuild actions. """ from __future__ import absolute_import
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform <|fim▁hole|> os.name == "posix" and platform.system() ...
import pytest needs_posix = pytest.mark.skipif(
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
""" A particular errno. """ return errno.EINVAL
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
""" The string representation of a particular errno """ return "[Errno {}] Invalid argument".format(errno_value)
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
""" Return a callable that patches in a failing system call fake that fails and return a list of calls to that fake. """ def _apply_failing_clock_call(name, errno_value): calls = [] def _failing_clock_call(clock_id, timespec): calls.append((clock_id, timespec)) ...
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
calls = [] def _failing_clock_call(clock_id, timespec): calls.append((clock_id, timespec)) monkeypatch.setattr(_api.ffi, "errno", errno.EINVAL) return -1 monkeypatch.setattr(_api, name, _failing_clock_call) return calls
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
calls.append((clock_id, timespec)) monkeypatch.setattr(_api.ffi, "errno", errno.EINVAL) return -1
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
""" Return a callable that patches in a fake over the specified clock call that sets the specified resolution and returns a list of calls to that fake. """ def _apply_timespec(name, goal_timespec): calls = [] def _fake_clock_call(clock_id, timespec): calls.append((c...
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
calls = [] def _fake_clock_call(clock_id, timespec): calls.append((clock_id, timespec)) timespec[0] = goal_timespec[0] return 0 monkeypatch.setattr(_api, name, _fake_clock_call) return calls
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
calls.append((clock_id, timespec)) timespec[0] = goal_timespec[0] return 0
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
""" Tests for L{_SimpleNamespace}. """ def test_init(self): """ The initializer updates the instance's C{__dict__} with its keyword arguments. """ namespace = _api._SimpleNamespace(x=1) assert namespace.x == 1 def test_repr(self): """ ...
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
""" The initializer updates the instance's C{__dict__} with its keyword arguments. """ namespace = _api._SimpleNamespace(x=1) assert namespace.x == 1
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
""" The instance's repr reflects its C{__dict__} """ namespace = _api._SimpleNamespace() namespace.y = 2 assert repr(namespace) == "namespace(y=2)"
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
""" Two instances with equal C{__dict__}s are equal. """ assert _api._SimpleNamespace(a=1) == _api._SimpleNamespace(a=1)
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
""" Tests for L{get_clock_info}. """ def test_non_monotonic(self): """ L{get_clock_info} only knows about the monotonic clock. """ with pytest.raises(ValueError): get_clock_info("not monotonic") def test_failure(self, apply_failing_clock_call, errno_valu...
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
""" L{get_clock_info} only knows about the monotonic clock. """ with pytest.raises(ValueError): get_clock_info("not monotonic")
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
""" A failure in C{clock_getres} results in an L{OSError} that presents the failure's errno. """ calls = apply_failing_clock_call('_clock_getres', errno_value) with pytest.raises(OSError) as exc: get_clock_info("monotonic") assert len(calls) == 1 ...
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
""" The reported info always includes a nanosecond resolution when C{clock_getres} indicates nanosecond resolution. """ calls = apply_timespec( "_clock_getres", _bindings.ffi.new("struct timespec *", clock_getres_spec), ) expected_info = _...
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
""" Tests for L{get_clock_info}. """ def test_non_monotonic(self): """ L{get_clock_info} only knows about the monotonic clock. """ with pytest.raises(ValueError): get_clock_info("not monotonic") def test_info(self): """ The reported info ...
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
""" L{get_clock_info} only knows about the monotonic clock. """ with pytest.raises(ValueError): get_clock_info("not monotonic")
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
""" The reported info always includes a nanosecond resolution. """ expected_info = _api._SimpleNamespace( adjustable=False, implementation="mach_absolute_time()", monotonic=True, resolution=None, # checked separately ) ...
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
""" A failure in C{clock_gettime} results in an L{OSError} that presents the failure's errno. """ calls = apply_failing_clock_call('_clock_gettime', errno_value) with pytest.raises(OSError) as exc: monotonic() assert len(calls) == 1 assert calls[0][0] == _bindings.lib.CLOCK_MON...
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
""" For any given time resolution, the monotonic time equals the sum of the seconds and nanoseconds. """ clock_gettime_calls = apply_timespec( '_clock_gettime', _bindings.ffi.new("struct timespec *", clock_gettime_spec), ) # we a float, representing the current seconds plus ...
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
""" A monotonic moment is never greater than a succeeding monotonic moment. """ assert monotonic() <= monotonic()
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
expected_resolution = 1e-09
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
expected_resolution = 1.0
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
errno_value
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
strerror
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
apply_failing_clock_call
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
_apply_failing_clock_call
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
_failing_clock_call
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
apply_timespec
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
_apply_timespec
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
_fake_clock_call
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
test_init
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
test_repr
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
test_eq
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
test_non_monotonic
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
test_failure
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
test_info
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
test_non_monotonic
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
test_info
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
test_monotonic_fails_posix
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
test_clock
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>""" Tests for L{monotone}. """ from hypothesis import given, strategies as st import errno from monotone import get_clock_info, monotonic from monotone import _api, _bindings import os import platform import pytest needs_posix = pytest.mark.skipif( os....
test_clock_increases
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (c) 2015 Odoo S.A. <http://openerp.com> # # This program is free software: you can redistribu...
fpos = picking.sale_id.fiscal_position_id account_id = fpos.map_account(account_id) taxes_ids = fpos.map_tax(taxes).ids
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (c) 2015 Odoo S.A. <http://openerp.com> # # This program is free software: you can redistribu...
_inherit = 'stock.picking' carrier_price = fields.Float(string="Shipping Cost", readonly=True) delivery_type = fields.Selection(related='carrier_id.delivery_type', readonly=True) @api.multi def do_transfer(self): res = super(StockPicking, self).do_transfer() if self.carrier_id and...
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (c) 2015 Odoo S.A. <http://openerp.com> # # This program is free software: you can redistribu...
res = super(StockPicking, self).do_transfer() if self.carrier_id and self.carrier_id.delivery_type != 'grid': self.send_to_shipper() return res
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (c) 2015 Odoo S.A. <http://openerp.com> # # This program is free software: you can redistribu...
picking.ensure_one() invoice.ensure_one() carrier = picking.carrier_id # No carrier if not carrier: return None # Carrier already invoiced on the sale order if any(inv_line.product_id.id == carrier.product_id.id for inv_line in invoice.invoice_line_i...
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (c) 2015 Odoo S.A. <http://openerp.com> # # This program is free software: you can redistribu...
res = self.carrier_id.send_shipping(self)[0] self.carrier_price = res['exact_price'] self.carrier_tracking_ref = res['tracking_number'] msg = "Shipment sent to carrier %s for expedition with tracking number %s" % (self.carrier_id.name, self.carrier_tracking_ref) self.message_post...
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (c) 2015 Odoo S.A. <http://openerp.com> # # This program is free software: you can redistribu...
self.ensure_one() client_action = {'type': 'ir.actions.act_url', 'name': "Shipment Tracking Page", 'target': 'new', 'url': self.carrier_id.get_tracking_link(self)[0] } return client_action
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (c) 2015 Odoo S.A. <http://openerp.com> # # This program is free software: you can redistribu...
self.carrier_id.cancel_shipment(self) msg = "Shipment %s cancelled" % self.carrier_tracking_ref self.message_post(body=msg) self.carrier_tracking_ref = False
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (c) 2015 Odoo S.A. <http://openerp.com> # # This program is free software: you can redistribu...
self.send_to_shipper()
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (c) 2015 Odoo S.A. <http://openerp.com> # # This program is free software: you can redistribu...
return None
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (c) 2015 Odoo S.A. <http://openerp.com> # # This program is free software: you can redistribu...
return None
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (c) 2015 Odoo S.A. <http://openerp.com> # # This program is free software: you can redistribu...
return super(StockPicking, self)._prepare_shipping_invoice_line(picking, invoice)
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (c) 2015 Odoo S.A. <http://openerp.com> # # This program is free software: you can redistribu...
account_id = carrier.product_id.categ_id.property_account_income_categ.id
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (c) 2015 Odoo S.A. <http://openerp.com> # # This program is free software: you can redistribu...
fpos = picking.sale_id.fiscal_position_id account_id = fpos.map_account(account_id) taxes_ids = fpos.map_tax(taxes).ids
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (c) 2015 Odoo S.A. <http://openerp.com> # # This program is free software: you can redistribu...
do_transfer
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (c) 2015 Odoo S.A. <http://openerp.com> # # This program is free software: you can redistribu...
_prepare_shipping_invoice_line
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (c) 2015 Odoo S.A. <http://openerp.com> # # This program is free software: you can redistribu...
send_to_shipper
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (c) 2015 Odoo S.A. <http://openerp.com> # # This program is free software: you can redistribu...
open_website_url
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (c) 2015 Odoo S.A. <http://openerp.com> # # This program is free software: you can redistribu...
cancel_shipment
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import patterns, include, url from django.conf import settings from django.conf.urls.static import static from django.contrib import admin admin.autodiscover() import views urlpatterns = patterns('', url(r'^pis', views.pis), url(r'^words...
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
if getattr(self.parent, "proxy", None) and self.parent.proxy.instance: if hasattr(self.parent.proxy.instance, "get_network_id"): network = self.parent.proxy.instance.get_network_id(runner) if network == self.get_network_id(runner):
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
resource_name = "block_device" virtual_name = argument.String(field="VirtualName") device_name = argument.String(field="DeviceName") disabled = argument.Boolean(field="NoDevice", serializer=serializers.Const(""))
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
resource_name = "network_interface" public = argument.Boolean(default=False, field="AssociatePublicIpAddress") security_groups = argument.ResourceList(SecurityGroup, field="Groups")
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
resource_name = "ec2_instance" name = argument.String(min=3, max=128, field="Name", group="tags") ami = argument.String(field="ImageId") instance_type = argument.String(field="InstanceType") key_pair = argument.Resource(KeyPair, field="KeyName") subnet = argument.Resource(Subnet, field="SubnetI...
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
resource = Instance service_name = "ec2" api_version = "2015-10-01" describe_action = "describe_instances" describe_envelope = "Reservations[].Instances[]" key = "InstanceId" def get_describe_filters(self): return { "Filters": [ {"Name": "tag:Name", "Valu...
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
return { "Filters": [ {"Name": "tag:Name", "Values": [self.resource.name]}, { "Name": "instance-state-name", "Values": [ "pending", "running", "shutting-dow...
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
create_action = "run_instances" create_envelope = "Instances[0]" # create_response = 'id-only' waiter = "instance_running" signature = (Present("name"),) def get_create_serializer(self): return serializers.Resource(MaxCount=1, MinCount=1)
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
return serializers.Resource(MaxCount=1, MinCount=1)
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
destroy_action = "terminate_instances" waiter = "instance_terminated" def get_destroy_serializer(self): return serializers.Dict( InstanceIds=serializers.ListOfOne(serializers.Property("InstanceId")) )
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
return serializers.Dict( InstanceIds=serializers.ListOfOne(serializers.Property("InstanceId")) )
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
resource_name = "ec2_instance" input = Instance def get_network_id(self, runner): # FIXME: We can save on some steps if we only do this once obj = runner.get_plan(self.adapts).describe_object() return obj.get("VpcId", None) def get_serializer(self, runner, **kwargs): ob...
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
obj = runner.get_plan(self.adapts).describe_object() return obj.get("VpcId", None)
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
obj = runner.get_plan(self.adapts).describe_object() if getattr(self.parent, "proxy", None) and self.parent.proxy.instance: if hasattr(self.parent.proxy.instance, "get_network_id"): network = self.parent.proxy.instance.get_network_id(runner) if network == sel...
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
if hasattr(self.parent.proxy.instance, "get_network_id"): network = self.parent.proxy.instance.get_network_id(runner) if network == self.get_network_id(runner): return serializers.Const(obj["PrivateIpAddress"])
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
network = self.parent.proxy.instance.get_network_id(runner) if network == self.get_network_id(runner): return serializers.Const(obj["PrivateIpAddress"])
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
return serializers.Const(obj["PrivateIpAddress"])
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
return serializers.Const(obj["PublicDnsName"])
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
return serializers.Const(obj["PublicIpAddress"])
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
get_describe_filters
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
get_create_serializer
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
get_destroy_serializer
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
get_network_id
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
get_serializer
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding:utf-8 -*- from setuptools import setup setup( name='libipa', version='0.0.6', author='Andrew Udvare', author_email='audvare@gmail.com', packages=['ipa'], scripts=['bin/ipa-unzip-bin', 'bin/ipa-dump-info'],<|f...
url='https://github.com/Tatsh/libipa', license='LICENSE.txt', description='Library to read IPA files (iOS application archives).',
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.core.cache import cache from django.shortcuts import render from django.http import Http404 from styleguide.utils import (Styleguide, STYLEGUIDE_DIR_NAME, STYLEGUIDE_DEBUG, STYLEGUIDE_CACHE_NAME, ...
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.core.cache import cache from django.shortcuts import render from django.http import Http404 from styleguide.utils import (Styleguide, STYLEGUIDE_DIR_NAME, STYLEGUIDE_DEBUG, STYLEGUIDE_CACHE_NAME, ...
if not STYLEGUIDE_ACCESS(request.user): raise Http404() styleguide = None if not STYLEGUIDE_DEBUG: styleguide = cache.get(STYLEGUIDE_CACHE_NAME) if styleguide is None: styleguide = Styleguide() cache.set(STYLEGUIDE_CACHE_NAME, styleguide, None) if module_name is no...
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.core.cache import cache from django.shortcuts import render from django.http import Http404 from styleguide.utils import (Styleguide, STYLEGUIDE_DIR_NAME, STYLEGUIDE_DEBUG, STYLEGUIDE_CACHE_NAME, ...
raise Http404()
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.core.cache import cache from django.shortcuts import render from django.http import Http404 from styleguide.utils import (Styleguide, STYLEGUIDE_DIR_NAME, STYLEGUIDE_DEBUG, STYLEGUIDE_CACHE_NAME, ...
styleguide = cache.get(STYLEGUIDE_CACHE_NAME)
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.core.cache import cache from django.shortcuts import render from django.http import Http404 from styleguide.utils import (Styleguide, STYLEGUIDE_DIR_NAME, STYLEGUIDE_DEBUG, STYLEGUIDE_CACHE_NAME, ...
styleguide = Styleguide() cache.set(STYLEGUIDE_CACHE_NAME, styleguide, None)
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.core.cache import cache from django.shortcuts import render from django.http import Http404 from styleguide.utils import (Styleguide, STYLEGUIDE_DIR_NAME, STYLEGUIDE_DEBUG, STYLEGUIDE_CACHE_NAME, ...
styleguide.set_current_module(module_name)
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.core.cache import cache from django.shortcuts import render from django.http import Http404 from styleguide.utils import (Styleguide, STYLEGUIDE_DIR_NAME, STYLEGUIDE_DEBUG, STYLEGUIDE_CACHE_NAME, ...
index
<|file_name|>dummy_operator.py<|end_file_name|><|fim▁begin|># # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under th...
#
<|file_name|>dummy_operator.py<|end_file_name|><|fim▁begin|># # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under th...
""" Operator that does literally nothing. It can be used to group tasks in a DAG. """ ui_color = '#e8f7e4' @apply_defaults def __init__(self, *args, **kwargs) -> None: super().__init__(*args, **kwargs) def execute(self, context): pass
<|file_name|>dummy_operator.py<|end_file_name|><|fim▁begin|># # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under th...
super().__init__(*args, **kwargs)