prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>load_archive.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # SIM-CITY client # # Copyright 2015 Netherlands eScience Center <info@esciencecenter.nl> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtai...
def __init__(self, filename): self.filename = filename
<|file_name|>request.js<|end_file_name|><|fim▁begin|>'use strict'; var _ = require('lodash'); var Request = function(opts) { opts = opts || {}; this.method = opts.method || this.ANY; this.url = opts.url || this.ANY; this.auth = opts.auth || this.ANY; this.params = opts.params || this.ANY; this.data = opt...
}; Request.prototype.isEqual = function(other) { return (this.attributeEqual(this.method, other.method) &&
<|file_name|>helpers.py<|end_file_name|><|fim▁begin|>""" *2014.09.10 16:10:05 DEPRECATED!!!! please use building.models.search_building and building.models.make_building instead of the make_unit and make_building functions found here... out of date. """ import sys, os, json, codecs, re sys.path.append(os.path.dirna...
<|file_name|>app.js<|end_file_name|><|fim▁begin|><|fim▁hole|>import '../styles/appStyles.scss';<|fim▁end|>
import Aquaman from './components/Aquaman.jsx'; // eslint-disable-line no-unused-vars
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. # Jord...
<|file_name|>EnumTypeAdapterTest.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2017 pCloud AG * * 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/licen...
} private enum DuplicateNamesEnumType2 {
<|file_name|>ApiDispatcherServletConfiguration.java<|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 * * U...
requestMappingHandlerMapping.setRemoveSemicolonContent(false); requestMappingHandlerMapping.setInterceptors(getInterceptors()); return requestMappingHandlerMapping; }
<|file_name|>renew.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # Welcome to CLRenew, a simple python script that automates mouse clicks to # renew craigslist postings credit to https://github.com/yuqianli for base code import pyautogui import os # Set a counter to count the # of exceptions occur counter = 0 # St...
<|file_name|>test_cover.py<|end_file_name|><|fim▁begin|>"""The tests for the MQTT cover platform.""" from unittest.mock import patch import pytest from homeassistant.components import cover from homeassistant.components.cover import ( ATTR_CURRENT_POSITION, ATTR_CURRENT_TILT_POSITION, ATTR_POSITION, A...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate clap; use clap::Arg; use failure::Fail; use lucet_validate::{self, Validator}; use std::fs::File; use std::io::{self, Read}; use std::path::{Path, PathBuf}; use std::process; use witx; pub fn main() { // rebuild if env vars used by app_fro...
#[fail(display = "{}", _0)] Witx(#[cause] witx::WitxError), #[fail(display = "With file {:?}: {}", _0, _1)] Io(PathBuf, #[cause] io::Error),
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] include!(concat!(env!("OUT_DIR"), "/bindings.rs")); #[cfg(test)] mod tests { use super::*; use std::mem; use std::ptr; use std::ffi::CString; use std::ffi::C...
cupsFreeDests(num_dests, dests);
<|file_name|>test_LD_X_decr.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python ############################################################################### # # simulavr - A simulator for the Atmel AVR family of microcontrollers. # Copyright (C) 2001, 2002 Theodore A. Roth # # This program is free software; you ...
<|file_name|>html2rawtest.go<|end_file_name|><|fim▁begin|>package main import ( "fmt" "golang.org/x/net/html" "io" "strings" ) //const url = `https://www.ziprecruiter.com/jobs/cybercoders-befe3473/senior-software-engineer-golang-0dbe59d6?source=ziprecruiter-jobs-site` const htmldata = `<!DOCTYPE html1234> <html56...
func main() {
<|file_name|>FinishListener.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2010 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/licen...
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|># Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This pr...
<|file_name|>bitcoin_ru.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="ru" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="14"/> <source>About CosbyCoin</source> ...
<translation>&amp;Помощь</translation> </message>
<|file_name|>clusterrole.go<|end_file_name|><|fim▁begin|>/* Copyright 2016 The Kubernetes 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 Un...
<|file_name|>15.2.3.5-4-258.js<|end_file_name|><|fim▁begin|>/// Copyright (c) 2012 Ecma International. All rights reserved. /** * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-258.js * @description Object.create - 'get' property of one property in 'Properties' is the primitive value null (8.10.5 step 7.b) */ <|fim▁h...
function testcase() { try { Object.create({}, {
<|file_name|>perm_test.py<|end_file_name|><|fim▁begin|>import numpy as np import itertools from scipy.misc import comb as bincoef import random ######################################################################### # GENERATORS ######################################################################### def sign_per...
data = np.concatenate((A, B)) stat_ref = np.sum(A) # count permutation test statistics <=, >=, or ||>=|| than reference stat
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- __version__ = '0.5.0'<|fim▁hole|><|fim▁end|>
request_post_identifier = 'current_aldryn_blog_entry'
<|file_name|>text.js<|end_file_name|><|fim▁begin|>import test from 'ava'; import React from 'react'; import { shallow } from 'enzyme'; import Text from '../../../src/components/form-inputs/text'; test('Text | default props', (t) => { const textWrapper = shallow(<Text />); t.deepEqual(textWrapper.props(), { t...
max: -1,
<|file_name|>logistic.rs<|end_file_name|><|fim▁begin|>use la::Matrix; use opt::GradientDescent; pub struct LogisticRegression { theta : Matrix<f64>, threshold : f64 } impl LogisticRegression { pub fn train<F : FnMut(f64) -> ()>(x : &Matrix<f64>, y : &Matrix<bool>, learning_rate : f64, max_iterations : usize, mu...
// h(x) = 1 / (1 + e^(- theta^T * [1; x])) pub fn p(&self, x : &Matrix<f64>) -> f64 { assert!(x.cols() == 1); assert!((x.rows() + 1) == self.theta.get_data().len());
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>// ## Globals /*global $:true*/ var $ = require('gulp-load-plugins')({rename: {'gulp-jade-php': 'jade' }}); var argv = require('yargs').argv; var browserSync = require('browser-sync'); var gulp = require('gulp'); var lazypipe = require('la...
<|file_name|>syslog.py<|end_file_name|><|fim▁begin|>import SocketServer from abc import ABCMeta, abstractmethod import json import requests import six from .. import LOG as _LOG from ..signal.signal import DEFAULT_ORCHESTRATOR_URL from ..signal.event import LogEvent LOG = _LOG.getChild(__name__) @six.add_metaclass...
<|file_name|>server.go<|end_file_name|><|fim▁begin|>/* * * Copyright 2014, Google Inc. * 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 reta...
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>// Include gulp import gulp from 'gulp'; import fs from 'fs'; // Include Our Plugins<|fim▁hole|>import sassCompiler from 'sass'; import rename from "gulp-rename"; import uglify from 'gulp-uglify'; import postcss from 'gulp-postcss'; import re...
import eslint from 'gulp-eslint'; import mocha from 'gulp-mocha'; import browserSyncJs from 'browser-sync'; import sassJs from 'gulp-sass';
<|file_name|>scrape.py<|end_file_name|><|fim▁begin|># Copyright (C) 2013-2014 Igor Tkach # # 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/. import argparse import fcntl ...
couch_server = mkcouch(args.couch)
<|file_name|>Internationalizable.java<|end_file_name|><|fim▁begin|>/* * Copyright 2005-2006 UniVis Explorer development team. * * This file is part of UniVis Explorer * (http://phobos22.inf.uni-konstanz.de/univis).<|fim▁hole|> * of the License, or (at your option) any later version. * * Please see COPYING for the...
* * UniVis Explorer 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
<|file_name|>domtokenlist.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, AttrHelpers}; use dom::bindings::c...
// http://dom.spec.whatwg.org/#dom-domtokenlist-item fn Item(self, index: u32) -> Option<DOMString> {
<|file_name|>daysLeftThisWeek.js<|end_file_name|><|fim▁begin|>function daysLeftThisWeek (date) {<|fim▁hole|>} module.exports = daysLeftThisWeek<|fim▁end|>
return 6 - date.getDay()
<|file_name|>adaline.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 import math, sys, time def drange(start, stop, step): #Generator for step <1, from http://stackoverflow.com/questions/477486/python-decimal-range-step-value r = start while r < stop: yield r r += step class adalin...
if math.fabs(wc) < 0.1: insigFlag = True else:
<|file_name|>Battle.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 import time import random <|fim▁hole|>class Battle: def __init__(self, user1, user2): self.user1 = user1 self.user2 = user2 self.turn = user1 self.notTurn = user2 self.accepted = False self.fi...
<|file_name|>variables_test.py<|end_file_name|><|fim▁begin|>from sys import platform import unittest import checksieve class TestVariables(unittest.TestCase): def test_set(self): sieve = ''' require "variables"; set "honorific" "Mr"; ''' self.assertFalse(checksieve.parse_s...
def test_mod_length(self):
<|file_name|>persistent_list.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/. */ //! A persistent, thread-safe singly-linked list. us...
pub struct PersistentListIterator<'a, T> where T: 'a + Send + Sync { entry: Option<&'a PersistentListEntry<T>>,
<|file_name|>ifletsource1.rs<|end_file_name|><|fim▁begin|>fn main() { // Toutes les variables sont de type `Option<i32>`. let number = Some(7); let letter: Option<i32> = None; let emoticon: Option<i32> = None; // L'ensemble `if let` se déroule de cette manière: // `if let` déstructure `number`...
// Fournit une condition alternative. let i_like_letters = false;
<|file_name|>helpers.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Author: Nic Wolfe <nic@wolfeden.ca> # URL: https://sickrage.github.io # Git: https://github.com/SickRage/SickRage.git # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the ...
def is_anime_in_show_list():
<|file_name|>hue_gui.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'hue-gui.ui'<|fim▁hole|> from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") M...
# # Created by: PyQt5 UI code generator 5.8.2 # # WARNING! All changes made in this file will be lost!
<|file_name|>types.rs<|end_file_name|><|fim▁begin|>//! NTRU type definitions //! //! This module includes all the needed structs and enums for NTRU encryption library. All of them //! with their needed methods. use std::ops::{Add, Sub}; use std::default::Default; use std::{fmt, mem, error}; use libc::{int16_t, uint8_t,...
impl PartialEq for IntPoly { fn eq(&self, other: &IntPoly) -> bool { self.n == other.n &&
<|file_name|>sample_oscillator.js<|end_file_name|><|fim▁begin|>import {Sample} from './sample' import {context} from './init_audio' let instanceIndex = 0 export class SampleOscillator extends Sample{ constructor(sampleData, event){ super(sampleData, event) this.id = `${this.constructor.name}_${instanceInde...
// @TODO add type 'custom' => PeriodicWave let type = this.sampleData.type this.source = context.createOscillator()
<|file_name|>test_subclass.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS from ... import table from .. import pprint class MyRow(table.Row): def __str__(self):<|fim▁hole|> pass class MyMaskedColumn(table.Maske...
return str(self.as_void()) class MyColumn(table.Column):
<|file_name|>EventDecorator.java<|end_file_name|><|fim▁begin|>package cn.libery.calendar.MaterialCalendar; import android.content.Context; import java.util.Collection; import java.util.HashSet; import cn.libery.calendar.MaterialCalendar.spans.DotSpan; /** * Decorate several days with a dot */ public class Event...
private HashSet<CalendarDay> dates; public EventDecorator(int color, Collection<CalendarDay> dates) { this.color = color;
<|file_name|>posv.hpp<|end_file_name|><|fim▁begin|>/* * * Copyright (c) Toon Knapen & Kresimir Fresl 2003 * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * KF acknowledges the support of the Faculty of C...
#define BOOST_NUMERIC_BINDINGS_LAPACK_POSV_HPP #include <boost/numeric/bindings/traits/type_traits.hpp>
<|file_name|>af.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'save', 'af', { toolbar: 'Bewaar'<|fim▁hole|><|fim▁end|>
} );
<|file_name|>Benchmark.cpp<|end_file_name|><|fim▁begin|>#include <vector> #include <iostream> struct point { double x; double y; }; int main() { // Generate a lot of uniformly distributed 2d points in the range -1,-1 to +1,+1. enum { numXSamples = 10000 }; enum { numYSamples = 10000 }; std::vector<point> points...
points.push_back(p); } }
<|file_name|>commit.py<|end_file_name|><|fim▁begin|>import os # This function only READS the Commit info. # There is no point in loading any commit in memory. # What purpose can that serve? Nothing. (Prove this) def load(cls, name, path): try: with open(path, 'rb') as commit_info_file: commit_i...
# save # make chages to main tree? # exit
<|file_name|>_arrowcolor.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators class ArrowcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="arrowcolor", parent_name="layout.annotation", **kwargs ):<|fim▁hole|> plotly_name=plotly_name...
super(ArrowcolorValidator, self).__init__(
<|file_name|>Texts.java<|end_file_name|><|fim▁begin|>/* * This file is part of SpongeAPI, licensed under the MIT License (MIT). * * Copyright (c) SpongePowered <https://www.spongepowered.org> * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this s...
*/ public static Text join(Text separator, Text... texts) { switch (texts.length) { case 0:
<|file_name|>TaskExecutor.java<|end_file_name|><|fim▁begin|>package net.sf.jabref.gui.util; import javafx.concurrent.Task; /** * An object that executes submitted {@link Task}s. This * interface provides a way of decoupling task submission from the * mechanics of how each task will be run, including details of thr...
*/ public interface TaskExecutor { /**
<|file_name|>hrtb-higher-ranker-supertraits-transitive.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 o...
fn want_bar_for_any_ccx<B>(b: &B)
<|file_name|>deriving-clone-enum.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...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![feature(test)] extern crate test; extern crate rand; extern crate regex; extern crate zip; pub mod base;<|fim▁hole|><|fim▁end|>
pub mod mcts;
<|file_name|>Environment.js<|end_file_name|><|fim▁begin|>define( [ 'solarfield/lightship-js/src/Solarfield/Lightship/Environment', 'solarfield/ok-kit-js/src/Solarfield/Ok/ObjectUtils' ], function (LightshipEnvironment, ObjectUtils) { "use strict"; var Environment = ObjectUtils.extend(LightshipEnvironme...
);
<|file_name|>mouthdetection.py<|end_file_name|><|fim▁begin|>""" input: a loaded image; output: [[x,y],[width,height]] of the detected mouth area """ import cv def findmouth(img): # INITIALIZE: loading the classifiers haarFace = cv.Load('haarcascade_frontalface_default.xml') haarMouth = cv.Load('haarcascade_mo...
maxFaceSize = 0
<|file_name|>manifests.py<|end_file_name|><|fim▁begin|>"""Manifest clonning tools..""" import json import requests import six import time import uuid import zipfile from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes, serialization from cryptography.hazmat.primiti...
with original_manifest() as manifest: # my fancy stuff """
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This software may be used and distributed according to the terms of the * GNU General Public License version 2. */ use std::fmt; use std::pin::Pin; use anyhow::{Context, Error}; use edenapi_types::ToWire;...
}; write!(f, "{}", name) } }
<|file_name|>home.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ''' Copyright (c) 2015 Heidelberg University Library Distributed under the GNU GPL v3. For full terms see the file LICENSE.md ''' from ompannouncements import Announcements def index(): a = Announcements(myconf, db, locale) news_list = ...
return locals()
<|file_name|>parse-form-child-xml.js<|end_file_name|><|fim▁begin|>define(function (require) { 'use strict'; var $ = require('jquery'); var _ = require('underscore'); var XMLSerialiser = new window.XMLSerializer(); function xmlNodeReducer (memo, node) { return memo + XMLSerialiser.serializeToString(node...
*/ return function parseFormChildXML (xmlNode) { var result = {}; var $xmlNode = $(xmlNode);
<|file_name|>generate-apache-config.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import sys, os from optparse import OptionParser option_parser = OptionParser() option_parser.add_option('--install-root',default='/opt/graphite/', help="The base directory of the graphite installation") option_parser.add_opti...
if not os.path.isdir(install_root): print "Graphite does not appear to be installed at %s, do you need to specify a different --install-root?" % install_root sys.exit(1)
<|file_name|>gradientwidget.cpp<|end_file_name|><|fim▁begin|>#include "gradientwidget.h" #include "ui_gradientwidget.h" GradientWidget::GradientWidget(QWidget *parent) : AbstractWidget(parent), ui(new Ui::GradientWidget) { ui->setupUi(this); connect(ui->nextButton,SIGNAL(clicked(bool)),this,SLOT(nextCl...
<|file_name|>toggleLang.js<|end_file_name|><|fim▁begin|>// get the languange parameter in the URL (i for case insensitive; //exec for test for a match in a string and return thr first match) function getURLParameter(key) { var result = new RegExp(key + '=([^&]*)', 'i').exec(window.location.search); return result &...
<|file_name|>queues.go<|end_file_name|><|fim▁begin|>package servicebus // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorre...
if err != nil { return result, autorest.NewErrorWithError(err, "servicebus.QueuesClient", "listByNamespaceNextResults", nil, "Failure preparing next results request")
<|file_name|>simple.cost.import.setup.ts<|end_file_name|><|fim▁begin|>import {Component, OnInit, ElementRef,} from '@angular/core'; import {FileSelect} from './file.select'; import {NgIf} from '@angular/common'; import {NgForm} from '@angular/common'; import {CostImport, CostImportService} from '../../../services/co...
this.model.isSupplierInvoices = false; this.model.isPayrollWeekly = false; this.model.isPayrollMonthly = false;
<|file_name|>bitcoin_cmn.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="cmn" version="2.0"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Horuscoin Core</source> <translation type="un...
<source>This is a verified payment request.</source> <translation type="unfinished"/> </message>
<|file_name|>StreamCalcKryoTest.java<|end_file_name|><|fim▁begin|>package statzall.codec; import static org.junit.Assert.*; import org.junit.Test; import statzall.Cast; import statzall.StreamCalc; import statzall.codec.StreamCalcKryo; <|fim▁hole|> @Test public void test() { StreamCalc calc = new StreamCalc(10, 1...
public class StreamCalcKryoTest {
<|file_name|>exec_unix.go<|end_file_name|><|fim▁begin|>//go:build !windows // +build !windows<|fim▁hole|>import ( "log" "os/exec" "syscall" "time" ) // KillGrace is the amount of time we allow a process to shutdown before // sending a SIGKILL. const KillGrace = 5 * time.Second // WaitTimeout waits for the given c...
package internal
<|file_name|>grid.inlinedit.js<|end_file_name|><|fim▁begin|>;(function($){ /** * jqGrid extension for manipulating Grid Data * Tony Tomov tony@trirand.com * http://trirand.com/blog/ * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/...
<|file_name|>some.js<|end_file_name|><|fim▁begin|>var makeIterator = require('../function/makeIterator_'); /** * Array some */ /** * Description * @method some * @param {} arr * @param {} callback * @param {} thisObj * @return result */ function some(arr, callba...
<|file_name|>RunConfigurationUsageTriggerCollector.java<|end_file_name|><|fim▁begin|>// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.execution.impl.statistics; import com.intellij.execution.Executor; impor...
} return ValidationResultType.REJECTED;
<|file_name|>egg_info.py<|end_file_name|><|fim▁begin|>"""setuptools.command.egg_info Create a distribution's .egg-info directory and contents""" from distutils.filelist import FileList as _FileList from distutils.errors import DistutilsInternalError from distutils.util import convert_path from distutils import log im...
"""Delete `filename` (if not a dry run) after announcing it"""
<|file_name|>defaulting_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2016 The Kubernetes 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...
{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Kind: "ClusterRoleBinding"}: {}, {Group: "rbac.authorization.k8s.io", Version: "v1beta1", Kind: "ClusterRoleBindingList"}: {}, {Group: "rbac.authorization.k8s.io", Version: "v1beta1", Kind: "RoleBinding"}: ...
<|file_name|>convert_web_app.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 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. #include "chrome/browser/extensions/convert_web_app.h" #include <cmath> #include <limits...
ScopedTempDir temp_dir;
<|file_name|>21.py<|end_file_name|><|fim▁begin|>class amicable(): def d(self, n): if n == 1: return 0 else: sum_of_factors = 0 for i in range(1, int(n**0.5)+1): if n % i == 0: sum_of_factors += i ...
return sum_of_factors
<|file_name|>trait-cast-generic.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://www.apache....
fn f<A>(a: A) -> A { a } }
<|file_name|>server_test.go<|end_file_name|><|fim▁begin|>package server import (<|fim▁hole|> "testing" "golang.org/x/net/context" "github.com/quilt/quilt/api/pb" "github.com/quilt/quilt/db" "github.com/quilt/quilt/stitch" "github.com/stretchr/testify/assert" ) func checkQuery(t *testing.T, s server, table db.T...
"fmt"
<|file_name|>transcribe.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 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...
r.sp_diag.span_fatal(sp.clone(), &msg[]); } LisConstraint(len, _) => {
<|file_name|>c.go<|end_file_name|><|fim▁begin|>// Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package c<|fim▁hole|> "b" ) type BI interface { Something(s int64) int64 Another(pxp a.G) int32 } func BRS(sd...
import ( "a"
<|file_name|>353DesignSnakeGame.py<|end_file_name|><|fim▁begin|>class SnakeGame: def __init__(self, width, height, food): """ Initialize your data structure here. @param width - screen width @param height - screen height @param food - A list of food positions E.g fo...
<|file_name|>run_pseudo_tasks_slurm.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- import os import sys import argparse import datetime import time import gettext from pseudo_cluster.task import Task_record from pseudo_cluster.tasks_list import Tasks_list from pseudo_cluster.extended_tas...
help=_(""" Путь до скрипта, который реализует тело задачи в псевдокластере. """)
<|file_name|>generic-alias-unique.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// 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 // option. This file may not be copied, mod...
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. //
<|file_name|>os_project.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # Copyright (c) 2015 IBM Corporation # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, o...
else: if _needs_update(module, project): changed = True
<|file_name|>webpack-eslint.js<|end_file_name|><|fim▁begin|>const getWebpackConfig = require('./get-webpack-config'); module.exports = { globals: { __DEV__: false, __PROD__: false, __DEVSERVER__: false, __CLIENT__: false, __SERVER__: false, 'process.env.NODE_ENV': false }, settings: { ...
} } }
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub type c_char = u8; pub type wchar_t = u32; pub type __u64 = ::c_ulonglong; s! { pub struct stat { pub st_dev: ::dev_t, pub st_ino: ::ino_t, pub st_mode: ::c_uint, pub st_nlink: ::nlink_t, pub st_uid: ::uid_t, pub st...
if #[cfg(libc_align)] { mod align; pub use self::align::*; }
<|file_name|>issue-7911.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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...
struct Bar(i32); struct Foo { bar: Bar }
<|file_name|>Subdivision.cpp<|end_file_name|><|fim▁begin|>/* Open Asset Import Library (assimp) ---------------------------------------------------------------------- Copyright (c) 2006-2018, assimp team All rights reserved. Redistribution and use of this software in source and binary forms, with or without modific...
<|file_name|>smove.js<|end_file_name|><|fim▁begin|>try { await kuzzle.ms.sadd('set1', ['foo', 'bar', 'baz']); await kuzzle.ms.sadd('set2', ['qux']); await kuzzle.ms.smove('set1', 'set2', 'foo'); // Prints: [ 'bar', 'baz' ] console.log(await kuzzle.ms.smembers('set1'));<|fim▁hole|>} catch (error) { console...
// Prints: [ 'foo', 'qux' ] console.log(await kuzzle.ms.smembers('set2'));
<|file_name|>HolidayVillageTwoTone.js<|end_file_name|><|fim▁begin|>import createSvgIcon from './utils/createSvgIcon'; import { jsx as _jsx } from "react/jsx-runtime";<|fim▁hole|> opacity: ".3" }, "0"), /*#__PURE__*/_jsx("path", { d: "m8 4-6 6v10h12V10L8 4zm4 14H9v-3H7v3H4v-7.17l4-4 4 4V18zm-3-5H7v-2h2v2zm9 7V8.35L13...
export default createSvgIcon([/*#__PURE__*/_jsx("path", { d: "m8 6.83-4 4V18h3v-3h2v3h3v-7.17l-4-4zM9 13H7v-2h2v2z",
<|file_name|>tap.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
"use strict";require("retape")(require("./index"))
<|file_name|>josu.js<|end_file_name|><|fim▁begin|>// フォーマット var koyomi = require('../..').create();<|fim▁hole|> // 序数 (CC:経過日数) eq(format(20150101, 'CC'), '1'); eq(format(20150101, 'CC>0'), '1st'); eq(format(20150102, 'CC>0'), '2nd'); eq(format(20150103, 'CC>0'), '3rd'); eq(format(20150104, 'CC>0'), '4th')...
var format = koyomi.format.bind(koyomi); var eq = require('assert').equal; koyomi.startMonth = 1;
<|file_name|>package-info.java<|end_file_name|><|fim▁begin|>/** * Purpose of package - find largest number from 2 and 3 numbers. * @since 1.0<|fim▁hole|> package ru.skuznetsov;<|fim▁end|>
* @author skuznetsov * @version 2.0 */
<|file_name|>test_keepalived_state_change.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Red Hat 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.apa...
class TestKeepalivedStateChange(base.BaseSudoTestCase): def setUp(self):
<|file_name|>extract_frames.py<|end_file_name|><|fim▁begin|>import cv2 import fitparse import os fname = 'V0280048.MP4' fitfile ='2018-06-01-12-13-33.fit' vidcap = cv2.VideoCapture(fname) success,image = vidcap.read() success count = 0 if success: stream = fname.split('.')[-2] os.mkdir(stream) while succes...
metadata.to_csv('{}_metadata.csv'.format(stream))
<|file_name|>ast_to_dict.py<|end_file_name|><|fim▁begin|>from typing import Any, Collection, Dict, List, Optional, overload from ..language import Node, OperationType from ..pyutils import is_iterable __all__ = ["ast_to_dict"] @overload def ast_to_dict( node: Node, locations: bool = False, cache: Optional[Dict...
...
<|file_name|>cs_npc.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2008-2019 TrinityCore <https://www.trinitycore.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 * Free Software Foundation; either version...
const_cast<CreatureTemplate*>(cinfo)->faction = factionId;
<|file_name|>V3Changed.cpp<|end_file_name|><|fim▁begin|>// -*- mode: C++; c-file-style: "cc-mode" -*- //************************************************************************* // DESCRIPTION: Verilator: Add temporaries, such as for changed nodes // // Code available from: http://www.veripool.org/verilator // //******...
static int level = -1; if (VL_UNLIKELY(level < 0)) level = v3Global.opt.debugSrcLevel(__FILE__);
<|file_name|>trace_event_importer.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be<|fim▁hole|> from telemetry import timeline_model def Import(data): trace = json.loads(data) # pylint: disable=W061...
# found in the LICENSE file. import json
<|file_name|>background.js<|end_file_name|><|fim▁begin|>chrome.runtime.onInstalled.addListener(function(details){ if(details.reason == "install"){ console.log("This is a first install!"); }else if(details.reason == "update"){ var thisVersion = chrome.runtime.getManifest().version; consol...
return {redirectUrl: "chrome-extension://"+chrome.runtime.id+"/js/gamehighlightplayer_stub.js" }; }
<|file_name|>test_simple.py<|end_file_name|><|fim▁begin|>#coding: utf-8 import os import time from . import test_util def test_add_file(): test_util.mkfile(1, 'a.md', 'add a file') test_util.verify_result() def test_add_file_t(): test_util.mkfile(2, 'l/m/n/test.md', 'add l/m/n/test.md') test_util.ver...
def test_rm_dir(): test_util.rmdir(1, 'ad') test_util.verify_result()
<|file_name|>mine.js<|end_file_name|><|fim▁begin|>exports.login = function* (ctx) { const result = yield ctx.service.mine.login(ctx.request.body); if (!result) { ctx.status = 400; ctx.body = { status: 400, msg: `please check your username and password`, } return; } ctx.body = { a...
exports.info = function* (ctx) { const info = yield ctx.service.mine.info(ctx.auth.user_id); if (info == null) {
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import _ from 'lodash'; import path from 'path'; import log from '../log'; import consoleStamp from 'console-stamp'; process.env.NODE_ENV = _.defaultTo(process.env.NODE_ENV, 'development'); const ENV = { dev: process.env.NODE_ENV === 'development', prod: pro...
let config = configDefaults.development; if (ENV.prod) {
<|file_name|>Session.py<|end_file_name|><|fim▁begin|>import sys import logging import pexpect class Session(object): NO_SESSION = 1 SESSION_AVAILABLE = 2 PRIVILEDGE_MODE = 3 CONFIGURATION_MODE = 4 def __init__(self, hostname, username='', password='', enable_username='', enable_password=''): ...
def enter_enable_mode(self): ''' enters enable mode '''