input stringlengths 0 1.96k | context stringlengths 1.23k 257k | answers listlengths 1 5 | length int32 399 40.5k | dataset stringclasses 10
values | language stringclasses 5
values | all_classes listlengths | _id stringlengths 48 48 |
|---|---|---|---|---|---|---|---|
"""Tests for django comment client views."""
from contextlib import contextmanager
import logging
import json
import ddt
from django.conf import settings
from django.core.cache import get_cache
from django.test.client import Client, RequestFactory
from django.contrib.auth.models import User
from django.core.management ... | [
" {\"thread_id\": \"dummy\", \"course_id\": unicode(self.course_id)},"
] | 1,297 | lcc | python | null | f7ee18c4d9156538d22f6663060cd388cce7b7fe2ff560d3 | |
"""SCons.Tool.mslink
Tool-specific initialization for the Microsoft linker.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 201... | [
" ret = (embedManifestDllAction) ([target[0]],None,env) "
] | 917 | lcc | python | null | 970d266acb1e58959ce93048f35f32055064fc1053f60014 | |
/**
* Copyright (c) 2005-2011 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Eclipse Public License (EPL).
* Please see the license.txt included with this distribution for details.
* Any modifications to this file must keep this entire header intact.
*/
package org.python.pydev.naviga... | [
" WorkspaceModifyOperation op = new WorkspaceModifyOperation() {"
] | 1,208 | lcc | java | null | 028fac90b8ce9bb8e36ca503af93a07b449aafbe6570e486 | |
/* Copyright (c) 2007 Pentaho Corporation. All rights reserved.
* This software was developed by Pentaho Corporation and is provided under the terms
* of the GNU Lesser General Public License, Version 2.1. You may not use
* this file except in compliance with the license. If you need a copy of the license,
* ... | [
"\t\tif (super.init(smi, sdi))"
] | 521 | lcc | java | null | 6a7e2d3329ea2bdb0c4bdac5aee494e87cdfc588799e3f78 | |
# coding: utf-8
# python
from datetime import datetime, time, timedelta
# 3rd-party
from freezegun import freeze_time
import pytest
# this app
from timetra.diary import utils
def test_extract_components():
f = utils.extract_date_time_bounds
## simple since, until
assert f('18:55..19:30') == {'since': '18:55... | [
" assert f('+5..', last) == (d(2014,1,30, 22,21), now)"
] | 1,349 | lcc | python | null | 6ed48ea127a5e3b151e2448bd64dd53c427087b78346f68e | |
// This is a MOD of Nerun's Distro SpawnGen (Engine r117) that works with default runuo proximity spawners.
using System;
using System.Collections.Generic;
using System.IO;
using Server.Mobiles;
using Server.Commands;
namespace Server
{
public class SpawnGenerator
{
private static int m_Count;
p... | [
" else if (smaxtime.Contains(\"h\"))"
] | 1,478 | lcc | csharp | null | 616a17b42a836d0cbc6def391f1ad2c62a6951e8da18f14c | |
"""
High-level QEMU test utility functions.
This module is meant to reduce code size by performing common test procedures.
Generally, code here should look like test code.
More specifically:
- Functions in this module should raise exceptions if things go wrong
- Functions in this module typically use functions ... | [
" s, o = self._session_cmd_close(session, suspend_log_chk_cmd)"
] | 1,232 | lcc | python | null | 659965fc4472dec4f8b056a906be656d08aac541f75950f4 | |
package org.zeromq;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import java.io.IOException;
import java.lang.Thread.UncaughtExceptionHandler;
import java.util.concurrent.Callable;
import java.util.concurrent.Execu... | [
" final Future<Boolean> pubf = service.submit(pub);"
] | 471 | lcc | java | null | 4607ba7831731a759293fdd8a639dc5c10d803e93d6bcba2 | |
/*
* ################################################################
*
* ProActive Parallel Suite(TM): The Java(TM) library for
* Parallel, Distributed, Multi-Core Computing for
* Enterprise Grids & Clouds
*
* Copyright (C) 1997-2012 INRIA/University of
* Nice-Sophia Antipolis/ActiveEon
... | [
" if (this.owner.getDecorator() instanceof FTDecorator) {"
] | 1,423 | lcc | java | null | 656e6b487418898304f2b9808ba22f80abf877b82fdba872 | |
/*
Copyright (C) 2014-2019 de4dot@gmail.com
This file is part of dnSpy
dnSpy 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 v... | [
"\t\t\tif (value <= 0x7F)"
] | 701 | lcc | csharp | null | 527be9dcafaca936af7816ffc1b91056d113516e8acf4806 | |
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2013 Roman Zimbelmann <hut@lavabit.com>
# This configuration file is licensed under the same terms as ranger.
# ===================================================================
# This file contains ranger's commands.
# It's all in python; lines beginning with # are comme... | [
" obj = CommandLoader(args=['aunpack'] + au_flags \\"
] | 3,874 | lcc | python | null | c2347b59144779a0b7a159df894795eedab94a268ecd2b43 | |
//
// ActivatorTest.cs - NUnit Test Cases for System.Activator
//
// Authors:
// Nick Drochak <ndrochak@gol.com>
// Gert Driesen <drieseng@users.sourceforge.net>
// Sebastien Pouliot <sebastien@ximian.com>
//
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
using System;
using System.Globalization;
using S... | [
"\t\t[ExpectedException (typeof (ArgumentNullException))]"
] | 740 | lcc | csharp | null | 4f42b848b4da56a77422629e5f5b34775ae49475d94110cf | |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import absolute_import
from __future__ import unicode_literals
from elmo.test import TestCase
from django... | [
" de = Locale.objects.get(code='de')"
] | 668 | lcc | python | null | af99b5be338dcd6ea99c715d5b5b5bdb923174f4a608472b | |
# -*- coding: utf-8 -*-
import threading
import logging
import time
import select
import socket
import ssl
import struct
from errors import *
from constants import *
import users
import channels
import blobs
import commands
import messages
import callbacks
import tools
import soundoutput
import mumble_pb2
from pycelt i... | [
" userstate.texture = cmd.parameters[\"texture\"]"
] | 1,807 | lcc | python | null | 835d60f6bb369f4f9e5e17b7af239e5a16e37bb40847519c | |
/**
* This file is part of Aion-Lightning <aion-lightning.org>.
*
* Aion-Lightning 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 ver... | [
" PlayerGroup group = player.getPlayerGroup2();"
] | 799 | lcc | java | null | 67a6dc96ef742343a5472232bc814279dccd54c1055439e8 | |
# -*- coding: utf-8 -*-
from io import BytesIO as StringIO
from amoco.config import conf
from amoco.logger import Log
logger = Log(__name__)
logger.debug("loading module")
import re
try:
from pygments.token import Token
from pygments.style import Style
from pygments.lexer import RegexLexer
from pygments... | [
" r = [head]"
] | 734 | lcc | python | null | d8447e7d54fe3091a9199e7ab96ea24e60a7f9976caf7d82 | |
from __future__ import print_function, division, absolute_import
# Copyright (c) 2011 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS... | [
" column, tree_model, tree_iter = self._setup_column(1, False)"
] | 630 | lcc | python | null | 01927bf90663c8e45781b1b5ddce62bfaf81ca7f023ef08b | |
/**
*
* Copyright (c) 2014, the Railo Company Ltd. All rights reserved.
*
* 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 your option) ... | [
"\t if (parent instanceof Grid) {"
] | 1,452 | lcc | java | null | a9f806dacfe9f5d8c7b09f082dcb1b2d02bd3ec0647bbbed | |
/*
* "NorseWorld: Ragnarok", a roguelike game for PCs.
* Copyright (C) 2002-2008, 2014 by Serg V. Zhdanovskih.
*
* This file is part of "NorseWorld: Ragnarok".
*
* 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
* ... | [
" XmlNodeList dnl = element.SelectNodes(\"Dialog\");"
] | 667 | lcc | csharp | null | 60f43ea884b0dda7f3dd9e6fee352e3b1f7715b7cbef50df | |
using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Engines.PartySystem;
using Server.Mobiles;
using Server.Network;
using Server.Regions;
namespace Server.Items
{
public enum PeerlessList
{
None,
DreadHorn,
Exodus,
MelisandeTrammel,
MelisandeFelucca,
... | [
" m_key[i] = new ExodusTomeAltar();"
] | 1,143 | lcc | csharp | null | e8fcbecdd8f66e30320eeb4325e3c774f6123213490f17da | |
//#############################################################################
//# #
//# Copyright (C) <2014> <IMS MAXIMS> #
//# #
... | [
"\t\tif(beans == null)"
] | 755 | lcc | java | null | 131b0d4e1060ac70718be3c8613b7334215e78efea7deb46 | |
/*
* Copyright 2007 ZXing 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.0
*
* Unless required by applicable law or agreed ... | [
" new Version(1, new int[]{},"
] | 994 | lcc | java | null | 5a5af80308308375d1df176501cc0cb6e044e09d4787ab3a | |
/*
KeePass Password Safe - The Open-Source Password Manager
Copyright (C) 2003-2017 Dominik Reichl <dominik.reichl@t-online.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 Foundation; either version... | [
"\t\t\tbyte[] pb = kdf.Transform(pbMsg, p);"
] | 2,072 | lcc | csharp | null | cad0e73b70c6604397a4ffceeee2f4696001601af1e061b6 | |
/**
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*
* File Created @ [Mar 13, 2014, 5:32:24 PM (GM... | [
"\t\treturn requestManaExact(stack, player, cost, remove);"
] | 1,100 | lcc | java | null | b94c4100fcacf82ca0b3cf350411e8a6361c3aedbbb68172 | |
# Copy this file to app_server/settings.py and adjust to your specification (it should work fine out of the box)
# Django settings for django_agfk project.
import os
import sys
SETTINGS_PATH = os.path.realpath(os.path.dirname(__file__))
CLIENT_SERVER_PATH = SETTINGS_PATH
AGFK_PATH = os.path.realpath(os.path.join(SETTIN... | [
"if DEBUG and len(sys.argv) > 1:"
] | 684 | lcc | python | null | d7f7bd8bf110178d86ce3ea9bb27e6f1f794f60c3fe3a478 | |
//
// LED_Queue.cs
//
// Author:
// Shane Synan <digitalcircuit36939@gmail.com>
//
// Copyright (c) 2015 - 2016
//
// 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... | [
"\t\t\t\t\t\t\" expected {1})\", NextFrame.PixelCount, LightCount"
] | 821 | lcc | csharp | null | 4673929404a475d693820dddae925a0b49797eeb5da4c706 | |
/*
* Copyright 2012 PRODYNA AG
*
* Licensed under the Eclipse Public License (EPL), Version 1.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.opensource.org/licenses/eclipse-1.0.php or
* http://www.nabucco.org/License.... | [
" if ((this.userErrorMessage == null)) {"
] | 813 | lcc | java | null | 9de1c2d790d0cfc4b8f31402e8be6b0d06aa0e2623207f6a | |
/*
* Copyright (C) 2012 The CyanogenMod Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | [
" dc.index = p.readInt();"
] | 1,196 | lcc | java | null | ea1234d3d85703f270dfcff3d2aedc39d8ebe2b1d2369a39 | |
package de.fhg.fokus.mdc.odrClientProxy.registry;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.codehaus.jackson.JsonGenerationException;
import org.codehaus.jackson.map.JsonMappingException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import de.fhg.fokus.mdc.odr... | [
"\t\t\t\t\t\tif (licence.isDomainSoftware()) {"
] | 679 | lcc | java | null | 3a16af734adf48dc73f6e28cfaec11262bb343e3da134f90 | |
#region License
// ====================================================
// Project Porcupine Copyright(C) 2016 Team Porcupine
// This program comes with ABSOLUTELY NO WARRANTY; This is free software,
// and you are welcome to redistribute it under certain conditions; See
// file LICENSE, which is part of this source ... | [
" for (int x = 0; x < xSizeP; x++)"
] | 1,083 | lcc | csharp | null | a85ec69aacbcbe8db663b015147d5e8f96ae3e1481e5036c | |
package org.bitseal.network;
import java.net.MalformedURLException;
import java.net.URL;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;
import org.bitseal.core.App;
import org.bitseal.data.ServerRecord;
import org.bitseal.database.ServerRecordProvid... | [
"\t\t\tint testInt2 = rand.nextInt(5000);"
] | 845 | lcc | java | null | d87a8d45371d8a5b1d38f4ab97868fb93ab6a18b81e452ea | |
/*
* OCaml Support For IntelliJ Platform.
* Copyright (C) 2010 Maxim Manuylov
*
* 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 ... | [
"\t\t\t\treturn new int[0];"
] | 431 | lcc | java | null | 9ebf3a9f0f2f7e7496ccd13c44ec7354a4a0230fe1f15f47 | |
/*
* Javassist, a Java-bytecode translator toolkit.
* Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. Alternatively, the contents of th... | [
" logging2(name + \"not found.\");"
] | 745 | lcc | java | null | 42eff230c4b79230f8b478baf6961fc54e1bad443af197c3 | |
/*
* ported to v0.37b7
* using automatic conversion tool v0.01
*/
package vidhrdw;
import static arcadeflex.fucPtr.*;
import static arcadeflex.libc_v2.*;
import static old.mame.drawgfx.*;
import static old.mame.drawgfxH.TRANSPARENCY_NONE;
import static mame.mame.Machine;
import static mame.osdependH.osd_bitmap;
impo... | [
" 16 + (~stactics_display_buffer.read(i) & 0x0f),"
] | 2,896 | lcc | java | null | 8d3d0541e92abe43d18a21fd5943d0fee67278670fbf48d8 | |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using SharpDX;
using LeagueSharp;
using LeagueSharp.Common;
using EloBuddy;
using L... | [
" .Distance(spell.From.To2D(), position.To2D(), true, true) <="
] | 1,895 | lcc | csharp | null | fe60cba2f4bf6cfc13feac0963a3f83ff7a28080318e5bde | |
///////////////////////////////////////////////////////////////////////////////
// For information as to what this class does, see the Javadoc, below. //
// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, //
// 2007, 2008, 2009, 2010, 2014, 2015 by Peter Spirtes, Richard Scheines, Joseph... | [
" final LinkedList<Node> path = new LinkedList<>();"
] | 1,093 | lcc | java | null | 513f349427eab3898c563f007083539809e961ebeaa5b59d | |
/**
* The i3DML Project
* Author: Keyvan M. Kambakhsh
*
* UNDER GPL V3 LICENSE
**/
using System;
using i3DML.ObjectModel.Components;
namespace i3DML.ObjectModel
{
/// <summary>
/// Provides a drawable or a container element.
/// </summary>
public abstract class Drawable : WorldElement,Ii3DMLIniti... | [
" if (pop[i] is PlaceBase)"
] | 756 | lcc | csharp | null | e1cfeee7b51ffa6e208f12e8fc7a842cb7e910013cd3b8fe | |
/*
* Kuali Coeus, a comprehensive research administration system for higher education.
*
* Copyright 2005-2016 Kuali, Inc.
*
* This program 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, eithe... | [
" else if (!this.getFileId().equals(other.getFileId())) {"
] | 677 | lcc | java | null | aebc1dbdefd0470032eb19b36673cec2767fbc28f3a13fd5 | |
using Server.Spells;
using Server.Targeting;
using System;
using System.Collections;
using System.Collections.Generic;
namespace Server.Items
{
public abstract class BaseConflagrationPotion : BasePotion
{
public abstract int MinDamage { get; }
public abstract int MaxDamage { get; }
publi... | [
" Mobile m = mobiles[i];"
] | 864 | lcc | csharp | null | 0e11139b864daa3a41696de69d95d0a294335165cb569f6a | |
#region Header
// Vorspire _,-'/-'/ Channel.cs
// . __,-; ,'( '/
// \. `-.__`-._`:_,-._ _ , . ``
// `:-._,------' ` _,`--` -: `_ , ` ,' :
// `---..__,,--' (C) 2016 ` -'. -'
// # Vita-Nex [http://core.vita-nex.com] #
// {o)xxx|===============- # -===============|xxx(o}... | [
"\t\t\t\twhile (HistoryCount >= WorldChat.CMOptions.HistoryBuffer)"
] | 964 | lcc | csharp | null | 1d26c663ec47ee3d35774aa3b47622ec574c5ea151b49857 | |
/*
* Copyright (C) 2000 - 2013 Silverpeas
*
* This program 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 version.
*
* As a spec... | [
" return mock.getAvailCompoIds(sClientSpaceId, sUserId);"
] | 882 | lcc | java | null | b519f9921c8764941f3609154c5ff4b26d6c0630555f325d | |
package com.bkoneti.fileManager.controller;
import android.app.Activity;
import android.app.DialogFragment;
import android.content.Intent;
import android.net.Uri;
import android.util.SparseBooleanArray;
import android.view.ActionMode;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.AbsList... | [
" files[++index] = (String) mListView.getItemAtPosition(key);"
] | 526 | lcc | java | null | 3bd9b54a05c3a1d9fac2ee41a5e9f728a8b777e66409b700 | |
package net.minecraft.server;
import com.google.common.collect.Queues;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext;
import io.netty.chan... | [
" if (this.m instanceof IUpdatePlayerListBox) {"
] | 598 | lcc | java | null | 12a85487bcc201bf5b2d1aed937af17781714f568e2f4f03 | |
# -*- coding: utf-8 -*-
"""
BIRRP
===========
* deals with inputs and outputs from BIRRP
Created on Tue Sep 20 14:33:20 2016
@author: jrpeacock
"""
#==============================================================================
import numpy as np
import os
import subprocess
import time
from datetime import datetime... | [
" ll = z_index_dict[z_key][1]"
] | 3,693 | lcc | python | null | fbd2ce3fa32ecbd53cedd8e6e94c4011c99d452dc926cd2e | |
package org.thoughtcrime.securesms.util;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.AsyncTask;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.support.annotation.UiThread;
im... | [
" return context.getString(resourceOne, name);"
] | 625 | lcc | java | null | 952e4fb549d3a952e37556b53313cdbf932f75f456f15901 | |
# 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://opensource.org/licenses/MIT>, at your
#... | [
" env[\"PATH\"] = \"%s%s%s\" % ("
] | 635 | lcc | python | null | d5aeb3ac7b9ce924600b49b84fc825d3230cb90e4711eb37 | |
import json
import os
import re
from collections import defaultdict
from six import iteritems, itervalues, viewkeys
from .item import ManualTest, WebdriverSpecTest, Stub, RefTestNode, RefTest, TestharnessTest, SupportFile, ConformanceCheckerTest, VisualTest
from .log import get_logger
from .utils import from_os_path, t... | [
" for path, manifest_tests in iteritems(type_paths):"
] | 530 | lcc | python | null | 94a45bef4dfbdc205ca29907ce87ecff9c3d6548141c05a7 | |
/*
* Freeplane - mind map editor
* Copyright (C) 2012 Dimitry
*
* This file author is Dimitry
*
* 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
... | [
" if (compiledScript != null) {"
] | 651 | lcc | java | null | 8c9bb2b76a046b253799f5ca041ded912c0cd8fc4381f3c1 | |
// CANAPE Network Testing Tool
// Copyright (C) 2014 Context Information Security
//
// 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
// (... | [
" throw new NotSupportedException();"
] | 659 | lcc | csharp | null | a1513f998bc527a864d8e16254a66a40d622fcb15412fae3 | |
"""
Contains an abstract base class that supports data transformations.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
import os
import numpy as np
import warnings
from functools import partial
from deepchem.utils.save import save_to_disk
from deepchem.... | [
" for i in range(energy.size):"
] | 874 | lcc | python | null | fb636e04ae087216fc1ed273e49b1e03ab82872bf4ab05e0 | |
//#############################################################################
//# #
//# Copyright (C) <2014> <IMS MAXIMS> #
//# #
... | [
"\t\tif(caseInsensitive); // this is to avoid eclipse warning only."
] | 664 | lcc | java | null | 9516693902335ad7c898f1e9ec8d1799680dac2988c0259d | |
/*******************************************************************************
* Copyright (c) 2012-2016 Codenvy, S.A.
* 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 ... | [
" for (StackImpl stack : stacks) {"
] | 498 | lcc | java | null | 1dba3395659d0bbbbc35a3da100e582c60c44de0cdd4c2e8 | |
package org.tanaguru.service;
import junit.framework.TestCase;
import org.tanaguru.crawler.CrawlerFactory;
import org.tanaguru.entity.audit.Audit;
import org.tanaguru.entity.audit.AuditImpl;
import org.tanaguru.entity.parameterization.*;
import org.tanaguru.entity.service.parameterization.ParameterDataService;
import o... | [
" ParameterElement ped = new ParameterElementImpl();"
] | 593 | lcc | java | null | bac49e73188f1e4ebc882afd8cd6cc4798333341297fb191 | |
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using Loyc;
using Loyc.Collections;
using S = Loyc.Syntax.CodeSymbols;
namespace Loyc.Syntax
{
/// <summary>Standard extension methods for <see cref="LNode"/>.</summary>
public static class LNodeExt
{
#r... | [
"\t\t\tif (kind == LNodeKind.Id && candidate.Name != pattern.Name)"
] | 1,713 | lcc | csharp | null | a330393b411f537b7da68d95f8343c7628953903c26432d2 | |
using EloBuddy; namespace KoreanZed
{
using LeagueSharp;
using LeagueSharp.Common;
using System.Linq;
using System;
using System.Collections.Generic;
using KoreanZed.Enumerators;
using KoreanZed.QueueActions;
using SharpDX;
class ZedShadows
{
private readonly ZedMenu zedM... | [
" if (colisionList.Count > extendedWillHit)"
] | 603 | lcc | csharp | null | 72337b5e2ebcaf24dc3e9b1e0609516992166e68a738bdea | |
//#############################################################################
//# #
//# Copyright (C) <2015> <IMS MAXIMS> #
//# #
... | [
"\t\tcontextMenus = new ContextMenus();"
] | 1,735 | lcc | java | null | caf4ee2315e7782e651f443c2b635e258cb5c7aea3ede55c | |
"""
Install Python and Node prerequisites.
"""
import hashlib
import os
import re
import subprocess
import sys
from distutils import sysconfig
from paver.easy import BuildFailure, sh, task
from .utils.envs import Env
from .utils.timer import timed
PREREQS_STATE_DIR = os.getenv('PREREQ_CACHE_DIR', Env.REPO_ROOT / '.prer... | [
" return bool(re.search(pattern, frozen_output))"
] | 1,046 | lcc | python | null | cfdc68693b8867678092d17fdb043cc34839f37798d88a62 | |
# -*- coding: utf-8 -*-
"""
Test for the pseudo-form implementation (odoo.tests.common.Form), which should
basically be a server-side implementation of form views (though probably not
complete) intended for properly validating business "view" flows (onchanges,
readonly, required, ...) and make it easier to generate sen... | [
" 'subs': [(0, 0, {})]"
] | 1,031 | lcc | python | null | 2bdd8408d0651a7c4efb3a83615391556c9a2af978875365 | |
from sympy import (
Abs, And, binomial, Catalan, cos, Derivative, E, Eq, exp, EulerGamma,
factorial, Function, harmonic, I, Integral, KroneckerDelta, log,
nan, Ne, Or, oo, pi, Piecewise, Product, product, Rational, S, simplify,
sin, sqrt, Sum, summation, Symbol, symbols, sympify, zeta, gamma, Le,
In... | [
" b, v = symbols('b, v', integer = True)"
] | 4,519 | lcc | python | null | 77bc1815b31202f2c431f0bd2c1ea65d6386dcbf74514e10 | |
using UnityEngine;
using System;
using LuaInterface;
using SLua;
using System.Collections.Generic;
public class Lua_UnityEngine_WWW : LuaObject {
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static public int constructor(IntPtr l) {
try {
int argc = LuaDLL.lua_gettop(l);
UnityEngine.WWW o;
if(argc... | [
"\t\t\tint argc = LuaDLL.lua_gettop(l);"
] | 427 | lcc | csharp | null | 124c1846577ae2e5fcc64e558a68b1f71e80770b1c6f377f | |
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace System.Collections.Specialized
{
#if !NETFX_CORE
public class NotifyCollectionChangedEventArgs : EventArgs
{
#region " Attributes "
private NotifyCollectionChangedAction _notifyAction;
private IList _newIt... | [
" this.InitializeAdd(action, changedItems, startingIndex);"
] | 756 | lcc | csharp | null | b64722de0a50cd03fec807399570eeb10ac2b39da7a8d5e3 | |
/*******************************************************************************
* Copyright (c) 1998, 2015 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 Eclipse Distribution License v. 1.0
... | [
" int sizeAfter = getNamespaceResolverSize(desc);"
] | 1,329 | lcc | java | null | 8a2fd200c0170fc660f3939cf1ac96106dc7e05cbcd739ea | |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CmsData.QueryBuilder;
using UtilityExtensions;
namespace CmsData
{
public class QueryParser
{
private readonly QueryLexer lexer;
private readonly string text;
public QueryParser(string s)
... | [
" c.Campus = Token2Csv();"
] | 714 | lcc | csharp | null | c6257bab33edefa6c3e6aa0a9b46d09d5375b9c450a0c307 | |
//
// System.Drawing.Icon.cs
//
// Authors:
// Gary Barnett (gary.barnett.mono@gmail.com)
// Dennis Hayes (dennish@Raytek.com)
// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
// Sanjay Gupta (gsanjay@novell.com)
// Peter Dennis Bartok (pbartok@novell.com)
// Sebastien Pouliot <sebastien@ximian.com>
//
//... | [
"Console.WriteLine (\"\\tide.width: {0}\", ide.width);"
] | 2,756 | lcc | csharp | null | 7535856a01a07c6c689fb46424b279e43fe483d635ef3bbc | |
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to th... | [
" if ((l.status & VISITED2) != 0) {"
] | 3,107 | lcc | java | null | ccd61a72c442c4312744465333f1834fbb9aa1fdbd7f909c | |
#if CSHotFix
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;
using CSHotFix.CLR.TypeSystem;
using CSHotFix.CLR.Method;
using CSHotFix.Runtime.Enviorment;
using CSHotFix.Runtime.Intepreter;
using CSHotFix.Runtime.Stack;
using CSHotFix.Reflection;
using CSHo... | [
" ptr_of_this_method = ILIntepreter.Minus(__esp, 1);"
] | 599 | lcc | csharp | null | f0c18c81b769fb90470c8df8bae97ef061380d5b8dcb9b40 | |
package de.tudresden.slr.ui.chart.settings.pages;
import org.eclipse.birt.chart.model.attribute.LineStyle;
import org.eclipse.birt.chart.model.attribute.Position;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.SelectionEve... | [
"\t\t\tif(position == Position.INSIDE_LITERAL) {"
] | 620 | lcc | java | null | 6cd281e781038f9d58715d430ef4da8a82ec9cd5572bd6bb | |
import Util
import time
import unittest
import tAnimator
import selectBrowser
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.u... | [
" currImageValue = self._getCurrentValue( driver, \"Image\")"
] | 3,277 | lcc | python | null | 94c4df74ebdbcfad6ff07c35a32605e7d576c977242ba25c | |
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com>
# Copyright (C) 2013-2014 science + computing ag
# Author: Sebastian Deiss <sebastian.deiss@t-online.de>
#
#
# This file is part of paramiko.
#
# Paramiko is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser Gene... | [
" if (self.f < 1) or (self.f > self.p - 1):"
] | 1,912 | lcc | python | null | 5aa80682c87ae812a93e6bb27ac638d91789e7695186311c | |
/*
* SLD Editor - The Open Source Java SLD Editor
*
* Copyright (C) 2016, SCISYS UK Limited
*
* 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 yo... | [
" if (disableTreeSelection) {"
] | 908 | lcc | java | null | b607483b0c82f02c516bc92ffc69d9d3747ea0eaf71ca58a | |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution, third party addon
# Copyright (C) 2004-2015 Vertel AB (<http://vertel.se>).
#
# This program is free software: you can redistribute it and/or modify
# it under... | [
" (self.employee_id, from_date, to_date, code))"
] | 836 | lcc | python | null | 7c44f14dfd55d7192d94587a0e3d0cb5b2dd53c6dd46b6f6 | |
import os
import sys
import time
import config
import numpy as np
from numpy import vectorize
from scipy import interpolate, integrate
from scipy import special
from scipy.interpolate import UnivariateSpline, InterpolatedUnivariateSpline
from scipy.ndimage.filters import gaussian_filter
import pylab as pl
from numba im... | [
" if config.MF =='Tinker':"
] | 1,377 | lcc | python | null | a4496fc9e2bf0797e31ad91e16fcbb8eef95cbc5986bb746 | |
// $Id: FigSingleLineText.java 132 2010-09-26 23:32:33Z marcusvnac $
// Copyright (c) 1996-2008 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
// agreement is hereby granted, p... | [
" if (font == null) {"
] | 924 | lcc | java | null | d18db499c41a15c135ce3f82d3cc62afdcd46c02c9a100e3 | |
import numpy as np
from numpy.linalg import inv
import os
#see detail comments in hexahedra_4
x0_v,y0_v,z0_v=np.array([1.,0.,0.]),np.array([0.,1.,0.]),np.array([0.,0.,1.])
#anonymous function f1 calculating transforming matrix with the basis vector expressions,x1y1z1 is the original basis vector
#x2y2z2 are basis of ne... | [
" for theta in np.arange(0,np.pi,theta_res):"
] | 800 | lcc | python | null | 837dcdc595cabd1df2ffe38aeec0464032bc96b95bb36f75 | |
namespace SampleRithmic
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows;
using Ecng.Common;
using Ecng.Xaml;
using MoreLinq;
using Ookii.Dialogs.Wpf;
using StockSharp.Messages;
using StockSharp.BusinessEntities;
using StockSharp.Rithmic;
using StockSharp.L... | [
"\t\t\tif (window.Visibility == Visibility.Visible)"
] | 471 | lcc | csharp | null | a50aee631ed0face644834967b1fc81b37cc66c1782f1e1a | |
import ROOT
from ..core import Object, isbasictype, snake_case_methods
from .core import Plottable, dim
from ..objectproxy import ObjectProxy
from ..registry import register
from .graph import Graph
from array import array
class DomainError(Exception):
pass
class _HistBase(Plottable, Object):
TYPES = {
... | [
" for n in xrange(params[0]['nbins'] + 1)]"
] | 2,054 | lcc | python | null | 7ca84608f996fd9789e4cbc658213c13482f990b4ea1c34e | |
package protocol.xmpp;
import android.util.Log;;
import protocol.Contact;
import protocol.Protocol;
import ru.sawim.comm.Util;
import ru.sawim.io.RosterStorage;
import ru.sawim.listener.OnMoreMessagesLoaded;
import ru.sawim.roster.RosterHelper;
import java.util.HashSet;
import java.util.concurrent.ConcurrentHashMap;
/*... | [
" if (contact.setLastMessageTransmitted(query.getEnd())) {"
] | 630 | lcc | java | null | e745ca2cc98ac1c0224978f820c9902c973ae8afb16c93ec | |
"""
piecewise affine equalization ipol demo web app
"""
from lib import base_app, build, http, image
from lib.misc import ctime
from lib.base_app import init_app
import shutil
import cherrypy
from cherrypy import TimeoutError
import os.path
import time
import PIL.Image
import PIL.ImageDraw
class app(base_app):
""" ... | [
" im1L = im1.convert(\"L\", rgb2I)"
] | 756 | lcc | python | null | 0c4383dd82b695a9c0f842643d57d89b5f9deac30eb27285 | |
/* NFC Reader 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.
NFC Reader is distributed in the hope that it will be useful,
but WITHOUT ANY W... | [
"\t\t\tfor (int i = 1; i <= MAX_LOG; ++i) {"
] | 702 | lcc | java | null | 22e513a622143cc52cb34624fc06151012a9995c967df13c | |
"""
ACE parser
From wotsit.org and the SDK header (bitflags)
Partial study of a new block type (5) I've called "new_recovery", as its
syntax is very close to the former one (of type 2).
Status: can only read totally file and header blocks.
Author: Christophe Gisquet <christophe.gisquet@free.fr>
Creation date: 19 januar... | [
" return \"Block: %s\" % self[\"type\"].display"
] | 952 | lcc | python | null | 5772539578239747ccdb82c5a9bc47b7df833cf9c67b1225 | |
/**
* <pre>
* The owner of the original code is Ciena Corporation.
*
* Portions created by the original owner are Copyright (C) 2004-2010
* the original owner. All Rights Reserved.
*
* Portions created by other contributors are Copyright (C) the contributor.
* All Rights Reserved.
*
* Contributor(s):
* (Co... | [
"\t\tif (socketAdapter != null) {"
] | 1,211 | lcc | java | null | 8eee41f139373f09ef454c2f6997710fa102d97316c455fe | |
"""This class holds Cheroot WSGI server implementation.
Simplest example on how to use this server::
from cheroot import wsgi
def my_crazy_app(environ, start_response):
status = '200 OK'
response_headers = [('Content-type','text/plain')]
start_response(status, response_headers)
r... | [
" path = environ['PATH_INFO'] or '/'"
] | 1,313 | lcc | python | null | c4b5d72178219c00e3466b9a8a3483f56036128b3ffe4348 | |
import sys
from copy import deepcopy as copy
from utils import *
from data import Data
from math import log
from bitarray import bitarray
class Model :
def __init__( self , dataobj = None , modelfile = None ) :
if dataobj :
self.data = dataobj
self.initialize()
if modelfile :
self.loadmodel( modelfile )
... | [
"\t\tdatasetfile , field , parents = sys.argv[ 1: ]"
] | 1,784 | lcc | python | null | 3f302be0d966385442a6296e30fa6c4cf6c4bd891c7e8b20 | |
using System;
using Server.Items;
using Server.Targeting;
using Server.Mobiles;
using System.Collections.Generic;
namespace Server.Engines.Craft
{
public enum EnhanceResult
{
None,
NotInBackpack,
BadItem,
BadResource,
AlreadyEnhanced,
Success,
Failure,
... | [
" int random = Utility.Random(100);"
] | 976 | lcc | csharp | null | 218d7b3f8d5e93240d972dc518c5b9e0fe4372b38cd94b33 | |
from typing import Optional, List, Iterable, Dict, Any, Type, Union
import re
from collections import OrderedDict
from xml.dom import minidom
from systemrdl import RDLCompiler, RDLImporter
from systemrdl import rdltypes
from systemrdl.messages import SourceRefBase
from systemrdl import component as comp
from . import t... | [
" entries[entry_name] = (entry_value, displayname, desc)"
] | 2,406 | lcc | python | null | 585e8ba1eb1b3be2a7a81d0eebb3178d8d03ec8aea535999 | |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Configuration;
using System.IO;
using System.Collections;
using System.Reflection;
namespace FOG
{
public partial class FrmSetup : Form
... | [
" Label noneFound = new Label();"
] | 451 | lcc | csharp | null | c8bb6c7b2115807916ef0d828a186d6e698ed8a7962bc728 | |
/********
* This file is part of Ext.NET.
*
* Ext.NET 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 version.
*
* Ext.NE... | [
" object obj = this.ViewState[\"SubmitText\"];"
] | 1,411 | lcc | csharp | null | 211036deb12c17fbe2d6904e590bcf927cced0a233eb0c78 | |
/**
* this file is part of Voxels
*
* Voxels 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.
*
* Voxels is distributed in the ... | [
" int ti = 0, ci = 0, vi = 0;"
] | 1,502 | lcc | java | null | 374f798258a61ee74e40065b162fa268f1abb4cffaf4ed85 | |
# lint-amnesty, pylint: disable=missing-module-docstring
import json
import logging
import sys
from functools import wraps
import calc
import crum
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.http import Http404, HttpResponse, HttpResponseForbidden, HttpResponse... | [
" exposedHeaders += f', {header}' if exposedHeaders else header"
] | 796 | lcc | python | null | 7ffdfbe9a1f219ca6e4ba947f389a17ae4f1378b03a7c921 | |
// Copyright (c) 2004-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
//
// MySQL Connector/NET is licensed under the terms of the GPLv2
// <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
// MySQL Connectors. There are special exceptions to the terms and
// conditions of the GPLv2 as it is applied ... | [
" Driver d = idlePool.Peek();"
] | 1,070 | lcc | csharp | null | 07673406347dbc81c33565aadcb582257991cdab25eab669 | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2019-2021 Pyresample developers
#
# 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 3 of the License, or (at y... | [
" var = (float(var), float(var))"
] | 3,675 | lcc | python | null | b2e9852774a64a45a97fb402afdda4bca2ad6f026ab0a353 | |
# Stolen Dignity version 0.1
# by DrLecter
import sys
from com.l2scoria import Config
from com.l2scoria.gameserver.model.quest import State
from com.l2scoria.gameserver.model.quest import QuestState
from com.l2scoria.gameserver.model.quest.jython import QuestJython as JQuest
#Quest info
QUEST_NUMBER,QUEST_NAME,QUEST_D... | [
"CREATED = State('Start', QUEST)"
] | 755 | lcc | python | null | 733108e23bea8f0fe687224256eb5c0b58a30b29f6ce051d | |
using System;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Xml.Serialization;
namespace Kasuga
{
[Serializable]
public struct PlayTime
{
public static PlayTime Zero;
public static PlayTime Empty;
public static Regex TimeTagRegex;
public static Regex HeadTimeTagRegex;
public s... | [
"\t\t\t\t\tdouble? seconds1 = this.Seconds;"
] | 1,143 | lcc | csharp | null | 9e42cec6ffd16ad23a4bdd0f6b04734f621a0d2df6c78eb4 | |
/**
* Copyright (c) 2013 James King [metapyziks@gmail.com]
*
* This file is part of OpenTKTK.
*
* OpenTKTK 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 you... | [
" _attributes = new List<AttributeInfo>();"
] | 661 | lcc | csharp | null | 4ec18b2c8f603cf68ea65e3606254e77895f2945bbc43537 | |
from warnings import warn
from copy import deepcopy, copy
from six import iteritems, string_types
from ..solvers import optimize
from .Object import Object
from .Solution import Solution
from .Reaction import Reaction
from .DictList import DictList
# Note, when a reaction is added to the Model it will no longer keep pe... | [
" for l in (self.reactions, self.genes, self.metabolites):"
] | 1,227 | lcc | python | null | 291eb52753b18a31b084cd6c13d64847dd010ab270cd7bff | |
//#############################################################################
//# #
//# Copyright (C) <2015> <IMS MAXIMS> #
//# #
... | [
"\t\tif(beans == null)"
] | 778 | lcc | java | null | f963d6d0a6afee2f2e97ceb0f221aca6ff419e9f3f0e1a2b | |
/**
* ===========================================
* Java Pdf Extraction Decoding Access Library
* ===========================================
*
* Project Info: http://www.jpedal.org
* (C) Copyright 1997-2008, IDRsolutions and Contributors.
*
* This file is part of JPedal
*
This library is free software; you can r... | [
"\t\t\t\tcx = lines[selectedLine].getCenterX();"
] | 1,861 | lcc | java | null | e78664cfc18ba1345c5f345deba0b09a64d425e203bdff71 | |
/*
* Zirco Browser for Android
*
* Copyright (C) 2010 - 2011 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distribute... | [
" new LayoutAnimationController(set, 0.5f);"
] | 730 | lcc | java | null | ecfe82f294b057561aa2f9cd0122f2dbc5fb0dae134d8df8 | |
//
// DO NOT REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
//
// @Authors:
// wolfgangb
//
// Copyright 2004-2013 by OM International
//
// This file is part of OpenPetra.org.
//
// OpenPetra.org is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as pub... | [
" if (PartnerInterestRow.RowState != DataRowState.Deleted)"
] | 803 | lcc | csharp | null | 0927453c4d51d5c9eef3799b0ae56d6daebdb8afabc59c38 | |
// <TMSEG: Prediction of Transmembrane Helices in Proteins.>
// Copyright (C) 2014 Michael Bernhofer
//
// 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... | [
"\t\tint[] \t\tscoresTmh \t= new int[length];"
] | 569 | lcc | java | null | 86d39eb1a6f382a4d98e5d61ed62ae7c8942fd177b543add |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.