prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.10/h...
<|file_name|>characterfeatures.py<|end_file_name|><|fim▁begin|>"""Module containing character feature extractors."""<|fim▁hole|> @register_feat def characterSpace(text): """Return the total number of characters.""" return len(text) @register_feat def letterSpace(text): """Return the total number of lette...
import string from unstyle.features.featregister import register_feat
<|file_name|>utils.ts<|end_file_name|><|fim▁begin|>export function round(value: number, multiplicator?: number): number { multiplicator = multiplicator || 10; return Math.round(value * multiplicator) / multiplicator; } export function int16(msb: number, lsb: number): number { const val = uint16(msb, ...
export function uint16(msb: number, lsb: number): number {
<|file_name|>test_gpg.py<|end_file_name|><|fim▁begin|># # Copyright © 2012–2022 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.org/> # # 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 Fr...
import weblate.vcs.gpg
<|file_name|>init-dev-env.js<|end_file_name|><|fim▁begin|>module.exports = function(grunt) { <|fim▁hole|> * - register git hooks (commit-msg) */ grunt.registerTask('init-dev-env', 'Initialize dev environment.', function() { var fs = require('fs'); var done = this.async(); fs.symlink('../../tasks/lib...
/** * Initialize development environment for Testacular *
<|file_name|>shadow-mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 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...
<|file_name|>dispatcher.py<|end_file_name|><|fim▁begin|># # Copyright (C) 2012-2014, Quarkslab. # # This file is part of qb-sync. # # qb-sync 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...
}
<|file_name|>run_sdae.py<|end_file_name|><|fim▁begin|>import cPickle import gzip import os, sys, errno import time import math # numpy & theano imports need to be done in this order (only for some numpy installations, not sure why) import numpy #import gnumpy as gnp # we need to explicitly import this in some cases, ...
# a dictionary of file descriptors, pointing at the required files required_labels={}
<|file_name|>factory_generator.hpp<|end_file_name|><|fim▁begin|>/** * file mirror/doc/factory_generator.hpp * Documentation only header * * @author Matus Chochlik * * Copyright 2008-2010 Matus Chochlik. Distributed under the Boost * Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt o...
<|file_name|>pluginmanagedlg.cpp<|end_file_name|><|fim▁begin|>/* * Copyright 2011 kubtek <kubtek@mail.com> * * This file is part of StarDict. * * StarDict 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,...
<|file_name|>TransitionIntoState0.py<|end_file_name|><|fim▁begin|>""" Wind Turbine Company - 2013 Author: Stephan Rayner Email: stephan.rayner@gmail.com """ import time from test.Base_Test import Base_Test class Maintenance_153Validation(Base_Test): def setUp(self): self.WindSpeedValue = "4.5" s...
<|file_name|>youku.js<|end_file_name|><|fim▁begin|>/** * Created by jiangli on 15/1/6. */ "use strict"; var request = require('request'); var iconv = require('iconv-lite'); var crypto = require('crypto'); var Buffer = require('buffer').Buffer; /** * [_parseYouku 解析优酷网] * @param [type] $url [description] * @retur...
$index = $index + 1; if ($charCode[$key]) { return $charCode[$key][$index];
<|file_name|>top-level-alternation.rs<|end_file_name|><|fim▁begin|>#![feature(let_else)] #![deny(unreachable_patterns)] fn main() { while let 0..=2 | 1 = 0 {} //~ ERROR unreachable pattern if let 0..=2 | 1 = 0 {} //~ ERROR unreachable pattern match 0u8 { 0 | 0 => {} //~ ERROR unreacha...
} let (0 | 0) = 0 else { return }; //~ ERROR unreachable pattern }
<|file_name|>media_player.py<|end_file_name|><|fim▁begin|>"""Vizio SmartCast Device support.""" from datetime import timedelta import logging from typing import Any, Callable, Dict, List, Optional, Union from pyvizio import VizioAsync from pyvizio.api.apps import find_app_name from pyvizio.const import APP_HOME, INPUT...
@property def icon(self) -> str:
<|file_name|>295.js<|end_file_name|><|fim▁begin|>"use strict"; var SHOW_DATA = { "venue_name": "Merriweather Post Pavilion, Columbia, Maryland", "venue_id": 76, "show_date": "26th of Jun, 1984", "sets": [<|fim▁hole|> "encore": false, "songs": [ {"name": "Casey Jones", "length":"5:59", "trans":"/"}, {"na...
{"set_title": "1st set",
<|file_name|>error_code.rs<|end_file_name|><|fim▁begin|>/*! * gash : error_code.rs * cs4414 ps2 * Jeremy Letang / free student */ <|fim▁hole|>pub enum ErrorCode { Exit, Break, Continue }<|fim▁end|>
/// Error return for commands
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>extern crate pkg_config; <|fim▁hole|> std::env::var("TARGET").unwrap() } fn main() { if !get_target().contains("darwin") { pkg_config::find_library("avahi-compat-libdns_sd").unwrap(); } }<|fim▁end|>
fn get_target() -> String {
<|file_name|>tut-worker-3d.py<|end_file_name|><|fim▁begin|>import bee from bee import * import dragonfly from dragonfly.commandhive import commandhive, commandapp from dragonfly.sys import exitactuator from dragonfly.io import display, commandsensor from dragonfly.std import variable, transistor, test from dragonfly.sy...
d = display("str")()
<|file_name|>zoodefs.rs<|end_file_name|><|fim▁begin|>pub mod perms { pub const READ: i32 = 1; pub const WRITE: i32 = 1 << 1; pub const CREATE: i32 = 1 << 2; pub const DELETE: i32 = 1 << 3; pub const ADMIN: i32 = 1 << 4; pub const ALL: i32 = READ | WRITE | CREATE | DELETE | ADMIN; } pub mod acls...
lazy_static!{ pub static ref CREATOR_ALL_ACL: Vec<Acl> = acl(perms::ALL, "auth", "");
<|file_name|>question_baseselect.ts<|end_file_name|><|fim▁begin|>import { Serializer } from "./jsonobject"; import { Question } from "./question"; import { Base, SurveyError, ISurveyImpl } from "./base"; import { ItemValue } from "./itemvalue"; import { Helpers, HashTable } from "./helpers"; import { surveyLocalization...
} protected setNewValue(newValue: any) { newValue = this.valueFromData(newValue); if (
<|file_name|>PluginListener.java<|end_file_name|><|fim▁begin|>/** * */ package jframe.core.plugin; import java.util.EventListener; /** * @author dzh * @date Sep 12, 2013 9:42:33 PM * @since 1.0 */ public interface PluginListener extends EventListener { <|fim▁hole|> void pluginChanged(PluginEvent event); }<|fi...
<|file_name|>formatsvgz.py<|end_file_name|><|fim▁begin|><|fim▁hole|># -*- coding: utf-8 -*- # Copyright 2014 Lukas Kemmer # # 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.apach...
#!/usr/bin/env python3
<|file_name|>trait-bounds-impl-comparison-1.rs<|end_file_name|><|fim▁begin|>// Copyright 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:/...
impl Trait for usize {
<|file_name|>field_isempty.rs<|end_file_name|><|fim▁begin|>// // imag - the personal information management suite for the commandline // Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors // // This library is free software; you can redistribute it and/or // modify it under the terms of th...
<|file_name|>order.ts<|end_file_name|><|fim▁begin|>// Copyright 2017 Google LLC // // 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 // //...
<|file_name|>nl.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // THIS CODE IS GENERATED - DO NOT MODIFY // See angular/tools/gulp-...
'nl', [['a.m.', 'p.m.'], u, u], u, [ ['Z', 'M', 'D', 'W', 'D', 'V', 'Z'], ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
<|file_name|>shortest_path.py<|end_file_name|><|fim▁begin|># coding: utf-8 # C++ # http://www.e-olimp.com/articles/21 # http://hardfire.ru/Dij_sparse # Weak 5 # TODO: hear lession + lession about heap<|fim▁hole|>- X = [S] [vert. processed so far] - A[S] = 0 [computed shortest path distances] [- B[S] = []] [path - ...
""" NAIVE: Initialize:
<|file_name|>webpack.base.config.js<|end_file_name|><|fim▁begin|>var webpack = require('webpack'); module.exports = { devtool: 'inline-source-map', entry: { 'react-bootstrap-table': './src/index.js' }, output: { path: './dist', filename: '[name].js', library: 'ReactBootstrapTable', libraryT...
externals: [
<|file_name|>files_77.js<|end_file_name|><|fim▁begin|>var searchData= [ ['wizard_2ec',['wizard.c',['../wizard_8c.html',1,'']]], ['wrapper_2ecpp',['wrapper.cpp',['../wrapper_8cpp.html',1,'']]], ['wxforms_2ec',['wxforms.c',['../wxforms_8c.html',1,'']]]<|fim▁hole|><|fim▁end|>
];
<|file_name|>information.tsx<|end_file_name|><|fim▁begin|>import shx from 'shelljs' import React from 'react' import { render, Text, Box } from 'ink' import Settings from '../../classes/settings' import Pacman from '../../classes/pacman' import Utils from '../../classes/utils' import Title from './title' /** * */ e...
<Box marginRight={1}><Text>Info: </Text></Box>
<|file_name|>BenchmarkTest04982.java<|end_file_name|><|fim▁begin|>/** * OWASP Benchmark Project v1.1 * * This file is part of the Open Web Application Security Project (OWASP) * Benchmark Project. For details, please see * <a href="https://www.owasp.org/index.php/Benchmark">https://www.owasp.org/index.php/Benchmark</a>...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>module.exports = { addAttribute: require("./addAttribute"), addAttributes: require("./addAttributes"), addClass: require("./addClass"), alignElement: require("./alignElement"), appendChild: require("./appendChild"), createElement: require("./cre...
getStyles: require("./getStyles"), getTag: require("./getTag"),
<|file_name|>stanza.py<|end_file_name|><|fim▁begin|>import logging from ..directives import directives_by_section logger = logging.getLogger(__name__) class Stanza(object): """ Subclass for config file stanzas. In an HAProxy config file, a stanza is in the form of:: stanza header dire...
logger.warn(
<|file_name|>PlanItineraryRoute.js<|end_file_name|><|fim▁begin|>import React from 'react' import { PlanItineraryContainer } from './index' const PlanMapRoute = () => { return ( <div><|fim▁hole|> <PlanItineraryContainer /> </div> ) } export default PlanMapRoute<|fim▁end|>
<|file_name|>RuDupElimLogRecord.cpp<|end_file_name|><|fim▁begin|>/********************************************************************** // @@@ START COPYRIGHT @@@ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this wo...
<|file_name|>KeyHandler.java<|end_file_name|><|fim▁begin|>package com.zalthrion.zylroth.handler; import net.minecraft.client.settings.KeyBinding; <|fim▁hole|>import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class KeyHandler { @SideOnly(Side.CLIENT) public static KeyBinding openSum...
import org.lwjgl.input.Keyboard; import cpw.mods.fml.client.registry.ClientRegistry;
<|file_name|>constref.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 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...
match (b"bar", b"jjj", b"ggg", b"fff") { (i32::CONST_REF_DEFAULT, i32::CONST_REF, i64::CONST_REF_DEFAULT, i64::CONST_REF) => true, _ => false,
<|file_name|>webpack.config.js<|end_file_name|><|fim▁begin|>const LogTestPlugin = require("../../helpers/LogTestPlugin"); /** @type {import("../../../").Configuration} */ module.exports = { mode: "production", entry: "./index", stats: "normal", plugins: [new LogTestPlugin()]<|fim▁hole|><|fim▁end|>
};
<|file_name|>gotoolchain.py<|end_file_name|><|fim▁begin|># # SPDX-License-Identifier: MIT # import glob import os import shutil import tempfile from oeqa.selftest.case import OESelftestTestCase from oeqa.utils.commands import runCmd, bitbake, get_bb_vars class oeGoToolchainSelfTest(OESelftestTestCase): """ T...
cmd = cmd + "${CROSS_COMPILE}go %s" % gocmd return runCmd(cmd).status def test_go_dep_build(self):
<|file_name|>test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (c) 2006 Damien Miller <djm@mindrot.org> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice a...
r += a[random.randint(0, len(a) - 1)] return r class TestRadix(unittest.TestCase):
<|file_name|>recipe-181780.py<|end_file_name|><|fim▁begin|>from wxPython.wx import *<|fim▁hole|>from twisted.internet import reactor class MyApp(wxApp): def OnInit(self): # Twisted Reactor Code reactor.startRunning() EVT_TIMER(self,999999,self.OnTimer) self.timer=wxTimer(self,999999...
<|file_name|>qmultimediawidgets.py<|end_file_name|><|fim▁begin|>############################################################################# ## ## Copyright (C) 2017 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the test suite of PySide2. ## ## $QT_BEGIN_LICENSE:GPL-EXCEPT$ ##...
def __init__(self): QWidget.__init__(self)
<|file_name|>app.ts<|end_file_name|><|fim▁begin|>/// <reference types="@argonjs/argon" /> /// <reference types="three" /> /// <reference types="dat-gui" /> /// <reference types="stats" /> // set up Argon const app = Argon.init(); // set up THREE. Create a scene, a perspective camera and an object // for the user's l...
<|file_name|>stochrsi.spec.ts<|end_file_name|><|fim▁begin|>import * as chai from "chai"; import * as path from "path"; import * as indicators from "../../../src/indicators/"; import { TestDataFactory } from "../../testData"; const jsonfile = require("jsonfile"); chai.should(); describe("STOCHRSI Indicator", () => { ...
it("the indicator should not indicate that it is ready to be consumed", () => { indicator.isReady.should.equal(false); });
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # TWX documentation build configuration file, created by # sphinx-quickstart on Sat Jun 27 15:07:02 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible...
# The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents.
<|file_name|>DrawServiceUtil.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2000-2013 Liferay, Inc. 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; eith...
import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
<|file_name|>http_tracker_connection.cpp<|end_file_name|><|fim▁begin|>/* Copyright (c) 2003-2014, Arvid Norberg All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must...
} // extract ip i = info.dict_find_string("ip");
<|file_name|>a.py<|end_file_name|><|fim▁begin|># print absolute value of an integer: a = -100 if a >= 0: print a else:<|fim▁hole|><|fim▁end|>
print -a
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # MicroPython documentation build configuration file, created by # sphinx-quickstart on Sun Sep 21 11:42:03 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all ...
#texinfo_no_detailmenu = False
<|file_name|>epub_to_txt_parser.py<|end_file_name|><|fim▁begin|>import sys, getopt import errno import os.path import epub import lxml from bs4 import BeautifulSoup class EPubToTxtParser: # Epub parsing specific code def get_linear_items_data( self, in_file_name ): book_items = [] book = epub....
elif o == '-o':
<|file_name|>imageTest.py<|end_file_name|><|fim▁begin|>f = open("pixels.dat", "r") pixs = f.readline() f.close() print len(pixs) from PIL import Image import numpy as np img = Image.new('RGB', (160, 210), "black") # create a new black image pixels = img.load() # create the pixel map # Load the hardcoded grayscale...
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from datetime import datetime, timedelta from django.db import models from django.db.models import Max, Min from tinymce.models import HTMLField <|fim▁hole|> symbol = models.CharField(max_length=10, blank=True, null=True) description = HTMLField(blank=True, n...
class Company(models.Model): name = models.CharField(max_length=75, blank=True, null=True)
<|file_name|>Handler.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from collections import namedtuple Payload = namedtuple('Payload', ['iden', 'body', 'send_date', 'sender']) class Handler(object):<|fim▁hole|> @staticmethod def config(): return def __init__(self, logger): self.logg...
<|file_name|>mod.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/licens...
<|file_name|>jsonWorker.ts<|end_file_name|><|fim▁begin|>/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *-------...
(toValidate) => this.doValidate(toValidate)
<|file_name|>test_instance_mapping.py<|end_file_name|><|fim▁begin|># 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 ...
db_inst_mapping1 = create_mapping() # let's also create an instance mapping that's not in a cell to make
<|file_name|>opdelete.go<|end_file_name|><|fim▁begin|>/* Copyright 2021 Gravitational, 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/licenses/LICENSE-2.0 Unless re...
"go.mongodb.org/mongo-driver/x/bsonx/bsoncore" "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage"
<|file_name|>test-xy.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import pygtk pygtk.require('2.0') import pynotify import sys if __name__ == '__main__':<|fim▁hole|> n = pynotify.Notification("X, Y Test", "This notification should point to 150, 10") n.set_hint("x", 150) ...
if not pynotify.init("XY"): sys.exit(1)
<|file_name|>parse.cpp<|end_file_name|><|fim▁begin|>#include <iostream> #include <stdint.h> #include <map> #include <set> #include "macros.h" #include <assert.h> using namespace std; #include <fstream> struct defsetcmp { bool operator() (const pair<uint64_t, uint64_t> &l, const pair<uint64_t, uint64_t> &r) { r...
<|file_name|>convert_basti.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import glob,re,sys,math,pyfits import numpy as np import utils if len( sys.argv ) < 2: print '\nconvert basti SSP models to ez_gal fits format' print 'Run in directory with SED models for one metallicity' print 'Usage: convert_basti.py ez...
<|file_name|>handlers.go<|end_file_name|><|fim▁begin|>package proxy import ( "log" "strconv" "../util" ) func (s *ProxyServer) handleGetWorkRPC(cs *Session, diff, id string) (reply []string, errorReply *ErrorReply) { t := s.currentBlockTemplate() if len(t.Header) == 0 { return nil, &ErrorReply{Code: -1, Messa...
log.Printf("Unknown RPC method: %v", req) return &ErrorReply{Code: -1, Message: "Invalid method"}
<|file_name|>_hasnotematchingsubstringof.py<|end_file_name|><|fim▁begin|># # gPrime - A web-based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # # 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 ...
# (at your option) any later version. # # This program is distributed in the hope that it will be useful,
<|file_name|>pksig_ps03.py<|end_file_name|><|fim▁begin|>""" Identity Based Signature | From: "David Pointcheval and Olivier Sanders. Short Randomizable Signatures" | Published in: 2015 | Available from: https://eprint.iacr.org/2015/525.pdf * type: signature (identity-based) * setting: bilinear group...
ms = [group.hash(m, ZR) for m in messages] s1, s2 = sig if group.init(G1) == s1: return False
<|file_name|>SeaGlassTextPaneUI.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2009 Kathryn Huxtable and Kenneth Orr. * * This file is part of the SeaGlass Pluggable Look and Feel. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with...
* if the opaque property has not already been set by the client program. * <li>
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from datetime import datetime import json import boto.cloudformation from moto.core import BaseBackend from .parsing import ResourceMap, OutputMap from .utils import generate_stack_id from .exceptions import ValidationError ...
notification_arns=notification_arns, tags=tags, ) self.stacks[stack_id] = new_stack
<|file_name|>file_tools.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals import codecs import distutils.dir_util import os import shutil import sys def touch_file(file_path): """ Create a new empty file at file_path. """ parent_dir = os...
def copy_tree(input_dir, output_dir, overwrite=False): """
<|file_name|>test_app.py<|end_file_name|><|fim▁begin|># coding: utf8 from __future__ import unicode_literals from flask import abort, make_response, request from flask_api.decorators import set_renderers from flask_api import exceptions, renderers, status, FlaskAPI import json import unittest app = FlaskAPI(__name__)...
return {}
<|file_name|>MinaComponentBuilderFactory.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 fil...
import javax.annotation.Generated; import org.apache.camel.Component; import org.apache.camel.builder.component.AbstractComponentBuilder;
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod color; pub mod scale; pub mod canvas; pub mod decorator; pub mod sketch; pub use self::color::Color; pub use self::scale::Scale; pub use self::canvas::Canvas;<|fim▁hole|>pub use self::decorator::Decorator;<|fim▁end|>
pub use self::sketch::Sketch;
<|file_name|>MapPrismTest.java<|end_file_name|><|fim▁begin|>package com.jnape.palatable.lambda.optics.prisms; import org.junit.Test; import java.util.HashMap; import java.util.LinkedHashMap; import static java.util.Arrays.asList; import static java.util.Collections.singleton; import static java.util.Collections.sing...
new HashMap<>(singletonMap("foo", 1)),
<|file_name|>ObjectSettings.java<|end_file_name|><|fim▁begin|>package addonloader.util; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; import java.util.Properties; /** * Simple wrapper around {@link Properit...
public boolean getBoolean(String key, boolean def) { return Boolean.parseBoolean(this.getProperty(key, String.valueOf(def)));
<|file_name|>desktop.py<|end_file_name|><|fim▁begin|># Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os import subprocess from typing import Sequence from pants.util.osutil import get_os_name class IdeaNotFoundException(Except...
cmd = "idea" if not _cmd_exists(cmd): raise OpenError( "The program '{}' isn't in your PATH. Please install and re-run this "
<|file_name|>shared.ts<|end_file_name|><|fim▁begin|>import { lighten } from 'polished'; import { css } from '@emotion/react'; import styled from '@emotion/styled'; import { colors } from './colors'; export const outer = css` position: relative; padding: 0 5vw; `; // Centered content container blocks export cons...
`;
<|file_name|>test_views.py<|end_file_name|><|fim▁begin|>""" Test the views of jurisdiction models """ # Django from django.test import TestCase # Third Party from nose.tools import assert_is_not, eq_ # MuckRock from muckrock.core.test_utils import http_get_response from muckrock.jurisdiction import factories, views ...
response = http_get_response(url, self.view, **kwargs) eq_(response.status_code, 200)
<|file_name|>service-585.service.spec.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license<|fim▁hole|>import { Service585Service } from './ser...
*/ import { TestBed, inject } from '@angular/core/testing';
<|file_name|>protein.py<|end_file_name|><|fim▁begin|>from . import sqldb class aminoAcid(): def __init__(self,abbr1,abbr3,name): self.abbr3 = abbr3<|fim▁hole|> def __str__(self): return self.name def __repr__(self): return self.name def getOne(self): return self.abbr1 ...
self.abbr1 = abbr1 self.name = name
<|file_name|>bagImageDemo.js<|end_file_name|><|fim▁begin|>/** * Created by liushuo on 17/2/20. */ import React , {Component} from 'react'; import {AppRegistry , ListView , Text , View, StyleSheet,TouchableOpacity, Image, Dimensions} from 'react-native'; let badgeDatas = require('../Json/BadgeData.json') let {width,h...
<|file_name|>UmbracoClientManager.js<|end_file_name|><|fim▁begin|>/// <reference path="/umbraco_client/Application/NamespaceManager.js" /> /// <reference path="/umbraco_client/Application/HistoryManager.js" /> /// <reference path="/umbraco_client/ui/jquery.js" /> /// <reference path="/umbraco_client/Tree/UmbracoTree.j...
var m = new Umbraco.Controls.ModalWindow();
<|file_name|>localrepocache_tests.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012-2015 Codethink 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; version 2 of the License. #<|fim▁h...
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details.
<|file_name|>CWNPropertyCheckView.java<|end_file_name|><|fim▁begin|>package de.uni.freiburg.iig.telematik.wolfgang.properties.check; import javax.swing.JPanel; import javax.swing.JPopupMenu; import de.invation.code.toval.graphic.component.DisplayFrame; import de.invation.code.toval.graphic.util.SpringUtilities; impor...
private static final long serialVersionUID = -950169446391727139L;
<|file_name|>git.py<|end_file_name|><|fim▁begin|># The following comment should be removed at some point in the future. # mypy: disallow-untyped-defs=False from __future__ import absolute_import import logging import os.path import re from pip._vendor.packaging.version import parse as parse_version from pip._vendor....
(scheme[after_plus:], netloc, newpath, query, fragment), )
<|file_name|>ekloges.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- import csv import codecs import re import argparse import os from prettytable import PrettyTable report08_schools = {} report08_employees = {} report08_school_employees = {} report16_employee = None # The following (com...
<|file_name|>webroot.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in comp...
'plugins': [],
<|file_name|>popup.spec.js<|end_file_name|><|fim▁begin|>describe('$materialPopup service', function() { beforeEach(module('material.services.popup', 'ngAnimateMock')); function setup(options) { var popup; inject(function($materialPopup, $rootScope) { $materialPopup(options).then(function(p) { ...
}); return popup; }
<|file_name|>scheduler_predicates.go<|end_file_name|><|fim▁begin|>/* Copyright 2015 The Kubernetes 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. You may obtain a copy of the License at http://www.apache...
} // Simplified version of RunRC, that does not create RC, but creates plain Pods and
<|file_name|>test_pytables.py<|end_file_name|><|fim▁begin|>import nose import sys import os import warnings import tempfile from contextlib import contextmanager import datetime import numpy as np import pandas import pandas as pd from pandas import (Series, DataFrame, Panel, MultiIndex, Categorical, bdate_range, ...
# fixed _maybe_remove(store, 'df2') store.put('df2',df) result = store.select('df2')
<|file_name|>attributes.ts<|end_file_name|><|fim▁begin|>namespace $ { export function $mol_dom_render_attributes ( el : Element , attrs : { [ key : string ] : string|number|boolean|null } ) { for( let name in attrs ) { <|fim▁hole|> let val = attrs[ name ] as any if( val === null || val === false ) { ...
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo, an open source suite of business apps # This module copyright (C) 2014-2015 Therp BV (<http://therp.nl>). # # This program is free software: ...
# # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. #
<|file_name|>JPEGXREncoderOptions.ts<|end_file_name|><|fim▁begin|>/** * Copyright 2014 Mozilla Foundation * <|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 Licen...
* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
<|file_name|>wiki2man.py<|end_file_name|><|fim▁begin|># -*- coding: UTF-8 -*- import sys WorkList = None def SH(i): """reformatting .SH""" global WorkList string = WorkList[i] l = len(string) - 2 r = 0 while string[0] == '=' and string[l] == '=': WorkList[i] = string[1:l] stri...
if string[i:i+3] == '\n\n\n': string = string[:i] + string[i+1:] i = i + 1 return string
<|file_name|>module.rs<|end_file_name|><|fim▁begin|>use std::collections::{HashMap, HashSet}; use super::{Expression, Call, TreePrinter, TypeDeclaration, Import, ImportName, Symbol, SymbolType, GlobalBinding, Function, ExternalFunction, prefix}; use target::Target; use compileerror::CompileResult; pub struct Module { ...
}
<|file_name|>canihaz.js<|end_file_name|><|fim▁begin|>'use strict'; //<|fim▁hole|>// Third party modules. // module.exports = require('canihaz')({ location: __dirname, dot: 'smithy' });<|fim▁end|>
<|file_name|>GlobalAction.java<|end_file_name|><|fim▁begin|>/* * SonarQube, open source software quality management tool. * Copyright (C) 2008-2014 SonarSource * mailto:contact AT sonarsource DOT com * * SonarQube is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser Gener...
<|file_name|>main.go<|end_file_name|><|fim▁begin|>/* Copyright 2021 The Kubeflow 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 requ...
name = strings.Replace(name, "k8s.io/api/core/", "", -1) name = strings.Replace(name, "k8s.io/apimachinery/pkg/apis/meta/", "", -1)
<|file_name|>averesultgraph-consumer-bread.py<|end_file_name|><|fim▁begin|># Draw graph x-axios is the number of nodes in the network. import re import sys import os import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import NullFormatter # useful for `logit` scale from mininet.log import setLogL...
plt1.axis([5, 35, 4, 10]) plt2.axis([5, 35, 0, 15])
<|file_name|>udprelay.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # 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...
self._close_client(client_dns_pair[0])
<|file_name|>into_iterator.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code, unused_imports)] #[macro_use] extern crate derive_more; #[derive(IntoIterator)] #[into_iterator(owned, ref, ref_mut)] struct MyVec(Vec<i32>); #[derive(IntoIterator)] #[into_iterator(owned, ref, ref_mut)] struct Numbers { numbers: Vec<i...
<|file_name|>_mod1_1_1_0_0_1.py<|end_file_name|><|fim▁begin|>name1_1_1_0_0_1_0 = None name1_1_1_0_0_1_1 = None name1_1_1_0_0_1_2 = None name1_1_1_0_0_1_3 = None<|fim▁hole|><|fim▁end|>
name1_1_1_0_0_1_4 = None
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>extern crate cfg_if; use cfg_if::cfg_if; cfg_if! { if #[cfg(all(windows, feature = "neon-sys"))] { use std::env; use std::fs::File; use std::io::Write; use std::path::Path; // Extract linker metadata from neon-sys and save...
write!(buffer, "{}", env::var(var).unwrap()).unwrap(); }
<|file_name|>test_media_player.py<|end_file_name|><|fim▁begin|>"""The tests for the Yamaha Media player platform.""" from unittest.mock import MagicMock, PropertyMock, call, patch import pytest import homeassistant.components.media_player as mp from homeassistant.components.yamaha import media_player as yamaha from h...
assert state is not None assert state.state == "off"