prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>ASTMatch0.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction...
using namespace CPlusPlus; bool ObjCSelectorArgumentAST::match0(AST *pattern, ASTMatcher *matcher)
<|file_name|>users.js<|end_file_name|><|fim▁begin|>/** * Module dependencies */ var httpStatus = require('../helpers/http-status') , User = require('mongoose').model('User') , logger = require('../../logger'); exports.login = function (req, res) { res.render('users/login', {title: 'login'}); }; exports.check...
return checkAccessTokenAuth(req, res, function () { res.send(httpStatus.BAD_REQUEST, { errors: errors }); });
<|file_name|>net.js<|end_file_name|><|fim▁begin|>"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const diagnostics = tslib_1.__importStar(require("./diagnostics")); const log = diagnostics.log; // new diagnostics.Logger( __filename ); //import compression =...
// it("status 401 response", () => {
<|file_name|>this-3.js<|end_file_name|><|fim▁begin|>// node/this-3.js<|fim▁hole|>var object = { id: "xyz", printId: function() { console.log('The id is '+ this.id + ' ' + this.toString()); } }; // setTimeout(object.printId, 100); var callback = object.printId; callback();<|fim▁end|>
<|file_name|>populate_visualization_cache.py<|end_file_name|><|fim▁begin|>import logging <|fim▁hole|>from catalog.core.visualization.data_access import visualization_cache logger = logging.getLogger(__name__) class Command(BaseCommand): help = '''Build pandas dataframe cache of primary data''' def handle(se...
from django.core.management.base import BaseCommand
<|file_name|>reconnecting.js<|end_file_name|><|fim▁begin|>module.exports = client => { //eslint-disable-line no-unused-vars console.log(`Reconnecting... [at ${new Date()}]`);<|fim▁hole|><|fim▁end|>
};
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>""" Django settings for school project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside ...
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-2014 OpenERP (<http://www.openerp.com>). # # This program is free software: you can redist...
for model in models if not model.model.startswith('ir.')]
<|file_name|>odom_reader.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import rospy from pprint import pformat from tf_conversions import transformations from math import pi from nav_msgs.msg import Odometry class odom_reader: def __init__(self):<|fim▁hole|> """ convert an orientation given in...
self.image_sub = rospy.Subscriber("/odom", Odometry, self.callback)
<|file_name|>path_to_enlightenment.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- '''<|fim▁hole|>Path to Enlightenment. ''' import io import unittest # The path to enlightenment starts with the following: KOANS_FILENAME = 'koans.txt' def filter_koan_names(lines): ''' Strips ...
Functions to load the test cases ("koans") that make up the
<|file_name|>iterators.rs<|end_file_name|><|fim▁begin|>#[macro_use(s)] extern crate ndarray; extern crate itertools; use ndarray::{Array0, Array2}; use ndarray::RcArray; use ndarray::{Ix, Si, S}; use ndarray::{ ArrayBase, Data, Dimension, aview1, arr2, arr3, Axis, indices, }; use itert...
assert_slice_correct(&v.subview(Axis(0), 1)); assert!(v.slice(&[S, Si(0, Some(1), 1)]).as_slice().is_none()); println!("{:?}", v.slice(&[Si(0, Some(1), 2), S]));
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------...
<|file_name|>projection-body.rs<|end_file_name|><|fim▁begin|>// Test that when we infer the lifetime to a subset of the fn body, it // works out. // // compile-pass trait MyTrait<'a> { type Output; } fn foo1<T>() where for<'x> T: MyTrait<'x>,<|fim▁hole|> let x = bar::<T::Output>(); drop(x); } fn bar<'...
{ // Here the region `'c` in `<T as MyTrait<'c>>::Output` will be // inferred to a subset of the fn body.
<|file_name|>element_wrapper.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 wrapper over an element and a snapshot, that al...
self.element.is_empty() }
<|file_name|>vselb.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 OpenStack LLC. # 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 o...
from quantum.openstack.common import log as logging from quantum.plugins.services.agent_loadbalancer.drivers.vedge.vmware.vshield.vseapi import VseAPI
<|file_name|>ABHelloWorld.java<|end_file_name|><|fim▁begin|>package boun.swe573.accessbadger; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; <|fim▁hole|>public class ABHelloWorld { @RequestMapping("/welcome") public String helloWorld() { String me...
@Controller
<|file_name|>throwing-console-patch.js<|end_file_name|><|fim▁begin|>const colors = require('colors/safe'); const shouldSilenceWarnings = (...messages) => [].some((msgRegex) => messages.some((msg) => msgRegex.test(msg))); const shouldNotThrowWarnings = (...messages) => [].some((msgRegex) => messages.some((msg) => ...
<|file_name|>script.ts<|end_file_name|><|fim▁begin|>class HobbiesBehavior extends Sup.Behavior { awake() { let vertical:boolean = false; let horizontal:boolean = true; // Configure platforms Sup.getActor("MovingPlatform1").getBehavior(MovingPlatformBehavior).min = -2; Sup.getActor("MovingPlat...
Sup.getActor("SlackMovingPlatform1").getBehavior(MovingPlatformBehavior).speed = 0.06; Sup.getActor("SlackMovingPlatform1").getBehavior(MovingPlatformBehavior).direction = horizontal; Sup.getActor("SlackMovingPlatform2").getBehavior(MovingPlatformBehavior).min = -11;
<|file_name|>main.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>import { AppModule } from './heroFinder/heroFinder.module'; import { environment } from './environments/environment'; if (environment.production) { enableProdMode(); } platformBrowserDynamic().bootstrapModule(AppModule) .catch(err => console.log(err));...
import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
from MSMSeeder.attic import core
<|file_name|>remove_instance_database.py<|end_file_name|><|fim▁begin|>from maintenance.async_jobs import BaseJob from maintenance.models import RemoveInstanceDatabase __all__ = ('RemoveInstanceDatabase',) class RemoveInstanceDatabaseJob(BaseJob): step_manger_class = RemoveInstanceDatabase get_steps_method =...
) self._instance = instance @property
<|file_name|>whoami.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Display logged-in username. Configuration parameters: format: display format for whoami (default '{username}')<|fim▁hole|>Format placeholders: {username} display current username Inspired by i3 FAQ: https://faq.i3wm.org/questi...
<|file_name|>websocket.py<|end_file_name|><|fim▁begin|>############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation...
debug=debug) # automatically fragment outgoing traffic into WebSocket frames # of this size
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate rustbox; use std::env; use std::io::Result; use std::path::Path; mod filedata; use filedata::FileData; mod display; use display::Display; fn main() { let fd = match init_data() { Ok(v) => v, Err(e) => { println!("could not open specified file:...
//create a new data object from cmd args
<|file_name|>DomSource.ts<|end_file_name|><|fim▁begin|>import { StandardEvents } from './Events' import { Stream } from '@motorcycle/types' /** * A DOM source interface for objects to declaratively query the DOM. * * @name DomSource * * @example * interface DomSource { * query(cssSelector: CssSelector): DomSo...
*/ query<C extends A = A>(cssSelector: CssSelector): DomSource<C, B> /**
<|file_name|>webgl.js<|end_file_name|><|fim▁begin|>/** * Class: Webgl * Description: Her goes description */ import {m, utils} from '../../js/main'; import * as THREE from './three.min.js' import dat from './dat.gui.min.js' import Detector from './Detector.js' // GLOBAL var EightBitMode = false; export default cl...
this.scene.add( this.particleSystem );
<|file_name|>axt_to_lav_code.py<|end_file_name|><|fim▁begin|>def exec_after_process(app, inp_data, out_data, param_dict, tool, stdout, stderr): for name,data in out_data.items(): if name == "seq_file2": <|fim▁hole|> break<|fim▁end|>
data.dbkey = param_dict['dbkey_2'] app.model.context.add( data ) app.model.context.flush()
<|file_name|>test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2008 the V8 project authors. 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...
start = datetime.now() output = case.Run() case.duration = (datetime.now() - start) except IOError, e:
<|file_name|>interface_with_str.rs<|end_file_name|><|fim▁begin|>foreign_callback!(callback SomeObserver { self_type SomeTrait; onStateChanged = SomeTrait::on_state_changed(&self, _: &str);<|fim▁hole|>foreigner_class!(class ClassWithCallbacks { self_type Foo; constructor Foo::default() -> Foo; method...
});
<|file_name|>IPostcssCompilerForPreProcessor.ts<|end_file_name|><|fim▁begin|>import ICompiler = require("../postcss/ICompiler"); interface IPostcssCompilerForPreProcessor extends ICompiler { } <|fim▁hole|><|fim▁end|>
export = IPostcssCompilerForPreProcessor;
<|file_name|>Backstab.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
class Backstab: pass
<|file_name|>logger.js<|end_file_name|><|fim▁begin|>'use strict' const config = { local: { pino: { prettyPrint: false } }, ci: { pino: { prettyPrint: false } }, staging: { pino: { prettyPrint: false } }, prod: {<|fim▁hole|> prettyPrint: false } } } ...
pino: {
<|file_name|>regions-early-bound-trait-param.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:...
assert_eq!(object_invoke1(&*m), (4,5)); assert_eq!(object_invoke2(&*m), 5);
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>#[crate_id = "reddit#0.1"]; #[comment = "Rust binding to Reddit API"]; #[license = "LGPLv3"]; #[crate_type = "lib"]; extern mod extra; extern mod http; // Import macros mod macros; pub mod session; pub mod redditor; pub mod subreddit; pub mod post; pub mod...
#[feature(macro_rules)]; #[feature(managed_boxes)];
<|file_name|>worker.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 devtools_traits::{DevtoolsPageInfo, ScriptToDevtoolsContro...
<|file_name|>MyWebMvcConfigure.java<|end_file_name|><|fim▁begin|>package com.imooc.config; import com.imooc.controller.interceptor.handlers.OneInterceptor; import com.imooc.controller.interceptor.handlers.TwoInterceptor; import org.springframework.context.annotation.Configuration; import org.springframework.web.servle...
<|file_name|>test_df_hf.py<|end_file_name|><|fim▁begin|>import pytest from forte.solvers import solver_factory, HF def test_df_rhf(): """Test DF-RHF on HF.""" ref_energy = -100.04775218911111 # define a molecule xyz = """ H 0.0 0.0 0.0 F 0.0 0.0 1.0 """ # create a molecular model ...
hf.run()
<|file_name|>diff.py<|end_file_name|><|fim▁begin|>"""Clowder command line diff controller .. codeauthor:: Joe DeCapo <joe@polka.cat> """ import argparse import clowder.util.formatting as fmt from clowder.clowder_controller import CLOWDER_CONTROLLER, print_clowder_name, valid_clowder_yaml_required from clowder.confi...
]) @valid_clowder_yaml_required
<|file_name|>EnumTyp.java<|end_file_name|><|fim▁begin|>/* * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License v...
<|file_name|>api_op_DescribeNetworkInsightsPaths.go<|end_file_name|><|fim▁begin|>// Code generated by smithy-go-codegen DO NOT EDIT. package ec2 import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/...
return err } if err = addSetLoggerMiddleware(stack, options); err != nil {
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate byteorder; use byteorder::{ByteOrder, BigEndian}; use std::io::{Read, Write, Result}; /// A byte buffer object specifically turned to easily read and write binary values pub struct ByteBuffer { data: Vec<u8>, wpos: usize, rpos: usize, rbit:...
<|file_name|>server.js<|end_file_name|><|fim▁begin|>/** * Runs a webserver and socket server for visualizating interactions with TJBot */ var ip = require('ip'); var express = require("express") var config = require('./config.js') var path = require("path") var app = express(); var http = require('http'); var exports...
exports.sendEvent = sendEvent; exports.wss = wss
<|file_name|>CLIExample.java<|end_file_name|><|fim▁begin|>/* * Copyright 2015-2016 DevCon5 GmbH, info@devcon5.ch * * 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.apac...
@CliOptionGroup
<|file_name|>SceneGenerator.py<|end_file_name|><|fim▁begin|>import json import math ###################################################### # add parameters ###################################################### def addParameters(scene, h=0.005, maxIter=5, maxIterVel=5, velocityUpdateMethod=0, contactTolerance=0.05, t...
# compute rotation matrix ###################################################### def rotation_matrix(axis, angle):
<|file_name|>process_json.py<|end_file_name|><|fim▁begin|># directory = 'Congressional_Bill_Corpus.v1.00/raw/' directory = '' text_file = directory + 'billtext_org.json' labels_file = directory + 'train.json' output_dir = '/Users/katya/datasets/congress_bills_2/' import sys #pcogennen noah's congress_bills_2 into use...
def rm_newlines(string):
<|file_name|>test_sensor.py<|end_file_name|><|fim▁begin|>"""The tests for the Tasmota sensor platform.""" import copy import datetime from datetime import timedelta import json from unittest.mock import Mock, patch import hatasmota from hatasmota.utils import ( get_topic_stat_status, get_topic_tele_sensor, ...
f"{DEFAULT_PREFIX}/{mac}/sensors", json.dumps(sensor_config),
<|file_name|>SystemUserAuthenticator.java<|end_file_name|><|fim▁begin|>/** * */ package com.sirma.itt.emf.authentication.sso.saml.authenticator; import java.nio.charset.StandardCharsets; import java.util.Map; import javax.crypto.SecretKey; import javax.enterprise.inject.Instance; import javax.inject.Inject; import...
<|file_name|>ipxact2hdlCommon.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # This file is part of ipxact2systemverilog # Copyright (C) 2013 Andreas Lindh # # 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 ...
fieldNameList, bitOffsetList, bitWidthList, fieldDescList,
<|file_name|>RectInternalRepresentation.js<|end_file_name|><|fim▁begin|>(function(window) { var RectInternalRepresentation = function(primitive) {<|fim▁hole|> this._height = 10; me.GetWidth = function() { return this._width; }; me.SetWidth = function(O) {...
var me = new ArmContext.InternalRepresentation(primitive); this._width = 10;
<|file_name|>request.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import from future.standard_library import suspend_hooks from future.utils import PY3 if PY3: from urllib.request import * # This aren't in __all__: from urllib.request import (getproxies, ...
unwrap) else:
<|file_name|>pos.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import json import frappe from erpnext.accounts.party import get_party_account_currency from erpnext.c...
item_doc.append('item_defaults', { "company": doc.get("company"), "default_warehouse": item.get('warehouse')
<|file_name|>AttitudeChartPanel.java<|end_file_name|><|fim▁begin|>package drone_slam.apps.controlcenter.plugins.attitudechart; import drone_slam.apps.controlcenter.ICCPlugin; import drone_slam.base.IARDrone; import drone_slam.base.navdata.AttitudeListener; import org.jfree.chart.ChartPanel; import javax.swing.*; imp...
this.chart = new AttitudeChart();
<|file_name|>combinators.js<|end_file_name|><|fim▁begin|>'use strict'; function curry (fn) { var args = Array.prototype.slice.call(arguments, 1); return function () { var nextArgs = Array.prototype.slice.call(arguments), allArgs = args.concat(nextArgs); return fn.apply(this, allArg...
identity: function (i) { return i; },
<|file_name|>angular-tags.module.js<|end_file_name|><|fim▁begin|>(function (angular) { 'use strict'; angular .module('ngTagsInput', []);<|fim▁hole|><|fim▁end|>
})(window.angular);
<|file_name|>mhtml_generation_manager.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 "content/browser/download/mhtml_generation_manager.h" #include <map> #...
int job_id = NewJob(web_contents, params, callback);
<|file_name|>size_hint.rs<|end_file_name|><|fim▁begin|>#![feature(core)] extern crate core; #[cfg(test)] mod tests { use core::iter::Iterator; use core::iter::Peekable; struct A<T> { begin: T, end: T } macro_rules! Iterator_impl { ($T:ty) => { impl Iterator for A<$T> { type Item = $T; ...
<|file_name|>VectorParameterUI.py<|end_file_name|><|fim▁begin|>########################################################################## # # Copyright (c) 2010, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided...
# promote products derived from this software without specific prior # written permission. #
<|file_name|>basic-spec.js<|end_file_name|><|fim▁begin|>"use strict"; describe("This package", function(){ it("rubs the lotion on its skin, or else", function(){ 2..should.equal(2); // In this universe, it'd damn well better }); it("gets the hose again", function(){ this.should.be.extensible.and.ok; // Eve...
it("breaks something", function(){
<|file_name|>person.js<|end_file_name|><|fim▁begin|>var Model = require('./model'); var schema = { name : String, stuff: { electronics: [{ type: String }], computing_dev: [{ type: String }] },<|fim▁hole|> biological: Number }, fruits: [ ...
age:{
<|file_name|>partial.py<|end_file_name|><|fim▁begin|>from polybori import BooleSet, interpolate_smallest_lex class PartialFunction(object): """docstring for PartialFunction""" def __init__(self, zeros, ones): super(PartialFunction, self).__init__() self.zeros = zeros.set() self.ones =...
domain = self.definedOn().intersect(other.definedOn()) zeros = self.zeros.intersect(other.zeros).union(self.ones.intersect( other.ones)) ones = self.zeros.intersect(other.ones).union(self.ones.intersect(
<|file_name|>moleculetype.py<|end_file_name|><|fim▁begin|>""" This file is part of the TheLMA (THe Laboratory Management Application) project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. MoleculeType entity classes. """ from everest.entities.base import Entity from everest.entities.uti...
#: thaw. thaw_time = None
<|file_name|>scene.go<|end_file_name|><|fim▁begin|>// Copyright 2016 Pikkpoiss // // 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...
func (s *BaseScene) Load(r Resources) (err error) { return
<|file_name|>test_simple_replace.rs<|end_file_name|><|fim▁begin|>use std::process::{Command, Stdio}; use std::io::{Read, Write}; use common::*; #[test] fn simple_replace1() { let _fs = setup(&[tf("file3")]); set_file_content("file3", "baca"); let output = Command::new(BINARY_PATH) .args(&["-s", ...
<|file_name|>does-not-have-mapdata-internal-slot.js<|end_file_name|><|fim▁begin|>// Copyright (C) 2015 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- es6id: 23.1.3.8 description: > Throws a TypeError if `this` object does not have a [[MapData]...
});
<|file_name|>convertToSparseMatrix.py<|end_file_name|><|fim▁begin|>""" Script used to convert data into sparse matrix format that can easily be imported into MATLAB. Use like this python convertToSparseMatrix.py ../../../../../data/train_triplets.txt 1000 ../../../../../data/eval/year1_test_triplets_visible.txt ../../....
""" import sys
<|file_name|>views.py<|end_file_name|><|fim▁begin|>import gzip import json import os from django.conf import settings from django.contrib import messages from django.contrib.auth.decorators import login_required from django.core.paginator import EmptyPage from django.core.paginator import PageNotAnInteger from django....
read_depth = request.GET.get('read_depth', '') if read_depth != '':
<|file_name|>random_sources.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # -*- mode: python -*- """Sources of random data Copyright (C) 2013 Dan Meliza <dmeliza@uchicago.edu> Created Wed May 29 14:50:02 2013 """ from mspikes import util from mspikes.types import DataBlock, Source, Node, tag_set from numpy....
<|file_name|>version.py<|end_file_name|><|fim▁begin|># Copyright (c) 2017, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms.<|fim▁hole|><|fim▁end|>
__version__ = "1.2.0.11"
<|file_name|>rektifye.js<|end_file_name|><|fim▁begin|>showWord(["v. ","korije, redrese."<|fim▁hole|><|fim▁end|>
])
<|file_name|>fabfile.py<|end_file_name|><|fim▁begin|>from __future__ import with_statement from fabric.api import local, abort, run, cd, env from fabric.context_managers import prefix env.directory = '/home/pestileaks/pestileaks' env.activate = 'source /home/pestileaks/env/bin/activate' env.user = 'pestileaks' env.hos...
<|file_name|>IVisitedSort.java<|end_file_name|><|fim▁begin|>package visitors; /**<|fim▁hole|> Object accept(ISortVisitor visitor); }<|fim▁end|>
* Created by stratosphr on 20/11/15. */ public interface IVisitedSort extends IVisited {
<|file_name|>disables_wer.py<|end_file_name|><|fim▁begin|># Copyright (C) 2015 Kevin Ross # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from lib.cuckoo.common.abstracts import Signature class DisablesWER(Signature): name = "disables_wer"...
return True return False
<|file_name|>type_enforcement.rs<|end_file_name|><|fim▁begin|>use crate::ast::AstNode; use secsp_parser::syntax::{SyntaxKind, SyntaxNode}; use secsp_syntax_derive::AstType; #[derive(AstType)] #[ast(kind = "NODE_TE_RULE")] pub struct TeRule(SyntaxNode); #[derive(Debug, PartialEq, Eq)] pub enum TeRuleKind { Allow,...
<|file_name|>profile.py<|end_file_name|><|fim▁begin|>from typing import Any, List, Tuple, Dict #cast from sphinx.application import Sphinx # from sphinx.ext.autodoc import Documenter from sphinx.ext.autodoc import ModuleLevelDocumenter from sphinx.pycode import ModuleAnalyzer, PycodeError #from sphinx.domains.python i...
# result: ('com_google_fonts_check_post_table_version', None) signode: <desc_signature class="" first="False" fullname="com_google_fonts_check_post_table_version" module="fontbakery.profiles.post"><desc_annotation xml:space="preserve">FontBakeryCheck </desc_annotation><desc_addname xml:space="preserve">fontbake...
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>use std::io; use std::result; use mqtt3; use tokio_timer::TimerError; pub type Result<T> = result::Result<T, Error>; quick_error! { #[derive(Debug)] pub enum Error { Io(err: io::Error) { from() description("io error") ...
cause(err) } Timer(err: TimerError) { from()
<|file_name|>k_medoids.py<|end_file_name|><|fim▁begin|>""" Special purpose k - medoids algorithm """ import numpy as np def fit(sim_mat, D_len, cidx): """ Algorithm maximizes energy between clusters, which is distinction in this algorithm. Distance matrix contains mostly 0, which are overlooked due to searc...
for idx in indsi: value += sim_mat[idy].get(idx, 0)
<|file_name|>mpsc_queue.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2010-2011 Dmitry Vyukov. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must reta...
/// order to see if the sender has made progress or not Inconsistent, }
<|file_name|>mtp_device_delegate_impl_linux.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/media_galleries/linux/mtp_device_delegate_impl_li...
success_callback_wrapper, error_callback_wrapper); EnsureInitAndRunTask(PendingTaskInfo( base::FilePath(), content::BrowserThread::UI, FROM_HERE, closure));
<|file_name|>convert_test.go<|end_file_name|><|fim▁begin|>package service import ( "path/filepath" "reflect" "testing" "github.com/docker/docker/api/types/container" "github.com/docker/libcompose/config" "github.com/docker/libcompose/docker/ctx" "github.com/docker/libcompose/lookup" "github.com/docker/libcomp...
} _, hostCfg, err = Convert(sc, ctx.Context, nil) assert.Nil(t, err)
<|file_name|>rasterize.py<|end_file_name|><|fim▁begin|>import json import logging from math import ceil import os import click import cligj from .helpers import resolve_inout from . import options import rasterio from rasterio.errors import CRSError from rasterio.transform import Affine from rasterio.coords import di...
if has_src_crs and src_crs != template_ds.crs:
<|file_name|>app.js<|end_file_name|><|fim▁begin|><|fim▁hole|> SanctuaryApp.config(['$routeProvider', function($routeProvider) { $routeProvider .when('/youtubelist', { templateUrl: 'partials/youtubelist.html', controller: 'YoutubeListController' }) .otherwise({ redirectTo:...
var SanctuaryApp = angular.module('SanctuaryApp', [ 'ngRoute', 'SanctuaryControllers' ]);
<|file_name|>admintools_bootstrap.py<|end_file_name|><|fim▁begin|>from django import template from django.utils.safestring import mark_safe from django.utils.html import escape from django.utils.translation import ugettext as _ from django.contrib.admin.views.main import PAGE_VAR, ALL_VAR from django.conf import settin...
return { 'cl': cl,
<|file_name|>rda_main.cc<|end_file_name|><|fim▁begin|>#include <iostream> #include <fstream> #include <vector> #include <string> #include <stdexcept> #include <boost/program_options.hpp> #include <boost/lexical_cast.hpp> #include <boost/tuple/tuple.hpp> #include <btl/fasta_writer.h> #include "ereal.h" #include "dna_se...
string program_name("rda build "); program_name += string(build_string); options_description desc("Allowed options");
<|file_name|>button.module.ts<|end_file_name|><|fim▁begin|>import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {FormlyModule} from '@ngx-formly/core';<|fim▁hole|>import {ReactiveFormsModule} from '@angular/forms'; import {JigsawButtonModule} from "@rdkmaster/jigsaw"; import {Fo...
<|file_name|>_collections.py<|end_file_name|><|fim▁begin|># util/_collections.py # Copyright (C) 2005-2020 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Collection classes...
)
<|file_name|>updateScopeAcl.js<|end_file_name|><|fim▁begin|>"use strict"; const apisObject = { "type": "object", "required": false, "patternProperties": { "^[_a-z\/][_a-zA-Z0-9\/:]*$": { //pattern to match an api route "type": "object", "required": true, "properties": { "access": {"type": "boolean", ...
"additionalProperties": false }, "additionalProperties": false }
<|file_name|>test_matcher.py<|end_file_name|><|fim▁begin|># Copyright (C) 2013-2015 eNovance SAS <licensing@enovance.com> # # 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.a...
('disk', 'sdd', 'scsi-id', 'scsi-2001b4d2001775100'), ('disk', 'sde', 'size', '1000'),
<|file_name|>xor2.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Thu Apr 21 22:48:37 2016 @author: burger """ import numpy as np from matplotlib import pyplot as plt def sigma(x, a=1, b=0): return 1/(1+np.exp(-(a*x+b))) x = np.asarray([[0.0, .1], [0, 1], [.9, .05], [.9, .95]]) markers ...
<|file_name|>LEOcoin_sl_SI.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="sl_SI"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About LEOcoin</source> <trans...
<location line="+1"/> <source>Maximum Ring size:</source> <translation type="unfinished"></translation> </message>
<|file_name|>list_concat.py<|end_file_name|><|fim▁begin|>list2=['tom','jerry','mickey'] list1=['hardy','bob','minnie'] print(list1+list2) print(list2+list1) <|fim▁hole|>print(list1*3) print(list2+['disney','nick','pogo'])<|fim▁end|>
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from infra_libs.infra_types.infra_types import freeze<|fim▁hole|>from infra_libs.infra_types.infra_type...
<|file_name|>Sentence.js<|end_file_name|><|fim▁begin|>import React, { useContext, useEffect, Fragment } from "react" import { Typography } from "@material-ui/core" import EventsContext from "../context/EventsContext" import TitleContext from "../context/TitleContext" import Box from "@material-ui/core/Box" import Butto...
<|file_name|>database.js<|end_file_name|><|fim▁begin|>/** * description * Author: Oded Sagir * @param Object require for adding dependencies * @return Object Class Object */ define(function(require) { var database = { posts: require("text!api/posts.json") };<|fim▁hole|> return da...
<|file_name|>lhp.directive.ts<|end_file_name|><|fim▁begin|>/** * Created by akabeera on 2/18/2016. */ /// <reference path="../../typings/browser.d.ts" /> module app.Directives { 'use strict'; export class LhpDirective implements ng.IDirective { public templateUrl:string = 'components/lhp.html'; ...
angular.module('reactionGifs').directive('lhp', ['$log', app.Directives.LhpDirective.Factory()]); }
<|file_name|>GS.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2007-2009 Gabest * http://www.gabest.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 2, or (at y...
EXPORT_C_(int) GStest() {
<|file_name|>version.py<|end_file_name|><|fim▁begin|>import re from os.path import join from setuptools import find_packages def get(): pkgnames = find_packages() if len(pkgnames) == 0: return "unknown"<|fim▁hole|> c = re.compile(r"__version__ *= *('[^']+'|\"[^\"]+\")") m = c.search(content) ...
pkgname = pkgnames[0] content = open(join(pkgname, "__init__.py")).read()
<|file_name|>tests.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import absolute_import import mock import six import time from exam import fixture, patcher from sentry.quotas.redis import ( is_rate_limited, RedisQuota, ) from sentry.testutils import TestCase from sentry.utils.redi...
inst = mock.MagicMock() inst.return_value = (0, 60)
<|file_name|>loc.rs<|end_file_name|><|fim▁begin|>//! The rpeek library. //! //! # License //! //! Copyright (c) 2015 by Stacy Prowell. All rights reserved. //! //! Licensed under the BSD 2-Clause license. See the file LICENSE //! that is part of this distribution. This file may not be copied,<|fim▁hole|> use std::fm...
//! modified, or distributed except according to those terms.
<|file_name|>auth.js<|end_file_name|><|fim▁begin|>'use strict'; memoryApp.controller('AuthCtrl', function ($scope, $location, AuthService) { $scope.register = function () { var username = $scope.registerUsername; var password = $scope.registerPassword; if (username && password) { AuthService.regis...
if (username && password) {
<|file_name|>Hotel.view.js<|end_file_name|><|fim▁begin|>import React from 'react' import {observer} from 'mobx-react' import {Route, Link} from 'react-router-dom' import {IMAGE_DIR, TOKEN, GET_HOTEL_INFO, RESPONSE_CODE_SUCCESS} from 'macros' import {setParamsToURL, dateToZh} from 'utils' import Cookies from 'js-cookie'...
)