prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] //! Test infrastructure for the Diem VM. //! //! This crate contains helpers for executing tests against the Diem VM. use diem_types::{transaction::TransactionSt...
/// Returns the name of the current function. This macro is used to derive the name for the golden /// file of each test case. #[macro_export]
<|file_name|>StatusPanel.java<|end_file_name|><|fim▁begin|>package cocoonClient.Panels; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import javax.swing.Box; import javax.swing...
} for(int i = 0; i < columnWidth.length; i++){
<|file_name|>search.tests.ts<|end_file_name|><|fim▁begin|>import Search from "./search"; import { INotify } from "../../services/notify"; import { IProfileService, CategoryFilter } from "../../services/api/profileService"; import ProfileResult from "../../services/api/profileResult"; import Failure from "../../services...
await sut.OnRunSearch(gender, languages, skills);
<|file_name|>pago-dialog.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit, OnDestroy } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { Response } from '@angular/http'; import { NgbActiveModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; import { EventManager, A...
templateUrl: './pago-dialog.component.html' })
<|file_name|>integration.py<|end_file_name|><|fim▁begin|>import cgi import hashlib import http.server import io import os import posixpath import ssl import threading import time import urllib.parse import pyftpdlib.authorizers import pyftpdlib.handlers import pyftpdlib.servers class FTPServer: def __init__(sel...
fp = dechunk(self.rfile) else: fp = self.rfile
<|file_name|>addressbook.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_L...
#include "addressbook.h"
<|file_name|>transmute-non-immediate-to-immediate.rs<|end_file_name|><|fim▁begin|>// run-pass // Issue #7988 // Transmuting non-immediate type to immediate type <|fim▁hole|>pub fn main() { unsafe { ::std::mem::transmute::<[isize; 1],isize>([1]) }; }<|fim▁end|>
// pretty-expanded FIXME #23616
<|file_name|>controller.js<|end_file_name|><|fim▁begin|>import auth from '../auth'; import clone from 'clone'; import storage from './storage'; async function addBlockOrItem(dbConn, token, codeObj, props, type) { let user = await auth.getUser(token); console.log(`Adding new ${type} for user ${user.login}`); let...
await storage.updateToolbarItem(dbConn, user.login, position, {type, id}); },
<|file_name|>util.go<|end_file_name|><|fim▁begin|>// Copyright 2014 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum 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 So...
return self.state.GetBalance(from).Cmp(balance) >= 0
<|file_name|>Controller.java<|end_file_name|><|fim▁begin|>package sample; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.TextArea; import javafx.scene.paint.Color; import javafx.scene.text.Text; import javafx.scene.text.TextFlow; import java.net.URL; import java.util.ArrayList;...
<|file_name|>open_options.rs<|end_file_name|><|fim▁begin|>use std::fs::OpenOptions; #[allow(unused_must_use)] #[warn(clippy::nonsensical_open_options)] fn main() { OpenOptions::new().read(true).truncate(true).open("foo.txt"); OpenOptions::new().append(true).truncate(true).open("foo.txt"); <|fim▁hole|> OpenO...
OpenOptions::new().read(true).read(false).open("foo.txt"); OpenOptions::new().create(true).create(false).open("foo.txt"); OpenOptions::new().write(true).write(false).open("foo.txt");
<|file_name|>DistributedBuildingMgrAI.py<|end_file_name|><|fim▁begin|>from direct.directnotify.DirectNotifyGlobal import * from otp.ai.AIBaseGlobal import * from toontown.building import DistributedBuildingAI from toontown.building import GagshopBuildingAI from toontown.building import HQBuildingAI from toontown.buildi...
self.__buildings = {} self.findAllLandmarkBuildings()
<|file_name|>base64.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lic...
/// Configuration for RFC 4648 standard base64 encoding
<|file_name|>15.2.3.6-4-542.js<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 Ecma International. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- es5id: 15.2.3.6-4-542<|fim▁hole|>includes: [propertyHelper.js] ---*/ var obj = {}; var getFunc = function() { retu...
description: > ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is undeletable
<|file_name|>urlpath.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
../../../../../share/pyshared/twisted/python/urlpath.py
<|file_name|>mainThreadEditor.ts<|end_file_name|><|fim▁begin|>/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *-...
}
<|file_name|>vrpose.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 core::nonzero::NonZero; use dom::bindings::cell::DOMRefCel...
Some(ref data) => { if dst.get().is_null() { dst.set(slice_to_array_buffer_view(cx, &data)); } else {
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>fn main() { let num = 1000; for b in 1..num { let a = (1000000 - 2000*b) / (2000-2*b); let c = 1000 - a - b; if a*a + b*b == c*c { println!("The numbers are {}, {}, {}", a, b, c);<|fim▁hole|> } }<|fim▁end|>
println!("The product abc = {}", a*b*c); break; }
<|file_name|>link.rs<|end_file_name|><|fim▁begin|>use std::{cmp}; use prelude::*; pub fn read_link(fs: &mut Filesystem, ino: u64) -> Result<Vec<u8>> { let inode = try!(get_inode(fs, ino)); if inode.mode.file_type == FileType::Symlink { read_link_data(fs, &inode) } else { Err(Error::new(format!("inode is ...
<|file_name|>deactivatemfadevice.py<|end_file_name|><|fim▁begin|><|fim▁hole|># # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice...
# Copyright 2009-2015 Eucalyptus Systems, Inc.
<|file_name|>SceneControllerCallsSay.java<|end_file_name|><|fim▁begin|>package gradingTools.comp301ss21.assignment4.controller; import gradingTools.basics.sharedTestCase.checkstyle.CheckstyleClassInstantiatedTestCase; import gradingTools.basics.sharedTestCase.checkstyle.CheckstyleMethodCalledTestCase; import gradi...
<|file_name|>delete-account-modal.component.ts<|end_file_name|><|fim▁begin|>// Copyright 2021 The Oppia 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 // //...
import { UserService } from 'services/user.service'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
<|file_name|>user-access-right-drop-graph-spec.js<|end_file_name|><|fim▁begin|>/* jshint globalstrict:true, strict:true, maxlen: 5000 */ /* global describe, before, after, it, require*/ // ////////////////////////////////////////////////////////////////////////////// // / @brief tests for user access rights // / // / ...
if (colLevel['none'].has(name)) {
<|file_name|>datepicker_tpl.js<|end_file_name|><|fim▁begin|>var tpl = [ '<div id="{uuid}" class="datepicker ui-d-n">', ' <div class="datepicker__mask"></div>', ' <div class="datepicker__main">', ' <div class="datepicker__header">', ' <div class="datepicker__time-toggle"></div>', ' <div class="datepicker__tim...
' </ul>',
<|file_name|>widget.preloader.js<|end_file_name|><|fim▁begin|>var WidgetPreloader = Backbone.View.extend({ tagName: 'span', className: 'preloader', initialize: function(){ this.render(); }, render: function(){ $(this.el).html('<div class="spinner"><div class="bar1 bar"></div><div class="bar2 bar"></div><div cl...
});
<|file_name|>loghttp_test.go<|end_file_name|><|fim▁begin|>package logh import ( "encoding/json" "net/http" "net/http/httptest" "net/url" "testing" "time" "github.com/dilfish/tools/io" ) func TestRequestToInfo(t *testing.T) { var req http.Request tx := time.Now() req.Method = "POST" req.URL = &url.URL{} r...
t.Error("new request error:", err) } err = rl.PostOne(req) if err != nil {
<|file_name|>EacOnItemPickup.java<|end_file_name|><|fim▁begin|>package Eac.event; import Eac.Eac; import cpw.mods.fml.common.eventhandler.SubscribeEvent;<|fim▁hole|>public class EacOnItemPickup extends Eac { @SubscribeEvent public void EacOnItemPickup(PlayerEvent.ItemPickupEvent e) { if (e.pickedUp.get...
import cpw.mods.fml.common.gameevent.PlayerEvent; import net.minecraft.item.ItemStack;
<|file_name|>web.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf8 -*- """The Tornado web framework. 核心模块, 参考示例使用代码: - 重要模块: - tornado.web - tornado.ioloop # 根据示例,可知入口在此.参看: ioloop.py - tornado.httpserver The Tornado web framework looks a bit like web.py (...
<|file_name|>regress-208496-001.js<|end_file_name|><|fim▁begin|>/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* 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...
var b = '(TEST FAILURE)'; h(par);
<|file_name|>test_init.py<|end_file_name|><|fim▁begin|>"""Tests for init functions.""" from datetime import timedelta from zoneminder.zm import ZoneMinder from homeassistant import config_entries from homeassistant.components.zoneminder import const from homeassistant.components.zoneminder.common import is_client_in_...
assert not hass.services.has_service(const.DOMAIN, const.SERVICE_SET_RUN_STATE)
<|file_name|>apps.py<|end_file_name|><|fim▁begin|><|fim▁hole|> class PhotosAppConfig(AppConfig): name = 'livinglots_usercontent.photos' def ready(self): try: from actstream import registry from . import signals registry.register(self.get_model('Photo')) exc...
from django.apps import AppConfig
<|file_name|>views.py<|end_file_name|><|fim▁begin|># Create your views here.<|fim▁hole|>from django.contrib.auth.models import User from repository.models import PisiPackage def show_user (request, name=None): user = get_object_or_404 (User, username=name) context = { 'user' : user } packages = None try: pack...
from django.http import HttpResponse from django.shortcuts import render, get_object_or_404
<|file_name|>lasso_regression.py<|end_file_name|><|fim▁begin|>from sklearn.linear_model import Lasso def get_lasso_prediction(train_data, train_truth, test_data, test_truth, alpha=1.0, iter_id=0): clf = Lasso(alpha=alpha) clf.fit(train_data, train_truth) predicted = clf.predict(test_data)<|fim▁hole|><|fim▁...
return predicted.ravel()
<|file_name|>AntiXSS.java<|end_file_name|><|fim▁begin|>/** * Balero CMS Project: Proyecto 100% Mexicano de código libre. * Página Oficial: http://www.balerocms.com * * @author Anibal Gomez <anibalgomez@icloud.com> * @copyright Copyright (C) 2015 Neblina Software. Derechos reservados. * @license Licenci...
<|file_name|>htmliframeelement.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::codegen::HTMLIFrameElementBindin...
} pub fn MarginWidth(&self) -> DOMString { ~""
<|file_name|>8646922c8a04_change_default_pool_slots_to_1.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 license...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>VERSION = "0.12beta4"<|fim▁hole|><|fim▁end|>
VERSION_NAME = "Anderssen"
<|file_name|>data_source_aws_lambda_layer_version_test.go<|end_file_name|><|fim▁begin|>package aws import ( "fmt" "testing" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" ) func TestAccDataSourceAWSLambdaLayerVersion_basic(t *testing.T) { rName := acctest.Random...
}, }) }
<|file_name|>pipeline_activity_crud.ts<|end_file_name|><|fim▁begin|>/* * Copyright 2020 ThoughtWorks, 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...
<|file_name|>AssFilterAutoLoader.cpp<|end_file_name|><|fim▁begin|>/* * Copyright(C) 2016-2017 Blitzker * * 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 3 of the L...
{ DbgLog((LOG_TRACE, 1, L"AssFilterAutoLoader::CheckInput -> Failed to add filter to cache."));
<|file_name|>convert_to_q.py<|end_file_name|><|fim▁begin|># Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier:...
<|file_name|>positioned.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::cell::ArcRefCell; use crate::context::LayoutCo...
let containing_block = DefiniteContainingBlock {
<|file_name|>predefined.html.py<|end_file_name|><|fim▁begin|>XXXXXXXXX XXXXX XXXXXX XXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXX X XXXXXXXXXX XXX...
<|file_name|>MulitAuctionServiceImpl.java<|end_file_name|><|fim▁begin|>/* */ package com.hundsun.network.gates.wulin.biz.service.pojo.auction; /* */ /* */ import com.hundsun.network.gates.luosi.biz.security.ServiceException; /* */ import com.hundsun.network.gates.luosi.common.enums.EnumActiveStatus;...
<|file_name|>db_wbx.py<|end_file_name|><|fim▁begin|># # Copyright 2007 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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 v...
Return value to stick in REFCLK_DIVISOR register """ return 1
<|file_name|>package.py<|end_file_name|><|fim▁begin|>############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, t...
fixed as long as fixing them doesn't require huge changes to the code. Users of LZMA Utils should move to XZ Utils. XZ Utils support the legacy .lzma format used by LZMA Utils, and can also emulate the command line
<|file_name|>TorManager.py<|end_file_name|><|fim▁begin|>import logging import re import socket import binascii import sys import os import time import gevent import subprocess import atexit from Config import config from Crypt import CryptRsa from Site import SiteManager from lib.PySocks import socks from gevent.coro...
self.status = "Connected (%s)" % res_auth self.conn = conn
<|file_name|>model_delete_server_metadata_response.go<|end_file_name|><|fim▁begin|>package model import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/huaweicloud/huaweicloud-sdk-go-v3/core/utils" "strings" )<|fim▁hole|>type DeleteServerMetadataResponse struct { HttpStatusCode int `json:"-"` } func (o Dele...
// Response Object
<|file_name|>mail_compose_message.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free softwar...
}
<|file_name|>require.js<|end_file_name|><|fim▁begin|>// -- kriskowal Kris Kowal Copyright (C) 2009-2010 MIT License (function (require, exports) { /** * @module */ /*whatsupdoc*/ var Q = require("q"); var has = Object.prototype.hasOwnProperty; var update = function (_object, object) { for (var key in object) ...
}
<|file_name|>storage.js<|end_file_name|><|fim▁begin|>$(document).delegate('.storage_graph_link', 'click', function(e){ var anchor = this, el = $(anchor), id = el.attr('data-status'); if(e.ctrlKey || e.metaKey){ return true; }else{ e.preventDefault(); } var cell = document.getElementById(id); var text ...
} })
<|file_name|>FilterDSPKernel.hpp<|end_file_name|><|fim▁begin|>/* <samplecode> <abstract> A DSPKernel subclass implementing the realtime signal processing portion of the FilterDemo audio unit. </abstract> </samplecode> */ #ifndef FilterDSPKernel_hpp #define FilterDSPKernel_hpp #import "DSPKernel.hpp" #import ...
} void convertBadStateValuesToZero() { /*
<|file_name|>sol-rust.rs<|end_file_name|><|fim▁begin|>use std::io; use std::io::prelude::*;<|fim▁hole|> let stdin = io::stdin(); for line in stdin.lock().lines() { let s = line.unwrap(); println!("{}", &s[4..]); } }<|fim▁end|>
fn main() {
<|file_name|>convert.py<|end_file_name|><|fim▁begin|># This file is part of Korman. # # Korman is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
with utils.temporary_mesh_object(bo) as meshObj: if bo.data.materials: self.mesh.export_object(meshObj, so) else:
<|file_name|>ReadonlyableDefinition.ts<|end_file_name|><|fim▁begin|>export abstract class ReadonlyableDefinition {<|fim▁hole|>}<|fim▁end|>
isReadonly: boolean;
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>use std::c_str::CString; use std::error; use std::fmt; use std::str; use libc; use libc::c_int; use {raw, ErrorCode}; /// A structure to represent errors coming out of libgit2. pub struct Error { raw: raw::git_error, } impl Error { /// Returns the last error...
<|file_name|>high-contrast-light.src.js<|end_file_name|><|fim▁begin|>/** * @license Highcharts JS v9.1.0 (2021-05-04) * @module highcharts/themes/high-contrast-light * @requires highcharts *<|fim▁hole|> * * License: www.highcharts.com/license */ 'use strict'; import '../../Extensions/Themes/HighContrastLight.js';...
* (c) 2009-2021 Highsoft AS
<|file_name|>networking.go<|end_file_name|><|fim▁begin|>package api type Networking struct { AmazonVPC AmazonVPC `yaml:"amazonVPC,omitempty"` SelfHosting SelfHosting `yaml:"selfHosting,omitempty"` } type SelfHosting struct { Type string `yaml:"type"` Typha bool `yaml:"typha"`<|fim▁hole|...
<|file_name|>mod.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/. */ //! Enum wrappers to be able to select different channel implemen...
<|file_name|>e127.py<|end_file_name|><|fim▁begin|>from __future__ import print_function, division import matplotlib matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab! from neuralnilm import Net, RealApplianceSource, BLSTMLayer, SubsampleLayer, DimshuffleLayer from lasagne.nonlinearities import...
lower learning rate to 0.001 e108
<|file_name|>TestConformColorsCssProcessor.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2010. All rights reserved. */ package ro.isdc.wro.model.resource.processor; import static org.junit.Assert.assertEquals; import java.io.File; import java.net.URL; import org.junit.AfterClass; import org.junit.Before; im...
public void shouldSupportCorrectResourceTypes() {
<|file_name|>config.py<|end_file_name|><|fim▁begin|>import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string' SQLALCHEMY_COMMIT_ON_TEARDOWN = True MAIL_SERVER = 'smtp.googlemail.com' MAIL_PORT = 587 MAIL_USE_TLS...
MAIL_PASSWORD = 'Airjeff3' FLASKY_MAIL_SUBJECT_PREFIX = '[JeffPD]' FLASKY_MAIL_SENDER = 'frey.maxim@gmail.com'
<|file_name|>userassist.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Windows UserAssist information collector.""" import codecs import logging from winregrc import data_format from winregrc import errors from winregrc import interface class UserAssistEntry(object): """UserAssist entry. Attributes...
self._DebugPrintValue('Unknown12', value_string)
<|file_name|>MINISTM32_STRIVE.py<|end_file_name|><|fim▁begin|>#!/bin/false # This file is part of Espruino, a JavaScript interpreter for Microcontrollers # # Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk> # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL...
'ram' : 64, 'flash' : 512,
<|file_name|>map1.py<|end_file_name|><|fim▁begin|>class TschunkMap1(): #(TschunkMap): def __init__(self): self.img = 'img/map1.png' self.figure = 'todo' self.rows = 15<|fim▁hole|> self.cols = 7 self.origin_x = 1 self.origin_y = 13 self.initial_direction = (...
<|file_name|>ObjectListItem.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Color-Coding Studio. All Rights Reserved. * * Use of this source code is governed by an Apache License, Version 2.0 * that can be found in the LICENSE file at http://www.apache.org/licenses/LICENSE-2.0 */ namespace sap { ex...
<|file_name|>StringDistanceExample.java<|end_file_name|><|fim▁begin|>/*- * #%L * Simmetrics - Examples * %% * Copyright (C) 2014 - 2021 Simmetrics 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 ...
static float example03() { String str1 = "A quirky thing it is. This is a sentence."; String str2 = "This sentence is similar. A quirky thing it is.";
<|file_name|>MediaGallery.js<|end_file_name|><|fim▁begin|>import React, {Component, PropTypes} from 'react'; import {View, ListView, Image, CameraRoll, TouchableHighlight, StyleSheet} from 'react-native'; import MessageDao from '../../dao/MessageDao'; import LoadingSpinner from '../common/LoadingSpinner'; import Icon f...
constructor(props, context) { super(props, context); this.state = {mediasForThread: [], isLoading: true};
<|file_name|>_sizesrc.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="surface.hoverlabel.font", **kwargs ): super(SizesrcValidator, self).__init__( ...
edit_type=kwargs.pop("edit_type", "none"),
<|file_name|>task_html.py<|end_file_name|><|fim▁begin|>class TagException(Exception): pass class ArgumentException(Exception): pass class Tag(object): __slots__ = ['_name', '_attributes', '_parent', '_previous_sibling', '_next_sibling', '_first_child', '_last_child', '_children'] d...
@previous_sibling.setter def previous_sibling(self, value):
<|file_name|>CustomerPersistenceIntegrationTest.java<|end_file_name|><|fim▁begin|>/* * 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.or...
<|file_name|>static_files_handler.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2007 Google 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.apach...
"""Serves the response to an OSError or IOError.
<|file_name|>typevar.py<|end_file_name|><|fim▁begin|>""" Type variables for Parametric polymorphism. Cretonne instructions and instruction transformations can be specified to be polymorphic by using type variables. """ from __future__ import absolute_import import math from . import types, is_power_of_two from copy im...
<|file_name|>test_ld.py<|end_file_name|><|fim▁begin|>from unittest import mock from .. import * from bfg9000.tools.ld import LdLinker from bfg9000.path import abspath from bfg9000.versioning import Version def mock_execute(args, **kwargs): return 'SEARCH_DIR("/dir1")\nSEARCH_DIR("=/dir2")\n' class TestLdLinke...
self.assertEqual(ld.family, 'native')
<|file_name|>config_test.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2016 VMware, Inc. All Rights Reserved. // // This product is licensed to you under the Apache License, Version 2.0 (the "License"). // You may not use this product except in compliance with the License. // // This product may include a number of ...
<|file_name|>sharded_jit.py<|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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Un...
<|file_name|>backboneApp.js<|end_file_name|><|fim▁begin|>var Backbone = require('backbone'), _ = require('underscore'); global.App = {}; App.Task = Backbone.Model.extend({ url : 'http://localhost:9292/tasks/' + this.get('id'), defaults : { title: 'Untitled Task 1', done : false } });...
this.delegateEvents();
<|file_name|>setup_ch.py<|end_file_name|><|fim▁begin|>''' Created on Jul 19, 2010 @author: jnaous ''' from django.core.urlresolvers import reverse from django.test import Client from common.tests.client import test_get_and_post_form from django.contrib.auth.models import User from pyquery import PyQuery as pq from ope...
), )
<|file_name|>test_user_keys.js<|end_file_name|><|fim▁begin|>var assert = require('assert'); var keys = require("cmd/common/keys/user.js"); var userKeysNock = require('test/fixtures/user/fixture_user_keys'); module.exports = { setUp : function(cb){ return cb(); }, 'list keys' : function(cb){ keys({ _ : ...
var key_val = "pviryBwt22iZ0iInufMYBuVV"; keys({ _ : ['target', 'UserKey'] }, function(err, r){ assert.equal(err, null, err); assert.equal(r, key_val);
<|file_name|>next-empty.worker.js<|end_file_name|><|fim▁begin|>self.addEventListener("message", nextEmpty); function isAt(points, x, y) { for (var i = 0, len = points.length; i < len; i += 2) { if (points[i] == x && points[i + 1] == y) return true; } return false; } function nextEmpty(event) ...
var data = event.data; var x = 0;
<|file_name|>developer.js<|end_file_name|><|fim▁begin|>/* ########################################################################### GLOBAL ASSETS RELEASE v6.0.2 BUILD DATE: 20100224 ########################################################################### */ // init values hele = new Array(); newspause = 4; // ...
function fadenews(){ if (nop == .1){
<|file_name|>DP20150401B.py<|end_file_name|><|fim▁begin|>""" [2015-04-01] Challenge #208 [Intermediate] ASCII Gradient Generator https://www.reddit.com/r/dailyprogrammer/comments/3104wu/20150401_challenge_208_intermediate_ascii/ # [](#IntermediateIcon) _(Intermediate)_: ASCII Gradient Generator A linear colour gradie...
cccccccccccccdddddeeeeeeeeeeeeeffffggggg cccccccccccccdddddeeeeeeeeeeeeefffffgggg ccccccccccccccdddddeeeeeeeeeeeeeffffgggg
<|file_name|>query.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/. */ //! Utilities for querying the layout, as needed by the layout ...
enum OverflowDirection { RightAndDown,
<|file_name|>fastcall-inreg.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/...
// ignore-hexagon // ignore-mips // ignore-mips64
<|file_name|>pln_distrib.py<|end_file_name|><|fim▁begin|>''' Implementation in scipy form of the Double Pareto-Lognormal Distribution ''' import numpy as np from scipy.stats import rv_continuous, norm def _pln_pdf(x, alpha, nu, tau2): A1 = np.exp(alpha * nu + alpha ** 2 * tau2 / 2) fofx = alpha * A1 * x ** (...
def _pln_cdf(x, alpha, nu, tau2):
<|file_name|>test_geometric.py<|end_file_name|><|fim▁begin|>import pytest from .utils import * import psi4 from qcengine.testing import using @pytest.mark.parametrize('engine', [ pytest.param('optking'), pytest.param('geometric', marks=using('geometric')), ]) # yapf: disable @pytest.mark.parametrize('inp',...
H 1 1.0 2 90.0 """)
<|file_name|>main-footer.component.ts<|end_file_name|><|fim▁begin|>import { Component } from '@angular/core';<|fim▁hole|>@Component({ selector: 'main-footer', template: ` <div id="main-footer" class="main-footer"> <div class="container"> <div class="row"> ...
<|file_name|>GetInboxClinicalDocuments.java<|end_file_name|><|fim▁begin|><|fim▁hole|>import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import org.hl7.v3.CE; /** * <p>Java-Klasse für anonymous complex type. * * <p>Das folgen...
package ch.docbox.ws.cdachservicesv2; import javax.xml.bind.annotation.XmlAccessType;
<|file_name|>p051.rs<|end_file_name|><|fim▁begin|>//! [Problem 51](https://projecteuler.net/problem=51) solver. #![warn(bad_style, unused, unused_extern_crates, unused_import_braces, unused_qualifications, unused_results)] #[macro_use(problem)] extern crate common; extern crate integer; extern crate p...
<|file_name|>Math.cpp<|end_file_name|><|fim▁begin|>// // File: Math.cpp // Author: John Barbero Unenge // Date: 10/11/12. // // Copyright (c) 2012 Catch22. All rights reserved. //<|fim▁hole|>// License: The following code is licensed under the Catch22-License // #include "Math.hpp" #include <math.h> Vector2d* ...
// All code is my own except where credited to others. //
<|file_name|>net.rs<|end_file_name|><|fim▁begin|>use color::Colorf32; use fastup::{self, Node, parse_for_first_node, parse_color}; use stats_once::{NET_DOWNLOAD_SPEED, NET_UPLOAD_SPEED}; use super::error_node; use std::mem::swap; #[derive(Debug, Copy, Clone, Default)] pub struct Widget; impl super::Widget for Widget ...
<|file_name|>PrefPageOracle.java<|end_file_name|><|fim▁begin|>/* * DBeaver - Universal Database Manager * Copyright (C) 2010-2017 Serge Rider (serge@jkiss.org) * Copyright (C) 2011-2012 Eugene Fradkin (eugene.fradkin@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may no...
private Text explainTableText; private Button rowidSupportCheck; private Button enableDbmsOuputCheck;
<|file_name|>BLITSaw_processor.cpp<|end_file_name|><|fim▁begin|>/* * BLITSaw_processor.cpp * * Copyright (c) 2014, fukuroda (https://github.com/fukuroder) * Released under the MIT license */ #include "BLITSaw_processor.h" #include "BLITSaw_guids.h" #include "pluginterfaces/vst/ivstparameterchanges.h" #i...
} }
<|file_name|>quiz_error.rs<|end_file_name|><|fim▁begin|>extern crate diesel; use self::diesel::result::Error as DatabaseError; use std::error; use std::fmt; use std::convert::From; #[derive(Debug)] pub enum QuizError { DatabaseError(DatabaseError), JokerUnavailable, GameAlreadyFinished, NoGameInProgr...
write!(f, "Game already finished error: Tried to interact with a game that has already been finished") }
<|file_name|>symbol.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses...
assert_eq!(i.intern ("dog"), Symbol(0));
<|file_name|>jj.js<|end_file_name|><|fim▁begin|>/* Just Journal JavaScript Library author: Lucas Holt date created: June 10, 2007 */ function follow(friend) { 'use strict'; var request = jQuery.ajax({ url: "/api/friend/" + friend, type: "PUT", data: {} ...
<|file_name|>MainActivity.java<|end_file_name|><|fim▁begin|>package fr.hnit.babyname; /*<|fim▁hole|>either version 2 of the License, or (at your option) any later version. The babyname app is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ...
The babyname app 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,
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>extern crate bip_metainfo; extern crate bip_disk; extern crate bip_util; extern crate bytes; extern crate futures; extern crate tokio_core; extern crate rand; use std::collections::HashMap; use std::io::{self}; use std::path::{Path, PathBuf}; use std::sync::{Mutex, Arc}...
self.run_with_lock(|files| { if !files.contains_key(&file_path) { files.insert(file_path.clone(), Vec::new()); }
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2015 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...
explicit_self: None, args: vec!(Literal(path_local!(u64))), ret_ty: Literal(Path::new_(pathvec_std!(cx, core::option::Option), None,
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::ops::Add; use std::ops::Mul; fn main() { // Rust allows limited operators overloading // There are special traits for overloadng operators #[derive(Debug)] struct Point { x: i32, y: i32, } impl Add for Point { type Output = Point;...
impl<T> HasArea<T> for Square<T>