prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>SkypeWinClient.cpp<|end_file_name|><|fim▁begin|>/* qgvdial is a cross platform Google Voice Dialer Copyright (C) 2009-2017 Yuvraaj Kelkar 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 Found...
{
<|file_name|>Homework_4.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Applied Mathematics for Computer Science. Homework4 -- L-M Algorithm. @author: LiBin 11531041 @date: 2016 - 5 - 23. """ #%% Objective: Assuming given type of the certain function # " fun(x) = a*exp(-b*t) ", input da...
b = b_new else:
<|file_name|>link-check.test.js<|end_file_name|><|fim▁begin|>'use strict'; const expect = require('expect.js'); const http = require('http'); const express = require('express'); const linkCheck = require('../'); describe('link-check', function () { this.timeout(2500);//increase timeout to enable 429 retry tests ...
const server = http.createServer(app); server.listen(0 /* random open port */, 'localhost', function serverListen(err) { if (err) { done(err);
<|file_name|>rule_002.py<|end_file_name|><|fim▁begin|>from vsg.rules import token_indent from vsg import token lTokens = [] lTokens.append(token.generic_clause.generic_keyword) class rule_002(token_indent): ''' This rule checks the indent of the **generic** keyword. **Violation** .. code-block:: v...
entity fifo is generic ( '''
<|file_name|>merge.js<|end_file_name|><|fim▁begin|>import React from 'react' import Icon from 'react-icon-base' const IoMerge = props => ( <Icon viewBox="0 0 40 40" {...props}> <g><path d="m30 17.5c2.7 0 5 2.3 5 5s-2.3 5-5 5c-1.9 0-3.4-1-4.3-2.5h-0.8c-4.7 0-9-2-12.4-5.8v9c1.5 0.9 2.5 2.4 2.5 4.3 0 2.7-2.3 ...
export default IoMerge
<|file_name|>nmhe.py<|end_file_name|><|fim▁begin|># Copyright 2012-2013 Greg Horn # # This file is part of rawesome. # # rawesome is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the ...
# # subplot(3,2,4) # plot(cdot) # ylabel('cdot')
<|file_name|>php.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # HnTool rules - php # Copyright (C) 2009-2010 Candido Vieira <cvieira.br@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free...
if ep == 'on': check_results['low'].append('Expose PHP is on (%s)' % (php_conf))
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # === django_pgmp ---------------------------------------------------------=== # This file is part of django-pgpm. django-pgpm is copyright © 2012, RokuSigma # Inc. and contributors. See AUTHORS and LICENSE for more det...
# # django-pgpm 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 Lesser General Public License
<|file_name|>log-and-notification.js<|end_file_name|><|fim▁begin|>/** * 检查文件名后缀,判断是否为合法的日志文件 * * @param fileName 文件名字符串 * @returns {bool} 文件名是否合法,true 合法,false 非法 */ function isValidLogFile(fileName) { if(fileName === null || fileName === '') throw new Error('file name empty!'); return (lastValid = /.*\.slf$/...
} var lastValid = false;
<|file_name|>pubsub.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...
@apply_defaults def __init__( self, topic: str,
<|file_name|>parse.go<|end_file_name|><|fim▁begin|>/* Copyright The containerd 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...
func expectTokenOrQuoted(s string) (value string, rest string) {
<|file_name|>getproperties.js<|end_file_name|><|fim▁begin|>'use strict'; var inherits = require('util').inherits; var _ = require('lodash'); <|fim▁hole|> function GetPropertiesMethod() { GremlinMethod.call(this, 'getProperties', arguments[0]); } inherits(GetPropertiesMethod, GremlinMethod); GetPropertiesMethod.pro...
var GremlinMethod = require('../function');
<|file_name|>config.py<|end_file_name|><|fim▁begin|># Copyright 2017 Mycroft AI 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 # # Unle...
for key in config: self.__setitem__(key, config[key]) self.store(cache)
<|file_name|>main.go<|end_file_name|><|fim▁begin|>// Copyright 2017 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 (<|fim▁hole|> type PointToDepTestGlideAv010 deptestglideA.Bversion1 type FooVersion2 dept...
"github.com/ChinmayR/deptestglideA" "github.com/ChinmayR/deptestglideB" )
<|file_name|>ProfilePicture.js<|end_file_name|><|fim▁begin|>import React, { Component, PropTypes } from 'react'; import { View, Image, Text, StyleSheet } from 'react-native'; import LinearGradient from 'react-native-linear-gradient'; const glassPrimary = '#d5d2da'; const glassSecondary = '#bb2130'; class Pro...
<|file_name|>transaction_info_test.rs<|end_file_name|><|fim▁begin|>// Copyright (c) The Diem Core Contributors<|fim▁hole|> use super::*; use crate::DiemDB; use diem_temppath::TempPath; use proptest::{collection::vec, prelude::*}; fn verify( store: &LedgerStore, txn_infos: &[TransactionInfo], first_version:...
// SPDX-License-Identifier: Apache-2.0
<|file_name|>roles_list.py<|end_file_name|><|fim▁begin|><|fim▁hole|> from iris_sdk.models.maps.base_map import BaseMap class RolesListMap(BaseMap): role = None<|fim▁end|>
#!/usr/bin/env python
<|file_name|>index.js<|end_file_name|><|fim▁begin|>export default { Control : require('./Control'), Delete : require('./Delete'), Detail : require('./Detail'),<|fim▁hole|> Head : require('./Head'), Quit : require('./Quit'), };<|fim▁end|>
<|file_name|>Core.ts<|end_file_name|><|fim▁begin|>/* * Copyright 2015-2017 Atomist 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-...
export { Line }; export { MutableContainer }; export { MutableTerminal }; export { MutableView };
<|file_name|>deep_localization_weighted_loss_variable_length_deeper.py<|end_file_name|><|fim▁begin|>import tensorflow as tf ''' Model for sequence classification and localization with weighted loss ''' class DeepLocalizationWeightedLossVariableLengthDeeper: def get_name(self): return "deep_localization_w...
logits = []
<|file_name|>listener_unix_test.go<|end_file_name|><|fim▁begin|>// Copyright 2016 Canonical Ltd. // Licensed under the AGPLv3, see LICENCE file for details. //go:build !windows // +build !windows package spool_test import ( "io" "net" "github.com/juju/errors" ) func dial(socketPath string) (io.ReadCloser, error...
conn, err := net.Dial("unix", socketPath)
<|file_name|>Tile.java<|end_file_name|><|fim▁begin|>package mapproject; import static helpers.Artist.*; import org.newdawn.slick.opengl.Texture; /** * Clase que representa una celda individual del mapa * * @author Alba Ríos */ public class Tile { private float x, y, width, height; private Texture texture; ...
this.y = y;
<|file_name|>test_requests.py<|end_file_name|><|fim▁begin|># force python 3.* compability from __future__ import absolute_import, division, print_function from builtins import (bytes, str, open, super, range, zip, round, input, int, pow, object) # regular imports below: import unittest from python...
<|file_name|>mail.py<|end_file_name|><|fim▁begin|>from django.conf import settings from django.core.mail import send_mail from django.core.urlresolvers import reverse <|fim▁hole|> code.code ) url = strategy.request.build_absolute_uri(url) send_mail('Validate your account', 'Validate your account {0}'...
def send_validation(strategy, backend, code): url = '{0}?verification_code={1}'.format( reverse('social:complete', args=(backend.name,)),
<|file_name|>searchdata.js<|end_file_name|><|fim▁begin|>var indexSectionsWithContent = {<|fim▁hole|> 0: "abcdefghilmnoprstuy~", 1: "abcdefghmnops", 2: "e", 3: "acdegilmnoprstu~", 4: "acefpsy", 5: "p", 6: "em" }; var indexSectionNames = { 0: "all", 1: "classes", 2: "namespaces", 3: "functions", 4...
<|file_name|>simd-binop.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/lice...
// ignore-tidy-linelength #![allow(experimental)]
<|file_name|>issue_2472_b.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/li...
fn bar(&self);
<|file_name|>text.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/. */ //! Computed types for text properties. #[cfg(feature = "servo"...
<|file_name|>test_regression.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Regression tests.""" from __future__ import print_function from __future__ import unicode_literals from tabulate import tabulate, _text_type, _long_type, TableFormat, Line, DataRow from common import assert_equal, assert_in, skip ...
<|file_name|>directdl_tv.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda 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, eithe...
size = float(size)/1024 info = '%.2f GB' % size url = i['links']
<|file_name|>keyboard.js<|end_file_name|><|fim▁begin|>var argscheck = require('cordova/argscheck'), utils = require('cordova/utils'), exec = require('cordova/exec'), channel = require('cordova/channel'); <|fim▁hole|>}; Keyboard.hideKeyboardAccessoryBar = function(hide) { exec(null, null, "Keyboard", "...
var Keyboard = function() {
<|file_name|>codemagic.js<|end_file_name|><|fim▁begin|>/** * * * @author Josh Lobe * http://ultimatetinymcepro.com */ jQuery(document).ready(function($) { // Declare global variables // The New eXeLearning // var editor = top.tinymce.activeEditor; var editor = parent.tinymce.activeEditor; // / The New eXeL...
// Toggle Code Highlighting $("#highlighting").click( function() {
<|file_name|>extern-pass-u32.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. //<|fim▁hole|>// except according to those terms. // Test a function that takes/returns a u32. ...
// 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, modified, or distributed
<|file_name|>async_core.py<|end_file_name|><|fim▁begin|>#!/usr/local/bin/python3.4 # -*- coding: utf-8 -*- import threading import time import sys import trace from inspect import isgeneratorfunction import format class KillableThread(threading.Thread): """A subclass of threading.Thread, with a kill() method pro...
def globaltrace(self, frame, why, arg): if why == 'call': return self.localtrace else:
<|file_name|>event.ts<|end_file_name|><|fim▁begin|>import { AxisScale } from '@visx/axis'; import { ScaleInput } from '@visx/scale'; import { Emitter } from 'mitt'; export type EventEmitterContextType = Emitter; /** Arguments for findNearestDatum* functions. */ export type NearestDatumArgs< XScale extends AxisScale...
dataKey: string; point: { x: number; y: number } | null; xAccessor: (d: Datum) => ScaleInput<XScale>; yAccessor: (d: Datum) => ScaleInput<YScale>;
<|file_name|>test_utils.py<|end_file_name|><|fim▁begin|>import asyncio from unittest import mock import pytest from waterbutler.core import utils class TestAsyncRetry: @pytest.mark.asyncio async def test_returns_success(self): mock_func = mock.Mock(return_value='Foo') retryable = utils.asyn...
retryable = utils.async_retry(8, 0, raven=None)(mock_func)
<|file_name|>load_ICD9_structure.py<|end_file_name|><|fim▁begin|>import sys import os import subprocess import string printable = set(string.printable) def sanitize(txt): txt = ''.join(filter(lambda c: c in printable, txt)) return txt def traverse(t, outfile): print>>outfile, sanitize(t.code+'\t'+t.descr...
sys.path.append('icd9') from icd9 import ICD9
<|file_name|>adapter.py<|end_file_name|><|fim▁begin|>from cx_Oracle import CLOB from django.contrib.gis.db.backends.adapter import WKTAdapter class OracleSpatialAdapter(WKTAdapter): <|fim▁hole|><|fim▁end|>
input_size = CLOB
<|file_name|>deviceconfiguration.py<|end_file_name|><|fim▁begin|>#------------------------------------------------------------------------------- # Name: /faraday/deviceconfiguration.py # Purpose: Configure the Faraday radio by manipulating relevant INI files # and providing a Flask server to ki...
if __name__ == '__main__':
<|file_name|>f32.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/licens...
match self { NEG_INFINITY => NEG_INFINITY, x => (x + ((x * x) + 1.0).sqrt()).ln(),
<|file_name|>download-stats.js<|end_file_name|><|fim▁begin|>'use strict'; const _ = require('lodash'); const co = require('co'); const Promise = require('bluebird'); const AWS = require('aws-sdk'); AWS.config.region = 'us-east-1'; const cloudwatch = Promise.promisifyAll(new AWS.CloudWat...
let functions = resp.Functions .map(f => f.FunctionName) .filter(fn => fn.includes("aws-coldstart") && !fn.endsWith("run"));
<|file_name|>01-array.ts<|end_file_name|><|fim▁begin|>//adapted from tsc /*@ filter :: (x: boolean) => IArray<string> + number */ export function filter(x):any { if (x) { return 42; } <|fim▁hole|>}<|fim▁end|>
return <IArray<string>>new Array<string>(3);
<|file_name|>InAppBrowserProxy.js<|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...
navigationButtonsDivInner = document.createElement("div"); navigationButtonsDivInner.className = "inappbrowser-app-bar-inner"; navigationButtonsDivInner.onclick = function (e) { e.cancelBubble = true;
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate rand; use std::io; use std::cmp::Ordering; use rand::Rng; fn main() { println!("Guess the number!"); let secret_number = rand::thread_rng().gen_range(1, 101); //println!("The secret number is: {}", secret_number); loop { println...
Ordering::Less => println!("Too small!"),
<|file_name|>test_jsonrpc.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import import json from twisted.internet import defer, error from twisted.python import failure from twisted.test import proto_helpers from twisted.trial import unittest from txjsonrpc import jsonrpc, jsonrpclib class TestJSON...
self.proto.stringReceived(json.dumps(receive)) return d def test_parse_error(self):
<|file_name|>vec_mat_operations2.hpp<|end_file_name|><|fim▁begin|><|fim▁hole|>/// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include <boost/qvm/gen/vec_mat_operations2.hpp><|fim▁end|>
/// Copyright (c) 2008-2021 Emil Dotchevski and Reverge Studios, Inc. /// Distributed under the Boost Software License, Version 1.0. (See accompanying
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export default from './navigation.component';
<|file_name|>aapp_dr_runner.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2014, 2015, 2016 Adam.Dybbroe # Author(s): # Adam.Dybbroe <adam.dybbroe@smhi.se> # Janne Kotro fmi.fi # Trygve Aspenes # This program is free software: you can redistribute it and/or modif...
level1c, level1d) Metop data under the metop_data_out
<|file_name|>resolve_constant_fake_quant.cc<|end_file_name|><|fim▁begin|>/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://ww...
<|file_name|>exhaustive.rs<|end_file_name|><|fim▁begin|>use itertools::Itertools; use malachite_base::bools::exhaustive::exhaustive_bools; #[test] fn test_exhaustive_bools() { assert_eq!(exhaustive_bools().collect_vec(), &[false, true]);<|fim▁hole|><|fim▁end|>
}
<|file_name|>ModifyDBParameterGroupActionWorker.java<|end_file_name|><|fim▁begin|>/** * */ package com.transcend.rds.worker; import java.util.Arrays; import java.util.Collection; import java.util.LinkedList; import java.util.List; import org.hibernate.Session; import org.slf4j.Logger; import org.springframework.tr...
* @param req * @return * @throws Exception */
<|file_name|>resultUrlTests.js<|end_file_name|><|fim▁begin|>'use strict'; const resultsStorage = require('../lib/core/resultsStorage'); const moment = require('moment'); const expect = require('chai').expect; const timestamp = moment(); const timestampString = timestamp.format('YYYY-MM-DD-HH-mm-ss'); function create...
expect(resultUrls.hasBaseUrl()).to.be.false;
<|file_name|>instance_reservation_shape_config_details.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2016, 2018, 2021, Oracle and/or its affiliates. All rights reserved. // This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apach...
) // InstanceReservationShapeConfigDetails The shape configuration requested when launching instances in a compute capacity reservation. // If the parameter is provided, the reservation is created with the resources that you specify. If some
<|file_name|>auth_token.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010-2012 OpenStack 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 # # ...
<|file_name|>db5.js<|end_file_name|><|fim▁begin|>module.exports.up=function(onSuccess,onFailed){ var dbo=new entity.Base(); dbo.saveToDB("recipe_drink",["recipe_code","drink_code","quantity","description"], [ ["3622","342",9.83,"1/3 shot Southern Comfort "], ["3622","315",9.83,"1/3 shot Grand Marnier "], [...
["5071","316",180,"6 oz Vodka "], ["5071","387",180,"6 oz Dark rum "], ["5071","376",180,"6 oz Gin "], ["5071","261",360,"12 oz sweetened Pineapple juice "],
<|file_name|>link.go<|end_file_name|><|fim▁begin|>package hal import ( "bytes" "encoding/json" "errors" "fmt" ) var ( ErrPropMandatory = errors.New("The href property is mandatory.") ) type link struct { // REQUIRED // Its value is either a URI [RFC3986] or a URI Template [RFC6570].<br> // If the value is a ...
// A client SHOULD provide some notification (for example, by logging a
<|file_name|>request.py<|end_file_name|><|fim▁begin|>import os import re import json import importlib # Django Libraries from django.http import HttpResponse, HttpResponseServerError # CloudScape Libraries from cloudscape.common import config from cloudscape.common import logger from cloudscape.common.vars import T_B...
} LOG.info('Parsed handler object for API endpoint <%s>: %s' % (self.endpoint, self.handler_obj)) # Return the handler module path
<|file_name|>concurrency.cpp<|end_file_name|><|fim▁begin|>/* * This file is part of Poedit (http://poedit.net) * * Copyright (C) 2010-2015 Vaclav Slavik * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * ...
std::unique_ptr<ThreadPool> gs_pool; static std::once_flag initializationFlag;
<|file_name|>opcode.rs<|end_file_name|><|fim▁begin|>enum_from_primitive! { #[derive(Debug)] pub enum Opcode { Special = 0b000000, RegImm = 0b000001, Addi = 0b001000,<|fim▁hole|> Addiu = 0b001001, Andi = 0b001100, Ori = 0b001101, Lui = 0b...
<|file_name|>random_seed.py<|end_file_name|><|fim▁begin|>"""For seeding individual ops based on a graph-level seed. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.framework import ops _DEFAULT_GRAPH_SEED = 87654321 def get_se...
print sess2.run(a) # generates 'A2' print sess2.run(b) # generates 'B3' print sess2.run(b) # generates 'B4' ```
<|file_name|>pass_.py<|end_file_name|><|fim▁begin|>from .functor import Functor class _PASS(Functor): def __call__(self, *_, **__): pass<|fim▁hole|><|fim▁end|>
__enter__ = __exit__ = __call__ def __repr__(self): return '<PASS>' PASS = _PASS()
<|file_name|>SerialComUSB.java<|end_file_name|><|fim▁begin|>/* * This file is part of SerialPundit. * * Copyright (C) 2014-2020, Rishi Gupta. All rights reserved. * * The SerialPundit is DUAL LICENSED. It is made available under the terms of the GNU Affero * General Public License (AGPL) v3.0 for non-commercial...
/** * <p>This unregisters listener and terminate native thread used for monitoring specified USB device
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// This Source Code Form is subject to the terms of the Mozilla Public<|fim▁hole|>mod mdv; mod thinids; #[allow(clippy::module_inception)] mod thinpool; pub use self::thinpool::{ThinPool, ThinPoolSizeParams, DATA_BLOCK_SIZE};<|fim▁end|>
// 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/. mod filesystem;
<|file_name|>ur.js<|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-...
u, [['قبل مسیح', 'عیسوی'], u, u], 0, [6, 0],
<|file_name|>rpc.py<|end_file_name|><|fim▁begin|>import os import re import time import xbmc import xbmcvfs import xbmcgui import urllib2 import bjsonrpc from bjsonrpc.handlers import BaseHandler from quasar.addon import ADDON, ADDON_PATH from quasar.logger import log from quasar.config import JSONRPC_EXT_PORT, QUASARD...
<|file_name|>browser.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright(C) 2013 Julien Veyssier # # This file is part of weboob. # # weboob 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 Foundati...
if 'plot_simple' in jres: pitch = unicode(jres['plot_simple']) if 'rating' in jres and 'rating_count' in jres:
<|file_name|>A.ts<|end_file_name|><|fim▁begin|>import {Entity} from "../../../../src/decorator/entity/Entity"; import {PrimaryGeneratedColumn} from "../../../../src/decorator/columns/PrimaryGeneratedColumn"; import {Column} from "../../../../src/decorator/columns/Column"; @Entity() export class A { <|fim▁hole|> @C...
@PrimaryGeneratedColumn() id: number;
<|file_name|>HibernatePersistModuleTest.java<|end_file_name|><|fim▁begin|>package me.jasoncampos.inject.persist.hibernate; import static org.junit.Assert.assertEquals; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; import javax.persistence.Entity; import javax.per...
import org.junit.Test;
<|file_name|>VismoServiceTest.java<|end_file_name|><|fim▁begin|>package integration.tests; import static org.junit.Assert.assertEquals; import gr.ntua.vision.monitoring.VismoConfiguration; import gr.ntua.vision.monitoring.VismoVMInfo; import gr.ntua.vision.monitoring.dispatch.VismoEventDispatcher; import gr.ntua.visio...
import java.util.Properties; import java.util.concurrent.CountDownLatch;
<|file_name|>modulegen__gcc_LP64.py<|end_file_name|><|fim▁begin|>from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warning...
cls.add_constructor([param('long int', 'v')]) ## nstime.h (module 'core'): ns3::Time::Time(long long int v) [constructor] cls.add_constructor([param('long long int', 'v')])
<|file_name|>test_pipeline.py<|end_file_name|><|fim▁begin|>from django.http import HttpResponse from django.test import TestCase from ..pipeline import make_staff class Backend(object): name = None def __init__(self, name, *args, **kwargs): super(Backend, self).__init__(*args, **kwargs) self...
pass class PipelineTest(TestCase):
<|file_name|>play_iterator.py<|end_file_name|><|fim▁begin|># (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # 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...
if state.run_state == self.ITERATING_RESCUE:
<|file_name|>mock.py<|end_file_name|><|fim▁begin|>import os import json class FakeResponse(object): status_code = 200 text = None headers = [] <|fim▁hole|> def json(self): return json.loads(self.text) def response(name): content = open(os.path.join(os.path.dirname(__file__), 'responses', name)).read() retur...
def __init__(self, text): self.text = text
<|file_name|>unique.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 L...
<|file_name|>web.py<|end_file_name|><|fim▁begin|>from flask import * from pyZPL import * from printLabel import printLabel import xml.etree.ElementTree as ET<|fim▁hole|> app = Flask(__name__) dn = os.path.dirname(os.path.realpath(__file__))+"/" tree = ET.parse(dn+"pace.xml") customElements = tree.findall(".//*[@id]") ...
import os
<|file_name|>stylesheet.py<|end_file_name|><|fim▁begin|># Copyright (c) 2010-2019 openpyxl from warnings import warn from openpyxl.descriptors.serialisable import Serialisable from openpyxl.descriptors import ( Typed, ) from openpyxl.descriptors.sequence import NestedSequence from openpyxl.descriptors.excel impor...
self.borders = borders if cellStyleXfs is None:
<|file_name|>expr-block-generic.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.ap...
<|file_name|>complaint.component.spec.ts<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2014-2021 Bjoern Kimminich. * SPDX-License-Identifier: MIT */ import { ComplaintService } from '../Services/complaint.service' import { UserService } from '../Services/user.service' import { ReactiveFormsModule } from '@angular...
component.uploader.queue[0] = new FileItem(component.uploader, new File([''], 'file.pdf', { type: 'application/pdf' }), {}) spyOn(component.uploader.queue[0], 'upload') component.save()
<|file_name|>valgrind-make-fix-list.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os, sys usage = "usage: %s [infile [outfile]]" % os.path.basename(sys.argv[0]) if len(sys.argv) < 1: print (usage) else: stext = "<insert_a_suppression_name_here>" rtext = "memcheck problem #" input = sys.s...
if len(sys.argv) > 1: input = open(sys.argv[1]) if len(sys.argv) > 2:
<|file_name|>commands.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https:...
<|file_name|>Proxy.java<|end_file_name|><|fim▁begin|>package com.day21; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; /** * 代理类 * @author tenlee * */ public class Proxy implements InvocationHandler{ private Subject target; public Proxy(Subject target) { this.target = target; } ...
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { System.out.println("做大量的评估"); method.invoke(target, args);
<|file_name|>delegate.hpp<|end_file_name|><|fim▁begin|>/*============================================================================= Copyright (c) 2012 Paul Fultz II delgate.h Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost....
}} // namespace boost::hof #endif
<|file_name|>app_bluenrg_stm32l1.rs<|end_file_name|><|fim▁begin|>#![feature(plugin)] #![crate_type="staticlib"] #![no_std] <|fim▁hole|>//! Sample application for BlueNRG communication over SPI in X-NUCLEO-IDB04A1 //! extension board for NUCLEO-L152RE #[macro_use] #[plugin] extern crate core; extern crate zinc; use co...
<|file_name|>SoapTest.java<|end_file_name|><|fim▁begin|>package ru.stqa.javacourse.mantis.tests; import org.testng.annotations.Test; import ru.stqa.javacourse.mantis.model.Issue; import ru.stqa.javacourse.mantis.model.Project; import javax.xml.rpc.ServiceException;<|fim▁hole|> import static org.testng.Assert.assertE...
import java.net.MalformedURLException; import java.rmi.RemoteException; import java.util.Set;
<|file_name|>test_api.py<|end_file_name|><|fim▁begin|>from unittest.mock import ANY, patch from django.test import override_settings from geoip2.errors import AddressNotFoundError from rest_framework import status from rest_framework.test import APITestCase from karrot.groups.factories import GroupFactory from karrot...
'sentry': { 'dsn': OVERRIDE_SETTINGS['SENTRY_CLIENT_DSN'],
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![feature(box_patterns)] #[cfg(feature = "sqlite")] #[macro_use] extern crate diesel; #[cfg(feature = "sqlite")] #[macro_use] extern crate diesel_migrations; #[cfg(test)] #[macro_use] extern crate assert_matches; use chrono::prelude::*; use chrono::Duration; use deri...
use crate::configuration::{Configuration, SchedulingStrategy}; pub use crate::scheduling::{Schedule, Scheduled};
<|file_name|>SQLParserRule.java<|end_file_name|><|fim▁begin|>/* * Licensed to the Apache Software Foundation (ASF) under one or more<|fim▁hole|> * (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/LICEN...
* 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 License, Version 2.0
<|file_name|>promise-rejection-events.js<|end_file_name|><|fim▁begin|>'use strict'; if (self.importScripts) { importScripts('/resources/testharness.js'); } setup({ allow_uncaught_exception: true }); // // Straightforward unhandledrejection tests // async_test(function(t) { var e = new Error(); var p; onUn...
});
<|file_name|>project_3_test_data.py<|end_file_name|><|fim▁begin|>''' Created on 26/09/2014 @author: javgar119 ''' cluster_list =([Cluster(set([]), 0, 0, 1, 0), Cluster(set([]), 1, 0, 1, 0)]) cluster_list2 = ([Cluster(set([]), 0, 0, 1, 0), Cluster(set([])...
(1.0, 17, 18), (1.0, 6, 7), (1.0, 7, 8), (1.0, 5, 6), (1.0, 10, 11), (1.0, 0, 1), (1.0, 1, 2)]) cluster_list3 = ([Cluster(set([]), 90.9548590217, -17.089022585, 1, 0),
<|file_name|>User.java<|end_file_name|><|fim▁begin|>package org.dongchao.model.entity; import org.hibernate.validator.constraints.NotEmpty; import javax.persistence.*; import java.io.Serializable; import java.util.List; import java.util.Objects; import java.util.Set; /** * Created by zhaodongchao on 2017/5/3. */ @...
多对多关联fetch不能设置为懒加载
<|file_name|>_client_adaptations.py<|end_file_name|><|fim▁begin|># Copyright 2016, 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 retai...
_common.fully_qualified_method(group, method), request_serializer=request_serializer, response_deserializer=response_deserializer)
<|file_name|>Trilateration_Colin.py<|end_file_name|><|fim▁begin|>import math class Point: def __init__(self, x, y): self.x = x self.y = y def rssToEstimatedDistance(rss): freq = 2462 # freq of WiFi channel 6 origDBm = -20 # estimate this value loss = abs(origDBm -...
touchingPoint = Point(math.cos(angle) * posOnLine + p1.x, math.sin(angle) * posOnLine + p1.y)
<|file_name|>topRight.min.js<|end_file_name|><|fim▁begin|><|fim▁hole|>size 455<|fim▁end|>
version https://git-lfs.github.com/spec/v1 oid sha256:d33a38aa03c6c04c3b54d84dbf40da10270e517a1f2ca5ed32486bd757d16cd0
<|file_name|>license.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Copyright 2015 SmartBear Software 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...
@property def short_name(self): """ Gets the short_name of this License.
<|file_name|>routes.js<|end_file_name|><|fim▁begin|>var routes = { "index" : { title : "", url : "/", controller : main }, "404" : {<|fim▁hole|> title : "404", url : "/404", controller : fourohfour } };<|fim▁end|>
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import sys <|fim▁hole|> from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)<|fim▁end|>
if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dannysite_web.settings")
<|file_name|>junk.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # -*- coding: utf-8 -*- # vim: set et sw=4 fenc=utf-8: # # Copyright 2016 INVITE Communications Co., Ltd. All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public ...
# 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|>base.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # Hive Netius System # Copyright (c) 2008-2020 Hive Solutions Lda. # # This file is part of Hive Netius System. # # Hive Netius System is free software: you can redistribute it and/or modify # it under the terms of the...
method = globals[name]
<|file_name|>instance_filter.py<|end_file_name|><|fim▁begin|><|fim▁hole|> def setup_thread(instance): global thread_instance thread_instance.put(instance) def teardown_thread(): ''' A counterpart for setup_thread(), probly only useful in test_code ''' global thread_instance try: ...
from beaker.util import ThreadLocal thread_instance = ThreadLocal()
<|file_name|>issue97.spec.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>import { RowMap, write } from '../../src'; describe('Issue #97 - https://github.com/C2FO/fast-csv/issues/97', () => { it('should keep the original row', () => { return new Promise((res, rej) => { const rs = new RecordingStrea...
import { RecordingStream } from '../__fixtures__';