prompt large_stringlengths 72 9.34k | completion large_stringlengths 0 7.61k |
|---|---|
<|file_name|>727. Minimum Window Subsequence.py<|end_file_name|><|fim▁begin|>from collections import defaultdict
class Solution(object):
def minWindow(self, S, T):
"""
:type S: str
:type T: str
:rtype: str
"""
pre = defaultdict(list)
for i, c in enumerate(T,... | start_index[p + 1] = start_index[p] |
<|file_name|>727. Minimum Window Subsequence.py<|end_file_name|><|fim▁begin|>from collections import defaultdict
class Solution(object):
def minWindow(self, S, T):
"""
:type S: str
:type T: str
:rtype: str
"""
pre = defaultdict(list)
for i, c in enumerate(T,... | lo, hi = start_index[-2], i |
<|file_name|>727. Minimum Window Subsequence.py<|end_file_name|><|fim▁begin|>from collections import defaultdict
class Solution(object):
def minWindow(self, S, T):
"""
:type S: str
:type T: str
:rtype: str
"""
pre = defaultdict(list)
for i, c in enumerate(T,... | return '' |
<|file_name|>727. Minimum Window Subsequence.py<|end_file_name|><|fim▁begin|>from collections import defaultdict
class Solution(object):
def minWindow(self, S, T):
"""
:type S: str
:type T: str
:rtype: str
"""
pre = defaultdict(list)
for i, c in enumerate(T,... | return S[lo:hi+1] |
<|file_name|>727. Minimum Window Subsequence.py<|end_file_name|><|fim▁begin|>from collections import defaultdict
class Solution(object):
def <|fim_middle|>(self, S, T):
"""
:type S: str
:type T: str
:rtype: str
"""
pre = defaultdict(list)
for i, c in enumera... | minWindow |
<|file_name|>verify.py<|end_file_name|><|fim▁begin|># Copyright 2010 http://www.collabq.com
import logging
from django.conf import settings
from django.http import HttpResponseRedirect
from common import api
from common import exception
class VerifyInstallMiddleware(object):<|fim▁hole|> logging.info("VerifyInstal... | def process_request(self, request): |
<|file_name|>verify.py<|end_file_name|><|fim▁begin|># Copyright 2010 http://www.collabq.com
import logging
from django.conf import settings
from django.http import HttpResponseRedirect
from common import api
from common import exception
class VerifyInstallMiddleware(object):
<|fim_middle|>
<|fim▁end|> | def process_request(self, request):
logging.info("VerifyInstallMiddleware")
logging.info("Path %s" % request.path)
if not request.path == '/install':
try:
root_user = api.actor_get(api.ROOT, settings.ROOT_NICK)
logging.info("Root Exists")
except:
logging.info("Root Does... |
<|file_name|>verify.py<|end_file_name|><|fim▁begin|># Copyright 2010 http://www.collabq.com
import logging
from django.conf import settings
from django.http import HttpResponseRedirect
from common import api
from common import exception
class VerifyInstallMiddleware(object):
def process_request(self, request):
... | logging.info("VerifyInstallMiddleware")
logging.info("Path %s" % request.path)
if not request.path == '/install':
try:
root_user = api.actor_get(api.ROOT, settings.ROOT_NICK)
logging.info("Root Exists")
except:
logging.info("Root Does Not Exists")
return HttpRespo... |
<|file_name|>verify.py<|end_file_name|><|fim▁begin|># Copyright 2010 http://www.collabq.com
import logging
from django.conf import settings
from django.http import HttpResponseRedirect
from common import api
from common import exception
class VerifyInstallMiddleware(object):
def process_request(self, request):
... | try:
root_user = api.actor_get(api.ROOT, settings.ROOT_NICK)
logging.info("Root Exists")
except:
logging.info("Root Does Not Exists")
return HttpResponseRedirect('/install') |
<|file_name|>verify.py<|end_file_name|><|fim▁begin|># Copyright 2010 http://www.collabq.com
import logging
from django.conf import settings
from django.http import HttpResponseRedirect
from common import api
from common import exception
class VerifyInstallMiddleware(object):
def <|fim_middle|>(self, request):
... | process_request |
<|file_name|>a.py<|end_file_name|><|fim▁begin|># import re, os
# from jandy.profiler import Profiler
#
#
# class Base:
# def __init__(self):
# print('init call')
#
# def compile(self, str):
# re.compile(str)<|fim▁hole|># try:
# p.start()
# b = Base()
# b.compile("foo|bar")
# prin... | #
# #
# p = Profiler("12K", "localhost:3000", 1) |
<|file_name|>1021.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
def calc_note(count, value):
qnt = 0
if count >= value:
qnt = int(count) / value
print '%d nota(s) de R$ %d.00' % (qnt, value)
return count - qnt * value
n = float(raw_input())<|fim▁hole|>n = calc_note(n, 100)
n = calc... |
print 'NOTAS:' |
<|file_name|>1021.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
def calc_note(count, value):
<|fim_middle|>
n = float(raw_input())
print 'NOTAS:'
n = calc_note(n, 100)
n = calc_note(n, 50)
n = calc_note(n, 20)
n = calc_note(n, 10)
n = calc_note(n, 5)
n = calc_note(n, 2)
print 'MOEDAS:'
print '%d moe... | qnt = 0
if count >= value:
qnt = int(count) / value
print '%d nota(s) de R$ %d.00' % (qnt, value)
return count - qnt * value |
<|file_name|>1021.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
def calc_note(count, value):
qnt = 0
if count >= value:
<|fim_middle|>
print '%d nota(s) de R$ %d.00' % (qnt, value)
return count - qnt * value
n = float(raw_input())
print 'NOTAS:'
n = calc_note(n, 100)
n = ... | qnt = int(count) / value |
<|file_name|>1021.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
def calc_note(count, value):
qnt = 0
if count >= value:
qnt = int(count) / value
print '%d nota(s) de R$ %d.00' % (qnt, value)
return count - qnt * value
n = float(raw_input())
print 'NOTAS:'
n = calc_note(n, 100)
n =... | print '1 moeda(s) de R$ 0.05'
m1 = (n - 0.05) * 100 |
<|file_name|>1021.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
def calc_note(count, value):
qnt = 0
if count >= value:
qnt = int(count) / value
print '%d nota(s) de R$ %d.00' % (qnt, value)
return count - qnt * value
n = float(raw_input())
print 'NOTAS:'
n = calc_note(n, 100)
n =... | print '0 moeda(s) de R$ 0.05'
m1 = round(n, 2) * 100 |
<|file_name|>1021.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
def calc_note(count, value):
qnt = 0
if count >= value:
qnt = int(count) / value
print '%d nota(s) de R$ %d.00' % (qnt, value)
return count - qnt * value
n = float(raw_input())
print 'NOTAS:'
n = calc_note(n, 100)
n =... | print '%.0f moeda(s) de R$ 0.01' % m1 |
<|file_name|>1021.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
def calc_note(count, value):
qnt = 0
if count >= value:
qnt = int(count) / value
print '%d nota(s) de R$ %d.00' % (qnt, value)
return count - qnt * value
n = float(raw_input())
print 'NOTAS:'
n = calc_note(n, 100)
n =... | print '0 moeda(s) de R$ 0.01' |
<|file_name|>1021.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
def <|fim_middle|>(count, value):
qnt = 0
if count >= value:
qnt = int(count) / value
print '%d nota(s) de R$ %d.00' % (qnt, value)
return count - qnt * value
n = float(raw_input())
print 'NOTAS:'
n = calc_note(n, 100... | calc_note |
<|file_name|>testLock2.py<|end_file_name|><|fim▁begin|>"""import portalocker
with portalocker.Lock('text.txt', timeout=5) as fh:
fh.write("Sono in testLoxk2.py")
"""
from lockfile import LockFile
<|fim▁hole|>with lock:
print lock.path, 'is locked.'
with open('text.txt', "a") as file:
file.write("So... | lock = LockFile('text.txt') |
<|file_name|>strFormat.py<|end_file_name|><|fim▁begin|># testStr = "Hello {name}, How long have you bean?. I'm {myName}"
#
# testStr = testStr.format(name="Leo", myName="Serim")
#
# print(testStr)<|fim▁hole|>
# print( "4" in "3.5")<|fim▁end|> |
limit = None
hello = str(limit, "")
print(hello) |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | "offpeak_total": ["Offpeak Total", GIGABITS, "mdi:download"], |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | """Set up the EBox sensor."""
username = config.get(CONF_USERNAME)
password = config.get(CONF_PASSWORD)
httpsession = hass.helpers.aiohttp_client.async_get_clientsession()
ebox_data = EBoxData(username, password, httpsession)
name = config.get(CONF_NAME)
from pyebox.client import PyEboxEr... |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | """Implementation of a EBox sensor."""
def __init__(self, ebox_data, sensor_type, name):
"""Initialize the sensor."""
self.client_name = name
self.type = sensor_type
self._name = SENSOR_TYPES[sensor_type][0]
self._unit_of_measurement = SENSOR_TYPES[sensor_type][1]
... |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | """Initialize the sensor."""
self.client_name = name
self.type = sensor_type
self._name = SENSOR_TYPES[sensor_type][0]
self._unit_of_measurement = SENSOR_TYPES[sensor_type][1]
self._icon = SENSOR_TYPES[sensor_type][2]
self.ebox_data = ebox_data
self._state... |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | """Return the name of the sensor."""
return f"{self.client_name} {self._name}" |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | """Return the state of the sensor."""
return self._state |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | """Return the unit of measurement of this entity, if any."""
return self._unit_of_measurement |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | """Icon to use in the frontend, if any."""
return self._icon |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | """Get the latest data from EBox and update the state."""
await self.ebox_data.async_update()
if self.type in self.ebox_data.data:
self._state = round(self.ebox_data.data[self.type], 2) |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | """Get data from Ebox."""
def __init__(self, username, password, httpsession):
"""Initialize the data object."""
from pyebox import EboxClient
self.client = EboxClient(username, password, REQUESTS_TIMEOUT, httpsession)
self.data = {}
@Throttle(MIN_TIME_BETWEEN_UPDATES)
... |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | """Initialize the data object."""
from pyebox import EboxClient
self.client = EboxClient(username, password, REQUESTS_TIMEOUT, httpsession)
self.data = {} |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | """Get the latest data from Ebox."""
from pyebox.client import PyEboxError
try:
await self.client.fetch_data()
except PyEboxError as exp:
_LOGGER.error("Error on receive last EBox data: %s", exp)
return
# Update data
self.data = self.c... |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | self._state = round(self.ebox_data.data[self.type], 2) |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | async_setup_platform |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | __init__ |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | name |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | state |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | unit_of_measurement |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | icon |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | async_update |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | __init__ |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
i... | async_update |
<|file_name|>excise.py<|end_file_name|><|fim▁begin|>def excise(conn, qrelname, tid):
with conn.cursor() as cur:
# Assume 'id' column exists and print that for bookkeeping.
#
# TODO: Instead should find unique constraints and print
# those, or try to print all attributes that are not ... | |
<|file_name|>excise.py<|end_file_name|><|fim▁begin|>def excise(conn, qrelname, tid):
<|fim_middle|>
<|fim▁end|> | with conn.cursor() as cur:
# Assume 'id' column exists and print that for bookkeeping.
#
# TODO: Instead should find unique constraints and print
# those, or try to print all attributes that are not corrupt.
sql = 'DELETE FROM {0} WHERE ctid = %s RETURNING id'.format(qrelname... |
<|file_name|>excise.py<|end_file_name|><|fim▁begin|>def excise(conn, qrelname, tid):
with conn.cursor() as cur:
# Assume 'id' column exists and print that for bookkeeping.
#
# TODO: Instead should find unique constraints and print
# those, or try to print all attributes that are not ... | return row[0] |
<|file_name|>excise.py<|end_file_name|><|fim▁begin|>def <|fim_middle|>(conn, qrelname, tid):
with conn.cursor() as cur:
# Assume 'id' column exists and print that for bookkeeping.
#
# TODO: Instead should find unique constraints and print
# those, or try to print all attributes that ... | excise |
<|file_name|>page_privacy.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404
from wagtail.wagtailadmin.forms import PageViewRestrictionForm
from wagtail.wagtailadmin.modal_workflow ... | })
|
<|file_name|>page_privacy.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404
from wagtail.wagtailadmin.forms import PageViewRestrictionForm
from wagtail.wagtailadmin.modal_workflow ... | page = get_object_or_404(Page, id=page_id)
page_perms = page.permissions_for_user(request.user)
if not page_perms.can_set_view_restrictions():
raise PermissionDenied
# fetch restriction records in depth order so that ancestors appear first
restrictions = page.get_view_restrictions().order_b... |
<|file_name|>page_privacy.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404
from wagtail.wagtailadmin.forms import PageViewRestrictionForm
from wagtail.wagtailadmin.modal_workflow ... | raise PermissionDenied |
<|file_name|>page_privacy.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404
from wagtail.wagtailadmin.forms import PageViewRestrictionForm
from wagtail.wagtailadmin.modal_workflow ... | restriction = restrictions[0]
restriction_exists_on_ancestor = (restriction.page != page) |
<|file_name|>page_privacy.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404
from wagtail.wagtailadmin.forms import PageViewRestrictionForm
from wagtail.wagtailadmin.modal_workflow ... | restriction = None
restriction_exists_on_ancestor = False |
<|file_name|>page_privacy.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404
from wagtail.wagtailadmin.forms import PageViewRestrictionForm
from wagtail.wagtailadmin.modal_workflow ... | form = PageViewRestrictionForm(request.POST, instance=restriction)
if form.is_valid() and not restriction_exists_on_ancestor:
if form.cleaned_data['restriction_type'] == PageViewRestriction.NONE:
# remove any existing restriction
if restriction:
... |
<|file_name|>page_privacy.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404
from wagtail.wagtailadmin.forms import PageViewRestrictionForm
from wagtail.wagtailadmin.modal_workflow ... | if form.cleaned_data['restriction_type'] == PageViewRestriction.NONE:
# remove any existing restriction
if restriction:
restriction.delete()
else:
restriction = form.save(commit=False)
restriction.page = page
... |
<|file_name|>page_privacy.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404
from wagtail.wagtailadmin.forms import PageViewRestrictionForm
from wagtail.wagtailadmin.modal_workflow ... | if restriction:
restriction.delete() |
<|file_name|>page_privacy.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404
from wagtail.wagtailadmin.forms import PageViewRestrictionForm
from wagtail.wagtailadmin.modal_workflow ... | restriction.delete() |
<|file_name|>page_privacy.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404
from wagtail.wagtailadmin.forms import PageViewRestrictionForm
from wagtail.wagtailadmin.modal_workflow ... | restriction = form.save(commit=False)
restriction.page = page
form.save() |
<|file_name|>page_privacy.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404
from wagtail.wagtailadmin.forms import PageViewRestrictionForm
from wagtail.wagtailadmin.modal_workflow ... | if not restriction_exists_on_ancestor:
if restriction:
form = PageViewRestrictionForm(instance=restriction)
else:
# no current view restrictions on this page
form = PageViewRestrictionForm(initial={
'restriction_type': '... |
<|file_name|>page_privacy.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404
from wagtail.wagtailadmin.forms import PageViewRestrictionForm
from wagtail.wagtailadmin.modal_workflow ... | if restriction:
form = PageViewRestrictionForm(instance=restriction)
else:
# no current view restrictions on this page
form = PageViewRestrictionForm(initial={
'restriction_type': 'none'
}) |
<|file_name|>page_privacy.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404
from wagtail.wagtailadmin.forms import PageViewRestrictionForm
from wagtail.wagtailadmin.modal_workflow ... | form = PageViewRestrictionForm(instance=restriction) |
<|file_name|>page_privacy.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404
from wagtail.wagtailadmin.forms import PageViewRestrictionForm
from wagtail.wagtailadmin.modal_workflow ... | form = PageViewRestrictionForm(initial={
'restriction_type': 'none'
}) |
<|file_name|>page_privacy.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404
from wagtail.wagtailadmin.forms import PageViewRestrictionForm
from wagtail.wagtailadmin.modal_workflow ... | return render_modal_workflow(
request, 'wagtailadmin/page_privacy/ancestor_privacy.html', None,
{
'page_with_restriction': restriction.page,
}
) |
<|file_name|>page_privacy.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404
from wagtail.wagtailadmin.forms import PageViewRestrictionForm
from wagtail.wagtailadmin.modal_workflow ... | return render_modal_workflow(
request,
'wagtailadmin/page_privacy/set_privacy.html',
'wagtailadmin/page_privacy/set_privacy.js', {
'page': page,
'form': form,
}
) |
<|file_name|>page_privacy.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404
from wagtail.wagtailadmin.forms import PageViewRestrictionForm
from wagtail.wagtailadmin.modal_workflow ... | set_privacy |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | class FeedbackPage(Page):
def __init__(self, version, response, solution):
""" |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | def __init__(self, version, account_sid, message_sid):
"""
Initialize the FeedbackList
:param Version version: Version that contains the resource
:param account_sid: The account_sid
:param message_sid: The message_sid
:returns: twilio.rest.api.v2010.account.message.... |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | """
Initialize the FeedbackList
:param Version version: Version that contains the resource
:param account_sid: The account_sid
:param message_sid: The message_sid
:returns: twilio.rest.api.v2010.account.message.feedback.FeedbackList
:rtype: twilio.rest.api.v2010... |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | """
Create a new FeedbackInstance
:param FeedbackInstance.Outcome outcome: The outcome
:returns: Newly created FeedbackInstance
:rtype: twilio.rest.api.v2010.account.message.feedback.FeedbackInstance
"""
data = values.of({
'Outcome': outcome,
... |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | """
Provide a friendly representation
:returns: Machine friendly representation
:rtype: str
"""
return '<Twilio.Api.V2010.FeedbackList>' |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | def __init__(self, version, response, solution):
"""
Initialize the FeedbackPage
:param Version version: Version that contains the resource
:param Response response: Response from the API
:param account_sid: The account_sid
:param message_sid: The message_sid
... |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | """
Initialize the FeedbackPage
:param Version version: Version that contains the resource
:param Response response: Response from the API
:param account_sid: The account_sid
:param message_sid: The message_sid
:returns: twilio.rest.api.v2010.account.message.fee... |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | """
Build an instance of FeedbackInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.message.feedback.FeedbackInstance
:rtype: twilio.rest.api.v2010.account.message.feedback.FeedbackInstance
"""
return FeedbackInst... |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | """
Provide a friendly representation
:returns: Machine friendly representation
:rtype: str
"""
return '<Twilio.Api.V2010.FeedbackPage>' |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | class Outcome(object):
CONFIRMED = "confirmed"
UMCONFIRMED = "umconfirmed"
def __init__(self, version, payload, account_sid, message_sid):
"""
Initialize the FeedbackInstance
:returns: twilio.rest.api.v2010.account.message.feedback.FeedbackInstance
:rtype: twili... |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | CONFIRMED = "confirmed"
UMCONFIRMED = "umconfirmed" |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | """
Initialize the FeedbackInstance
:returns: twilio.rest.api.v2010.account.message.feedback.FeedbackInstance
:rtype: twilio.rest.api.v2010.account.message.feedback.FeedbackInstance
"""
super(FeedbackInstance, self).__init__(version)
# Marshaled Properties
... |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | """
:returns: The account_sid
:rtype: unicode
"""
return self._properties['account_sid'] |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | """
:returns: The message_sid
:rtype: unicode
"""
return self._properties['message_sid'] |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | """
:returns: The outcome
:rtype: FeedbackInstance.Outcome
"""
return self._properties['outcome'] |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | """
:returns: The date_created
:rtype: datetime
"""
return self._properties['date_created'] |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | """
:returns: The date_updated
:rtype: datetime
"""
return self._properties['date_updated'] |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | """
:returns: The uri
:rtype: unicode
"""
return self._properties['uri'] |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | """
Provide a friendly representation
:returns: Machine friendly representation
:rtype: str
"""
return '<Twilio.Api.V2010.FeedbackInstance>' |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | __init__ |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | create |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | __repr__ |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | __init__ |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | get_instance |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | __repr__ |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | __init__ |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | account_sid |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | message_sid |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | outcome |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | date_created |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | date_updated |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | uri |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | __repr__ |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from __future__ import division, print_function, absolute_import
from os.path import join
def configuration(parent_package='', top_path=None):
import warnings
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_inf... | #!/usr/bin/env python |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from __future__ import division, print_function, absolute_import
from os.path import join
def configuration(parent_package='', top_path=None):
<|fim_middle|>
if __name__ == '__main__':
from numpy.distutils.core import setup
setu... | import warnings
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info, BlasNotFoundError
config = Configuration('odr', parent_package, top_path)
libodr_files = ['d_odr.f',
'd_mprec.f',
'dlunoc.f']
blas_info ... |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from __future__ import division, print_function, absolute_import
from os.path import join
def configuration(parent_package='', top_path=None):
import warnings
from numpy.distutils.misc_util import Configuration
from numpy.distutils.... | libodr_files.append('d_lpk.f') |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.