code
stringlengths
3
6.57k
get_context_data(self, **kwargs)
super(Py3Page, self)
get_context_data(**kwargs)
django.get_version()
VoteResults(TemplateView)
get_context_data(self, **kwargs)
super(VoteResults, self)
get_context_data(**kwargs)
Talk.objects.filter(event=Event.spotlight()
annotate(num_votes=Count("votes")
sum(talks_votes)
max(talks_votes)
int(talk.num_votes * 100 / votes_total)
ajax_vote(request, *args, **kwargs)
can_vote(request)
HttpResponse(u'Можно голосовать только за один доклад', status=409)
Talk.objects.get(pk=kwargs['talk_id'])
HttpResponse('Voting is closed, sorry', status=409)
request.META.get('HTTP_USER_AGENT')
request.META.get('REMOTE_ADDR')
HttpResponse(reverse('vote-results')
set_vote_cookie(response)
HttpResponse('DB error, sorry', status=402)
HttpResponse('Only POST', status=402)
confirm_ownership(request, *args, **kwargs)
os.environ.get('CONFIRM_OWNERSHIP_%s' % kwargs['filename'], None)
endswith('.html')
HttpResponse(content, content_type=content_type)
test_repeater(benchmark)
benchmark(repeater,'a',5)
benchmark(repeater,'Wub', 6 )
sys.argv.append("py2exe")
tuple (hostname, data)
_is_inventory_group(key, value)
variable (key = value)
key.startswith('_')
isinstance(value, (list, tuple, GeneratorType)
of (hosts, data)
isinstance(value, tuple)
isinstance(value, GeneratorType)
list(value)
isinstance(item, ALLOWED_HOST_TYPES)
_is_group_data(key, value)
variable (key = value)
isinstance(value, ALLOWED_DATA_TYPES)
key.startswith('_')
_get_group_data(deploy_dir)
path.join(deploy_dir, 'group_data')
path.exists(group_data_directory)
listdir(group_data_directory)
file.endswith('.py')
path.join(group_data_directory, file)
path.basename(file)
logger.debug('Looking for group data in: {0}'.format(group_data_file)
exec_file(group_data_file, return_locals=True)
six.iteritems(attrs)
_is_group_data(key, value)
_get_groups_from_filename(inventory_filename)
exec_file(inventory_filename, return_locals=True)
six.iteritems(attrs)
_is_inventory_group(key, value)
int(ssh_port)
path.exists(inventory_filename)
inventory_filename.split(',')
_get_groups_from_filename(inventory_filename)
path.basename(inventory_filename)
rsplit('.')
groups.pop('all')
isinstance(all_hosts, tuple)
groups.values()
of (hosts, data)
isinstance(hosts, tuple)
of (hostname, data)
isinstance(host, tuple)
all_hosts.append(hostname)
of (hostnames + data)
files (inventory / group data)
logger.debug('Creating fake inventory...')
of (hostnames, data)
isinstance(group, tuple)
else (group, {})
six.iteritems(groups)
Inventory((all_hosts, all_data)
pseudo_inventory.set(fake_inventory)
data (group_data/*.py)
_get_group_data(deploy_dir)
pseudo_inventory.reset()
six.iteritems(groups)
isinstance(hosts, tuple)
data.update(group_data.pop(name)
empty (for now)
six.iteritems(group_data)
groups.pop('all')
file_groupname.lower()
contributors (see CONTRIBUTORS.md)
test_constants_only()
import (unpack_from, calcsize)
from_binary(msg_type: int, msg_id: int, data: bytes, offset: int)
compute_deploy_order(dependency_graph)
toposort.toposort_flatten(dict(dependency_graph)