prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Gfx-rs Developers. // // 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-...
#[macro_use] extern crate log;
<|file_name|>ResultAssociator.java<|end_file_name|><|fim▁begin|>package com.exabilan.interfaces; import java.util.List; import com.exabilan.types.exalang.Answer; import com.exabilan.types.exalang.ExaLang; import com.exabilan.types.exalang.Question; public interface ResultAssociator { /** * Finds the questi...
<|file_name|>arrayShift.js<|end_file_name|><|fim▁begin|>/** * Created by zad on 17/4/20. */ /** to left shift an Array * @param {Array} arr * @param {Number} num * @return {Array} */ function leftShift(arr, num) { const result = arr.concat();<|fim▁hole|> return rightShift(arr, -num); } while (num > 0) { ...
if (num < 0) {
<|file_name|>modules_handler.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2007 Google Inc. # # 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...
def get(self): values = {'modules': self.dispatcher.modules} self.response.write(self.render('modules.html', values))
<|file_name|>cache.py<|end_file_name|><|fim▁begin|>from __future__ import annotations import abc import shutil import functools from pathlib import Path import urllib.parse<|fim▁hole|>import logging from edgar_code.types import PathLike, Serializer, UserDict from edgar_code.util.picklable_threading import RLock logge...
from typing import ( Callable, Any, TypeVar, cast, Tuple, Dict, Optional, Union, Hashable, )
<|file_name|>ojrunnerlinux.py<|end_file_name|><|fim▁begin|>import lorun import os import codecs import random import subprocess import config import sys RESULT_MAP = [ 2, 10, 5, 4, 3, 6, 11, 7, 12 ] class Runner: def __init__(self): return def compile(self, judger, srcPath, outPath): cmd ...
<|file_name|>value.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Delix Project Authors. See the AUTHORS file at the top level directory. // // 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 Licen...
<|file_name|>mpunreachnlri.py<|end_file_name|><|fim▁begin|># Copyright 2015-2017 Cisco Systems, Inc. # All rights reserved. # # 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 # # h...
return dict(afi_safi=(afi, safi), withdraw=repr(nlri_bin)) @classmethod
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licens...
<|file_name|>br.js<|end_file_name|><|fim▁begin|>/* * /MathJax/localization/br/br.js * * Copyright (c) 2009-2015 The MathJax Consortium * * 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...
<|file_name|>contingency.py<|end_file_name|><|fim▁begin|>import math import numpy as np from Orange import data def _get_variable(variable, dat, attr_name, expected_type=None, expected_name=""): failed = False if isinstance(variable, data.Variable): datvar = getattr(dat, "variable", ...
def __setitem__(self, index, value):
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 Ethcore (UK) Ltd. // This file is part of Parity. // Parity 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...
}
<|file_name|>wikipedia.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 # -*- coding: utf-8 -*- # https://en.wikipedia.org/w/index.php?title=List_of_computing_and_IT_abbreviations&action=edit import re, urllib2 from collections import defaultdict from BeautifulSoup import BeautifulSoup pull = lambda url: urlli...
# okay, there is just the one for now ad = computing_abbrev() stk = stock()
<|file_name|>serverLeavRoomTest.js<|end_file_name|><|fim▁begin|>//TODO : socket.ioコネクション処理を1.0推奨の非同期方式にする describe('serverクラスのテスト', function() { var SERVER_PORT = process.env.PORT || 3000; var SERVER_URL = 'http://localhost:'+SERVER_PORT; var assert = require('chai').assert; var io = require('socket.io...
}); });
<|file_name|>euler-169-sum-of-powers-of-2.py<|end_file_name|><|fim▁begin|>""" sum(2 * 2**i for i in range(i)) == 2 * (2**i - 1) == n i == log_2(n // 2 + 1) """ from math import ceil, log import time def count_ways(n, current_power=None, memo=None): if memo is None: memo = {} if current_power is None:...
<|file_name|>carousel_impl.js<|end_file_name|><|fim▁begin|>window.addEvent("domready", function() { var carousel = new iCarousel("carousel_content", { idPrevious: "carousel_prev", idNext: "carousel_next", idToggle: "undefined", item: { klass: "carouselitem_right", ...
$('carousel_link'+index).addClass('active'); }); }); });
<|file_name|>put.rs<|end_file_name|><|fim▁begin|>extern crate curl; extern crate rustc_serialize; use self::curl::http; pub fn new(server: &str, port: &str, key: &str, data: &str, verbose: bool) { // build url from input values let url = format!("http://{}:{}/v1/kv/{}", server, port, key); // verbose: p...
let resp = match http::handle().put(url, data).exec() { Ok(resp) => resp, Err(err) => panic!("error putting k/v. {}", err), };
<|file_name|>decorated_type_id.hpp<|end_file_name|><|fim▁begin|>// Copyright David Abrahams 2002. Permission to copy, use, // modify, sell and distribute this software is granted provided this // copyright notice appears in all copies. This software is provided // "as is" without express or implied warranty, and with n...
inline bool decorated_type_info::operator<(decorated_type_info const& rhs) const { return m_decoration < rhs.m_decoration || m_decoration == rhs.m_decoration
<|file_name|>WebODF.java<|end_file_name|><|fim▁begin|>/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file ...
<|file_name|>GGraph.cpp<|end_file_name|><|fim▁begin|>// ---------------------------------------------------------------------- // CMP experimental environment // // (c) Nikita Nikitin, UPC LSI // nikita.i.nikitin@gmail.com // // File GGraph.cpp // Created May 03, 2011 // --------------------------------...
/* * Factory method for vertex: creates GVertex object. */
<|file_name|>format.rs<|end_file_name|><|fim▁begin|>use std::fmt; use std::cell::RefCell; /// Format all iterator elements lazily, separated by `sep`. /// /// The format value can only be formatted once, after that the iterator is /// exhausted. /// /// See [`.format_with()`](../trait.Itertools.html#method.format_with...
pub fn new_format_default<'a, I>(iter: I, separator: &'a str) -> Format<'a, I> where I: Iterator, { Format {
<|file_name|>AlertTypesListDTO.java<|end_file_name|><|fim▁begin|>package org.wso2.carbon.apimgt.rest.api.publisher.v1.dto; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.ArrayList; import java.util.List; import org.wso2.carbon.apimgt.rest.api...
@ApiModelProperty(example = "3", value = "The number of alerts")
<|file_name|>simulation.py<|end_file_name|><|fim▁begin|># Copyright (C) 2015 SensorLab, Jozef Stefan Institute http://sensorlab.ijs.si # # Written by Tomaz Solc, tomaz.solc@ijs.si # # This work has been partially funded by the European Community through the # 7th Framework Programme project CREW (FP7-ICT-2009-258301). ...
self.frequency = frequency
<|file_name|>test_mda.py<|end_file_name|><|fim▁begin|>import unittest from pyxt.mda import * from pyxt.chargen import CharacterGeneratorMock class MDATests(unittest.TestCase): def setUp(self): self.cg = CharacterGeneratorMock(width = 9, height = 14) self.mda = MonochromeDisplayAdapter(self.cg) ...
<|file_name|>get-debug.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1<|fim▁hole|><|fim▁end|>
oid sha256:8a773d7f07d6a2ce3c6379427f1a5aa12f7545b4da9579eae9b6a31ec13a11b7 size 43336
<|file_name|>constants.py<|end_file_name|><|fim▁begin|>DEBUG = 0 # cardinal diretions directions = ("left","up","right","down") # logic maxExamined = 75000 # maximum number of tries when solving maxMoves = 19 # maximum number of moves cullFrequency = 75000 # number of tries per cull update cullCutoff = 1.2 # fraction...
textCalculateCurrentCombos = "Calculate Damage" textClose = "Close" textDamageDisplayAmount = "Total: "
<|file_name|>intention_test.go<|end_file_name|><|fim▁begin|>package state import ( "testing" "time" "github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/go-memdb" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestStore_IntentionGet_none(t *testing.T) { assert :...
}, }, },
<|file_name|>ad_src_tf_phase_misfit.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ An implementation of the time frequency phase misfit and adjoint source after Fichtner et al. (2008). :copyright: Lion Krischer (krischer@geophysik.uni-muenchen.de), 2013 :license: GNU General ...
text = "Misfit: %.4f" % phase_misfit tf_axis.text(x=0.99, y=0.02, s=text, transform=tf_axis.transAxes,
<|file_name|>classes_75.js<|end_file_name|><|fim▁begin|>var searchData=<|fim▁hole|> ['utils',['utils',['../classsrc_1_1tests_1_1utils_1_1utils_1_1utils.html',1,'src::tests::utils::utils']]] ];<|fim▁end|>
[
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>error_chain! {<|fim▁hole|><|fim▁end|>
}
<|file_name|>bibexport_method_fieldexporter_webinterface.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ## $Id: webmessage_webinterface.py,v 1.13 2008/03/12 16:48:08 tibor Exp $ ## ## This file is part of Invenio. ## Copyright (C) 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it a...
# load the right message language language = argd["ln"] _ = gettext_set_language(language)
<|file_name|>removed-syntax-with-1.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at<|fim▁hole|>// // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-...
// http://rust-lang.org/COPYRIGHT.
<|file_name|>contextlib.py<|end_file_name|><|fim▁begin|># Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: contextlib import sys from functools import wraps from warnings import warn __all__ = ['contextmanager', 'nested', 'closing'] class GeneratorContextManager(object): def __init__(self, gen): ...
return helper
<|file_name|>htmlobjectelement.rs<|end_file_name|><|fim▁begin|>/* 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/. */ use dom::attr::Attr; use dom::bindings::cell::DOMRe...
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>import os import sys def readable_dir(prospective_dir):<|fim▁hole|> returns true if all these three are the case :param prospective_dir: path to the directory""" if prospective_dir is not None: if not os.path.isdir(prospective_dir): ...
""" Function that checks if a path is a directory, if it exists and if it is accessible and only
<|file_name|>FuzzingDialog.py<|end_file_name|><|fim▁begin|>import math from PyQt5.QtCore import Qt, pyqtSlot from PyQt5.QtGui import QCloseEvent from PyQt5.QtWidgets import QDialog, QInputDialog from urh import settings from urh.models.FuzzingTableModel import FuzzingTableModel from urh.signalprocessing.ProtocoLabel ...
n = self.ui.spinBoxNumberRandom.value() minimum = self.ui.spinBoxRandomMinimum.value()
<|file_name|>core_test.go<|end_file_name|><|fim▁begin|><|fim▁hole|>import "testing" //totally trivial, I know func TestOperationList(t *testing.T) { var operations []Operation = operationList() if operationLength := len(operations); operationLength != 3 { t.Error("Expected 2 operations in list but got ", operation...
package main
<|file_name|>GlassWidget.py<|end_file_name|><|fim▁begin|># Copyright 2006 James Tauber and contributors # Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net> # Copyright (C) 2010 Serge Tarkovski <serge.tarkovski@gmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use...
self.setGlassPosition() doc().body.appendChild(self.getElement()) Window.addWindowResizeListener(self)
<|file_name|>fps.py<|end_file_name|><|fim▁begin|># Copyright 2016 ARM Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
the workload. :janks: The number of "janks" that occurred during execution of the
<|file_name|>client.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2017 Chef Software Inc. and/or applicable contributors // // 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:...
pub fn is_stopping(&self) -> bool { match Self::try_recv::<protocol::Shutdown>(&self.rx) {
<|file_name|>block_holder.py<|end_file_name|><|fim▁begin|>from biicode.common.model.cells import SimpleCell from biicode.common.model.dependency_set import DependencySet from biicode.common.model.brl.block_name import BlockName from biicode.common.model.symbolic.block_version_table import BlockVersionTable from biicode...
<|file_name|>launcher.py<|end_file_name|><|fim▁begin|># # Copyright (C) 2014 # Sean Poyser (seanpoyser@gmail.com) # # 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 ...
<|file_name|>rpath.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lice...
let res = get_rpath_relative_to_output(o, &Path("bin/rustc"), &Path("lib/libstd.so"));
<|file_name|>runtests.py<|end_file_name|><|fim▁begin|>""" A standalone test runner script, configuring the minimum settings required for tests to execute. Re-use at your own risk: many Django applications will require different settings and/or templates to run their tests. """ import os import sys # Make sure the ...
# Minimum settings required for the app's tests. SETTINGS_DICT = {
<|file_name|>test_utils.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from nose.tools import (<|fim▁hole|> raises, ) from py3oauth2.utils import ( normalize_netloc, normalize_path, normalize_query, normalize_url, ) def test_normalize_url(): eq_(normalize_url('http://a/b/c/%7Bfoo%7D')...
eq_,
<|file_name|>myapp.py<|end_file_name|><|fim▁begin|># imports ## core <|fim▁hole|>import pprint import sys import StringIO ## 3rd party import cherrypy import requests ## local def full_path(*extra): return os.path.join(os.path.dirname(__file__), *extra) sys.path.insert(0, full_path()) import db logging.basicCo...
import importlib import logging import os
<|file_name|>tests.py<|end_file_name|><|fim▁begin|># Copyright 2012, Julius Seporaitis # # 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 # # U...
if __name__ == '__main__': unittest.main()
<|file_name|>generic.py<|end_file_name|><|fim▁begin|>from aioredis.util import wait_convert, wait_ok, _NOTSET, _ScanIter class GenericCommandsMixin: """Generic commands mixin. For commands details see: http://redis.io/commands/#generic """ def delete(self, key, *keys): """Delete a key.""" ...
"", dest_db, timeout, *flags)
<|file_name|>run.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Wrapper for `python -m` to make running tools simpler. A tool is defined as a pyth...
import imp
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>mock_sdb = base_decorator(sdb_backends)<|fim▁end|>
"""sdb module initialization; sets value for base decorator.""" from .models import sdb_backends from ..core.models import base_decorator
<|file_name|>fail-macro-fmt.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/...
fail!("test-fail-fmt {} {}", 42i, "rust"); }
<|file_name|>StatefulComponent.stories.tsx<|end_file_name|><|fim▁begin|>import { BlueRain, BlueRainConsumer, withBlueRain } from '../../../src'; import React from 'react'; import storiesOf from '@blueeast/bluerain-storybook-addon'; storiesOf('StatefulComponent', module) .add('StatefulComponent children function prop'...
)}
<|file_name|>showdown.test.js<|end_file_name|><|fim▁begin|>/*global Showdown*/ describe('$showdown', function () { 'use strict'; beforeEach(module('pl.itcrowd.services')); it('should be possible to inject initialized $showdown converter', inject(function ($showdown)<|fim▁hole|> { expect($showdo...
<|file_name|>addressbook_send.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2013-2014 Sandstorm Development Group, Inc. and contributors // Licensed under the MIT License: // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "S...
} }
<|file_name|>InstanceCountNode.java<|end_file_name|><|fim▁begin|>/* * * Autopsy Forensic Browser * * Copyright 2018 Basis Technology Corp. * Contact: carrier <at> sleuthkit <dot> org * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
public <T> T accept(DisplayableItemNodeVisitor<T> visitor) { return visitor.visit(this);
<|file_name|>grade_school.py<|end_file_name|><|fim▁begin|>class School: def __init__(self): pass def add_student(self, name, grade): pass def roster(self): pass<|fim▁hole|> pass def added(self): pass<|fim▁end|>
def grade(self, grade_number):
<|file_name|>BaseCompilerTest.java<|end_file_name|><|fim▁begin|>/* * Copyright 2018 Red Hat, Inc. and/or its affiliates. * * 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:...
System.setProperty("org.uberfire.nio.git.daemon.enabled", "false");
<|file_name|>train.py<|end_file_name|><|fim▁begin|>import json, sys, glob, datetime, math, random, pickle, gzip import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm import chainer from chainer import computational_graph as c from chainer import cuda import chainer.functions as F from chainer i...
y = F.relu(self.model.decode(h)) return F.mean_squared_error(y, t), y
<|file_name|>routerrule_db.py<|end_file_name|><|fim▁begin|># Copyright 2013, Big Switch Networks # All Rights Reserved. #<|fim▁hole|># http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS...
# 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 #
<|file_name|>example_function_obj.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 <|fim▁hole|> def myFunc(): x = 1 y = 2 z = 'abc' # noqa return x + y print(myFunc.__name__) print(myFunc.__code__.co_varnames) print(myFunc.__code__.co_consts) print(myFunc.__code__.co_code) dis.disassemble(my...
import dis
<|file_name|>texture.rs<|end_file_name|><|fim▁begin|>// OpenAOE: An open source reimplementation of Age of Empires (1997) // Copyright (c) 2016 Kevin Fuller // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal...
texture: sdl2::render::Texture,
<|file_name|>Test.java<|end_file_name|><|fim▁begin|>package com.yao.app.java.nio.pipe; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.Pipe; public class Test { <|fim▁hole|> Thread t2 = new Thread(new MessageInput(pipe)); t2.start(); Thread.sleep(10...
public static void main(String[] args) { try { Pipe pipe = Pipe.open(); Thread t1 = new Thread(new MessageOutput(pipe));
<|file_name|>main.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import<|fim▁hole|> from clay import app import clay.config from flask import make_response, request, redirect, render_template, url_for from epubber.fimfic_epubgen import FimFictionEPubGenerator site_epub_classes = [ FimFictionEPub...
import re, os, sys
<|file_name|>densenet_distributed_test.py<|end_file_name|><|fim▁begin|><|fim▁hole|># You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WI...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.
<|file_name|>io.rs<|end_file_name|><|fim▁begin|>// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache ...
<|file_name|>blink_ops.rs<|end_file_name|><|fim▁begin|>/* Copyright 2013 Leon Sixt * * 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 * ...
//} inode.mut_values().insert(idx, value); }
<|file_name|>context_apply_test.go<|end_file_name|><|fim▁begin|>package terraform import ( "bytes" "fmt" "os" "reflect" "sort" "strings" "sync" "sync/atomic" "testing" "time" "github.com/hashicorp/terraform/config/module" ) func TestContext2Apply(t *testing.T) { m := testModule(t, "apply-good") p := tes...
func TestContext2Apply_badDiff(t *testing.T) { m := testModule(t, "apply-good")
<|file_name|>_ODataMetaModelUtils.js<|end_file_name|><|fim▁begin|>/*! * ${copyright} */ sap.ui.define([ "jquery.sap.global", "./_AnnotationHelperBasics" ], function (jQuery, _AnnotationHelperBasics) { "use strict"; /*global Promise */ var oBoolFalse = { "Bool" : "false" }, oBoolTrue = { "Bool" : "true" }, ...
*/ addSapSemantics : function (oType) { if (oType.property) { oType.property.forEach(function (oProperty) {
<|file_name|>package.py<|end_file_name|><|fim▁begin|>############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, t...
def configure(self, spec, prefix): pass
<|file_name|>sync_sectors.py<|end_file_name|><|fim▁begin|>import logging logger = logging.getLogger(__name__) class SyncSectors: def __init__(self, sector_model, sectors, disable_on=None, simulate=False): self.sector_model = sector_model self.sectors = sectors self.disable_on = disable_o...
return sector.disabled_on = self.disable_on sector.save()
<|file_name|>imagevectorsource.js<|end_file_name|><|fim▁begin|>goog.provide('ol.source.ImageVector'); goog.require('goog.asserts'); goog.require('goog.events'); goog.require('goog.events.EventType'); goog.require('goog.vec.Mat4'); goog.require('ol.dom'); goog.require('ol.extent'); goog.require('ol.render.canvas.Replay...
return undefined; } else { /** @type {Object.<string, boolean>} */
<|file_name|>ast.py<|end_file_name|><|fim▁begin|>""" The classes `Token` and `Nonterm` can be subclassed and enriched with docstrings indicating the intended grammar, and will then be used in the parsing as part of the abstract syntax tree that is constructed in the process. """ from __future__ import annotations cl...
class Plus(Token): "%token plus [p1]" class star(Token):
<|file_name|>projecttags.py<|end_file_name|><|fim▁begin|>from django import template from django.conf import settings from django.template.defaultfilters import stringfilter import os register = template.Library() @register.filter(name='basename') @stringfilter def basename(value): return os.path.basename(value...
if subm.is_closed() and subm.grading: if subm.grading.means_passed:
<|file_name|>hostList.js<|end_file_name|><|fim▁begin|>Template.HostList.events({ }); Template.HostList.helpers({ // Get list of Hosts sorted by the sort field. hosts: function () { return Hosts.find({}, {sort: {sort: 1}}); } }); Template.HostList.rendered = function () { // Make rows sortable/draggable u...
this.$('#sortable').sortable({ stop: function (event, ui) { // Define target row items.
<|file_name|>types.py<|end_file_name|><|fim▁begin|>def _types_gen(T): yield T if hasattr(T, 't'): for l in T.t: yield l if hasattr(l, 't'): for ll in _types_gen(l): yield ll class Type(type):<|fim▁hole|> assert type(u'') == String assert type('') == String assert type('') =...
""" A rudimentary extension to `type` that provides polymorphic types for run-time type checking of JSON data types. IE:
<|file_name|>main_test.go<|end_file_name|><|fim▁begin|>package cryptostore import ( "fmt" "log" "os" "path/filepath" "testing" ) func init() { log.SetFlags(0) // buf := &bytes.Buffer{} // log.SetOutput(buf) } func TestEncryptAndDecrypt(t *testing.T) { secret := []byte("cei6je9aig2ahzi8eiyau2oP8feeKie7") cr...
return NewStore(storePath), nil }
<|file_name|>status_test.go<|end_file_name|><|fim▁begin|>// Copyright 2014 Canonical Ltd. // Licensed under the AGPLv3, see LICENCE file for details. package v4_test import ( "encoding/json" "net/http" "time" jc "github.com/juju/testing/checkers" "github.com/juju/testing/httptesting" "github.com/juju/utils/deb...
Value: "count: 1", Passed: false, }, })
<|file_name|>test_cfn.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # 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.o...
cfn_collect = cfn.Collector(requests_impl=FakeRequests(self)) self.assertRaises(exc.CfnMetadataNotConfigured, cfn_collect.collect) self.assertIn('No path configured', self.log.output)
<|file_name|>constants.js<|end_file_name|><|fim▁begin|><|fim▁hole|> * */ export const LOGIN_REQUEST = 'app/LoginContainer/LOGIN_REQUEST'; export const LOGIN_SUCCESS = 'app/LoginContainer/LOGIN_SUCCESS'; export const LOGIN_FAILURE = 'app/LoginContainer/LOGIN_FAILURE';<|fim▁end|>
/* * * LoginContainer constants
<|file_name|>details.py<|end_file_name|><|fim▁begin|>import web import sam.common import sam.models.links class Details: def __init__(self, db, subscription, ds, address, timestamp_range=None, port=None, page_size=50): self.db = db self.sub = subscription self.table_nodes = "s{acct}_Nodes"...
<|file_name|>visitor.py<|end_file_name|><|fim▁begin|>import copy from mongoengine.errors import InvalidQueryError from mongoengine.queryset import transform __all__ = ('Q',) class QNodeVisitor(object): """Base visitor class for visiting Q-object nodes in a query tree. """ def visit_combination(self, co...
<|file_name|>AllTests.java<|end_file_name|><|fim▁begin|>package de.devisnik.mine.robot.test;<|fim▁hole|> import de.devisnik.mine.robot.AutoPlayerTest; import de.devisnik.mine.robot.ConfigurationTest; import junit.framework.Test; import junit.framework.TestSuite; public class AllTests { public static Test suite() { ...
<|file_name|>getfmtast.cpp<|end_file_name|><|fim▁begin|>/*************************************************************************** getfmtast.cpp - returns the AST for formatted IO ------------------- begin : July 22 2002 copyright ...
***************************************************************************/ /*************************************************************************** * *
<|file_name|>fbcode_builder_config.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals 'fbcode_builder steps to build Facebook Thrift' import specs.fbthrift as fbthrift...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate time; use std::sync::{Arc, mpsc}; use std::thread;<|fim▁hole|> type Float = f64; type Integer = u32; type Callback = Box<Fn(Float) -> Float + Send + Sync + 'static>; type FnThread = Fn() -> Callback + Send + Sync; #[derive(Clone)] struct Integrator { f...
<|file_name|>forms.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from wtforms import StringField, BooleanField, PasswordField, SelectField, DateTimeField, TextAreaField<|fim▁end|>
from flask.ext.wtf import Form
<|file_name|>config.cpp<|end_file_name|><|fim▁begin|>#include "script_component.hpp" class CfgPatches { class ADDON { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"};<|fim▁hole|> authors[] = {"KoffeinFlummi", "BaerMitUm...
author = ECSTRING(common,ACETeam);
<|file_name|>AssignableNode.java<|end_file_name|><|fim▁begin|>package org.apache.helix.controller.rebalancer.waged.model; /* * 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 * regardin...
* capacity categories assuming the new capacity usage is added to the node. * For example, if the current node usage is {CPU: 0.9, MEM: 0.4, DISK: 0.6}. Then this call shall * return 0.9.
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin from .models import Lesson, Series class LessonAdmin(admin.ModelAdmin): pass class SeriesAdmin(admin.ModelAdmin): pass <|fim▁hole|><|fim▁end|>
admin.site.register(Lesson, LessonAdmin) admin.site.register(Series, SeriesAdmin)
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>export * from './MessagePipeFrontend.class';<|fim▁end|>
export * from './messaging.definitions'; export * from './MessagePipeBackend.class';
<|file_name|>Formatter.cpp<|end_file_name|><|fim▁begin|>#define BOOST_TEST_NO_LIB #include <boost/test/auto_unit_test.hpp> #include "dormouse-engine/essentials/Formatter.hpp" <|fim▁hole|>namespace { BOOST_AUTO_TEST_SUITE(FormatterTestSuite); BOOST_AUTO_TEST_CASE(FormatsEmptyString) { std::string s; Formatter f(For...
using namespace dormouse_engine::essentials;
<|file_name|>patch_set.js<|end_file_name|><|fim▁begin|>"use strict"; // https://codereview.chromium.org/api/148223004/70001/?comments=true function PatchSet(issue, id, sequence) { this.files = []; // Array<PatchFile> this.sourceFiles = []; // Array<PatchFile> this.testFiles = []; // Array<PatchFile> th...
this.draftCount = 0; this.lastModified = ""; // Date
<|file_name|>MainController.ts<|end_file_name|><|fim▁begin|>import { BaseController } from "./BaseController"; import { Route } from "./BaseController"; import * as loadHtml from "./HtmlLoader"; export class MainController extends BaseController { main = (): void => { loadHtml.load(this.requestData, '/...
routes: Route[] = [ new Route("/", this.main)
<|file_name|>JavaDocConfigurationImpl.java<|end_file_name|><|fim▁begin|>package com.github.setial.intellijjavadocs.configuration.impl; import com.github.setial.intellijjavadocs.configuration.JavaDocConfiguration; import com.github.setial.intellijjavadocs.exception.SetupTemplateException; import com.github.setial.intel...
settings.addToDom(root); loadedStoredConfig = true;
<|file_name|>AMLUtils.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2011-2013 Team XBMC * http://kodi.tv * * 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...
<|file_name|>api.py<|end_file_name|><|fim▁begin|>from better_zoom import BetterZoom from better_selecting_zoom import BetterSelectingZoom from broadcaster import BroadcasterTool from dataprinter import DataPrinter from data_label_tool import DataLabelTool from enable.tools.drag_tool import DragTool from draw_points_too...
from line_segment_tool import LineSegmentTool from move_tool import MoveTool
<|file_name|>boss_twinemperors.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2014-2017 StormCore * * 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 ...
void SpellHit(Unit* caster, const SpellInfo* entry) override { if (caster == me)
<|file_name|>month.go<|end_file_name|><|fim▁begin|>package chron import ( "time" "github.com/dustinevan/chron/dura" "fmt" "reflect" "database/sql/driver" "strings" ) type Month struct { time.Time } func NewMonth(year int, month time.Month) Month { return Month{time.Date(year, month, 1, 0, 0, 0, 0, time.UTC)...
<|file_name|>royal-american.js<|end_file_name|><|fim▁begin|>var cheerio = require('cheerio') , request = require('request') , url = 'http://theroyalamerican.com/schedule/' , shows = [] , months = ['January', 'February', 'March', 'April', 'May', ...
date = normalizeDate(date, year) var show = { venue: 'The Royal American', venueUrl: 'http://theroyalamerican.com/',
<|file_name|>config.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ## \file config.py # \brief python package for config # \author T. Lukaczyk, F. Palacios # \version 3.2.9 "eagle" # # SU2 Lead Developers: Dr. Francisco Palacios (Francisco.D.Palacios@boeing.com). # Dr. Thomas D. Economo...