question stringclasses 1
value | context stringlengths 4.2k 104k | answers listlengths 1 1 | length int32 399 10k | dataset stringclasses 1
value | language stringclasses 3
values | all_classes null | _id stringlengths 48 48 | _row_id int64 0 499 | context_cheatsheet stringlengths 4.19k 104k | prompt_cheatsheet stringclasses 1
value | answer_prefix stringclasses 1
value | task stringclasses 1
value | max_new_tokens int64 84 84 | cheatsheet stringlengths 620 12k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Please complete the code given below.
/**
* Copyright (C) 2010 Orbeon, Inc.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the Free Software Foundation; either version
* 2.1 of the License, or (at your option) ... | [
" digest.update((byte) (TEXT_CODE & 0xff));"
] | 865 | lcc | java | null | d130622298f175eb038e14cf3cab0d504c020de19bc3eab8 | 300 | Your task is code completion.
/**
* Copyright (C) 2010 Orbeon, Inc.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the Free Software Foundation; either version
* 2.1 of the License, or (at your option) any later... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class DigestContentHandler implements XMLReceiver {
private static final int ELEMENT_CODE = Node.ELEMENT_NODE;
private static final int ATTRIBUTE_CODE = Node.ATTRIBUTE_NODE;
private static final int TEX... | |
Please complete the code given below.
"""Tools for use in AppleEvent clients and servers:
conversion between AE types and python types
pack(x) converts a Python object to an AEDesc object
unpack(desc) does the reverse
coerce(x, wanted_sample) coerces a python object to another python object
"""
#
# This code was origi... | [
" return aetypes.Range(dict['star'], dict['stop'])"
] | 1,045 | lcc | python | null | 6632f438b48e38612c7af5be064f73e8a4b86ead00fbda69 | 301 | Your task is code completion.
"""Tools for use in AppleEvent clients and servers:
conversion between AE types and python types
pack(x) converts a Python object to an AEDesc object
unpack(desc) does the reverse
coerce(x, wanted_sample) coerces a python object to another python object
"""
#
# This code was originally wri... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def mkrange(dict):
# ... (rest of the function)
Cheatsheet (for next line):
- We are in mkrange(), which is a helper function for unpack.
- The function takes a dictionary as an argument.
- The function is expe... | |
Please complete the code given below.
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Formatting;
using ... | [
" if (!Enum.IsDefined(typeof(SampleDirection), sampleDirection))"
] | 1,053 | lcc | csharp | null | 6cde737d77f75e2d7bba19ebf78653bae352413d2a95770b | 302 | Your task is code completion.
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Formatting;
using System.Ne... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public virtual Type ResolveType(ApiDescription api, string controllerName, string actionName, IEnumerable<string> parameterNames, SampleDirection sampleDirection, out Collection<MediaTypeFormatter> formatt... | |
Please complete the code given below.
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
import gtk
import parser
import gettext
import gobject
from itertools import islice, cycle
from tryton.common import MODELACCESS
from tryto... | [
" value = entry.get_active_text()"
] | 586 | lcc | python | null | 716049fd0d1692b85479651b13974c96045e6d05f8fe7fe3 | 303 | Your task is code completion.
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
import gtk
import parser
import gettext
import gobject
from itertools import islice, cycle
from tryton.common import MODELACCESS
from tryton.common.... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
elif event.keyval in (gtk.keysyms.F3, gtk.keysyms.F2):
if isinstance(entry, gtk.Entry):
value = entry.get_text()
else:
Relevant lines and variables:
- `entry` is an object of type `gtk.Entry`... | |
Please complete the code given below.
/*
* Copyright (C) 2005-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, eithe... | [
" if (newLocationList.size() > 0)"
] | 961 | lcc | java | null | daa27a5d67ba9d011a6296ae7e7effeac588540b3e61d3e5 | 304 | Your task is code completion.
/*
* Copyright (C) 2005-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class LegacyConfigPostProcessor implements BeanFactoryPostProcessor, PriorityOrdered
{
// ...
@SuppressWarnings("unchecked")
private MutablePropertyValues processLocation... | |
Please complete the code given below.
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Nimbis Services, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, e... | [
" lines = f.readlines()"
] | 744 | lcc | python | null | a32e9a8e3ff6ea4c2599a33d5345c01decf2e4c9913e970a | 305 | Your task is code completion.
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Nimbis Services, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either ver... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def absent(dest, username, check_mode):
""" Ensures user is absent
Returns (msg, changed) """
if not os.path.exists(dest):
raise ValueError("%s does not exists" % dest)
... | |
Please complete the code given below.
#region license
/*
MediaFoundationLib - Provide access to MediaFoundation interfaces via .NET
Copyright (C) 2007
http://mfnet.sourceforge.net
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as publish... | [
" [In, MarshalAs(UnmanagedType.LPStruct)] Guid guidExtendedType,"
] | 848 | lcc | csharp | null | 0101b11c0d92563f34753effab4ccc713d10d886c00ee990 | 306 | Your task is code completion.
#region license
/*
MediaFoundationLib - Provide access to MediaFoundation interfaces via .NET
Copyright (C) 2007
http://mfnet.sourceforge.net
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code context:
**IMFMediaEventQueueAlt Interface**
- We are in the IMFMediaEventQueueAlt interface, which has a method `QueueEventParamUnk`.
- The method `QueueEventParamUnk` takes a `MediaEventType met` and a `ConstPropVariant pvValue` as parameters.
- The method is likely used to queue an e... | |
Please complete the code given below.
/*
* Copyright (C) 2018. OpenLattice, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) a... | [
" ensureWriteAccess( directedAclKeys.getTarget() );"
] | 695 | lcc | java | null | be8b544961199f01b0f2942229db2d1da0ff394e0ca9e9eb | 307 | Your task is code completion.
/*
* Copyright (C) 2018. OpenLattice, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
@Timed
@Override
@PostMapping(
path = UPDATE,
consumes = MediaType.APPLICATION_JSON_VALUE )
public Void addPrincipalToPrincipal( @RequestBody DirectedAclKeys directedAclKeys ) {
... | |
Please complete the code given below.
#!/usr/bin/env python
"""Pluggable module for tests that verify NOTIFY bodies.
Copyright (C) 2015, Digium, Inc.
John Bigelow <jbigelow@digium.com>
This program is free software, distributed under the terms of
the GNU General Public License Version 2.
"""
import sys
import logging
... | [
" children = element.findall('*')"
] | 861 | lcc | python | null | f8f3e51eaf0b5e82798c164612594b613eff07183067e54c | 308 | Your task is code completion.
#!/usr/bin/env python
"""Pluggable module for tests that verify NOTIFY bodies.
Copyright (C) 2015, Digium, Inc.
John Bigelow <jbigelow@digium.com>
This program is free software, distributed under the terms of
the GNU General Public License Version 2.
"""
import sys
import logging
import xm... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def verify_element(self, element):
"""Verify the element matches what is expected.
This verifies the tag, attributes, text, and extra text of an element.
If child elements are found... | |
Please complete the code given below.
"""Simple implementation of the Level 1 DOM.
Namespaces and other minor Level 2 features are also supported.
parse("foo.xml")
parseString("<foo><bar/></foo>")
Todo:
=====
* convenience methods for getting elements and text.
* more testing
* bring some of the writer and lineariz... | [
" elif node.nodeType == Node.DOCUMENT_TYPE_NODE:"
] | 5,441 | lcc | python | null | 64062f61594fcf5875068e83e34bbe4352d55f2ffc994594 | 309 | Your task is code completion.
"""Simple implementation of the Level 1 DOM.
Namespaces and other minor Level 2 features are also supported.
parse("foo.xml")
parseString("<foo><bar/></foo>")
Todo:
=====
* convenience methods for getting elements and text.
* more testing
* bring some of the writer and linearizer code i... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def getElementsByTagNameNS(self, namespaceURI, localName):
return _get_elements_by_tagName_ns_helper(
self, namespaceURI, localName, NodeList())
Cheatsheet (for next line):
- We are in the getElements... | |
Please complete the code given below.
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.openhealthtools.mdht.uml.cda.emspcr.tests;
import java.util.Map;
import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.ecore.EObject;
import org.junit.Test;
import org.openhealthtools.mdht.uml.cda.C... | [
"\t\t\t\t\t(EMSSceneSection) objectToTest, diagnostician, map);"
] | 659 | lcc | java | null | 78238acd4e2f77afea6f7f0a6a7204254284924614d7e707 | 310 | Your task is code completion.
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.openhealthtools.mdht.uml.cda.emspcr.tests;
import java.util.Map;
import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.ecore.EObject;
import org.junit.Test;
import org.openhealthtools.mdht.uml.cda.CDAFactory... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given context:
Context:
[Previous code... ~10,000 lines omitted for brevity]
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.openhealthtools.mdht.uml.cda.emspcr.tests;
import java.util.Map;
import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.ecore.EObject;
impor... | |
Please complete the code given below.
/**
* Copyright (C) 2014-2015 Regents of the University of California.
* Authors:
* Jeff Thompson <jefft0@remap.ucla.edu>
* Rafael Teixeira <monoman@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser ... | [
"\t\t\tif (decoder.getOffset() == endOffset)"
] | 2,575 | lcc | csharp | null | 3478f59e50537de1932e70589d61d1ffd7f3cc98c321b79a | 311 | Your task is code completion.
/**
* Copyright (C) 2014-2015 Regents of the University of California.
* Authors:
* Jeff Thompson <jefft0@remap.ucla.edu>
* Rafael Teixeira <monoman@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General P... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class Tlv0_1_1WireFormat : WireFormat
{
// ... (many methods and variables)
private static Tlv0_1_1WireFormat instance_;
private Random random_;
// ... (many met... | |
Please complete the code given below.
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package NetSpace;
import NetSpace.weapons.WeaponsEnum;
import NetSpace.weapons.Weapon;
import NetSpace.weapons.WeaponType;
import NetSpace.aliens.Enemy;
import NetSpace.aliens.Enemy... | [
" for(int i = 0; i< myWeapons.length; i++) {"
] | 673 | lcc | java | null | d885bc25f6d6b7f2bed6c360c4182759018c010914bbd263 | 312 | Your task is code completion.
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package NetSpace;
import NetSpace.weapons.WeaponsEnum;
import NetSpace.weapons.Weapon;
import NetSpace.weapons.WeaponType;
import NetSpace.aliens.Enemy;
import NetSpace.aliens.EnemyRepresent... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class game extends BasicGame {
// ...
ArrayList <Weapon> ActiveWeapons = new ArrayList<Weapon>();
// ...
@Override
public void update(GameContainer container, int delta) thro... | |
Please complete the code given below.
/* *********************************************************************
*
* This file is part of Full Metal Galaxy.
* http://www.fullmetalgalaxy.com
*
* Full Metal Galaxy is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero Gen... | [
" action.setAccount( AppMain.instance().getMyAccount() );"
] | 819 | lcc | java | null | b81d989e514c39c2fbe5246f88c81834d4b9daf9ea103acc | 313 | Your task is code completion.
/* *********************************************************************
*
* This file is part of Full Metal Galaxy.
* http://www.fullmetalgalaxy.com
*
* Full Metal Galaxy is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Publ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class DlgJoinChooseColor extends DialogBox
{
// ...
m_btnOk.addClickHandler( new ClickHandler()
{
@Override
public void onClick(ClickEvent p_event)
... | |
Please complete the code given below.
#
# Copyright (C) 2018 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later ve... | [
" err = json.loads(r.data.decode(\"utf-8\"))"
] | 962 | lcc | python | null | 3577964dff527ef6068237089eaaf8be6c4ce4aa3ba45df8 | 314 | Your task is code completion.
#
# Copyright (C) 2018 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code context:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def download_file(socket_path, url, progress=True):
"""Download a file, saving it to the CWD with the included filename
:param socket_path: Path to the Unix socket to use for API communication
... | |
Please complete the code given below.
#region License
// Copyright (c) 2013, ClearCanvas Inc.
// All rights reserved.
// http://www.clearcanvas.ca
//
// This file is part of the ClearCanvas RIS/PACS open source project.
//
// The ClearCanvas RIS/PACS open source project is free software: you can
// redistribute it and... | [
"\t\t\t\t\t\tresponse = service.MergeOrder(request);"
] | 849 | lcc | csharp | null | 653224ff195b272eec8557efa25225d29043896dba76e043 | 315 | Your task is code completion.
#region License
// Copyright (c) 2013, ClearCanvas Inc.
// All rights reserved.
// http://www.clearcanvas.ca
//
// This file is part of the ClearCanvas RIS/PACS open source project.
//
// The ClearCanvas RIS/PACS open source project is free software: you can
// redistribute it and/or modif... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given context:
Context:
[Previous code... ~10,000 lines omitted for the brevity]
private void MergeOrderDryRun(out OrderDetail mergedOrder, out string failureReason)
{
if (_selectedOrder == null)
{
failureReason = null;
mergedOrder = null;
... | |
Please complete the code given below.
"""Provide functions for phenotype phase plane analysis."""
from itertools import product
from typing import TYPE_CHECKING, Dict, List, Optional, Union
import numpy as np
import pandas as pd
from optlang.interface import OPTIMAL
from ..exceptions import OptimizationError
from ..ut... | [
" if len(reaction.metabolites) != 1:"
] | 1,153 | lcc | python | null | 80bda6d99d3c518ff6465d159112864d8eed9a04c56b1d15 | 316 | Your task is code completion.
"""Provide functions for phenotype phase plane analysis."""
from itertools import product
from typing import TYPE_CHECKING, Dict, List, Optional, Union
import numpy as np
import pandas as pd
from optlang.interface import OPTIMAL
from ..exceptions import OptimizationError
from ..util import... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def _total_yield(
input_fluxes: List[float],
input_elements: List[float],
output_flux: float,
output_elements: List[float],
) -> float:
"""Compute total output per inp... | |
Please complete the code given below.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
#
# This file is a part of the Pootle project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorsh... | [
" lang, proj, dir_path, filename = split_pootle_path(pootle_path)"
] | 588 | lcc | python | null | a8df204f2a859a703bf766e6567ed3d50e67fb8e91bc975b | 317 | Your task is code completion.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
#
# This file is a part of the Pootle project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship inform... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
class UnitManager(models.Manager):
def get_queryset(self):
"""Mimics `select_related(depth=1)` behavior. Pending review."""
return (
super(UnitManager, self).get_queryset().select_related(
... | |
Please complete the code given below.
# -*- coding: utf-8 -*-
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('creation', '__first__'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations ... | [
" ('created', models.DateTimeField(auto_now_add=True, null=True)),"
] | 519 | lcc | python | null | 8d8cddfebc329d8bed250acfd102274d7ccd8f8bf08e4b85 | 318 | Your task is code completion.
# -*- coding: utf-8 -*-
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('creation', '__first__'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
migrations.CreateModel(
name='State',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('code', models.Cha... | |
Please complete the code given below.
import sys
import pdb
from socket import IPPROTO_TCP, IPPROTO_UDP, IPPROTO_ICMP
import logging
from ipaddr import IPv4Address
from struct import pack as spack
from pytricia import PyTricia
import socket
from fslib.node import Node, PortInfo
from fslib.link import NullLink
from fsl... | [
" pinfo = self.ports[portnum]"
] | 720 | lcc | python | null | f18f638df2a7be9849603948e255d240c5646454c2a0a5a0 | 319 | Your task is code completion.
import sys
import pdb
from socket import IPPROTO_TCP, IPPROTO_UDP, IPPROTO_ICMP
import logging
from ipaddr import IPv4Address
from struct import pack as spack
from pytricia import PyTricia
import socket
from fslib.node import Node, PortInfo
from fslib.link import NullLink
from fslib.common... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
def process_packet(self, poxpkt, inputport):
'''Process an incoming POX packet. Mainly want to check whether
it's an ARP and update our ARP "table" state'''
# self.logger.debug("Switch {} proc... | |
Please complete the code given below.
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This progr... | [
" item = fromString(toString(item));"
] | 1,401 | lcc | java | null | e20af03f2ee467f621a8abf4253b8106ed16e82d2aeb0e8c | 320 | Your task is code completion.
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is dis... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public abstract class AbstractRecentItemsHandler<M, T>
protected void doUpdateMenu() {
int i;
JMenuItem menuitem;
// clear menu
if (m_Menu instanceof JMenu) {
((J... | |
Please complete the code given below.
using System;
using System.Collections.Generic;
using System.Linq;
using Server.Factions;
using Server.Mobiles;
using Server.Multis;
using Server.Targeting;
using Server.Engines.VvV;
using Server.Items;
using Server.Spells;
using Server.Network;
namespace Server.Items
{
public... | [
" return src.Map.Rules == MapRules.FeluccaRules;"
] | 562 | lcc | csharp | null | ab64e80497dc29027b566fe583c6e6936d54fd063307f698 | 321 | Your task is code completion.
using System;
using System.Collections.Generic;
using System.Linq;
using Server.Factions;
using Server.Mobiles;
using Server.Multis;
using Server.Targeting;
using Server.Engines.VvV;
using Server.Items;
using Server.Spells;
using Server.Network;
namespace Server.Items
{
public interfac... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
**DetectHidden Class**
- The `OnUse` method is a callback for the `DetectHidden` skill, which is triggered when a mobile uses the skill.
- The method takes a `Mobile` object `src` as a parameter.
- The method returns a `TimeSpan` object representing the duration of the skill's effect.
... | |
Please complete the code given below.
/*
* This file is part of Bitsquare.
*
* Bitsquare is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any... | [
" if (halfTradePeriodDate == null && takeOfferDate != null)"
] | 1,060 | lcc | java | null | 23da8d9de20f882d02d5c855b1322a6bc6b13eebcf69be20 | 322 | Your task is code completion.
/*
* This file is part of Bitsquare.
*
* Bitsquare is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later ve... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public abstract class Trade implements Tradable, Model {
// ... (many lines omitted for brevity)
public void setTradePeriodState(TradePeriodState tradePeriodState) {
boolean changed = this.tradeP... | |
Please complete the code given below.
/* ------------------------------------------------------------------------
* Tab.cs
* Symbol table management of Coco/R
* by H.Moessenboeck, Univ. of Linz
* ------------------------------------------------------------------------*/
using System;
using System.IO;
using System.... | [
"\t\t\tif (a == null) a = LeadingAny(p.down);"
] | 2,508 | lcc | csharp | null | bca3c4560f23f25e2f915056e3c74f7832b570be4c2e30fb | 323 | Your task is code completion.
/* ------------------------------------------------------------------------
* Tab.cs
* Symbol table management of Coco/R
* by H.Moessenboeck, Univ. of Linz
* ------------------------------------------------------------------------*/
using System;
using System.IO;
using System.Collectio... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class Tab {
// ... (many lines of code)
static void CompFollow(Node p) {
while (p != null && !visited[p.n]) {
visited[p.n] = true;
if (p.typ == ... | |
Please complete the code given below.
//////////////////////////////////////////////////////////////////////////////////
// Wiimote.cs
// Managed Wiimote Library
// Written by Brian Peek (http://www.brianpeek.com/)
// for MSDN's Coding4Fun (http://msdn.microsoft.com/coding4fun/)
// Visit http://blogs.msdn.com/coding4f... | [
"\t\t\tbuff[4] = (byte)(address & 0x000000ff);"
] | 5,328 | lcc | csharp | null | 8e0bd228e7aa848a9bf8109d86ecaf76dcf9e5dee02fba5e | 324 | Your task is code completion.
//////////////////////////////////////////////////////////////////////////////////
// Wiimote.cs
// Managed Wiimote Library
// Written by Brian Peek (http://www.brianpeek.com/)
// for MSDN's Coding4Fun (http://msdn.microsoft.com/coding4fun/)
// Visit http://blogs.msdn.com/coding4fun/archiv... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the Wiimote.cs code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
private void WriteData(int address, byte[] data)
{
// ...
if(mAltWriteMethod)
HIDImports.HidD_SetOutputReport(this.mHandle.DangerousGetHandle(), buff, (uint)buff.Length... | |
Please complete the code given below.
//#############################################################################
//# #
//# Copyright (C) <2014> <IMS MAXIMS> #
//# ... | [
"\t\t\tif (order == SortOrder.DESCENDING)"
] | 641 | lcc | java | null | 22de4bb8a2b770879cf742cb312eaec089c2f1c8e6caf97b | 325 | Your task is code completion.
//#############################################################################
//# #
//# Copyright (C) <2014> <IMS MAXIMS> #
//# ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public MskJointVoCollection sort(Comparator comparator)
{
Collections.sort(col, comparator);
return this;
}
Cheatsheet (for next line):
- We are in the sort(Comparator) method, which sorts the collectio... | |
Please complete the code given below.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Net.Mail;
using Server;
using Server.Accounting;
using Server.Network;
namespace Server.Misc
{
public class CrashGuard
{
private static bool Enable... | [
"\t\t\t\t\tSendEmail( filePath );"
] | 677 | lcc | csharp | null | 85d7beeed9e180c5fcee6fa973932cd47b046a7c181b3368 | 326 | Your task is code completion.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Net.Mail;
using Server;
using Server.Accounting;
using Server.Network;
namespace Server.Misc
{
public class CrashGuard
{
private static bool Enabled = true;... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for CrashGuard class:
- We are in GenerateCrashReport() method, which is writing a log file.
- The method is using a StreamWriter object named 'op' to write to the file.
- The method is writing various information such as server version, operating system, .NET framework, time, and exception details.
- The ... | |
Please complete the code given below.
using System.Data.Common;
using System.Collections;
using NHibernate.Cache;
using NHibernate.Cfg;
using NHibernate.Engine;
using NUnit.Framework;
namespace NHibernate.Test.SecondLevelCacheTests
{
using Criterion;
[TestFixture]
public class SecondLevelCacheTest : TestCase
{
p... | [
"\t\t\t\tIList list = session.CreateCriteria(typeof(Item))"
] | 480 | lcc | csharp | null | ef2256036a1a6e12b496e5e9085b2f653cfd173eb485a40e | 327 | Your task is code completion.
using System.Data.Common;
using System.Collections;
using NHibernate.Cache;
using NHibernate.Cfg;
using NHibernate.Engine;
using NUnit.Framework;
namespace NHibernate.Test.SecondLevelCacheTests
{
using Criterion;
[TestFixture]
public class SecondLevelCacheTest : TestCase
{
protected ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
**Context:**
```csharp
[Test]
public void SecondLevelCacheWithCriteriaQueries()
{
using (ISession session = OpenSession())
{
IList list = session.CreateCriteria(typeof(AnotherItem))
.Add(Expression.Gt("Id", 2))
.SetCacheable(true)
... | |
Please complete the code given below.
using System;
using System.Text;
namespace SharpCompress.Compressors.PPMd.H
{
internal class SubAllocator
{
public virtual int FakeUnitsStart { get { return _fakeUnitsStart; } set {_fakeUnitsStart = value; }}
public virtual int HeapEnd => _heapEnd;
public virtu... | [
" for (k++; i < N1 + N2 + N3; i++, k += 3)"
] | 1,244 | lcc | csharp | null | ccb175b81d17f841ce38c2caa311f192e142ac2649f954a2 | 328 | Your task is code completion.
using System;
using System.Text;
namespace SharpCompress.Compressors.PPMd.H
{
internal class SubAllocator
{
public virtual int FakeUnitsStart { get { return _fakeUnitsStart; } set {_fakeUnitsStart = value; }}
public virtual int HeapEnd => _heapEnd;
public virtual int PT... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for SubAllocator class:
**Relevant lines and variables:**
- `public virtual int GetAllocatedMemory()`
- `_subAllocatorSize` (private integer field)
- `public virtual void StopSubAllocator()`
- `_heap` (private byte array field)
- `public virtual bool StartSubAllocator(int saSize)`
- `UNIT_SIZE` (public st... | |
Please complete the code given below.
# -*- coding: utf-8 -*-
# Page model for Intel->Chargeback->Rates.
import attr
from cached_property import cached_property
from navmazing import NavigateToAttribute
from navmazing import NavigateToSibling
from wait_for import TimedOutError
from widgetastic.utils import Parametrize... | [
" view = navigate_to(self, 'Add')"
] | 641 | lcc | python | null | 2edf15bcbfcd4fcf56e4a6731116895a5ed5bb7b70ee804d | 329 | Your task is code completion.
# -*- coding: utf-8 -*-
# Page model for Intel->Chargeback->Rates.
import attr
from cached_property import cached_property
from navmazing import NavigateToAttribute
from navmazing import NavigateToSibling
from wait_for import TimedOutError
from widgetastic.utils import ParametrizedLocator
... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
@attr.s
class ComputeRate(Updateable, Pretty, BaseEntity):
"""This class represents a Compute Chargeback rate.
Example:
.. code-block:: python
>>> import cfme.intelligence.chargebac... | |
Please complete the code given below.
#region LGPL License
/*
Axiom Graphics Engine Library
Copyright (C) 2003-2010 Axiom Project Team
This file is part of Axiom.RenderSystems.OpenGLES
C# version developed by bostich.
The overall design, and a majority of the core engine and rendering code
contained within this librar... | [
"\t\t\tOpenGL.BindBuffer( All.ElementArrayBuffer, _bufferId );"
] | 782 | lcc | csharp | null | 8abd7abbc3616f319f05d25be5a410bd9fc2bb508b68e3cb | 330 | Your task is code completion.
#region LGPL License
/*
Axiom Graphics Engine Library
Copyright (C) 2003-2010 Axiom Project Team
This file is part of Axiom.RenderSystems.OpenGLES
C# version developed by bostich.
The overall design, and a majority of the core engine and rendering code
contained within this library is a de... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class GLESHardwareIndexBuffer : HardwareIndexBuffer
{
// ...
public override void WriteData( int offset, int length, IntPtr src, bool discardWholeBuffer )
{
// ...
... | |
Please complete the code given below.
from enigma import eDVBResourceManager,\
eDVBFrontendParametersSatellite, eDVBFrontendParametersTerrestrial
from Screens.ScanSetup import ScanSetup, buildTerTransponder
from Screens.ServiceScan import ServiceScan
from Screens.MessageBox import MessageBox
from Plugins.Plugin impor... | [
"\t\tself.feid = int(self.satfinder_scan_nims.value)"
] | 673 | lcc | python | null | f8ded3af8ef3545db8175306e099fcfdecc9a38e3633b747 | 331 | Your task is code completion.
from enigma import eDVBResourceManager,\
eDVBFrontendParametersSatellite, eDVBFrontendParametersTerrestrial
from Screens.ScanSetup import ScanSetup, buildTerTransponder
from Screens.ServiceScan import ServiceScan
from Screens.MessageBox import MessageBox
from Plugins.Plugin import PluginD... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
def newConfig(self):
cur = self["config"].getCurrent()
if cur in (self.typeOfTuningEntry, self.systemEntry, self.typeOfInputEntry):
self.createSetup()
elif cur == self.satfinderTune... | |
Please complete the code given below.
/*
Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file
This file is part of 0MQ.
0MQ is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; ... | [
" else if (filterStr.length() == 0 || filterStr.length() > 255) {"
] | 931 | lcc | java | null | e183058d346d8baf870f97d2f9f4a343610cbd294e8bc9ff | 332 | Your task is code completion.
/*
Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file
This file is part of 0MQ.
0MQ is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either ve... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given context:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class Options {
// ...
case ZMQ.ZMQ_TCP_ACCEPT_FILTER:
String filterStr = (String) optval;
if (filterStr == null) {
tcpAcceptFilters.clear();
}... | |
Please complete the code given below.
using System;
using System.Collections;
using System.Security.Cryptography;
using System.Net;
using System.Text;
using System.IO;
using iTextSharp.text;
using iTextSharp.text.pdf.intern;
using iTextSharp.text.pdf.interfaces;
using System.util;
using System.util.zlib;
using Org.Bou... | [
" fout.Write(curr, 0, curr.Length);"
] | 6,006 | lcc | csharp | null | 0cc866de4a40f62e0dc2031e25487c87a06027728f76c5a9 | 333 | Your task is code completion.
using System;
using System.Collections;
using System.Security.Cryptography;
using System.Net;
using System.Text;
using System.IO;
using iTextSharp.text;
using iTextSharp.text.pdf.intern;
using iTextSharp.text.pdf.interfaces;
using System.util;
using System.util.zlib;
using Org.BouncyCastle... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
protected internal void ReadXref() {
hybridXref = false;
newXrefType = false;
tokens.Seek(tokens.Startxref);
tokens.NextToken();
if (!tokens.StringValue.Equals("star... | |
Please complete the code given below.
#!/usr/bin/env python
"""Tests that don't need an active D-Bus connection to run, but can be
run in isolation.
"""
# Copyright (C) 2006 Collabora Ltd. <http://www.collabora.co.uk/>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software ... | [
" s = lowlevel.SignalMessage('/a/b/c', 'foo.bar', 'baz')"
] | 677 | lcc | python | null | fdfc363818ce22cc623b576870180ec881f0a75f716cd8a8 | 334 | Your task is code completion.
#!/usr/bin/env python
"""Tests that don't need an active D-Bus connection to run, but can be
run in isolation.
"""
# Copyright (C) 2006 Collabora Ltd. <http://www.collabora.co.uk/>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and assoc... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def test_interface(self):
s = lowlevel.SignalMessage('/a/b/c', 'foo.bar', 'baz')
self.assertEqual(s.get_interface(), None)
self.assertFalse(s.has_interface('com.example.Interface'))... | |
Please complete the code given below.
from pickle_storage import *
from options import *
from module_map import *
from E2_page import *
from db.etwo import EtwoStore
import os.path
try:
from plot_page import *
except (ImportError, RuntimeError):
pass
class MASS(object):
def __init__(self, options = None):
... | [
" except (KeyError, AttributeError):"
] | 1,017 | lcc | python | null | 78fd6bbd4847ea904de30d888739147fe917202829362e1d | 335 | Your task is code completion.
from pickle_storage import *
from options import *
from module_map import *
from E2_page import *
from db.etwo import EtwoStore
import os.path
try:
from plot_page import *
except (ImportError, RuntimeError):
pass
class MASS(object):
def __init__(self, options = None):
i... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
def make_product_database(self):
e2 = self.get_E_2_page_no_mat()
EtwoStore.prepare()
for z_index in xrange(len(e2.get_cohomology(self.options))):
z_level = e2.get_cohomology(self.op... | |
Please complete the code given below.
#region Copyright notice and license
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// http://github.com/jskeet/dotnet-protobufs/
// Original C++/Java/Python code:
// http://code.google.com/p/protobuf/
//
// Redistributio... | [
" \"1:21: Expected \\\">\\\".\","
] | 1,187 | lcc | csharp | null | 2be88ed1d82791123566d7fc244876523ea87a620301c93a | 336 | Your task is code completion.
#region Copyright notice and license
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// http://github.com/jskeet/dotnet-protobufs/
// Original C++/Java/Python code:
// http://code.google.com/p/protobuf/
//
// Redistribution and use... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given context:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class TextFormatTest
{
// ... existing code ...
[Test]
public void Parse()
{
TestUtil.TestInMultipleCultures(() =>
... | |
Please complete the code given below.
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2008-2011, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distr... | [
"\t\treturn map.remove( key );"
] | 794 | lcc | java | null | b68fb107dd4b16b9e62aee193e5d5452796850436d17aaef | 337 | Your task is code completion.
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2008-2011, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed un... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class PersistentMap extends AbstractPersistentCollection implements Map {
protected Map map;
// ...
@Override
public Object remove(Object key) {
if ( isPu... | |
Please complete the code given below.
#region AuthorHeader
//
// Auction version 2.1, by Xanthos and Arya
//
// Based on original ideas and code by Arya
//
#endregion AuthorHeader
using System;
using System.IO;
using Server;
namespace Arya.Auction
{
/// <summary>
/// Summary description for AuctionLog.
/// </summa... | [
"\t\t\t\t\t( m.Account as Server.Accounting.Account ).Username );"
] | 805 | lcc | csharp | null | 3eb19d43291f949e184ce7a5465a8640ad3cc4cd277ab5ce | 338 | Your task is code completion.
#region AuthorHeader
//
// Auction version 2.1, by Xanthos and Arya
//
// Based on original ideas and code by Arya
//
#endregion AuthorHeader
using System;
using System.IO;
using Server;
namespace Arya.Auction
{
/// <summary>
/// Summary description for AuctionLog.
/// </summary>
publ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
**Context:**
```csharp
public class AuctionLog
{
// ...
public static void WriteReturnItem(AuctionItem auction, Mobile m)
{
if (!m_Enabled || m_Writer == null)
return;
try
{
m_Writer.WriteLine("}] Returning item [{0}] Mobile: {... | |
Please complete the code given below.
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2016 - now Bytebrand Outsourcing AG (<http://www.bytebrand.net>).
#
# This program is free software: you can... | [
" return {'action': action_message}"
] | 686 | lcc | python | null | 774c2fcb277e8f0e9c0b13c51982a14cc5f1ec168baf9c7e | 339 | Your task is code completion.
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2016 - now Bytebrand Outsourcing AG (<http://www.bytebrand.net>).
#
# This program is free software: you can redistri... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
@api.model
def attendance_scan(self, barcode):
""" Receive a barcode scanned from the Kiosk Mode
and change the attendances of corresponding employee.
Returns either an action or a warning.... | |
Please complete the code given below.
//#############################################################################
//# #
//# Copyright (C) <2014> <IMS MAXIMS> #
//# ... | [
"\t\tif (orderInvestigationLiteVo == null)"
] | 667 | lcc | java | null | e0bcde61d9adb5375395d14f33e7ca8fe874d965c734b2ac | 340 | Your task is code completion.
//#############################################################################
//# #
//# Copyright (C) <2014> <IMS MAXIMS> #
//# ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given context:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class Logic extends BaseLogic
{
// ... (many lines omitted for brevity)
private void addResult(OrderInvestigationLiteVo orderInvestigationLiteVo, Date dateUnseen)
{
// ... (many lines omitted for... | |
Please complete the code given below.
/*
* ManagedWinapi - A collection of .NET components that wrap PInvoke calls to
* access native API by managed code. http://mwinapi.sourceforge.net/
* Copyright (C) 2006 Michael Schierl
*
* This library is free software; you can redistribute it and/or
* modify it under the... | [
" pt = (POINT)c.ReadToStructure(0, typeof(POINT));"
] | 808 | lcc | csharp | null | faeb4c1f5b91b0308378f17f35d5be9bb0bb461449205814 | 341 | Your task is code completion.
/*
* ManagedWinapi - A collection of .NET components that wrap PInvoke calls to
* access native API by managed code. http://mwinapi.sourceforge.net/
* Copyright (C) 2006 Michael Schierl
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class SystemListView
{
// ...
public SystemListViewItem this[int index, int subIndex]
{
get
{
// ...
lvi = (LVITEM... | |
Please complete the code given below.
#!/usr/bin/env python2
# Terminator by Chris Jones <cmsj@tenshu.net>
# GPL v2 only
"""window.py - class for the main Terminator window"""
import copy
import time
import uuid
import gi
from gi.repository import GObject
from gi.repository import Gtk, Gdk, GdkX11
from util import dbg... | [
" if not self.is_child_notebook():"
] | 689 | lcc | python | null | febfe4f9eeaaa6cc696611fb0204abdaa2ec61fd7fcb43fa | 342 | Your task is code completion.
#!/usr/bin/env python2
# Terminator by Chris Jones <cmsj@tenshu.net>
# GPL v2 only
"""window.py - class for the main Terminator window"""
import copy
import time
import uuid
import gi
from gi.repository import GObject
from gi.repository import Gtk, Gdk, GdkX11
from util import dbg, err, ma... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def tab_new(self, widget=None, debugtab=False, _param1=None, _param2=None):
"""Make a new tab"""
cwd = None
profile = None
if self.get_property('term_zoomed') == True:
... | |
Please complete the code given below.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using AutoJIT.Contrib;
using AutoJITR... | [
" string name = nameArraySizeFragments[0];"
] | 1,831 | lcc | csharp | null | 76752da4aab9b0f2980a363c45b8b6a846bcbfadac525fd1 | 343 | Your task is code completion.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using AutoJIT.Contrib;
using AutoJITRuntime.Ex... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
private IEnumerable<StructTypeInfo> GetTypeInfo( string @struct ) {
return GetTypeInfo( @struct.Split( ';' ) );
}
private IEnumerable<StructTypeInfo> GetTypeInfo( string[] fragments ) {
bool is... | |
Please complete the code given below.
//
// TypeDefinition.cs
//
// Author:
// Jb Evain (jbevain@gmail.com)
//
// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal i... | [
"\t\t\t\tif (base_type == null)"
] | 1,469 | lcc | csharp | null | 47a5c3493dba4beb59cd884a00ee301ebbbc06f48b66fba5 | 344 | Your task is code completion.
//
// TypeDefinition.cs
//
// Author:
// Jb Evain (jbevain@gmail.com)
//
// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Sof... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given context:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public sealed class TypeDefinition : TypeReference, IMemberDefinition, ISecurityDeclarationProvider {
// ... (many lines omitted for brevity)
public bool IsValueType {
get {
... | |
Please complete the code given below.
/*
Simple Rule Engine
Copyright (C) 2005 by Sierra Digital Solutions Corp
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the Licens... | [
" throw new Exception(\"Could not find model: \" + args.Key);"
] | 578 | lcc | csharp | null | 42d7200767daef190a5abb124bd4a3751d552931e19200aa | 345 | Your task is code completion.
/*
Simple Rule Engine
Copyright (C) 2005 by Sierra Digital Solutions Corp
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat Sheet for Code Completion Task:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
public class ROM : ICloneable
{
#region instance variables
private Dictionary<string, IEvidence> evidenceCollection = new Dictionary<string, IEvidence>();
private Dictionary<string, X... | |
Please complete the code given below.
# SPDX-License-Identifier: MIT
"""
SSL with SNI_-support for Python 2. Follow these instructions if you would
like to verify SSL certificates in Python 2. Note, the default libraries do
*not* do certificate checking; you need to do additional work to validate
certificates yourself... | [
" self.protocol = _openssl_versions[protocol]"
] | 1,264 | lcc | python | null | f2d519e85b596a21571ccc0da4dcf8098c04163fb6b5b321 | 346 | Your task is code completion.
# SPDX-License-Identifier: MIT
"""
SSL with SNI_-support for Python 2. Follow these instructions if you would
like to verify SSL certificates in Python 2. Note, the default libraries do
*not* do certificate checking; you need to do additional work to validate
certificates yourself.
This ne... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def __init__(self, protocol):
# ... (rest of the method)
Cheatsheet (for next line):
- We are in the __init__ method of the PyOpenSSLContext class.
- The method is expected to initialize the object with a protocol para... | |
Please complete the code given below.
// This file has been generated by the GUI designer. Do not modify.
namespace MonoDevelop.Gettext
{
internal partial class POEditorWidget
{
private global::Gtk.UIManager UIManager;
private global::Gtk.VBox vbox2;
private global::Gtk.Notebook notebookPages;
priv... | [
"\t\t\tthis.label8 = new global::Gtk.Label ();"
] | 1,086 | lcc | csharp | null | 79bfd01dfd65567d16786ba83d96abf2c1f32aed45f161f0 | 347 | Your task is code completion.
// This file has been generated by the GUI designer. Do not modify.
namespace MonoDevelop.Gettext
{
internal partial class POEditorWidget
{
private global::Gtk.UIManager UIManager;
private global::Gtk.VBox vbox2;
private global::Gtk.Notebook notebookPages;
private globa... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
// Container child table1.Gtk.Table+TableChild
this.vbox5 = new global::Gtk.VBox ();
this.vbox5.Name = "vbox5";
this.vbox5.Spacing = 6;
// Container child vbox5.Gtk.Box+BoxChild
this.hbox3 = new ... | |
Please complete the code given below.
""" This module handles the tabbed layout in PyChess """
import imp, os
import traceback
import cStringIO
import gtk, gobject
from pychess.Utils.IconLoader import load_icon
from pychess.System.Log import log
from pychess.System import glock, conf, prefix
from ChessClock import Ch... | [
" for notebook in notebooks.values():"
] | 1,188 | lcc | python | null | 8c19d95147fe4a3d515b456de624adfc662e5bf40c1c3bad | 348 | Your task is code completion.
""" This module handles the tabbed layout in PyChess """
import imp, os
import traceback
import cStringIO
import gtk, gobject
from pychess.Utils.IconLoader import load_icon
from pychess.System.Log import log
from pychess.System import glock, conf, prefix
from ChessClock import ChessClock
... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def page_reordered (widget, child, new_num, headbook):
old_num = notebooks["board"].page_num(key2gmwidg[child].boardvbox)
if old_num == -1:
log.error('Games and labels are out of sync... | |
Please complete the code given below.
# -*- coding: utf-8 -*-
#
# This file is part of NINJA-IDE (http://ninja-ide.org).
#
# NINJA-IDE is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the L... | [
" \"Move-Tab-to-left\": QKeySequence(Qt.CTRL + Qt.SHIFT + Qt.Key_9),"
] | 902 | lcc | python | null | a4712b2e717d6693fc9b69d66fce23e4ec1069203a8569a4 | 349 | Your task is code completion.
# -*- coding: utf-8 -*-
#
# This file is part of NINJA-IDE (http://ninja-ide.org).
#
# NINJA-IDE is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, o... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat Sheet for Code Completion Task:
**Context:** The code is a settings configuration file for a Python application, specifically for the Ninja-IDE. The code defines various paths, URLs, images, color schemes, and shortcuts.
**Relevant Variables and Lines:**
1. `SHORTCUTS` dictionary: This dictionary contains keyb... | |
Please complete the code given below.
/*
* Copyright 2002-2010 the original author or authors.
*
* 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/... | [
"\t\tStringBuilder builder = new StringBuilder();"
] | 538 | lcc | java | null | fa471400c4273aa3192c4acebefee0003fad434d98173787 | 350 | Your task is code completion.
/*
* Copyright 2002-2010 the original author or authors.
*
* 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... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class MutablePersistenceUnitInfo implements SmartPersistenceUnitInfo {
// ... (many lines omitted for brevity)
public void setPersistenceProviderPackageName(String persistenceProviderPackageName... | |
Please complete the code given below.
/*******************************************************************************
* Copyright (c) 2001, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* ... | [
" IWorkbench workbench = PlatformUI.getWorkbench();"
] | 469 | lcc | java | null | 376650a8fc449c6f93baab1f5327f682bda670ea2bbdcc0b | 351 | Your task is code completion.
/*******************************************************************************
* Copyright (c) 2001, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which acc... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for the brevity]
public IEditorPart getEditorPart()
{
IEditorPart editorPart = null;
IWorkbench workbench = PlatformUI.getWorkbench();
if (workbench != null)
{
IWorkbenchWindow workb... | |
Please complete the code given below.
using System;
using System.Windows.Forms;
using System.Diagnostics;
using OpenDentBusiness;
using OpenDental.UI;
using System.Collections.Generic;
using System.IO;
using CodeBase;
namespace OpenDental{
/// <summary>
/// Summary description for FormBasicTemplate.
/// </summary>
... | [
"\t\t\tthis.butAttach.Location = new System.Drawing.Point(738, 2);"
] | 692 | lcc | csharp | null | c4cefa2a1ddbaac52ded7360c79296813666aad6d9e178b1 | 352 | Your task is code completion.
using System;
using System.Windows.Forms;
using System.Diagnostics;
using OpenDentBusiness;
using OpenDental.UI;
using System.Collections.Generic;
using System.IO;
using CodeBase;
namespace OpenDental{
/// <summary>
/// Summary description for FormBasicTemplate.
/// </summary>
public c... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class FormEmailTemplateEdit : System.Windows.Forms.Form {
// ...
private UI.Button butAttach;
private UI.ODGrid gridAttachments;
private ContextMenu contextMenuAttachments;
p... | |
Please complete the code given below.
package org.alfresco.web.awe.tag;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServl... | [
" if (sb == null)"
] | 627 | lcc | java | null | 1425b06afee32d16a5355b9b1c74c573855e0bfe86164222 | 353 | Your task is code completion.
package org.alfresco.web.awe.tag;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for AlfrescoTagUtil class:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class AlfrescoTagUtil {
// ...
public static void writeMarkContentHtml(Writer out, String urlPrefix, String redirectUrl, MarkedContent content)
throws IOException, Unsupported... | |
Please complete the code given below.
//
// HMACSHA512Test.cs - NUnit Test Cases for HMACSHA512
//
// Author:
// Sebastien Pouliot <sebastien@ximian.com>
//
// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
// Copyright (C) 2006, 2007 Novell, Inc (http://www.novell.com)
//
using NUnit.Framework;
using System... | [
"\t\t\tCheck (\"HMACSHA512-L-RFC4231-TC1\", hmac, data, digest);"
] | 1,867 | lcc | csharp | null | 5d5f9a55f0ca5e209dc65f2dc23ceaa77d3050df01057941 | 354 | Your task is code completion.
//
// HMACSHA512Test.cs - NUnit Test Cases for HMACSHA512
//
// Author:
// Sebastien Pouliot <sebastien@ximian.com>
//
// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
// Copyright (C) 2006, 2007 Novell, Inc (http://www.novell.com)
//
using NUnit.Framework;
using System;
using S... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for HMACSHA512Test.cs:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class HMACSHA512Test : KeyedHashAlgorithmTest {
protected HMACSHA512 algo;
[SetUp]
public override void SetUp ()
{
algo = new HMACSHA512 ();
algo.Key = ne... | |
Please complete the code given below.
/* KIARA - Middleware for efficient and QoS/Security-aware invocation of services and exchange of messages
*
* Copyright (C) 2014 Proyectos y Sistemas de Mantenimiento S.L. (eProsima)
*
* This library is free software; you can redistribute it and/or
* modify it under the ter... | [
"\t current_sum += 4 + CDRSerializer.alignment(current_sum, 4);"
] | 737 | lcc | java | null | 0acfff98f8a07512b57bf9de46cc67617183784cdd9c686d | 355 | Your task is code completion.
/* KIARA - Middleware for efficient and QoS/Security-aware invocation of services and exchange of messages
*
* Copyright (C) 2014 Proyectos y Sistemas de Mantenimiento S.L. (eProsima)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for EnumSwitchUnion class:
**Context:**
The EnumSwitchUnion class is a user-defined union that can hold one of three different types of values: int, string, or float. It has a discriminator (m_d) that determines which type of value is stored. The class has getter and setter methods for each type of value, ... | |
Please complete the code given below.
/*
* Copyright (c) 1998-2015 Caucho Technology -- all rights reserved
*
* This file is part of Resin(R) Open Source
*
* Each copy or derived work must preserve the copyright notice and this
* notice unmodified.
*
* Resin Open Source is free software; you can redistribute i... | [
" java = regKey.OpenSubKey(\"1.6\");"
] | 950 | lcc | csharp | null | 76a0bf2e534153ecd85f4baa149e185926fdf7267d6e1660 | 356 | Your task is code completion.
/*
* Copyright (c) 1998-2015 Caucho Technology -- all rights reserved
*
* This file is part of Resin(R) Open Source
*
* Each copy or derived work must preserve the copyright notice and this
* notice unmodified.
*
* Resin Open Source is free software; you can redistribute it and/or ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given Resin class:
**Variables and Fields:**
- `_javaExe`: stores the path to the Java executable
- `_javaHome`: stores the path to the Java home directory
- `_resinHome`: stores the path to the Resin home directory
- `_rootDirectory`: stores the path to the Resin root directory
- `ResinArgs`: an ... | |
Please complete the code given below.
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2012, Dane Summers <dsummers@pinedesk.biz>
# Copyright: (c) 2013, Mike Grozak <mike.grozak@gmail.com>
# Copyright: (c) 2013, Patrick Callahan <pmc@patrickcallahan.com>
# Copyright: (c) 2015, Evan Kaufman <evan@digitalflop... | [
" comment = re.sub(r'%s' % self.ansible, '', l)"
] | 1,528 | lcc | python | null | 70b3e65a3e9eee500a87c090d97914f3b7614cd7d7d51635 | 357 | Your task is code completion.
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2012, Dane Summers <dsummers@pinedesk.biz>
# Copyright: (c) 2013, Mike Grozak <mike.grozak@gmail.com>
# Copyright: (c) 2013, Patrick Callahan <pmc@patrickcallahan.com>
# Copyright: (c) 2015, Evan Kaufman <evan@digitalflophouse.com... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def _update_job(self, name, job, do_job):
# Find the job
for i, line in enumerate(self.lines):
if re.match(r'%s' % self.ansible, line):
if line == self.do_commen... | |
Please complete the code given below.
# Nikita Akimov
# interplanety@interplanety.org
#
# GitHub
# https://github.com/Korchy/BIS
# Mesh Modifiers
# -------------------------------------------------
# old - remove after recreating meshes through import
# -------------------------------------------------
import os
imp... | [
" modifier.vertex_group = modifier_json['vertex_group']"
] | 994 | lcc | python | null | e8d2fbeddaaa67221144399f1e48bc62deb18f5fd8c3c92a | 358 | Your task is code completion.
# Nikita Akimov
# interplanety@interplanety.org
#
# GitHub
# https://github.com/Korchy/BIS
# Mesh Modifiers
# -------------------------------------------------
# old - remove after recreating meshes through import
# -------------------------------------------------
import os
import bpy
f... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
class MeshModifierVERTEX_WEIGHT_PROXIMITY(MeshModifierCommon):
@classmethod
def _to_json_spec(cls, modifier_json, modifier):
modifier_json['falloff_type'] = modifier.falloff_type
modifier_json['mask_co... | |
Please complete the code given below.
package com.hartwig.hmftools.neo.bind;
import static java.lang.Math.max;
import static java.lang.Math.min;
import static com.hartwig.hmftools.common.utils.FileWriterUtils.closeBufferedWriter;
import static com.hartwig.hmftools.common.utils.FileWriterUtils.createBufferedWriter;
imp... | [
" for(int i = 0; i < rankCounts.length; ++i)"
] | 822 | lcc | java | null | 7b052378f063837f048563149af68758cefc4141ff2e4669 | 359 | Your task is code completion.
package com.hartwig.hmftools.neo.bind;
import static java.lang.Math.max;
import static java.lang.Math.min;
import static com.hartwig.hmftools.common.utils.FileWriterUtils.closeBufferedWriter;
import static com.hartwig.hmftools.common.utils.FileWriterUtils.createBufferedWriter;
import stati... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
private void buildAllelePeptideLikelihoods(final String allele, final Map<Integer, List<Double>> pepLenRanks)
{
Map<Integer, double[]> pepLenRankCounts = Maps.newHashMap();
int totalBuckets =... | |
Please complete the code given below.
package mx.letmethink.graph;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import sta... | [
" for (val n : vertex.neighbors()) {"
] | 466 | lcc | java | null | 7e369e49db979a11fae014da09f9aeaf1d365950a38b7333 | 360 | Your task is code completion.
package mx.letmethink.graph;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.j... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given context:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class Vertex {
private int key;
private String label;
private int edgeDirection;
private ArrayList<Edge> neighbors;
private Point2D center;
private int radius;
... | |
Please complete the code given below.
#!/usr/bin/python
import argparse, sys, time, logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
from scapy.all import *
"""
Author: mtask@github.com
Program: pydump.py
Description: Simple packet analyzer.
"""
"""
Pydump is made also python3 in mind, but haven't be... | [
" self.choice = int(self.choice) - 1"
] | 615 | lcc | python | null | 0015062cf7e9262884bb54332e85c9529f05689017c95eff | 361 | Your task is code completion.
#!/usr/bin/python
import argparse, sys, time, logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
from scapy.all import *
"""
Author: mtask@github.com
Program: pydump.py
Description: Simple packet analyzer.
"""
"""
Pydump is made also python3 in mind, but haven't been tested... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def prompt(self, cap):
self.cap = cap
self.option = None
self.opts = ['list', 'help', 'exit']
self.print_usage()
os.system('clear')
print(self.grn+'[*] Listing package... | |
Please complete the code given below.
namespace HospitalityManagement.Dialogs
{
partial class rptParamsDiag
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
... | [
" this.rptComboBox.Location = new System.Drawing.Point(92, 5);"
] | 764 | lcc | csharp | null | 94f4579778d0f769443d95027663337643885b8b0b67cd03 | 362 | Your task is code completion.
namespace HospitalityManagement.Dialogs
{
partial class rptParamsDiag
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <para... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
namespace HospitalityManagement.Dialogs
{
partial class rptParamsDiag
{
// ... (rest of the code)
private void InitializeComponent()
{
// ... (rest of the code)
... | |
Please complete the code given below.
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'NoteReferenceNS'
db.create_table(u'main_notereferencens'... | [
" 'Meta': {'ordering': \"['ordering']\", 'object_name': 'Scan'},"
] | 1,056 | lcc | python | null | 01f0d043830d266acc4757da3d85f78ced040ba1063aa7fb | 363 | Your task is code completion.
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'NoteReferenceNS'
db.create_table(u'main_notereferencens', (
... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def backwards(self, orm):
# Deleting model 'NoteReferenceNS'
db.delete_table(u'main_notereferencens')
# Deleting model 'CitationNS'
db.delete_table(u'main_citationns')
# D... | |
Please complete the code given below.
/*******************************************************************************
* Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 a... | [
" QName qname = new QName(targetNamespace, sdoTypeName);"
] | 1,110 | lcc | java | null | cfb6b58b94ffae9a2bc26c67c46fbd41b8ceea666926fb64 | 364 | Your task is code completion.
/*******************************************************************************
* Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 and Eclips... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for the brevity]
private boolean typesExists(String targetNamespace, String sdoTypeName) {
boolean alreadyProcessed = false;
if ((targetNamespace != null) && (targetNamespace.equals(SDOConstants.SDOJAVA_URL) ... | |
Please complete the code given below.
# -*- coding: utf-8 -*-
##################################################################################
#
# Copyright (c) 2005-2006 Axelor SARL. (http://www.axelor.com)
# and 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# $Id: hr.py 4656 2006-11-24 09:58:42Z Cyp $
#
# This pro... | [
" obj_emp = self.pool.get('hr.employee')"
] | 1,956 | lcc | python | null | 7dd56f936af4445521f33f3902093e6fbc8fc6051abd5488 | 365 | Your task is code completion.
# -*- coding: utf-8 -*-
##################################################################################
#
# Copyright (c) 2005-2006 Axelor SARL. (http://www.axelor.com)
# and 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# $Id: hr.py 4656 2006-11-24 09:58:42Z Cyp $
#
# This program is f... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def holidays_validate(self, cr, uid, ids, context=None):
...
Cheatsheet (for next line):
- We are in the holidays_validate method, which is used to approve a leave request.
- This method is likely to update the state o... | |
Please complete the code given below.
// ---------------------------------------------------------------------------------
// Copyright (C) 2007-2010 Chillisoft Solutions
//
// This file is part of the Habanero framework.
//
// Habanero is a free framework: you can redistribute it and/or modify
// it u... | [
" set { this.Enabled = value; }"
] | 2,288 | lcc | csharp | null | 17cb34da8ac4cba50c3cd902f4bb130d217b32fbce400737 | 366 | Your task is code completion.
// ---------------------------------------------------------------------------------
// Copyright (C) 2007-2010 Chillisoft Solutions
//
// This file is part of the Habanero framework.
//
// Habanero is a free framework: you can redistribute it and/or modify
// it under the ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public abstract class GridBaseWin : DataGridViewWin, IGridBase
{
// ... (many lines omitted for brevity)
public void ApplySearch(string searchClause, string orderBy)
{
GridBaseManag... | |
Please complete the code given below.
// created on 10/12/2002 at 20:37
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using xServer.Core.NAudio.Wave.MmeInterop;
namespace xServer.Core.NAudio.Mixer
{
/// <summary>
/// Represents a mixer line (source or destination)
/... | [
" return String.Format(\"{0} {1} ({2} controls, ID={3})\", "
] | 672 | lcc | csharp | null | 102833fe5a636f960b4e9762aced1a6f79de4abd212d5ced | 367 | Your task is code completion.
// created on 10/12/2002 at 20:37
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using xServer.Core.NAudio.Wave.MmeInterop;
namespace xServer.Core.NAudio.Mixer
{
/// <summary>
/// Represents a mixer line (source or destination)
/// </summ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
**MixerLine Class**
* The class represents a mixer line (source or destination) in the context of audio mixing.
* It has several properties and methods to interact with the mixer line, such as getting its name, short name, line ID, component type, and more.
* The class has two co... | |
Please complete the code given below.
//#############################################################################
//# #
//# Copyright (C) <2015> <IMS MAXIMS> #
//# ... | [
"\t\t\tif (valueObject.getCareContext().getBoId() == null)"
] | 1,991 | lcc | java | null | 25a88155c976a139f0f67418b062d4e28ff8b66c2718bc66 | 368 | Your task is code completion.
//#############################################################################
//# #
//# Copyright (C) <2015> <IMS MAXIMS> #
//# ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class EmergencyAttendanceForTimeAmendmentsVoAssembler {
// ... existing code ...
public static ims.core.admin.domain.objects.EmergencyAttendance extractEmergencyAttendance(ims.domain.ILightweightD... | |
Please complete the code given below.
# Copyright 2013 The Servo Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://... | [
" [\"cargo\", \"build\"] + opts,"
] | 688 | lcc | python | null | ff8f7d496166e1a205f67ca69caa4f63247ff40c16b5e326 | 369 | Your task is code completion.
# Copyright 2013 The Servo Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensourc... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
@Command('build',
description='Build Servo',
category='build')
@CommandArgument('--target', '-t',
default=None,
help='Cross compile f... | |
Please complete the code given below.
/**
* Copyright (C) 2001-2020 by RapidMiner and the contributors
*
* Complete list of developers available at our web site:
*
* http://rapidminer.com
*
* This program is free software: you can redistribute it and/or modify it under the terms of the
* GNU Affero General ... | [
"\t\t\tdouble estN = counts[3];"
] | 1,642 | lcc | java | null | 2248a8f904da25fd9ea3437cf9c3da1e73876f14aa5dfa87 | 370 | Your task is code completion.
/**
* Copyright (C) 2001-2020 by RapidMiner and the contributors
*
* Complete list of developers available at our web site:
*
* http://rapidminer.com
*
* This program is free software: you can redistribute it and/or modify it under the terms of the
* GNU Affero General Public Li... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
protected double getOptimisticScore(double[] counts) throws UndefinedParameterError {
double p = counts[0];
double n = counts[1];
if (this.getParameterAsBoolean(PARAMETER_RELATIVE_TO_PRED... | |
Please complete the code given below.
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Management;
using System.Text;
using System.Windows.Forms;
using GitCommands;
using GitCommands.Git;
using GitCommands.Patches;
using GitExtUtils.GitUI;
using GitUIPluginInterface... | [
" var firstId = Module.RevParse(gitStash.Name + \"^\");"
] | 671 | lcc | csharp | null | f54df722d8cb6050f8b9b79929415e488a47e64578808ae4 | 371 | Your task is code completion.
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Management;
using System.Text;
using System.Windows.Forms;
using GitCommands;
using GitCommands.Git;
using GitCommands.Patches;
using GitExtUtils.GitUI;
using GitUIPluginInterfaces;
using ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
private void LoadGitItemStatuses(IReadOnlyList<GitItemStatus> gitItemStatuses)
{
GitStash gitStash = Stashes.SelectedItem as GitStash;
if (gitStash == _currentWorkingDirStashItem)
{
... | |
Please complete the code given below.
import cobjects
from cobjects import CBuffer, CObject
import sixtracklib as st
from sixtracklib.stcommon import st_ARCH_BEAM_ELEMENTS_BUFFER_ID, \
st_NullAssignAddressItem, st_AssignAddressItem_p, \
st_buffer_size_t, st_object_type_id_t, st_arch_status_t, st_arch_size_t, \... | [
" assert lattice.cbuffer.get_object(bm1_index).out_address != 0"
] | 594 | lcc | python | null | 0c30966965780fab171d0c89cad81d1c373553c851c2aba7 | 372 | Your task is code completion.
import cobjects
from cobjects import CBuffer, CObject
import sixtracklib as st
from sixtracklib.stcommon import st_ARCH_BEAM_ELEMENTS_BUFFER_ID, \
st_NullAssignAddressItem, st_AssignAddressItem_p, \
st_buffer_size_t, st_object_type_id_t, st_arch_status_t, st_arch_size_t, \
st_A... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
job.assign_all_addresses()
job.collect_beam_elements()
assert lattice.cbuffer.get_object(bm0_index).out_address != 0
Cheatsheet (for next line):
- We are at the end of the test case.
- The goal is... | |
Please complete the code given below.
/*
* ====================================================================
* 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 ... | [
" if (o == this) {"
] | 1,028 | lcc | java | null | 2a2a9209a97ca8cd4029fb006e641c88c4b4df72c457a731 | 373 | Your task is code completion.
/*
* ====================================================================
* 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... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class AuthScope {
// ...
public AuthScope(final String host, final int port, final String realm, final String scheme)
// ...
public AuthScope(final AuthScope authscop... | |
Please complete the code given below.
//
// This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
// project.
//
// Copyright (C) 1998-2012 OpenLink Software
//
// This project is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as ... | [
" b}, callback, asyncState);"
] | 1,364 | lcc | csharp | null | 985588e7dc66ac6d50e0fe4a6602f7b58eb5fef402be68fa | 374 | Your task is code completion.
//
// This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
// project.
//
// Copyright (C) 1998-2012 OpenLink Software
//
// This project is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
private void CallWebService(int a, int b, string url)
{
// Instantiate an instance of the web service proxy
AddNumbers serviceProxy = new AddNumbers();
SoapContext requestContext = serviceProxy... | |
Please complete the code given below.
/*******************************************************************************
* HELIUM V, Open Source ERP software for sustained success
* at small and medium-sized enterprises.
* Copyright (C) 2004 - 2015 HELIUM V IT-Solutions GmbH
*
* This program is free software: you ... | [
"\t\t\t\t\tif (!(i == snrs.size() - 1)) {"
] | 724 | lcc | java | null | 60c91ffa1d58e4c6d52c0ae275b009bc330e180493b0d2e3 | 375 | Your task is code completion.
/*******************************************************************************
* HELIUM V, Open Source ERP software for sustained success
* at small and medium-sized enterprises.
* Copyright (C) 2004 - 2015 HELIUM V IT-Solutions GmbH
*
* This program is free software: you can redis... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class SeriennrChargennrMitMengeDto implements Serializable {
/**
*
*/
public static List<SeriennrChargennrMitMengeDto> erstelleDtoAusEinerSeriennummer(
String seriennummer... | |
Please complete the code given below.
using UnityCMF.CCore;
using UnityCMF.ECore;
// PROTECTED REGION ID(ETypedElement.Namespaces) ENABLED START
// PROTECTED REGION END
namespace UnityCMF.ECore {
public interface ETypedElement : EModelElement,ENamedElement {
bool Ordered { get; set; }
void SetOrdered(bool value, ... | [
"\t\t\t\t\tEType = (EClassifier)value;"
] | 642 | lcc | csharp | null | 7a60f7b18cb99dc78088418a1c233691053449386e7273eb | 376 | Your task is code completion.
using UnityCMF.CCore;
using UnityCMF.ECore;
// PROTECTED REGION ID(ETypedElement.Namespaces) ENABLED START
// PROTECTED REGION END
namespace UnityCMF.ECore {
public interface ETypedElement : EModelElement,ENamedElement {
bool Ordered { get; set; }
void SetOrdered(bool value, object da... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class ETypedElementImpl : ENamedElementImpl, ETypedElement {
// ...
public override void CSet(EStructuralFeature feature, object value) {
switch(feature.Name) {
case "ord... | |
Please complete the code given below.
#!/usr/bin/env python3
from argparse import ArgumentParser
from encrypted_archive_index import EncryptedArchiveIndex
import sys
from getpass import getpass
from key_deriver import KeyDeriver
import log
from archive_encryptor import ArchiveEncryptor, EncryptedArchiveCorruptExceptio... | [
" log.log_strm = open(args.log_file, 'w')"
] | 626 | lcc | python | null | cd81bc2e4c0a7dc1e4f6a340a63de44a5b0e7a055b43a7b3 | 377 | Your task is code completion.
#!/usr/bin/env python3
from argparse import ArgumentParser
from encrypted_archive_index import EncryptedArchiveIndex
import sys
from getpass import getpass
from key_deriver import KeyDeriver
import log
from archive_encryptor import ArchiveEncryptor, EncryptedArchiveCorruptException
import ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
def main():
parser = ArgumentParser()
...
actions = parser.add_subparsers()
decrypt_subparser = actions.add_parser('decrypt', help='Decrypt an archive')
decrypt_... | |
Please complete the code given below.
##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2012-2014 Uwe Hermann <uwe@hermann-uwe.de>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Sof... | [
" if ptype == 'BITS':"
] | 1,650 | lcc | python | null | 467203b77592a0dbc3eb517669aab5cd995bdb6136767dd3 | 378 | Your task is code completion.
##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2012-2014 Uwe Hermann <uwe@hermann-uwe.de>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Fou... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given context:
Context:
[Previous code... ~10,000 lines omitted for brevity]
class Decoder(srd.Decoder):
...
def decode(self, ss, es, data):
ptype, mosi, miso = data
# For now, only use DATA and BITS packets.
if ptype not in ('DATA', 'BITS'):
... | |
Please complete the code given below.
// This file was generated automatically by the Snowball to Java compiler
package edu.nyu.stex.data.preprocess.snowball;
/**
* This class was automatically generated by a snowball to Java compiler It
* implements the stemming algorithm defined by a snowball script.
*/
public cl... | [
" cursor = limit - v_3;"
] | 3,016 | lcc | java | null | b20a8d2aec9be1407977fc8294fc849403fe93cc367f38d6 | 379 | Your task is code completion.
// This file was generated automatically by the Snowball to Java compiler
package edu.nyu.stex.data.preprocess.snowball;
/**
* This class was automatically generated by a snowball to Java compiler It
* implements the stemming algorithm defined by a snowball script.
*/
public class roman... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
private boolean r_verb_suffix() {
int among_var;
int v_1;
int v_2;
int v_3;
// setlimit, line 164
v_1 = limit - cursor;
// tomark, line 164
if (cur... | |
Please complete the code given below.
package lcm.spy;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
import javax.swing.tree.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;
import java.util.jar.*;
import java.util.zip.*;
import lcm.util.*;
import jav... | [
" if (cd == null) {"
] | 583 | lcc | java | null | e537367e5f1862611742bd63b5d29acacd7963cc58c3c0ac | 380 | Your task is code completion.
package lcm.spy;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
import javax.swing.tree.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;
import java.util.jar.*;
import java.util.zip.*;
import lcm.util.*;
import java.lang.re... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
public class Spy {
// ...
class MySubscriber implements LCMSubscriber {
public void messageReceived(LCM lcm, String channel, LCMDataInputStream dins) {
// ...
... | |
Please complete the code given below.
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2016-2017, Yanis Guenane <yanis+ansible@guenane.org>
# Copyright: (c) 2017, Markus Teufelberger <mteufelberger+ansible@mgit.at>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
f... | [
" return sorted(result), bool(extension.get_critical())"
] | 2,179 | lcc | python | null | 71ce6181e5bc2ca033a59fff909ae4682cbb94f61145ba04 | 381 | Your task is code completion.
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2016-2017, Yanis Guenane <yanis+ansible@guenane.org>
# Copyright: (c) 2017, Markus Teufelberger <mteufelberger+ansible@mgit.at>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __fut... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
class CertificateInfoPyOpenSSL(CertificateInfo):
"""validate the supplied certificate."""
def __init__(self, module):
super(CertificateInfoPyOpenSSL, self).__init__(module, 'pyopenssl')
def _get_signature_algori... | |
Please complete the code given below.
#!/usr/bin/python
#
# Copyright (C) 2009-2012 Paul Davis
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# ... | [
"\t\t\t\tstill_there = _slots.find (i->first) != _slots.end ();"
] | 1,211 | lcc | python | null | aa8714d821c58b0cafe396b92312a4fe03c223fb64a901a3 | 382 | Your task is code completion.
#!/usr/bin/python
#
# Copyright (C) 2009-2012 Paul Davis
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
print("\t\tfor (%sSlots::iterator i = s.begin(); i != s.end(); ++i) {" % typename, file=f)
print("""
/* We may have just called a slot, and this may have resulted in
disconnection of other slots from us... | |
Please complete the code given below.
# (C) 2009 Frank-Rene Schaefer
"""
ABSTRACT:
!! UTF16 state split is similar to UTF8 state split as shown in file !!
!! "uf8_state_split.py". Please, read the documentation there about !!
!! the details of the basic idea. !!
Due ... | [
" front_seq = unicode_to_utf16(X.begin)"
] | 1,192 | lcc | python | null | b7aaf348eef474fc39a51484be57ea00820973ab5749b1cb | 383 | Your task is code completion.
# (C) 2009 Frank-Rene Schaefer
"""
ABSTRACT:
!! UTF16 state split is similar to UTF8 state split as shown in file !!
!! "uf8_state_split.py". Please, read the documentation there about !!
!! the details of the basic idea. !!
Due to the fa... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def get_trigger_sequence_for_interval(X):
# The interval either lies entirely >= 0x10000 or entirely < 0x10000
assert X.begin >= 0x10000 or X.end < 0x10000
# An interval below < 0x10000 remains the same
... | |
Please complete the code given below.
/*---------------------------------------------------------------------------*\
Compiler Generator Coco/R,
Copyright (c) 1990, 2004 Hanspeter Moessenboeck, University of Linz
extended by M. Loeberbauer & A. Woess, Univ. of Linz
with improvements by Pat Terry, Rhode... | [
"\t\t\tint beg = la.pos; int col = la.col;"
] | 1,264 | lcc | csharp | null | ae0f2d60c0cb9d0cb36a55fcf60b29466a441974ac234dca | 384 | Your task is code completion.
/*---------------------------------------------------------------------------*\
Compiler Generator Coco/R,
Copyright (c) 1990, 2004 Hanspeter Moessenboeck, University of Linz
extended by M. Loeberbauer & A. Woess, Univ. of Linz
with improvements by Pat Terry, Rhodes Univers... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class Parser {
// ... (many lines of code)
void TokenDecl(int typ) {
// ... (many lines of code)
if (la.kind == 41) {
SemText(out sym.semPos);
... | |
Please complete the code given below.
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or m... | [
" edi_doc['product_qty'] = line.product_uom_qty"
] | 813 | lcc | python | null | d6b0b1ba478697a4988f5e3a441475444dd822738a3d6461 | 385 | Your task is code completion.
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
class sale_order(osv.osv, EDIMixin):
...
def edi_import(self, cr, uid, edi_document, context=None):
...
order_lines = edi_document['order_line']
for order_line in order_lines:
... | |
Please complete the code given below.
/**
* Copyright (c) 2010-2015, openHAB.org and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse... | [
" \tServiceDescription description = getDefaultServiceDescription();"
] | 603 | lcc | java | null | 5b2b4575bee8bc4223e1eed289165b7fcf597782d98e9033 | 386 | Your task is code completion.
/**
* Copyright (c) 2010-2015, openHAB.org and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/lega... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class RESTApplication extends Application {
// ...
private Dictionary<String, String> getJerseyServletParams() {
// ...
final String[] interceptors = {
... | |
Please complete the code given below.
/*
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise,... | [
" permissions = new ArrayList<>();"
] | 897 | lcc | java | null | 2bcc90a8e0d4c69a7f61f382e24a8ae2c11dc6eb28b58b0a | 387 | Your task is code completion.
/*
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the soft... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
@Test
public void testReadonlyNodeHasPermission() throws Exception
{
// virtual permission should override actual permissions
NodeRef aVFTestTemplate2 = createVirtualizedFolder(testRootFo... | |
Please complete the code given below.
# -*- coding: utf-8 -*-
# Copyright (C) 2010, 2011, 2012 Sebastian Wiesner <lunaryorn@gmail.com>
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation; eit... | [
" subsystem='input', ID_INPUT_MOUSE=True, sys_name='mouse0'))"
] | 769 | lcc | python | null | 7293c0e9f7e75148f514aaf18ac8ea75262950e00b623dfd | 388 | Your task is code completion.
# -*- coding: utf-8 -*-
# Copyright (C) 2010, 2011, 2012 Sebastian Wiesner <lunaryorn@gmail.com>
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation; either versi... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given context:
Context:
[Previous code... ~10,000 lines omitted for brevity]
class TestContext(object):
@pytest.mark.match
def test_list_devices(self, context):
devices = list(context.list_devices(
Relevant lines and variables:
- We are in the test_list_devices method of the TestCo... | |
Please complete the code given below.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from HttpUtils import App, buildOpener
class Device(object):
def __init__(self, token):
self.token = token
self.app = App()
def check_inspection(self):
data = self.app.check__inspection()
return ... | [
" device = Device(token=deviceToken)"
] | 478 | lcc | python | null | e172201bb15276d6c82301b6f3239ef78af9c9ab95ca59b2 | 389 | Your task is code completion.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from HttpUtils import App, buildOpener
class Device(object):
def __init__(self, token):
self.token = token
self.app = App()
def check_inspection(self):
data = self.app.check__inspection()
return data
... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat Sheet for Code Completion Task:
**Device Class**
- `__init__` method initializes the `token` and `app` attributes.
- `check_inspection` method calls `app.check__inspection()` and returns the result.
- `notification_postDevicetoken` method sends a notification with device token and returns the result.
- `newUser... | |
Please complete the code given below.
#!/usr/bin/env python
"""Time-variable calibration for ATCA
Usage:
timevariation_cal.py <dataset> [--calibrator=<cal>] [--segment=<min>] [--slop=<min>]
-h --help show this
-c --calibrator CAL the name of the calibrator [default: 1934-638]
-s --segment LEN the ... | [
" elif (index_elements[0] == \"Scatter\"):"
] | 1,818 | lcc | python | null | ea081b4223c2863932036461c4dda5fe46df221fbaf332de | 390 | Your task is code completion.
#!/usr/bin/env python
"""Time-variable calibration for ATCA
Usage:
timevariation_cal.py <dataset> [--calibrator=<cal>] [--segment=<min>] [--slop=<min>]
-h --help show this
-c --calibrator CAL the name of the calibrator [default: 1934-638]
-s --segment LEN the length of... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def determine_array(srcname, freq):
print " determining array"
dsets = dataset_find(srcname, freq)
# The strings for the station configurations.
configs = {
'6A': "... | |
Please complete the code given below.
using System;
using System.Collections.Generic;
using Server.Targeting;
using Server.Engines.Craft;
namespace Server.Items
{
public class KeyRing : Item, IResource, IQuality
{
private CraftResource _Resource;
private Mobile _Crafter;
private ItemQua... | [
" if (Keys.Count < 1)"
] | 549 | lcc | csharp | null | b293cf5f342371e0bf71c2612684f816f33409393283da9c | 391 | Your task is code completion.
using System;
using System.Collections.Generic;
using Server.Targeting;
using Server.Engines.Craft;
namespace Server.Items
{
public class KeyRing : Item, IResource, IQuality
{
private CraftResource _Resource;
private Mobile _Crafter;
private ItemQuality _Qua... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class KeyRing : Item, IResource, IQuality
{
private CraftResource _Resource;
private Mobile _Crafter;
private ItemQuality _Quality;
[CommandProperty(AccessLevel.GameMaster)]
... | |
Please complete the code given below.
package org.cwepg.hr;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.StringReader;
import java.io.UnsupportedEncodin... | [
" for (String device : devices) {"
] | 1,943 | lcc | java | null | e7cf53f84107ea1aeedbca65bba9b70350df8c2b9d1a949d | 392 | Your task is code completion.
package org.cwepg.hr;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.StringReader;
import java.io.UnsupportedEncodingExceptio... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public List<Tuner> countTunersHdhr(boolean addDevice){
ArrayList<Tuner> tunerList = new ArrayList<Tuner>(); // To be returned from this method. Live (including retry to get live), and not disabled.
... | |
Please complete the code given below.
package org.thoughtcrime.securesms.migrations;
import android.content.Context;
import androidx.annotation.NonNull;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
impo... | [
" if (lastSeenVersion < Version.USER_NOTIFICATION) {"
] | 1,057 | lcc | java | null | 98f6d04d0820f21a99dd26399514e157795b7254b994a3ab | 393 | Your task is code completion.
package org.thoughtcrime.securesms.migrations;
import android.content.Context;
import androidx.annotation.NonNull;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.gr... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given context:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class ApplicationMigrations {
// ...
private static final String TAG = Log.tag(ApplicationMigrations.class);
// ...
private static final class Version {
// ...
... | |
Please complete the code given below.
package edu.stanford.nlp.ie.regexp;
import edu.stanford.nlp.util.logging.Redwood;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.... | [
" if (split.length < 2 || split.length > 4)"
] | 1,566 | lcc | java | null | 4bd2fd0f69e4de7c6c60f4067b514b23e77ab94af50551f3 | 394 | Your task is code completion.
package edu.stanford.nlp.ie.regexp;
import edu.stanford.nlp.util.logging.Redwood;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collectio... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
private static class Entry implements Comparable<Entry> {
public List<Pattern> regex; // the regex, tokenized by splitting on white space
public List<String> exact = new ArrayList<>();
public String ty... | |
Please complete the code given below.
"""SCons.Scanner.LaTeX
This module implements the dependency scanner for LaTeX code.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this sof... | [
" i = SCons.Node.FS.find_file(n, (source_dir,) + sub_path[0])"
] | 1,329 | lcc | python | null | 51cad9bbad6cbc55c69a6d0f523dbdfc409b670b50b64d77 | 395 | Your task is code completion.
"""SCons.Scanner.LaTeX
This module implements the dependency scanner for LaTeX code.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
class LaTeX(SCons.Scanner.Base):
...
def find_include(self, include, source_dir, path):
try:
sub_path = path[include[0]]
except (IndexError, KeyError):
sub... | |
Please complete the code given below.
#
# This file is part of Mapnik (C++/Python mapping toolkit)
# Copyright (C) 2009 Artem Pavlenko
#
# Mapnik is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version... | [
" ctx = Context()"
] | 2,860 | lcc | python | null | 992dbc69af1a3576bbb2ed62504f814872db7f713f6b9a74 | 396 | Your task is code completion.
#
# This file is part of Mapnik (C++/Python mapping toolkit)
# Copyright (C) 2009 Artem Pavlenko
#
# Mapnik is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of t... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def PythonDatasource(**keywords):
"""A base class for a Python data source.
Optional arguments:
envelope -- a mapnik.Box2d (minx, miny, maxx, maxy) envelope of the data source, default ... | |
Please complete the code given below.
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = ... | [
" if self.want.destination != self.have.destination:"
] | 1,555 | lcc | python | null | de56fbc358675175235c1b81f44c85afbdf421ee3d426fe4 | 397 | Your task is code completion.
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadat... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
class Difference(object):
def __init__(self, want, have=None):
self.want = want
self.have = have
def compare(self, param):
try:
result = getattr(self, param)
r... | |
Please complete the code given below.
# -*- coding: utf-8 -*-
import attr
from copy import copy
from cached_property import cached_property
from navmazing import NavigateToAttribute, NavigateToSibling
from widgetastic.utils import ParametrizedLocator
from widgetastic.widget import Table, Text, View, ParametrizedView, ... | [
" cancel_button = Button('Cancel')"
] | 628 | lcc | python | null | 3149648eac16b892c2a3b92e78536acd7934268336fc2d34 | 398 | Your task is code completion.
# -*- coding: utf-8 -*-
import attr
from copy import copy
from cached_property import cached_property
from navmazing import NavigateToAttribute, NavigateToSibling
from widgetastic.utils import ParametrizedLocator
from widgetastic.widget import Table, Text, View, ParametrizedView, Select, C... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
class MethodAddView(AutomateExplorerView):
...
playbook_input_parameters = PlaybookInputParameters()
add_button = Button('Add')
...
Cheatsheet (for next line):
- We are in the MethodAddVie... | |
Please complete the code given below.
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ac.factory;
import elsu.events.*;
import ac.core.*;
import elsu.database.*;
import elsu.... | [
" notifyListeners(new EventObject(this), EventStatusType.ERROR,"
] | 740 | lcc | java | null | 79cd419a6f2198575f4b878105dcc71a5fbd4737594a98a5 | 399 | Your task is code completion.
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ac.factory;
import elsu.events.*;
import ac.core.*;
import elsu.database.*;
import elsu.support.*... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public IAction getActionObject(String className) throws Exception {
IAction result = null;
String classPath = getActionProperty(className);
if (classPath != null) {
// u... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.