prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>types.py<|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 Licen...
"LazyList" ]
<|file_name|>transform.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 https://mozilla.org/MPL/2.0/. */ //! Specified types for CSS values that are related to tra...
<|file_name|>jnr12_in.js<|end_file_name|><|fim▁begin|>function enter(pi) { pi.warp(926110401, 0); //next return(true);<|fim▁hole|><|fim▁end|>
}
<|file_name|>events.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>import { Jogador } from '../../../../common/database/models/Jogador'; import { environment } from '../../../../common/environment'; import { BrazucasEventos } from '../../interfaces/brazucas-eventos'; import { VoiceChatProvider } from '../../providers/voic...
import { DadosVeiculo } from '../../../../browser/src/app/services/veiculo.service'; import { DadosLogin, DadosRegistro, RegistroResultado } from '../../../../browser/src/interfaces/login.interface'; import { BrazucasServer } from '../../../../common/brazucas-server';
<|file_name|>sword.cc<|end_file_name|><|fim▁begin|>/* * Xiphos Bible Study Tool * sword.cc - glue * * Copyright (C) 2000-2020 Xiphos Developer Team * * 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 ...
g_free(companion); }
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # eofs documentation build configuration file, created by # sphinx-quickstart on Thu Jul 5 15:47:55 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values ar...
] # If true, show URL addresses after external links.
<|file_name|>transifex.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Matt Layman from ConfigParser import ConfigParser, NoOptionError, NoSectionError import os import sys import requests API_URL = 'https://www.transifex.com/api/2' LANGUAGES = [<|fim▁hole|> 'it', 'nl', ] def fetch_po_for(language, us...
'es', 'fr',
<|file_name|>basic.py<|end_file_name|><|fim▁begin|>a = a # e 4 a = 1 # 0 int l = [a] # 0 [int] d = {a:l} # 0 {int:[int]} s = "abc" c = ord(s[2].lower()[0]) # 0 int # 4 (str) -> int l2 = [range(i) for i in d] # 0 [[int]] y = [(a,b) for a,b in {1:'2'}.iteritems()] # 0 [(int,str)] b = 1 # 0 int if 0: b ...
x = `1` # 0 str
<|file_name|>QueryFormModel.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2014 Juniper Networks, Inc. All rights reserved. */ define([ 'underscore', 'backbone', 'knockout', "protocol", 'contrail-model', 'query-or-model', 'query-and-model', 'core-basedir/reports/qe/ui/js/common/qe...
newAndClause = new QueryAndModel(this.model().attributes); andClauses.add([newAndClause]); },
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 Parity Technologies (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...
//! Bridge between bloomchain crate types and ethcore.
<|file_name|>SegmentHandler.java<|end_file_name|><|fim▁begin|>package com.cmput402w2016.t1.webapi.handler; import com.cmput402w2016.t1.data.Segment; import com.cmput402w2016.t1.webapi.Helper; import com.cmput402w2016.t1.webapi.WebApi; import com.sun.net.httpserver.HttpExchange; import com.sun.net.httpserver.HttpHandle...
try {
<|file_name|>user_context.go<|end_file_name|><|fim▁begin|>/* Copyright 2015 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.org/licenses/LICENSE-2.0 Unles...
<|file_name|>megacoin_zh_TW.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0" language="zh_TW"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+26"/> <source>D...
<translation>寫入檔案資訊失敗</translation>
<|file_name|>getFile.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # 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 Yo...
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Gengeo(AutotoolsPackage): """GenGeo i...
'--verbose', '--with-boost=' + self.spec['boost'].prefix, 'CCFLAGS=-fpermissive',
<|file_name|>package-info.java<|end_file_name|><|fim▁begin|>/** * Contains methods for extracting/selecting final multiword candidates. * @author Valeria Quochi @author Francesca Frontini @author Francesco Rubino <|fim▁hole|> */ package multiword;<|fim▁end|>
* Istituto di linguistica Computazionale "A. Zampolli" - CNR Pisa - Italy *
<|file_name|>dirac-admin-proxy-upload.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ######################################################################## # File : dirac-admin-proxy-upload.py # Author : Adrian Casajus ######################################################################## from __future_...
retVal = uploadProxy(cliParams)
<|file_name|>test_aras.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 import sys sys.path.append('../fml/') import os import numpy as np import fml import random t_width = np.pi / 4.0 # 0.7853981633974483 d_width = 0.2 cut_distance = 6.0 r_width = 1.0 c_width = 0.5 PTP = {\ 1 :[1,1] ,2: [1,8]#Ro...
return dist def aras_distance(mol1, mol2, max_size=30):
<|file_name|>preset.js<|end_file_name|><|fim▁begin|>var winston = require('winston'); var fs = require('fs'); var presets = {}; function presetsAction(player, values, callback) { var value = decodeURIComponent(values[0]); if (value.startsWith('{')) var preset = JSON.parse(value); else var preset = preset...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>let fs = require('fs'); const {dialog} = require('electron').remote; let drivelist = require('drivelist'); let distrosList = require('./js/distros.json'); let numeral = require('numeral'); let fileNameRoute; let fileName; let fileChoosed = false; let download...
let confirmWrite = () => { if (downloadFile) {
<|file_name|>test_suite_test.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The Drydock 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...
t.Fatalf("This should never run.") return 0
<|file_name|>call_record.py<|end_file_name|><|fim▁begin|>from office365.directory.identities.identity_set import IdentitySet from office365.entity import Entity class CallRecord(Entity): """Represents a single peer-to-peer call or a group call between multiple participants, sometimes referred to as an online ...
<|file_name|>daypicker.ts<|end_file_name|><|fim▁begin|>import {Component, OnInit} from 'angular2/core'; import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass} from 'angular2/common'; import {Ng2BootstrapConfig, Ng2BootstrapTheme} from '../ng2-bootstrap-config'; import {DatePickerInner} from './datepicker-inner'; // write ...
<th *ngFor="#labelz of labels" class="text-xs-center"><small aria-label="labelz.full"><b>{{labelz.abbr}}</b></small></th> `,
<|file_name|>Methuselah.py<|end_file_name|><|fim▁begin|>from .View import View class MethuselahView(View):<|fim▁hole|> "stableAfter": {"pick": "l"} }<|fim▁end|>
type = "Methuselah" trans = {
<|file_name|>set-user.go<|end_file_name|><|fim▁begin|>// Copyright 2016 The acbuild 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/LICENS...
func (i *Image) SetUser(user string) error { if user == "" { return fmt.Errorf("user cannot be empty")
<|file_name|>user.js<|end_file_name|><|fim▁begin|>import modelExtend from 'dva-model-extend' import { create, remove, update } from '../services/user' import * as usersService from '../services/users' import { pageModel } from './common' import { config } from 'utils' const { query } = usersService const { prefix } = ...
if (data.success) { yield put({ type: 'hideModal' }) yield put({ type: 'query' }) } else {
<|file_name|>ChartRendererTest.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2013-2016 52°North Initiative for Geospatial Open Source * Software GmbH * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published * by t...
} @Test
<|file_name|>panic-task-name-owned.rs<|end_file_name|><|fim▁begin|>// run-fail // error-pattern:thread 'owned name' panicked at 'test' // ignore-emscripten Needs threads. use std::thread::Builder; <|fim▁hole|> let r: () = Builder::new() .name("owned name".to_string()) .spawn(...
fn main() {
<|file_name|>gce_loadbalancer_external_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2017 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/licen...
<|file_name|>attachment.rs<|end_file_name|><|fim▁begin|>// notty is a new kind of terminal emulator. // Copyright (C) 2015 without boats // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software F...
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details.
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>struct Lexer<'a> { src: &'a [u8], pos: usize } impl<'a> Lexer<'a> { fn new(src: &'a [u8]) -> Lexer { Lexer { src: src, pos: 0 } } } impl<'a> Lexer<'a> { fn ch(&self) -> u8 { self.src[self.pos] } fn eof(&self) -> bool { self.pos >= self.src.len() } fn s...
self.skip_ws();
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ############################################################################## # # Account Journal Always Check Date module for OpenERP # Copyright (C) 2013-2014 Akretion (http://www.akretion.com) # @author Alexis de Lattre <ale...
<|file_name|>lib.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.org/licenses/LI...
if s.get().char_len() != 4 {
<|file_name|>helper.py<|end_file_name|><|fim▁begin|>from plenum.test.spy_helpers import get_count def sum_of_request_propagates(node): return get_count(node.replicas[0]._ordering_service, node.replicas[0]._ordering_service._request_propagates_if_needed) + \ get_count(node.replicas[...
node.replicas[1]._ordering_service._request_propagates_if_needed)
<|file_name|>app.test.js<|end_file_name|><|fim▁begin|>import { expect } from 'chai'; import * as types from '../../app/js/utils/actionTypes'; import { changeLanguage } from '../../app/js/actions/app';<|fim▁hole|> describe('App action', () => { it('changes language on the parameter passed', () => { const lang = '...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># See e.g. http://stackoverflow.com/a/14076841/931303 try: import pymysql pymysql.install_as_MySQLdb()<|fim▁hole|><|fim▁end|>
except ImportError: pass
<|file_name|>user.client.controller.js<|end_file_name|><|fim▁begin|>(function () { 'use strict'; angular .module('users.admin') .controller('UserController', UserController); UserController.$inject = ['$scope', '$state', '$window', 'Authentication', 'userResolve', '$mdToast']; function UserController...
<|file_name|>about.client.controller.js<|end_file_name|><|fim▁begin|>'use strict'; // Projects controller angular.module('about').controller('AboutUsController', ['$scope', '$stateParams', '$state', '$location', 'Authentication', function($scope, $stateParams, $state, $location, Authentication) { $scope.authenticat...
}
<|file_name|>index.js<|end_file_name|><|fim▁begin|>module.exports = {<|fim▁hole|> name: 1, status: { child: 0, attribute: 'class', regex: / ([a-z]+)$/ } } };<|fim▁end|>
selector: '.skilifts .skilift', parse: {
<|file_name|>gm_json.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (c) 2013 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. """Schema of the JSON summary file written out by the GM tool. This must be k...
import io import json import os
<|file_name|>test.py<|end_file_name|><|fim▁begin|>import mms import unittest from mooseutils import fuzzyAbsoluteEqual class TestOutflow(unittest.TestCase): def test(self): df1 = mms.run_spatial('advection-outflow.i', 7, y_pp=['L2u', 'L2v']) fig = mms.ConvergencePlot(xlabel='Element Size ($h$)', yl...
fig.plot(df1, label=['L2u'],
<|file_name|>dashboard.component.ts<|end_file_name|><|fim▁begin|>import {Component, OnInit} from 'angular2/core'; import {Router} from 'angular2/router'; import {Hero} from './hero'; import {HeroService} from './hero.service'; @Component({ selector: 'my-dashboard', templateUrl: 'app/dashboard.component.html', st...
<|file_name|>expressions.py<|end_file_name|><|fim▁begin|>__all__ = ['E'] import operator import sys import threading import numpy # Declare a double type that does not exist in Python space double = numpy.double # The default kind for undeclared variables default_kind = 'double' type_to_kind = {bool: 'bool', int: ...
'copy' : func(numpy.copy),
<|file_name|>network.rs<|end_file_name|><|fim▁begin|>// Copyright (C) 2013-2020 Blockstack PBC, a public benefit corporation // Copyright (C) 2020 Stacks Open Internet Foundation // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as publish...
<|file_name|>descriptionreponamelstm.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- from Models.FeatureProcessing import * from keras.models import Sequential from keras.layers import Activation, Dense, LSTM from keras.optimizers import Adam, SGD import numpy as np import abc from Classif...
sample = self.formatInputData(sample) return np.argmax(self.model.predict(sample))
<|file_name|>_shared_galleries_operations.py<|end_file_name|><|fim▁begin|># coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information....
<|file_name|>console_tests.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2016, Germán Fuentes Capella <development@fuentescapella.com> # BSD 3-Clause License # # Copyright (c) 2017, Germán Fuentes Capella # All rights reserved. # # Redistribution and use in source and binary forms, with or wi...
<|file_name|>ReporterColumnNameForm.java<|end_file_name|><|fim▁begin|>/*L * Copyright RTI International * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/webgenome/LICENSE.txt for details. */ /* $Revision: 1.1 $ $Date: 2007-08-22 20:03:57 $ */ package org.rti.webgenom...
/** * Set name of column containing reporter names.
<|file_name|>acscsv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: UTF-8 -*- __author__="Scott Hendrickson" __license__="Simplified BSD" import sys import datetime import fileinput from io import StringIO # Experimental: Use numba to speed up some fo the basic function # that are run many times pe...
<|file_name|>test_crashstorage_base.py<|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/. from unittest import mock from configman import Nam...
assert len(poly_store.stores) == 3 assert poly_store.stores.A.foo == "a" assert poly_store.stores.A2.foo == "a"
<|file_name|>vue-i18n.runtime.esm-bundler.js<|end_file_name|><|fim▁begin|>/*! * vue-i18n v9.0.0 * (c) 2021 kazuya kawaguchi * Released under the MIT License. */ import { getGlobalThis, format, makeSymbol, isPlainObject, isArray, isObject, isBoolean, isString, isRegExp, isFunction, isNumber, warn, isEmptyObject ...
} if (isString(props.format)) { options.key = props.format;
<|file_name|>config-user.js<|end_file_name|><|fim▁begin|>ig.module( 'plusplus.config-user' ) .defines(function() { /** * User configuration of Impact++. * <span class="alert alert-info"><strong>Tip:</strong> it is recommended to modify this configuration file!</span> * @examp...
<|file_name|>0005_course_image.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('studygroups', '0004_studygroupsignup_mobile'), ] operations = [ migrations.AddField( mod...
]
<|file_name|>Forage.ts<|end_file_name|><|fim▁begin|>//convert /*(ghost.core.Hardware.*/ import {Hardware} from "ghost/core/Hardware"; ///<module="ghost/core"/> //TODO:add mozilla API and converts with Promises export class FakeLocalStorage { public _storage : any; /** * Constructor ...
*/ public setItem(key:string, value:any):Promise<any>
<|file_name|>TaxonomyRouter_spec.js<|end_file_name|><|fim▁begin|>const should = require('should'), sinon = require('sinon'), _ = require('lodash'), settingsCache = require('../../../../server/services/settings/cache'), common = require('../../../../server/lib/common'), controllers = require('../../....
// edit feature taxonomyRouter.mountRoute.args[2][0].should.eql('/tag/:slug/edit'); taxonomyRouter.mountRoute.args[2][1].should.eql(taxonomyRouter._redirectEditOption.bind(taxonomyRouter)); });
<|file_name|>xsky_path45.py<|end_file_name|><|fim▁begin|>import zstackwoodpecker.test_state as ts_header import os TestAction = ts_header.TestAction def path(): return dict(initial_formation="template5", checking_point=8, path_list=[ [TestAction.create_vm, 'vm1', ], [TestAction.create_volume, 'volume1', 'flag=...
<|file_name|>mode.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 Parity Technologies (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 versio...
<|file_name|>Interaction.js<|end_file_name|><|fim▁begin|>/* * * * (c) 2010-2020 Torstein Honsi * * License: www.highcharts.com/license * * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!! * * */ 'use strict'; import H from './Globals.js'; /** * @interface Highcharts.PointEventsOption...
seriesTypes.pie.prototype.drawTracker = TrackerMixin.drawTrackerPoint;
<|file_name|>Destroyable.java<|end_file_name|><|fim▁begin|>/* Copyright 2015 Roychoudhury, Abhishek */ <|fim▁hole|>package org.abhishek.fileanalytics.lifecycle; public interface Destroyable { void destroy(); boolean destroyed(); }<|fim▁end|>
<|file_name|>rmeta.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 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/licenses/...
// aux-build:rmeta_rmeta.rs // aux-build:rmeta_rlib.rs
<|file_name|>openpgp.go<|end_file_name|><|fim▁begin|>// Copyright 2012 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 main import ( "crypto" "crypto/rand" "crypto/rsa" "io" "time" _ "crypto/sha256" "golang.o...
var KeyDate time.Time = time.Date(1979, time.April, 10, 14, 15, 0, 0, time.FixedZone("VET", -16200))
<|file_name|>float_context.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 geom::point::Point2D; use geom::size::Size2D; use g...
do self.with_base |base| { base.clearance(clear) } }
<|file_name|>Anonymous Functions Practice.js<|end_file_name|><|fim▁begin|>// function that finds the sum of two parameters function findSum(firstnr, secondnr){ return firstnr + secondnr; } //function that finds the product of two parameters function findProduct(firstnr, secondnr){ return firstnr * secondnr; } /* th...
threeOperation(5, findSum);
<|file_name|>RpAccountCheckBatchServiceImpl.java<|end_file_name|><|fim▁begin|>/* * Copyright 2015-2102 RonCoo(http://www.roncoo.com) Group. * * 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|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os from setuptools import setup def read(fname): with open(os.path.join(os.path.dirname(__file__), fname)) as f: return f.read() setup(name='django-darkknight', version='0.9.0', license="BSD", description="He...
'django-countries',
<|file_name|>integer-literal-suffix-inference.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...
//~| expected i16 //~| found i32 id_i16(c64); //~^ ERROR mismatched types
<|file_name|>lee_lineas.cc<|end_file_name|><|fim▁begin|><|fim▁hole|>/* --------------------------------------------------------------------------- * Programa: lee_lineas * Entradas: Una serie de líneas de texto * Salidas: - La línea más larga (si no se introduce ninguna se muestra una cadena vacía) * - L...
<|file_name|>QsbkFragment.java<|end_file_name|><|fim▁begin|>package io.github.marktony.reader.qsbk; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.design.widget.Snackbar; import android.support.v4.app.Fragment; import android.support.v4.widget.SwipeRefreshLayout; import an...
public void onRefresh() {
<|file_name|>test_maxout_op.py<|end_file_name|><|fim▁begin|># Copyright (c) 2018 PaddlePaddle 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://ww...
def test_dygraph_api(self): paddle.disable_static(self.place)
<|file_name|>test_stats_routes.py<|end_file_name|><|fim▁begin|>from .routes_test_fixture import app # noqa<|fim▁hole|> assert client.get("/stats/enwiki/1")._status_code == 200 # test archived campaign assert client.get("/stats/enwiki/7")._status_code == 200 def test_stats(client): assert client.get("/...
def test_stats_wiki_campaign(client): # test active campaign
<|file_name|>QuoteEntity.java<|end_file_name|><|fim▁begin|>package mobi.qubits.tradingapp.query; import java.util.Date; import org.springframework.data.annotation.Id; public class QuoteEntity { @Id private String id; private String symbol; private String name; private float open; private floa...
private String date; private String quoteTime;
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main import ( "fmt" "io/ioutil" "log" "os" "os/exec" "github.com/hashicorp/go-plugin" "github.com/hashicorp/go-plugin/examples/grpc/shared" ) func main() { // We don't want to see the plugin logs. log.SetOutput(ioutil.Discard) // We're a host. Star...
fmt.Println("Error:", err.Error()) os.Exit(1)
<|file_name|>test_nxos_bfd_global.py<|end_file_name|><|fim▁begin|># (c) 2019 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Li...
echo_rx_interval=51, interval={'tx': 51, 'min_rx': 51, 'multiplier': 3}, slow_timer=2000, startup_timer=5,
<|file_name|>test_overview_example.py<|end_file_name|><|fim▁begin|>__author__ = 'mpetyx' from unittest import TestCase import unittest import logging import sys from pyapi import API class TestpyAPI(TestCase): def setUp(self):<|fim▁hole|> # print "Setting up the coverage unit test for pyapi" self...
<|file_name|>mod_sesamstrasse.py<|end_file_name|><|fim▁begin|>import datetime, re from mod_helper import * debug = True def sesamstrasseShow(): mediaList = ObjectContainer(no_cache=True) if debug == True: Log("Running sesamstrasseShow()...") try: urlMain = "http://www.sesamstrasse.de" content = getURL(urlMain...
title = date+" - "+title
<|file_name|>get-all-users.js<|end_file_name|><|fim▁begin|><|fim▁hole|> module.exports = function(req, res) { var result = User.find ({}) .where('loginName').ne('root') .select('id loginName name claims') .exec(function(err, users) { res.json(users); }); };<|fim▁end|>
var User = require('../../models/user');
<|file_name|>args.py<|end_file_name|><|fim▁begin|>from webargs import fields <|fim▁hole|> user_args = { 'email': fields.Str(validate=Email, required=True), 'password': fields.Str(validate=password, required=True) } role_args = { 'name': fields.Str(required=True), 'description': fields.Str(required=True...
from ..api.validators import Email, password
<|file_name|>test_weather.py<|end_file_name|><|fim▁begin|>"""Test for the smhi weather entity.""" import asyncio from datetime import datetime import logging from unittest.mock import AsyncMock, Mock, patch from smhi.smhi_lib import APIURL_TEMPLATE, SmhiForecastException from homeassistant.components.smhi import weat...
assert state.attributes[ATTR_WEATHER_TEMPERATURE] == 17 assert state.attributes[ATTR_WEATHER_VISIBILITY] == 50
<|file_name|>ob_equality.py<|end_file_name|><|fim▁begin|># Copyright (C) 2013-2021 Roland Lutz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your op...
# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of
<|file_name|>BenchmarkTest11613.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|>table6.py<|end_file_name|><|fim▁begin|>from parameter import * from parse_digit import * from os import system cmd = "make -C tools >/dev/null 2>/dev/null;mkdir log model 2>/dev/null" system(cmd) #remove those method/data you are not interested in its result methodlist = ['random-forest','gbdt'] data = ...
if d == 'MQ2007-list' or d == 'MQ2008-list': digit = "NA" else: ndcg = l.split(' ')[-2].strip()
<|file_name|>windows.rs<|end_file_name|><|fim▁begin|>#![cfg(windows)] use std::{ptr, thread, time}; use std::sync::mpsc::{channel, Sender}; use winapi::{self, KEY_EVENT_RECORD}; use kernel32; use user32; use tvis_util::Handle; use input::{Event, InputEvent, Key, Mods}; use {Error, Result}; const SHUTDOWN_KEY: u16 = 0...
fn new(tx: Sender<Box<Event>>) -> KeyReader { KeyReader { surrogate: None, tx,
<|file_name|>parser.rs<|end_file_name|><|fim▁begin|>use expr::{Expr, BinOp, UnOp, Dec}; use parser::lexer::Lexer; use parser::token::Token; use parser::parser_error::ParserError; use std::result; pub type Result<T> = result::Result<T, ParserError>; struct Parser { lexer: Lexer, current_token: Token, } impl Parse...
self.eat(Token::RParen)?; self.eat(Token::LBracket)?; let body = self.block()?;
<|file_name|>django_settings.py<|end_file_name|><|fim▁begin|>from holodeck.settings import * import os import sys # Django settings for Holodeck project. PATH = os.path.split(os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]))))[0] DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email...
<|file_name|>models.py<|end_file_name|><|fim▁begin|>##-*-coding: utf-8 -*- from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Usage(models.Model): ip = models.CharField(max_length=50) method = models.CharField(max_length=3) path = ...
<|file_name|>fields.py<|end_file_name|><|fim▁begin|>from django.conf import settings if 'django_select2' in settings.INSTALLED_APPS: from django_select2.fields import AutoModelSelect2Field class PageSearchField(AutoModelSelect2Field):<|fim▁hole|> search_fields = [ 'title_set__title__icont...
<|file_name|>syncgroups.go<|end_file_name|><|fim▁begin|>package storagesync // 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 in...
}
<|file_name|>qmanager-agent.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python import signal import pickle import platform import socket import time from pika import BasicProperties import portbuild.qthreads as qthreads import portbuild.torrent as torrent import portbuild.util as util ready = [] class AgentPro...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>pub mod number_value;<|fim▁end|>
pub mod boolean_value;
<|file_name|>globalconnect.d.ts<|end_file_name|><|fim▁begin|>declare module "diagram-js/lib/features/global-connect/GlobalConnect" { import EventBus from "diagram-js/lib/core/EventBus"; import { Base } from "diagram-js/lib/model"; import Canvas from "diagram-js/lib/core/Canvas"; import Dragging from "diagram-js...
<|file_name|>lc767-reorganize-string.go<|end_file_name|><|fim▁begin|>package main import ( "fmt" ) /*767. Reorganize String https://leetcode.com/problems/reorganize-string/description/ Given a string `S`, check if the letters can be rearranged so that two characters that are adjacent to each other are not the sa...
**Input:** S = "aab" **Output:** "aba"
<|file_name|>TaskCreateFragment.java<|end_file_name|><|fim▁begin|>package pg.autyzm.friendly_plans.manager_app.view.task_create; import android.app.FragmentTransaction; import android.content.Intent; import android.databinding.DataBindingUtil; import android.os.Bundle; import android.util.Log; import android.view.Layo...
} @Override public void eventSelectSound(View view) {
<|file_name|>mva-w15.js<|end_file_name|><|fim▁begin|>/** * * STREAM: MVA (window: 15) * * * * DESCRIPTION: * - * * * API: * - * * * NOTES: * [1] * * * TODO: * [1] * * * HISTORY: * - 2014/05/28: Created. [AReines]. * * * DEPENDENCIES: * [1] * * * LICENSE: * MIT * * Copyright (c) 2014. Athan Reines. * * * AUT...
<|file_name|>aql_linker.py<|end_file_name|><|fim▁begin|>import re import os.path import datetime import base64 import aql # ============================================================================== info = aql.get_aql_info() HEADER = """#!/usr/bin/env python # # THIS FILE WAS AUTO-GENERATED. DO NOT EDIT! # # Co...
EMBEDDED_TOOLS = '\n _EMBEDDED_TOOLS.append(b"""\n%s""")\n'
<|file_name|>helpers.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # Copyright 2018 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/LI...
log_layer_probs -= tf.reduce_max(log_layer_probs, axis=0, keep_dims=True) layer_probs = tf.exp(log_layer_probs) probs_sum = tf.reduce_sum(layer_probs, axis=0, keep_dims=True) layer_probs = tf.divide(layer_probs, probs_sum)
<|file_name|>extension.go<|end_file_name|><|fim▁begin|><|fim▁hole|> import ( "github.com/markdaws/gohome/pkg/cmd" "github.com/markdaws/gohome/pkg/gohome" ) type extension struct { gohome.NullExtension } func (e *extension) Name() string { return "testing" } func (e *extension) BuilderForDevice(sys *gohome.System...
package testing
<|file_name|>account_test_classes.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from odoo.tests.common import HttpCase from odoo.exceptions import ValidationError<|fim▁hole|> the installation of all modules, and will SKIP TESTS ifit cannot find an already configured accounting (which means no localiza...
class AccountingTestCase(HttpCase): """ This class extends the base TransactionCase, in order to test the accounting with localization setups. It is configured to run the tests after
<|file_name|>protractor-ci.conf.js<|end_file_name|><|fim▁begin|>const config = require('./protractor.conf').config; config.capabilities = { browserName: 'chrome', chromeOptions: {<|fim▁hole|> exports.config = config;<|fim▁end|>
args: ['--headless', '--no-sandbox', '--disable-gpu'], }, };
<|file_name|>help.go<|end_file_name|><|fim▁begin|>// Copyright 2015 CoreOS, 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 // //...
clustering flags:
<|file_name|>dummy.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import logging from moulinette.utils.text import random_ascii from moulinette.core import MoulinetteError, MoulinetteAuthenticationError from moulinette.authentication import BaseAuthenticator logger = logging.getLogger("moulinette.authenticat...
if not raise_if_no_session_exists: return {"id": random_ascii()}