prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012 CNRS # Author: Florent Lamiraux # # This file is part of hpp-corbaserver. # hpp-corbaserver is free software: you can redistribute it<|fim▁hole|># License as published by the Free Software Foundation, either version # 3 of the License, or (at yo...
# and/or modify it under the terms of the GNU Lesser General Public
<|file_name|>trait-bounds-in-arc.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-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.a...
fn num_legs(&self) -> uint { 0 }
<|file_name|>CreateConditionalForwarderResultJsonUnmarshaller.java<|end_file_name|><|fim▁begin|>/* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. 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. ...
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*; import com.amazonaws.transform.*; import com.fasterxml.jackson.core.JsonToken;
<|file_name|>respeqt_es.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="es_ES"> <context> <name>AboutDialog</name> <message> <location filename="../aboutdialog.ui" line="14"/> <source>About RespeQt</source> <translation>Ace...
<translation>Mango malo 2 %1</translation> </message>
<|file_name|>FetchWeatherTask.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2014 The Android Open Source Project * * 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://...
locationValues.put(WeatherContract.LocationEntry.COLUMN_COORD_LAT, lat); locationValues.put(WeatherContract.LocationEntry.COLUMN_COORD_LONG, lon);
<|file_name|>FontWarnings.js<|end_file_name|><|fim▁begin|><|fim▁hole|> * Copyright (c) 2009-2018 The MathJax Consortium * * 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:...
/************************************************************* * * MathJax/localization/br/FontWarnings.js *
<|file_name|>upsertMany.js<|end_file_name|><|fim▁begin|>'use strict' const MongoClient = require('mongodb').MongoClient const muri = require('muri') const chai = require('chai') const expect = chai.expect const assert = chai.assert const chaiSubset = require('chai-subset') chai.use(chaiSubset) chai.should() const st...
<|file_name|>btqlistdelegate.cpp<|end_file_name|><|fim▁begin|>#include <QtGui> #include "btglobal.h" #include "btqlistdelegate.h" //#include <QMetaType> btQListDeletgate::btQListDeletgate(QObject *parent) : QItemDelegate(parent) { } QWidget *btQListDeletgate::createEditor(QWidget *parent, const QStyleOptionViewItem ...
} #include "btqlistdelegate.moc"
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup from djangocms_carousel import __version__ INSTALL_REQUIRES = [ ] CLASSIFIERS = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: D...
<|file_name|>task_manager.js<|end_file_name|><|fim▁begin|>mf.include("chat_commands.js"); mf.include("assert.js"); mf.include("arrays.js"); /** * Example: * var id; * var count = 0; * task_manager.doLater(new task_manager.Task(function start() { * id = mf.setInterval(function() { * mf.debug("hello");...
} tasks[0].stop(); tasks[0].start();
<|file_name|>custom.time.pipe.ts<|end_file_name|><|fim▁begin|>import { Pipe,PipeTransform } from '@angular/core' @Pipe({ name: 'customTime' }) export class CustomTimePipe implements PipeTransform { minuteTime: number = 60 * 1000 hourTime: number = 60 * this.minuteTime dayTime: number = 24 * this.hourTime monthTime...
<|file_name|>color.mako.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/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% ...
buttonhighlight buttonshadow buttontext captiontext graytext highlight
<|file_name|>flags.rs<|end_file_name|><|fim▁begin|>// This file is part of Grust, GObject introspection bindings for Rust // // Copyright (C) 2015 Mikhail Zabaluev <mikhail.zabaluev@gmail.com> // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Pub...
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>""" Django settings for jstest project. Generated by 'django-admin startproject' using Django 1.10.4. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.d...
<|file_name|>test_website.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import StringIO from pytest import raises from aspen.website import Website from aspen.http.response ...
<|file_name|>unmarshal.go<|end_file_name|><|fim▁begin|>package rest import ( "encoding/base64" "fmt" "io/ioutil" "net/http" "reflect" "strconv" "strings" "time" "github.com/revinate/etcd2s3/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws"<|fim▁hole|> // Unmarshal unmarshals the REST component of a respon...
"github.com/revinate/etcd2s3/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awserr" "github.com/revinate/etcd2s3/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request" )
<|file_name|>add_o32_rAX_Id.java<|end_file_name|><|fim▁begin|>/* JPC: An x86 PC Hardware Emulator for a pure Java Virtual Machine Copyright (C) 2012-2013 Ian Preston This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as p...
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
<|file_name|>jquery.flot.resize.min.js<|end_file_name|><|fim▁begin|>/* Flot plugin for automatically redrawing plots as the placeholder resizes. Copyright (c) 2007-2013 IOLA and Ole Laursen. Licensed under the MIT license. <|fim▁hole|>There are no options. If you need to disable the plugin for some plots, you can just...
It works by listening for changes on the placeholder div (through the jQuery resize event plugin) - if the size changes, it will redraw the plot.
<|file_name|>google-maps.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('mean.system').directive('googleMaps', ['GoogleMaps', 'Global', function(GoogleMaps, Global) { return { restrict: 'E', template: '<div id="map" style="height: 600px; width: 100%;"></div>',<|fim▁hole|> cen...
controller: function() { var mapOptions; if ( GoogleMaps ) { mapOptions = {
<|file_name|>test_call.py<|end_file_name|><|fim▁begin|>import py from rpython.flowspace.model import SpaceOperation, Constant, Variable from rpython.rtyper.lltypesystem import lltype, llmemory, rffi from rpython.translator.unsimplify import varoftype<|fim▁hole|>from rpython.rlib import jit from rpython.jit.codewriter ...
<|file_name|>temp_dir.py<|end_file_name|><|fim▁begin|>"""TempDir module."""<|fim▁hole|>import shutil class TempDir: """Class creating and managing the temporary directories.""" def __init__(self, directory: str): self.temp_dir = directory @classmethod def create(cls) -> "TempDir": ""...
import tempfile
<|file_name|>TableLog.rs<|end_file_name|><|fim▁begin|>outputserver.TableLog$2 outputserver.TableLog$3<|fim▁hole|>outputserver.TableLog$7 outputserver.TableLog$6 outputserver.TableLog$5 outputserver.TableLog$4 outputserver.TableLog$CenterTableCellRenderer outputserver.TableLog outputserver.TableLog$8<|fim▁end|>
outputserver.TableLog$1
<|file_name|>DummyClass.java<|end_file_name|><|fim▁begin|>/* * * Copyright 2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://...
public FoobarDto methodToTestFoobarDto(@RequestBody FoobarDto model) { return null; }
<|file_name|>trie.rs<|end_file_name|><|fim▁begin|>// Copyright 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/licenses/L...
/// Create an empty TrieMap #[inline] pub fn new() -> TrieMap<T> {
<|file_name|>editor.js<|end_file_name|><|fim▁begin|>/* This file is part of Booktype. Copyright (c) 2012 Aleksandar Erkalovic <aleksandar.erkalovic@sourcefabric.org> Booktype is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by t...
} else { // open but not active, switching content jquery(this).closest('ul').find('li').removeClass('active'); jquery(this).parent().toggleClass('active');
<|file_name|>normal.rs<|end_file_name|><|fim▁begin|>// Copyright 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/licenses...
<|file_name|>no-use-before-define.js<|end_file_name|><|fim▁begin|>"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); }) : (function(o, ...
/** * Checks whether or not a given reference is inside of the initializers of a given variable. * * @returns `true` in the following cases:
<|file_name|>path.rs<|end_file_name|><|fim▁begin|>// Copyright 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/licenses/L...
extension: None );
<|file_name|>usgs_eddn_test.py<|end_file_name|><|fim▁begin|>from datetime import datetime import pandas as pd from pandas.util.testing import assert_frame_equal import ulmo import ulmo.usgs.eddn.parsers as parsers import test_util fmt = '%y%j%H%M%S' message_test_sets = [ { 'dcp_address': 'C5149430', ...
['2013-10-30 07:00:00', pd.np.nan, 109.9], ['2013-10-30 08:00:00', pd.np.nan, 110.0], ['2013-10-30 09:00:00', pd.np.nan, 110.0], ['2013-10-30 10:00:00', pd.np.nan, 110.0],
<|file_name|>test-zlib-brotli-kmaxlength-rangeerror.js<|end_file_name|><|fim▁begin|>'use strict'; require('../common'); // This test ensures that zlib throws a RangeError if the final buffer needs to // be larger than kMaxLength and concatenation fails. // https://github.com/nodejs/node/pull/1811 const assert = requi...
buffer.kMaxLength = oldkMaxLength; const encoded = Buffer.from('G38A+CXCIrFAIAM=', 'base64');
<|file_name|>MySQLPreTableImportManager.java<|end_file_name|><|fim▁begin|>package org.dbflute.erflute.db.impl.mysql; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import org.dbflute.erflute.editor.model.dbimport.DBObject; import org.dbflute.erflute.editor....
// このテーブルは使用しない。
<|file_name|>normalizeOptions.js<|end_file_name|><|fim▁begin|>'use strict'; // Adapted from https://github.com/tleunen/babel-plugin-module-resolver/blob/master/src/normalizeOptions.js const path = require('path'); const { createSelector } = require('reselect'); const defaultExtensions = ['.js']; const normalizeRoot...
}; } );
<|file_name|>pouchdb.js<|end_file_name|><|fim▁begin|>const url = require('url'); const _ = require('lodash'); const fetch = require('node-fetch'); const PouchDB = require('pouchdb'); const logout = require('../../logout')(); PouchDB.plugin(require('pouchdb-adapter-node-websql')); PouchDB.plugin(require('pouchdb-find'))...
<|file_name|>issue-15167.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. //<|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|>validate.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # http://www.privacyidea.org # (c) cornelius kölbel, privacyidea.org # # 2020-01-30 Jean-Pierre Höhmann <jean-pierre.hohemann@netknights.it> # Add WebAuthn token # 2018-01-22 Cornelius Kölbel <cornelius.koelbel@netknights.it> # ...
<|file_name|>request_test.go<|end_file_name|><|fim▁begin|>package sarama import ( "bytes" "reflect" "testing" "github.com/davecgh/go-spew/spew" ) type testRequestBody struct { } func (s *testRequestBody) key() int16 { return 0x666 } func (s *testRequestBody) version() int16 { return 0xD2 } func (s *testRequ...
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details.<|fim▁hole|># # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RTriebeard(RPackage): """t...
<|file_name|>OldUnAveragedSystemData.py<|end_file_name|><|fim▁begin|>#### import the simple module from the paraview from paraview.simple import * import glob, re, os, numpy, csv def CreatePointSelection(ids): source = IDSelectionSource() source.FieldType = "POINT" sids = [] for i in ids: sids.app...
outTable.RowData.append(j * appliedVoltage, 'PowerConsumed') # ElectronCooling (W/m^2)
<|file_name|>objectconsole.py<|end_file_name|><|fim▁begin|># Written by Ingar Arntzen # see LICENSE.txt for license information """ This module implements a generic console interface that can be attached to any runnable python object. """ import code import __builtin__ import threading import exceptions ############...
<|file_name|>9120015.js<|end_file_name|><|fim▁begin|>/* This file is part of the OdinMS Maple Story Server Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc> Matthias Butz <matze@odinms.de> Jan Christian Meyer <vimes@odinms.de> This program is free software: you...
} else { cm.warp(801040000); cm.dispose();
<|file_name|>test_insert.py<|end_file_name|><|fim▁begin|>import pytest from etcdb import OperationalError from etcdb.lock import WriteLock def test_insert(cursor): cursor.execute('CREATE TABLE t1(id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255))') cursor.execute("INSERT INTO t1(id, name) VALUES ...
cursor.execute('CREATE TABLE t1(id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255))') cursor.execute("INSERT INTO t1(id, name) VALUES (1, 'aaa')")
<|file_name|>search-result-by-id.js<|end_file_name|><|fim▁begin|>import { LOAD_SEARCH_RESULT_SUCCESS, CLEAR_SEARCH_RESULTS, } from 'actions/search';<|fim▁hole|>import { createActionHandlers } from 'utils/reducer/actions-handlers'; const actionHandlers = {}; export function loadSearchResultSuccess(state, searchRes...
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from io import BytesIO from django import forms from django.http import HttpResponse from django.template import Context, Template from braces.views import LoginRequiredMixin from django.views.generic import DetailView, ListView from django.views.decorators.http impo...
styles = getSampleStyleSheet()
<|file_name|>memprof.py<|end_file_name|><|fim▁begin|>from __future__ import print_function, division, unicode_literals from pprint import pprint from itertools import groupby from functools import wraps from collections import namedtuple, deque # OrderedDict was added in 2.7. ibm6 still uses python2.6 try: from co...
tot_memory=int(args[7]), sidx=args[8], )
<|file_name|>blink.py<|end_file_name|><|fim▁begin|>import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) <|fim▁hole|> try: while True: GPIO.output(ledpin, 1) time.sleep(0.5) GPIO.output(ledpin, 0) time.sleep(0.5) except KeyboardInterrupt: GPIO.cleanu...
ledpin = 18 GPIO.setup(ledpin, GPIO.OUT)
<|file_name|>rgstry_test.cpp<|end_file_name|><|fim▁begin|>/* Copyright (C) 1999 Claude SIMON (http://q37.info/contact/). This file is part of the Epeios framework. The Epeios framework is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published...
*/ #include <stdio.h> #include <stdlib.h>
<|file_name|>configuration.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('springangularwayApp') .config(function ($stateProvider) { $stateProvider .state('configuration', { parent: 'admin', url: '/configuration', data: { ...
pageTitle: 'configuration.title' },
<|file_name|>commit_pending.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2012 - 2014 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public L...
class Command(WeblateLangCommand): help = 'commits pending changes older than given age'
<|file_name|>api.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2017 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 version ...
def create(cls, data, id_=None, **kwargs):
<|file_name|>test.js<|end_file_name|><|fim▁begin|>import test from 'ava'; import escapeStringRegexp from './index.js'; test('main', t => { t.is( escapeStringRegexp('\\ ^ $ * + ? . ( ) | { } [ ]'), '\\\\ \\^ \\$ \\* \\+ \\? \\. \\( \\) \\| \\{ \\} \\[ \\]' ); }); test('escapes `-` in a way compatible with PCRE',...
t.is( escapeStringRegexp('foo - bar'), 'foo \\x2d bar'
<|file_name|>field_of_vision.cpp<|end_file_name|><|fim▁begin|>#include "field_of_vision.hpp" using namespace engine; FieldOfVision::FieldOfVision(double x, double y, int size, double angle){ range = size; total_angle = angle; catch_effect = new Audio("assets/sounds/GUARDAVIU.wav", "EFFECT", 128); act...
inverteu = true; } line_angle -= angle_inc;
<|file_name|>bubble_sort.rs<|end_file_name|><|fim▁begin|>//! Module contains pure implementations of bubble sort algorithm. //! //! * `sort` - is non distructive function (does not affects on input sequence) //! * `mut_sort` - function with side effects (modify input sequence) //! //! It's better to use first one in fu...
break; } }
<|file_name|>io.rs<|end_file_name|><|fim▁begin|>/*! # Input and Output This module holds a single struct (`FC`) that keeps what would otherwise be global state of the running process. All the open file handles and sockets are stored here as well as helper functions to properly initialize the program and all the necess...
t.write_u64::<BigEndian>(nanos).unwrap(); } // Truncate to 6 least significant bytes
<|file_name|>CollinearOverlap.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2008, Keith Woodward * * 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 c...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/** * Created by ff on 2016/10/25. */ require('./style.css');<|fim▁hole|>}) module.exports = vm;<|fim▁end|>
var vm = avalon.define({ $id:'map'
<|file_name|>pixel_buffer.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
//! Moved to the `texture` module. #![deprecated(note = "Moved to the `texture` module")] pub use texture::pixel_buffer::*;
<|file_name|>search_screen.py<|end_file_name|><|fim▁begin|>from base_screen import BaseScreen import pygame from ..graphic_utils import ListView,\ ScreenObjectsManager, TouchAndTextItem from ..input import InputManager from play_options import PlayOptions mode_track_name = 0 mode_album_name = 1 mode_artist_nam...
<|file_name|>test_qwificlient.py<|end_file_name|><|fim▁begin|>from hearinglosssimulator.gui.wifidevice.wifidevicewidget import WifiDeviceWidget from hearinglosssimulator.gui.wifidevice.qwificlient import QWifiClient, ThreadAudioStream from hearinglosssimulator.gui.wifidevice.gui_debug_wifidevice import WindowDebugWifiD...
<|file_name|>interfaces.py<|end_file_name|><|fim▁begin|># sqlalchemy/interfaces.py # Copyright (C) 2007-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # Copyright (C) 2007 Jason Kirtland jek@discorporate.us # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.openso...
def execute(self, conn, execute, clauseelement, *multiparams, **params): """Intercept high level execute() events.""" return execute(clauseelement, *multiparams, **params)
<|file_name|>LabelPopup.java<|end_file_name|><|fim▁begin|>/* * Copyright 2013-2020 consulo.io * * 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...
*/ package com.intellij.ide.plugins;
<|file_name|>TestOrcLargeStripe.java<|end_file_name|><|fim▁begin|>/* * Copyright 2015 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://ww...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from distutils.core import setup import strfrag setup( name='Strfrag', version=strfrag.__version__, description=('StringFragment type to represent parts of str objects; ' 'used to avoid copying strings during processing'), url="https://gi...
'Development Status :: 3 - Alpha', 'Operating System :: OS Independent', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License',
<|file_name|>test_cc2_tensor.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # ---------------------------------------------------------------------------- # Copyright 2014 Nervana Systems Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with ...
assert tns.shape == shape
<|file_name|>DTStructuredMesh2D.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # This software is under a BSD license. See LICENSE.txt for details. from datatank_py.DTStructuredGrid2D import DTStructuredGrid2D, _squeeze2d import numpy as np class DTStructuredMesh2D(object): """2D ...
mesh = DTStructuredMesh2D(values, grid=grid) df["2D mesh"] = mesh
<|file_name|>DynamicJAXBFromXSDTestCases.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * ter...
Node node = marshalDoc.getDocumentElement();
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>pub mod vector; pub mod point; pub mod common; pub mod normal; pub mod ray; pub mod matrix;<|fim▁end|>
pub mod scalar;
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from . import ir_ui_view<|fim▁end|>
<|file_name|>neo-validator.ts<|end_file_name|><|fim▁begin|>export class NeoValidator { static validateHeight(height: number) {<|fim▁hole|> } } static validateTransactionId(transactionId: string) { // TODO } }<|fim▁end|>
if (height <= 0) { throw new Error(`'height' must be an integer 1 or above.`)
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import turfbbox from '@turf/bbox'; import booleanPointInPolygon from '@turf/boolean-point-in-polygon'; import rbush from 'rbush'; import { FeatureCollection, Polygon, Feature, Point } from '@turf/helpers'; /** * Merges a specified property from a FeatureCollection of...
* @name collect
<|file_name|>test_codestyle.py<|end_file_name|><|fim▁begin|>import unittest import pycodestyle from os.path import exists <|fim▁hole|> def test_conformance(self): """Test that we conform to PEP-8.""" style = pycodestyle.StyleGuide(quiet=False, ignore=['E501', 'W605']) if exists('transitions'...
class TestCodeFormat(unittest.TestCase):
<|file_name|>lpfhpfilter.cpp<|end_file_name|><|fim▁begin|>/** * The MIT License (MIT) * * adapted from musicdsp.org-post by mistert@inwind.it * * Copyright (c) 2013-2017 Igor Zinken - http://www.igorski.nl * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and as...
* * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
<|file_name|>server.py<|end_file_name|><|fim▁begin|># nxt.server module -- LEGO Mindstorms NXT socket interface module # Copyright (C) 2009 Marcus Wanner # # 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 Softw...
def _process_command(cmd):
<|file_name|>Type.java<|end_file_name|><|fim▁begin|>/*The MIT License (MIT) <|fim▁hole|>in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished t...
Copyright (c) 2016 Muhammad Hammad Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
<|file_name|>etcd_node.rs<|end_file_name|><|fim▁begin|>use rustc_serialize::json; //use chrono::datetime::DateTime; //use chrono::offset::fixed::FixedOffset; #[derive(Debug)] pub struct EtcdNode { /// key: the HTTP path to which the request was made. etcd uses a file-system-like structure to represent the /// ke...
assert_eq!(etcd_node.value, None); let ref nodes = etcd_node.nodes.unwrap();
<|file_name|>set.js<|end_file_name|><|fim▁begin|>require('ember-runtime/core'); require('ember-runtime/system/core_object'); require('ember-runtime/mixins/mutable_enumerable'); require('ember-runtime/mixins/copyable'); require('ember-runtime/mixins/freezable'); /** @module ember @submodule ember-runtime */ var get = ...
enumerables. This is often unhelpful. If you are filtering sets of objects, for instance,
<|file_name|>no_0977_squares_of_a_sorted_array.rs<|end_file_name|><|fim▁begin|>struct Solution; impl Solution { // 官方题解中的思路 pub fn sorted_squares(a: Vec<i32>) -> Vec<i32> { let mut ans = vec![0; a.len()]; if a.is_empty() { return ans; } // 这个减少了一半的时间。 if a[0]...
if l >= 0 { for i in (0..=l as usize).rev() { ans.push(a[i].pow(2));
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>""" Django settings for Outcumbent project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths ins...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #![recursion_limit = "128"] mod ext; mod repr; use proc_macro2::Span; use syn::visit::{self, Visit}; use...
// A struct is AsBytes if:
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals import logging # Logging configuration log = logging.getLogger(__name__) # noqa log.addHandler(logging.NullHandler()) # noqa from netmiko.ssh_dispatcher import ConnectHandler from netmiko.ssh_dispatcher import ssh_dispatcher...
'SSHDetect', 'BaseConnection') # Cisco cntl-shift-six sequence CNTL_SHIFT_6 = chr(30)
<|file_name|>core.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2013–2015Molly White # # 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, including...
<|file_name|>fileutils.js<|end_file_name|><|fim▁begin|>'use strict'; const fs = require('fs'); const execa = require('execa'); const Bluebird = require('bluebird'); const log = require('npmlog'); const fsStatAsync = Bluebird.promisify(fs.stat); <|fim▁hole|> return fsStatAsync(path).then(stat => stat.isFile()).catchR...
const isWin = require('./utils/is-win')(); exports.fileExists = function fileExists(path) {
<|file_name|>admin.py<|end_file_name|><|fim▁begin|># # Newfies-Dialer License # http://www.newfies-dialer.org # # 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/. # # Copyr...
ordering = ('-id', ) filter_horizontal = ('phonebook',)
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "web_sheets_django.settings.local") try: from django.core.management import execute_from_command_line except ImportError: ...
except ImportError: raise ImportError( "Couldn't import Django. Are you sure it's installed and "
<|file_name|>apps.py<|end_file_name|><|fim▁begin|>from django.apps import AppConfig<|fim▁hole|> class ContentStoreAppConfig(AppConfig): name = "contentstore" def ready(self): import contentstore.signals contentstore.signals<|fim▁end|>
<|file_name|>gradient_hf_test.py<|end_file_name|><|fim▁begin|>import numpy as np from openfermioncirq.experiments.hfvqe.gradient_hf import (rhf_func_generator, rhf_minimization) from openfermioncirq.experiments.hfvqe.molecular_example import make_h6_1_3 def test_rhf_func_gen(): rhf_...
<|file_name|>jsonloader.go<|end_file_name|><|fim▁begin|><|fim▁hole|>package config import "golang.org/x/xerrors" // JSONLoader loads configuration type JSONLoader struct { } // Load load the configuration JSON file specified by path arg. func (c JSONLoader) Load(_, _, _ string) (err error) { return xerrors.New("Not...
<|file_name|>dupe-symbols-7.rs<|end_file_name|><|fim▁begin|>// build-fail // // error-pattern: entry symbol `main` declared multiple times // FIXME https://github.com/rust-lang/rust/issues/59774<|fim▁hole|>// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" #![allow(warnings)] #[no_mangle] fn main(){}<|fim▁...
// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
<|file_name|>test_atmosphere.py<|end_file_name|><|fim▁begin|>import itertools import numpy as np import pandas as pd import pytest from numpy.testing import assert_allclose from pvlib import atmosphere from pvlib import solarposition latitude, longitude, tz, altitude = 32.2, -111, 'US/Arizona', 700 times = pd.date...
def test_kasten96_lt():
<|file_name|>shot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Wed Nov 25 12:14:03 2015 @author: ktritz """ from __future__ import print_function from builtins import str, range import inspect import types #import numpy as np from collections.abc import MutableMapping from .container import ...
if not self._logbook_entries: self._logbook_entries = self._logbook.get_entries(shot=self.shot) return self._logbook_entries
<|file_name|>tag-variant-disr-dup.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.apach...
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed
<|file_name|>bench_engine_main.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate criterion; extern crate pleco; extern crate pleco_engine; mod eval_benches; mod multimove_benches; mod startpos_benches; trait DepthLimit { fn depth() -> u16; } struct Depth5 {} struct Depth6 {} struct Depth7 {} struct De...
criterion_main!{
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import Message from './Message'; <|fim▁hole|><|fim▁end|>
export default Message; export * from './Message';
<|file_name|>edit.controller.js<|end_file_name|><|fim▁begin|>(function () { 'use strict'; function ContentEditController($rootScope, $scope, $routeParams, $q, $timeout, $window, $location, appState, contentResource, entityResource, navigationService, notificationsService, angularHelper, serverValidationManager, co...
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>from app import setup <|fim▁hole|>app = setup()<|fim▁end|>
<|file_name|>0159_auto__add_field_authidentity_last_verified__add_field_organizationmemb.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration)...
}, 'date_added': ('django.db.models.fields.DateTimeField', [], { 'default': 'datetime.datetime.now'
<|file_name|>decorator.py<|end_file_name|><|fim▁begin|>""" Time Execution decorator """ import socket import time from fqn_decorators import Decorator from fqn_decorators.asynchronous import AsyncDecorator from pkgsettings import Settings SHORT_HOSTNAME = socket.gethostname() settings = Settings() settings.configure...
<|file_name|>PropertySaver.java<|end_file_name|><|fim▁begin|>/* * PropertySaver.java * * Created on October 9, 2007, 3:13 PM * * Trieda, ktoru nainicializuje objekt PropertyReader, pri starte programu * WebAnalyzer. Tento objekt bude jedinacik a bude poskytovat vlastnosti, ktore * potrebuju jednotlive moduly Web...
<|file_name|>ewf-param-position.js<|end_file_name|><|fim▁begin|>(function($){ "use strict"; <|fim▁hole|> $('.wpb-element-edit-modal .ewf-position-box div').click(function(){ // e.preventDefault(); $(this).closest('.ewf-position-box').find('div').removeClass('active'); $(this).addClass(...
// wpb_el_type_position
<|file_name|>FixedBinaryString.hpp<|end_file_name|><|fim▁begin|>// C/C++ File // Author: Alexandre Tea <alexandre.qtea@gmail.com> // File: /Users/alexandretea/Work/gachc-steinerproblem/srcs/ga/FixedBinaryString.hpp // Purpose: TODO (a one-line explanation) // Created: 2017-01-15 20:57:05 // Modified: 2017-03-1...
void flip(unsigned int index); bool test(unsigned int index) const; bool operator[](unsigned int index) const; size_t size() const;
<|file_name|>PermMissingElem.java<|end_file_name|><|fim▁begin|>class Solution { public int solution(int[] A) {<|fim▁hole|> int[] temArray = new int[A.length + 2]; for (int i = 0; i < A.length; i++) { temArray[A[i]] = 1; } for (int i = 1; i < temArray...