prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>bibmerge_merger.py<|end_file_name|><|fim▁begin|>## This file is part of Invenio. ## Copyright (C) 2009, 2010, 2011 CERN. ## ## Invenio 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 vers...
@param rec2: Second record (a record dictionary structure)
<|file_name|>id.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 MaidSafe.net limited. // // This SAFE Network Software is licensed to you under The General Public License (GPL), version 3. // Unless required by applicable law or agreed to in writing, the SAFE Network Software distributed // under the GPL Licence is d...
}
<|file_name|>SummaryBudgets.java<|end_file_name|><|fim▁begin|>package com.google.api.ads.adwords.jaxws.v201406.video; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; import com.google.api.ads.adwords.jaxws.v201406.cm.Money; /...
<|file_name|>test_revision_diffing.py<|end_file_name|><|fim▁begin|># Copyright 2017 AT&T Intellectual Property. All other 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 # #...
# Between revision_ids[1] and [3], bucket_name is modified (by [2]) and # alt_bucket_name is modified by [3]. self._verify_buckets_status( revision_ids[1], revision_ids[3],
<|file_name|>token.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import datetime from flask import jsonify, request from app import token_auth from app.models.user_token_model import UserTokenModel @token_auth.verify_token def verify_token(hashed): token = UserTokenModel.query\ .filter(UserToke...
<|file_name|>update_interrupt_create.py<|end_file_name|><|fim▁begin|>def check_resource_count(expected_count): test.assertEqual(expected_count, len(reality.all_resources())) example_template = Template({<|fim▁hole|> 'A': RsrcDef({}, []), 'B': RsrcDef({'a': '4alpha'}, ['A']), 'C': RsrcDef({'a': 'foo'}, [...
<|file_name|>HashVisualization.js<|end_file_name|><|fim▁begin|>var set = new HashSet(); //Array size var arrElementWidth = 150; var arrElementHeight = 40; //Key size var keyWidth = 50; var keyMargin = 5; var width = 800; var height = DEFAULT_TABLE_SIZE * (arrElementHeight + 5); //Hash function block size var blockW...
set.probingType = probing == "Quadratic" ? "quadratic" : "linear"; set.hashFunc = hashFunc == "Simple" ? getSimpleHashCode : getHashCode;
<|file_name|>UploadFileService.java<|end_file_name|><|fim▁begin|>package pl.edu.wat.tim.webstore.service; <|fim▁hole|>/** * Created by Piotr on 15.06.2017. */ public interface UploadFileService { void save(UploadFile uploadFile); UploadFile getUploadFile(String name); }<|fim▁end|>
import pl.edu.wat.tim.webstore.model.UploadFile;
<|file_name|>spar_no.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import scrapy from locations.items import GeojsonPointItem DAYS = [ 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su' ] class SparNoSpider(scrapy.Spider): name = "spar_no" allowed_domains = ["spar.no"] start_...
return days = response.xpath('//div[@itemprop="openingHoursSpecification"]') if days:
<|file_name|>data_type.rs<|end_file_name|><|fim▁begin|>extern crate serde; use self::serde::ser::{Serialize, Serializer, SerializeStruct}; #[derive(Clone, PartialEq, Eq, Debug)] pub enum DataType { Boolean, Integer, Float, String, DateTime, Timestamp, Struct(String, Vec<Field>, String) } ...
pub front_fields: Vec<Field>, #[allow(dead_code)] pub back_fields: Vec<Field>,
<|file_name|>mk_ATCA_array_configs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python telescope = "ATCA" latitude_deg = -30.312906 diameter_m = 22.0 import os import sys from util_misc import ascii_dat_read #-----------------------------------------------------------------------------# def main(): # Read th...
FH.close() for confName, A1, A2, A3, A4, A5 in zip(col[1], col[2], col[3], col[4],
<|file_name|>opf_metrics_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license...
res.append(movingMeanAAE.getMetric()["value"]) self.assertTrue(max(res[1:890]) == 2.0)
<|file_name|>filecache.py<|end_file_name|><|fim▁begin|># Bulletproof Arma Launcher # Copyright (C) 2017 Lukasz Taczuk # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program...
os.rename(tmp_path, path)
<|file_name|>VelocityTemplate.java<|end_file_name|><|fim▁begin|>package com.flora.support; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.StringWriter; import java.io.Writer; import java.util.Map; import org.apache.velocity.VelocityContext; <|fim▁hole|>import org.apache.velocit...
import org.apache.velocity.app.VelocityEngine;
<|file_name|>media_player.py<|end_file_name|><|fim▁begin|>"""Support to interface with the Plex API.""" from __future__ import annotations from functools import wraps import json import logging import plexapi.exceptions import requests.exceptions from homeassistant.components.media_player import DOMAIN as MP_DOMAIN,...
<|file_name|>ConfidentialityClass.java<|end_file_name|><|fim▁begin|>// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon reco...
public String value() { return name(); }
<|file_name|>param_util.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # T. Carman # January 2017 import os import json def get_CMTs_in_file(aFile): ''' Gets a list of the CMTs found in a file. Parameters ---------- aFile : string, required The path to a file to read. Returns ------- A ...
Parameters ----------
<|file_name|>db_log_parser.py<|end_file_name|><|fim▁begin|># Copyright (c) 2011-present, Facebook, Inc. All rights reserved. # This source code is licensed under both the GPLv2 (found in the # COPYING file in the root directory) and Apache 2.0 License # (found in the LICENSE.Apache file in the root directory). fro...
class Log: @staticmethod
<|file_name|>medea.light.js<|end_file_name|><|fim▁begin|>/* medea.js - Open Source, High-Performance 3D Engine based on WebGL. * * (c) 2011-2013, Alexander C. Gessler * https://github.com/acgessler/medea.js * * Made available under the terms and conditions of a 3-clause BSD license. * */ medealib.define('light...
this.dir = vec3.create(dir);
<|file_name|>DistinctOperator.java<|end_file_name|><|fim▁begin|>package org.qcri.rheem.basic.operators; import org.apache.commons.lang3.Validate; import org.qcri.rheem.core.api.Configuration; import org.qcri.rheem.core.function.DistinctPredicateDescriptor; import org.qcri.rheem.core.function.PredicateDescriptor; impor...
* @param typeClass type of the dataunit elements */
<|file_name|>mock.rs<|end_file_name|><|fim▁begin|>use std::fmt; use std::ascii::AsciiExt; use std::io::{self, Read, Write, Cursor}; use std::cell::RefCell; use std::net::SocketAddr; use std::sync::{Arc, Mutex}; use solicit::http::HttpScheme; use solicit::http::transport::TransportStream; use solicit::http::frame::{Set...
<|file_name|>TextDocument.ts<|end_file_name|><|fim▁begin|>import isEqual from '../util/isEqual'; import Delta from '../delta/Delta'; import Op from '../delta/Op'; import Line, { LineRanges, LineIds } from './Line'; import LineOp from './LineOp'; import AttributeMap from '../delta/AttributeMap'; import { EditorRange, no...
return change; }
<|file_name|>mkdir.go<|end_file_name|><|fim▁begin|>package endpoints import ( "encoding/json" "fmt" "net/http" log "github.com/Sirupsen/logrus" ) // MkdirHandler implements http.Handler. type MkdirHandler struct { *State } // NewMkdirHandler creates a new mkdir handler. func NewMkdirHandler(s *State) *MkdirHan...
if !mh.commitChange(msg, w, r) { return
<|file_name|>iso8859_1.py<|end_file_name|><|fim▁begin|>""" Python Character Mapping Codec iso8859_1 generated from 'MAPPINGS/ISO8859/8859-1.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,err...
<|file_name|>hypercalls.rs<|end_file_name|><|fim▁begin|>#[derive(Debug)] #[repr(usize)] #[allow(non_camel_case_types)] pub enum Command { set_trap_table = 0, mmu_update = 1, set_gdt = 2, stack_switch = 3, set_callbacks = 4, fpu_taskswitch = 5, sche...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import Route from '@ember/routing/route'; export default Route.extend({ beforeModel: function(transition) { if (transition.targetName === this.routeName) { transition.abort(); return this.replaceWith('vault.cluster.settings.mount-secret-backend'); ...
}, });
<|file_name|>submission_download.js<|end_file_name|><|fim▁begin|>define([ 'INST' /* INST */, 'i18n!submissions', 'jquery' /* $ */, 'str/htmlEscape', 'jquery.ajaxJSON' /* ajaxJSON */, 'jqueryui/dialog', 'jqueryui/progressbar' /* /\.progressbar/ */ ], function(INST, I18n, $, htmlEscape) { INST.downloadSu...
checkForChange(); }; });
<|file_name|>bitimage.cpp<|end_file_name|><|fim▁begin|>/* This file is part of Warzone 2100. Copyright (C) 1999-2004 Eidos Interactive Copyright (C) 2005-2011 Warzone 2100 Project Warzone 2100 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as publish...
*dot = '\0'; // then discard it // Load the texture pages.
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod log;<|fim▁hole|> pub use self::log::{LogConf, LogDevice};<|fim▁end|>
<|file_name|>utf8prober.py<|end_file_name|><|fim▁begin|>######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 19...
else: return unlike
<|file_name|>OpenHillShade_September_6am_Listener.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
energymodels.OpenHillShade_September_6am_Listener
<|file_name|>C.cpp<|end_file_name|><|fim▁begin|>#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdint> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <...
#include <stack>
<|file_name|>events_application_info_py3.py<|end_file_name|><|fim▁begin|># coding=utf-8<|fim▁hole|># # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # ------------------------------------------------------------------------...
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information.
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>""" Created on June 10, 2012 @author: peta15 """ from wtforms import fields from wtforms import Form from wtforms import validators from lib import utils from webapp2_extras.i18n import lazy_gettext as _ from webapp2_extras.i18n import ngettext, gettext FIELD_MAXLENG...
"Field cannot be longer than %(max)d characters."))]) pass
<|file_name|>layers.js<|end_file_name|><|fim▁begin|>var _ = require('underscore') module.exports = function (cdb) { (function () { var Layers = cdb.vis.Layers; /* * if we are using http and the tiles of base map need to be fetched from * https try to fix it */ ...
Layers.register('tiled', function (vis, data) {
<|file_name|>Selectors.py<|end_file_name|><|fim▁begin|><|fim▁hole|>:mod:`Selectors` -- selection methods module ============================================================== This module have the *selection methods*, like roulette wheel, tournament, ranking, etc. """ import random import Consts def GRankSelector(po...
"""
<|file_name|>plotting_tools.py<|end_file_name|><|fim▁begin|># Copyright (c) 2017, Udacity # 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 retain the abov...
self.hist_dict['val_loss'].append(logs['val_loss'])
<|file_name|>reactor_server.py<|end_file_name|><|fim▁begin|>from kivy.support import install_twisted_reactor install_twisted_reactor() from twisted.internet import reactor from twisted.internet import protocol class EchoProtocol(protocol.Protocol): def dataReceived(self, data): response = self.factory.a...
<|file_name|>htptProxy.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Ben Jones # Georgia Tech # Spring 2014 # # htpt-socks.py: this file builds upon the work of Zavier Lagraula's # PySocks code to create a SOCKS server for our HTTP circumvention tool import socks """SOCKS 4 proxy server class. Co...
# First trying "opt" value against options that use an argument. if opt in ['-a', '--bind_adress']:
<|file_name|>return.js<|end_file_name|><|fim▁begin|>'use strict'; /*! * Snakeskin * https://github.com/SnakeskinTpl/Snakeskin * * Released under the MIT license * https://github.com/SnakeskinTpl/Snakeskin/blob/master/LICENSE */ import Snakeskin from '../core'; import { ws } from '../helpers/string'; import { an...
<|file_name|>test_driver.py<|end_file_name|><|fim▁begin|># Copyright 2016 Hewlett Packard Enterprise Development LP # # 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/lic...
self.assertEqual(constants.AGENT_TYPE_OVS, ovs_driver.agent_type) self.assertFalse(ovs_driver.can_trunk_bound_port)
<|file_name|>rnatreemap.js<|end_file_name|><|fim▁begin|>import {rnaPlot} from './rnaplot.js'; export function rnaTreemapChart() { var width = 550; var height = 400; function rnaTreemapNode(selection) { // create a background rectangle for each RNA structure selection.each(function(d) { ...
}
<|file_name|>BC7019.java<|end_file_name|><|fim▁begin|>/** * ByteCart, ByteCart Redux * Copyright (C) Catageek * Copyright (C) phroa * * 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...
<|file_name|>kill.rs<|end_file_name|><|fim▁begin|>#![crate_name = "uu_kill"] /* * This file is part of the uutils coreutils package. * * (c) Maciej Dziardziel <fiedzia@gmail.com> * * For the full copyright and license information, please view the LICENSE file * that was distributed with this source code. */ ex...
Mode::Kill => return kill(&matches.opt_str("signal").unwrap_or(obs_signal.unwrap_or("9".to_owned())), matches.free), Mode::Table => table(), Mode::List => list(matches.opt_str("list")),
<|file_name|>getNameOfClass.py<|end_file_name|><|fim▁begin|># ========================================================================== # # Copyright NumFOCUS # # 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 ...
itk.auto_progress(2)
<|file_name|>lib.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...
// check the properties of the Self type: {
<|file_name|>progress.rs<|end_file_name|><|fim▁begin|>use std::io::{Read, Result}; use std::time::{Duration, Instant}; pub struct Progress<R> { bytes: usize, tick: Instant, stream: R, } impl<R> Progress<R> { pub fn new(stream: R) -> Self { Progress {<|fim▁hole|> bytes: 0, ...
<|file_name|>mul_add.rs<|end_file_name|><|fim▁begin|>#![feature(core, core_float)] extern crate core; #[cfg(test)] mod tests { use core::num::Float; // impl Float for f32 { // #[inline] // fn nan() -> f32 { NAN } // // #[inline] // fn infinity() -> f32 { INFINITY } // ...
// unsafe { intrinsics::floorf32(self) } // } //
<|file_name|>isomorph.py<|end_file_name|><|fim▁begin|>""" Graph isomorphism functions. """ import networkx as nx from networkx.exception import NetworkXError __author__ = """\n""".join(['Aric Hagberg (hagberg@lanl.gov)', 'Pieter Swart (swart@lanl.gov)', 'Christoph...
<|file_name|>backend_lobby_mux_test.go<|end_file_name|><|fim▁begin|>// Copyright (C) 2011 by Krzysztof Kowalik <chris@nu7hat.ch> // // 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 vers...
<|file_name|>auth.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...
/// Authorization interface
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>with open('README.txt') as f: long_description = f.read() from distutils.core import setup setup( name = "nomit", packages = ["nomit"], version = "1.0",<|fim▁hole|> url = "https://github.com/mjuenema/nomit", download_url = "https://github.com/mj...
description = "Process Monit HTTP/XML", author = "Markus Juenemann", author_email = "markus@juenemann.net",
<|file_name|>InventoryGrid.java<|end_file_name|><|fim▁begin|>package edu.cmu.cs.cimds.geogame.client.ui; import java.util.ArrayList; import java.util.Collections; import java.util.List; import com.google.gwt.user.client.ui.Grid; import com.google.gwt.user.client.ui.Image; import com.google.gwt.user.client.ui.Label; i...
}
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import patterns, url from django.views.generic import RedirectView from . import views APP_SLUGS = { 'chrono': 'Chrono', 'face_value': 'Face_Value', 'podcasts': 'Podcasts', 'roller': 'Roller', 'webfighter': 'Webfighter', ...
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>/** * ## `<md-toolbar>` is a container for headers, titles, or actions. * * You can see live examples in the Material [documentation](https://material.angular.io/components/toolbar/examples) * * &nbsp; * ## Basic example: * HTML * ```html * <md-toolbar>My Ap...
* * &nbsp; * ## Positioning toolbar content
<|file_name|>admin.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. package api import ( "bufio" "io" "io/ioutil" "net/http" "os" "strconv"<|fim▁hole|> "time" l4g "github.com/alecthomas/log4go" "github.com/gorilla/mux" "g...
"strings"
<|file_name|>ViewerBO.java<|end_file_name|><|fim▁begin|>package osberbot.bo; /** * TODO: Description * * @author Tititesouris * @since 2016/03/20 */ public class ViewerBO { private Integer id; private String name; private Boolean moderator; private RankBO rank; public ViewerBO(Integer id,...
return moderator; } public Integer getId() {
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/* Copyright 2013 Jesse 'Jeaye' Wilkerson See licensing in LICENSE file, or at: http://www.opensource.org/licenses/BSD-3-Clause File: shared/log/mod.rs Author: Jesse 'Jeaye' Wilkerson<|fim▁hole|>#[link(name = "log", vers = "0.2")]; #[crate_type =...
Description: An aggregator of logging items. */
<|file_name|>navtreeindex17.js<|end_file_name|><|fim▁begin|>var NAVTREEINDEX17 = { "classIoss_1_1Tet4.html#ae945be949a6165bf9cebf2b770699ebd":[4,0,69,135,22], "classIoss_1_1Tet4.html#af2f9d7a80f796ded6a5ddfe374ed808e":[4,0,69,135,19], "classIoss_1_1Tet7.html":[4,0,69,136], "classIoss_1_1Tet7.html#a13df36e1096ef89227119...
"classIoss_1_1TriShell3.html":[4,0,69,145], "classIoss_1_1TriShell3.html#a036e26dedc61661127a9b1895218d946":[4,0,69,145,7], "classIoss_1_1TriShell3.html#a0dc6bebf7ea7657abc2e63a12bd0bddb":[4,0,69,145,16],
<|file_name|>GraphGrammar.py<|end_file_name|><|fim▁begin|># _ GraphGrammar.py __________________________________________________ # This class implements a graph grammar, that is basically an ordered # collecttion of GGrule's # ____________________________________________________________________ from GGrule import...
<|file_name|>config.py<|end_file_name|><|fim▁begin|># Licensed to the StackStorm, Inc ('StackStorm') 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 Licens...
help='Paths which will be searched for integration packs.')
<|file_name|>AccumulateSameValues.cpp<|end_file_name|><|fim▁begin|>/** * Yaafe extension for the Cultural Broadcasting Archive. * * Copyright (c) 2012 University of Applied Sciences Ð Institute for Creative Media Technologies * * Author : Ewald Wieser B.Sc. (fhstp.ac.at) * * Co-Authors : * Dipl.-Ing. (FH) ...
bool AccumulateSameValues::process(Ports<InputBuffer*>& inp, Ports<OutputBuffer*>& outp)
<|file_name|>IGenerator.ts<|end_file_name|><|fim▁begin|>module tools.generator {<|fim▁hole|> addLine(line: string): IGenerator; getLines(): string[]; } }<|fim▁end|>
export interface IGenerator {
<|file_name|>bidi_checker_web_ui_test.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/ui/webui/bidi_checker_web_ui_test.h" #include "base/ba...
IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL, TestSettingsPage) {
<|file_name|>creatPredictdata.py<|end_file_name|><|fim▁begin|>import glob import os import pandas as pd class CTD(object): """docstring for CTD""" def __init__(self): self.format_l = [] self.td_l = []<|fim▁hole|> def feature(self,index): format_l = self.format_l feature = ((f...
self.iternum = 0 self.formatname = ""
<|file_name|>test_v1beta1_user_info.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git "...
pass
<|file_name|>transforms_test.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 ...
self.run_scenario(df, lambda df: df.two.str.cat([df.three], join='outer'))
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from typing import Any, Dict, Tuple, Union __cached_defs: Dict[str, Any] = {} def __getattr__(name: str) -> Any: import importlib # noqa # isort:skip if name in __cached_defs: return __cached_defs[name] if name == "JsonBase": modul...
return __cached_defs[name] __all__ = ["JsonBase", "ProtobufBase"]
<|file_name|>device_recovery.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env vpython # Copyright 2016 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. """A script to recover devices in a known bad state.""" import argparse i...
<|file_name|>insert_test.js<|end_file_name|><|fim▁begin|>var mongodb = process.env['TEST_NATIVE'] != null ? require('../lib/mongodb').native() : require('../lib/mongodb').pure(); var testCase = require('../deps/nodeunit').testCase, debug = require('util').debug, inspect = require('util').inspect, nodeunit = requ...
// Let's find our user
<|file_name|>index.js<|end_file_name|><|fim▁begin|>var path = require('path') module.exports = { // Webpack aliases aliases: { quasar: path.resolve(__dirname, '../node_modules/quasar-framework/'),<|fim▁hole|> components: path.resolve(__dirname, '../src/components') }, // Progress Bar Webpack plugin for...
src: path.resolve(__dirname, '../src'), assets: path.resolve(__dirname, '../src/assets'),
<|file_name|>update_instances_utils.py<|end_file_name|><|fim▁begin|># Copyright 2016 Google Inc. 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....
<|file_name|>lib.py<|end_file_name|><|fim▁begin|>import re import datetime from collections import OrderedDict TimePattern = re.compile("^[0-9]{4}\-[0-9]{2}\-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$") TimeFormat = "%Y-%m-%dT%H:%M:%S.%fZ" TimePatternSimple = re.compile("^[0-9]{4}\-[0-9]{2}\-[0-9]{2} [0-9]{2}:[0...
return str(s)
<|file_name|>OptaplannerIntegrationTest.java<|end_file_name|><|fim▁begin|>/* * Copyright 2015 Red Hat, Inc. and/or its affiliates. * * 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 * * ...
"1.0.0.Final"); private static final String NOT_EXISTING_CONTAINER_ID = "no_container"; private static final String CONTAINER_1_ID = "cloudbalance";
<|file_name|>moodle-mod_quiz-repaginate.js<|end_file_name|><|fim▁begin|>YUI.add('moodle-mod_quiz-repaginate', function (Y, NAME) { // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as publishe...
// 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|>Player.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2005-2012 MaNGOS <http://getmangos.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 Software Foundation; either version 2 of the Li...
UpdateExpertise(BASE_ATTACK); UpdateArmorPenetration(); }
<|file_name|>llwmr.py<|end_file_name|><|fim▁begin|>from ...utils.tests import base as base from ...utils.tests import mpi as mpit # key order: dataset; epsilon; C __REFERENCE_RESULTS__ = { "dryrun": { 0.1: { 0.1: { "accuracy": 1-0.9300, }, 1: { ...
<|file_name|>module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { RouterModule } from '@angular/router'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule, ReactiveFormsModule } from '@angular/forms';<|fim...
import { ColorPickerModule } from 'angular2-color-picker';
<|file_name|>TransferInlineContentHandler.java<|end_file_name|><|fim▁begin|>/* ************************************************************************ ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** * * (c) 2009. ...
* General Public License for Générale Publique GNU Affero * more details. pour plus de détails.
<|file_name|>PointerVectorExample.cpp<|end_file_name|><|fim▁begin|>#include <iostream> #include <vector> #include "PointerVectorExample.h" #include "Score.h" using namespace std; namespace samples { void PointerVectorExample() { vector<Score*> scores; scores.reserve(5); Score* cppScore = new Score(30, "C++")...
vector<Score*>::iterator iter = scores.begin(); while (iter != scores.end())
<|file_name|>Command63QueryRemoteEncoderCancelNextRecording.java<|end_file_name|><|fim▁begin|><|fim▁hole|> * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
/* * Copyright 2011-2012 Gregory P. Moyer * * Licensed under the Apache License, Version 2.0 (the "License");
<|file_name|>gjoneska_pfenning.py<|end_file_name|><|fim▁begin|>"""Sections variable used for grouping Gjoneska 2015 GO IDs.""" __copyright__ = "Copyright (C) 2016-2018, DV Klopfenstein, H Tang. All rights reserved." __author__ = "DV Klopfenstein" SECTIONS = [ # 18 sections ("immune", [ # 15 GO-headers "G...
"GO:0006811", # BP 422 L04 D04 H ion transport "GO:0055085", # BP 330 L04 D04 H transmembrane transport "GO:0006874", # BP 33 L08 D09 ACD cellular calcium ion homeostasis
<|file_name|>view_mixins.py<|end_file_name|><|fim▁begin|>from django.apps import apps as django_apps from django.core.exceptions import ObjectDoesNotExist from django.views.generic.base import ContextMixin class SubjectOffstudyViewMixinError(Exception): pass class SubjectOffstudyViewMixin(ContextMixin): ""...
try: subject_offstudy = model_cls.objects.get( subject_identifier=self.subject_identifier) except ObjectDoesNotExist:
<|file_name|>_isEdge.js<|end_file_name|><|fim▁begin|>export default function _isEdge() {<|fim▁hole|><|fim▁end|>
const ua = navigator.userAgent.toLowerCase(); return Boolean(ua.match(/edge/i)); }
<|file_name|>modules.js<|end_file_name|><|fim▁begin|>var modules = { "success" : [ {id: 1, name:"控制台", code:"console", protocol:"http", domain:"console.ecc.com", port:"18333", created:'2017-03-08 00:00:00', creator:'1', modified:'2017-03-08 00:00:00', modifier:'1'}, {id: 2, name:"服务中心", code:"service-center", prot...
<|file_name|>app.module.ts<|end_file_name|><|fim▁begin|>import { NgModule, ApplicationRef } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule } from '@angular/forms'; import { HttpModule } from '@angular/http'; import { RouterModule, PreloadAllModules } from '@angular...
* function or object map of reducer functions. If passed an object of * reducers, combineReducers will be run creating your application * meta-reducer. This returns all providers for an @ngrx/store
<|file_name|>issue-53269.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. //<|fim▁hole|>// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file m...
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
<|file_name|>symlink.test.js<|end_file_name|><|fim▁begin|>'use strict'; const fs = require('fs'); const path = require('path'); const test = require('ava'); const mockFs = require('mock-fs'); // const writeArtifacts = require('../../../lib/artifacts').writeArtifact; const writeArtifacts = require('../../../lib'); t...
'dir': { 'file.txt': 'Hi!'
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import codecs from setuptools import setup VERSION = '0.2.0' def read_long_description(): long_desc = [] with codecs.open('README.rst', 'r', 'utf8') as longdesc: long_desc.append(longdesc.read()) with codecs.open('HISTORY.rst', 'r', 'utf8') as hi...
author='github.com/scardine', author_email=' ', license='MIT', py_modules=['get_image_size'],
<|file_name|>order-address.js<|end_file_name|><|fim▁begin|>/* * 2007-2015 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensourc...
function getAddressesTitles() {
<|file_name|>snapshot.py<|end_file_name|><|fim▁begin|>import argparse import os import subprocess import mongoengine as me import rmc.html_snapshots.utils as utils import rmc.shared.constants as c def crawl_page(url): args = [ 'phantomjs', '--disk-cache=true', os.path.join(utils.FILE_DIR...
if not overwrite and os.path.isfile(file_path): continue full_url = os.path.join(base_url, file_url)
<|file_name|>test_util.py<|end_file_name|><|fim▁begin|>from collections import OrderedDict<|fim▁hole|> from nose.tools import eq_, assert_true, assert_false from mosql.compat import binary_type, text_type from mosql.util import ( autoparam, build_set, build_where, param, ___, _is_iterable_not_str, ) def test...
from datetime import date
<|file_name|>spritesheet.cpp<|end_file_name|><|fim▁begin|>#include "spritesheet.hpp" ////////// // Code // // Initializing the SpriteSheet sizes. void SpriteSheet::init(int cols, int rows, int width, int height) { this->cols = cols; this->rows = rows; this->width = width; this->height = height; }...
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import render from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.views.generic import View from .models import \ Course, Registration, Task, TaskSubmission, ScoreProfile f...
code_master=False,
<|file_name|>rule_501.py<|end_file_name|><|fim▁begin|>from vsg.rules import token_case from vsg import token lTokens = [] lTokens.append(token.package_body.body_keyword) class rule_501(token_case):<|fim▁hole|> |configuring_uppercase_and_lowercase_rules_link| **Violation** .. code-block:: vhdl ...
''' This rule checks the **body** keyword has proper case.
<|file_name|>search_history_item.py<|end_file_name|><|fim▁begin|>__author__ = 'bromix' from .directory_item import DirectoryItem from .. import constants <|fim▁hole|>class SearchHistoryItem(DirectoryItem): def __init__(self, context, query, image=None, fanart=None): if image is None: image = c...
<|file_name|>add_comment.ts<|end_file_name|><|fim▁begin|>/** * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE...
export async function newReviewCommentReply( currFilePath,
<|file_name|>on-finished.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for on-finished v2.2.0 // Project: https://github.com/jshttp/on-finished // Definitions by: Honza Dvorsky <http://github.com/czechboy0> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// <reference path="../node/node.d.t...
function onFinished(msg:NodeJS.EventEmitter, listener:Function): NodeJS.EventEmitter; namespace onFinished {
<|file_name|>0002_auto_20170424_0117.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-04-23 22:17 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('backups', '0001_initial'), ] ...
<|file_name|>extern-fail.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/lic...
use std::libc; use std::task;