prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>flow.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/. */ //! Servo's experimental layout system builds a tree of `Flow` ...
self.flags.set( FlowFlags::INLINE_POSITION_IS_STATIC, logical_position.inline_start == LengthOrPercentageOrAuto::Auto &&
<|file_name|>sconstest-singleStringCannotBeMultipleOptions_dmd.py<|end_file_name|><|fim▁begin|>""" Test compiling and executing using the dmd tool. """ # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Softwa...
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
<|file_name|>basic.rs<|end_file_name|><|fim▁begin|>#![feature(plugin)] #![plugin(rustc_info)] fn main() { println!("This project was compiled with rustc release {} ({} {}) for {} target", rustc_release!(), rustc_commit_hash!(), rustc_commit_date!(), <|fim▁hole|>}<|fim▁end|>
rustc_host!());
<|file_name|>org-groups.js<|end_file_name|><|fim▁begin|>import React, { Component, Fragment } from 'react'; import { navigate } from '@reach/router'; import PropTypes from 'prop-types'; import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap'; import { siteRoot, gettext, orgID } from '../../uti...
</div>
<|file_name|>__DangerfileAsync.ts<|end_file_name|><|fim▁begin|>const asyncAction = () => new Promise(res => { setTimeout(() => {<|fim▁hole|> schedule(async () => { await asyncAction() warn("After Async Function") })<|fim▁end|>
warn("Async Function") res() }, 50) })
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
declare module 'json-gate'
<|file_name|>OpenshiftBuildConfigsProducer.java<|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.<|fim▁hole|> * (the "Licens...
* The ASF licenses this file to You under the Apache License, Version 2.0
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import card from card import Card from player import Player from hand import Hand from prompt import Prompt, IntegerPrompt, SetPrompt import pprint class Setup: def run(self, game): self.game = game self.cards_accounted_for = 0 self.setup...
self.game.cards.add(Card(card.TYPE_ROOM, 'Ballroom')) self.game.cards.add(Card(card.TYPE_ROOM, 'Conservatory')) self.game.cards.add(Card(card.TYPE_ROOM, 'Billiard Room'))
<|file_name|>test_mapping_index_converter.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # encoding: utf-8 # Copyright (C) Alibaba Cloud Computing # All rights reserved. import unittest from aliyun.log.es_migration.mapping_index_converter import \<|fim▁hole|> class TestMappingIndexConverter(unittest.TestCase...
MappingIndexConverter
<|file_name|>EDPartialAdmissionForDischargeDetailOutcomeVoAssembler.java<|end_file_name|><|fim▁begin|>//############################################################################# //# # //# Copyright (C) <2015> <IMS MAXIMS> ...
<|file_name|>malware-indicator-for-file-hash_consumer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (c) 2014, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. import sys from stix.core import STIXPackage def parse_stix(pkg): print("== MALWARE ==") for fam ...
exit(1) fd = open(fname) stix_pkg = STIXPackage.from_xml(fd)
<|file_name|>tool.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 ## # Copyright (c) 2007 Apple Inc. # # This is the MIT license. This software may also be distributed under the # same terms as Python (the PSF license). # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this ...
if write: try: attrs[attr_name] = compress(attr_value)
<|file_name|>fault.py<|end_file_name|><|fim▁begin|># Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in ...
_status_to_type = {}
<|file_name|>recsys.py<|end_file_name|><|fim▁begin|>from math import exp from collections import defaultdict @outputSchema("scaled: double") def logistic_scale(val, logistic_param): return -1.0 + 2.0 / (1.0 + exp(-logistic_param * val)) @outputSchema("t: (item_A, item_B, dist: double, raw_weight: double)")<|fim▁h...
<|file_name|>bencode_roundtrip.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>use synapse_bencode as bencode; fuzz_target!(|fuzz_data: &[u8]| { if let Ok(initial_bencode) = bencode::decode_buf(fuzz_data) { let mut buf = Vec::<u8>::new(); initial_bencode.encode(&mut buf).unwrap(); let roundtri...
#![no_main] use libfuzzer_sys::fuzz_target;
<|file_name|>base_component.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at ...
"""
<|file_name|>ProjectCalcDaoImpl.java<|end_file_name|><|fim▁begin|>package com.management.dao.impl.calcs; import java.sql.Connection; import java.sql.SQLException; import java.util.List; import org.apache.commons.dbutils.QueryRunner; import org.apache.commons.dbutils.handlers.BeanListHandler; import com.management.be...
}
<|file_name|>image.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/. */ //! CSS handling for the computed value of //! [`image`][image...
/// An angle.
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use amiquip::{Connection, ConsumerMessage, ConsumerOptions, QueueDeclareOptions, Result}; fn main() -> Result<()> { // Open connection. let mut connection = Connection::insecure_open("amqp://guest:guest@mkstack_rabbitmq:5672")?; // Open a channel - None sa...
<|file_name|>pkg.installspace.context.pc.py<|end_file_name|><|fim▁begin|># generated from catkin/cmake/template/pkg.context.pc.in<|fim▁hole|>PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/jorge/tum_simulator_ws/install/include".split(';') if "/home/jorge/tum_simulator_ws/install/include" != "" else [] PROJECT_CATKIN_DEPENDS ...
CATKIN_PACKAGE_PREFIX = ""
<|file_name|>pulsedescriptor.hpp<|end_file_name|><|fim▁begin|>/* =============================================================================== FILE: pulsedescriptor.hpp CONTENTS: Describes the way that outgoing and returning waveform of a pulse is stored in the PulseWaves. There can be multiple pu...
U32 size_of_attributes() const; BOOL load(ByteStreamIn* stream);
<|file_name|>LeetCode0363.java<|end_file_name|><|fim▁begin|>public class LeetCode0363 { public int maxSumSubmatrix(int[][] matrix, int k) { int m = matrix.length, n = matrix[0].length, ans = Integer.MIN_VALUE; long[] sum = new long[m + 1]; for (int i = 0; i < n; ++i) { long[] sumInRow = new long[m]; for (i...
ans = Math.max(ans, (int) (sum[j - 1] - sum[i])); if (ans == k){
<|file_name|>FLyrVect.java<|end_file_name|><|fim▁begin|>/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana * * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public Licen...
<|file_name|>pagination.js<|end_file_name|><|fim▁begin|>const findIndex = require('lodash/findIndex'); module.exports = (req, res, next) => { const pageData = req.pageData || {}; const siblings = pageData.meta ? pageData.meta.siblings : []; const pagination = pageData.pagination || {}; if (pageData && pageDat...
if (siblings && currentIndex < siblings.length) {
<|file_name|>animate_test.go<|end_file_name|><|fim▁begin|>package animate import ( "testing" )<|fim▁hole|> testData := []struct { text string }{ {"funny cat"}, } command := Animate() for _, d := range testData { rsp, err := command.Exec("animate", d.text) if err != nil { t.Fatal(err) } if rsp ==...
func TestGeocode(t *testing.T) {
<|file_name|>_importer.py<|end_file_name|><|fim▁begin|># ---------------------------------------------------------------- # Copyright 2016 Cisco Systems # # 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 ...
# limitations under the License.
<|file_name|>08-maybe-and-optionals.js<|end_file_name|><|fim▁begin|>/* @flow */ import assert from 'assert'; import { CONVERSION_TABLE } from './06-export'; import type { Unit, UnitValue } from './06-export'; // We didn't cover any edge cases yet, so let's do this now export function convertUnit(from: Unit, to: Unit,...
} return { unit: 'km',
<|file_name|>run_all.cpp<|end_file_name|><|fim▁begin|>/* * run_all.cpp * * This file is part of NEST. * * Copyright (C) 2004 The NEST Initiative * * NEST 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 Foun...
#define BOOST_TEST_MODULE cpptests
<|file_name|>java_protobuf_library.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, ...
return self.payload.import_specs
<|file_name|>kms.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (c) 2011 Openstack, LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # ...
JSON KMS activation """
<|file_name|>lib.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/. */ #![cfg(test)] mod interactive_time;<|fim▁hole|>mod paint_time;<...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 Markus Dittrich // Licensed under BSD license, see LICENSE file for details // // st is a simple commandline helper script for calculating basic // statistics on a data file consisting of column oriented // floating point numbers. // NOTE: Currently st...
fn update(&mut self, v: f64) { self.count += 1;
<|file_name|>sites.py<|end_file_name|><|fim▁begin|>class Gadgets(object): """ A Gadgets object providing managing of various gadgets for display on analytics dashboard. Gadgets are registered with the Gadgets using the register() method. """ def __init__(self): self._registry = {} # gadget h...
def get_gadget(self, id): return self._registry[id]
<|file_name|>CONFIG.py<|end_file_name|><|fim▁begin|>""" Configuration of 'memos' Flask app. Edit to fit development or deployment environment. """ # import random # localhost # PORT = 5000 # DEBUG = True # MONGO_PORT = 27017 # ix.cs.uoregon.edu PORT = 7420 # random.randint(5000, 8000)<|fim▁hole|># both MONGO_URL =...
MONGO_PORT = 4152 DEBUG = False # Because it's unsafe to run outside localhost
<|file_name|>prog.py<|end_file_name|><|fim▁begin|>__author__ = 'Filushin_DV' import generators import tables import profiler from faker import Factory date_start = '01/01/2015' date_end = '06/06/2015' citys = [] faker = Factory.create() for i in range(100): citys.append(faker.city()) valid_parents = (10, 2, 3) ...
#print (string.punctuation)
<|file_name|>lib.py<|end_file_name|><|fim▁begin|>import sys import os import re def human_size_to_byte(number): """ Convert number of these units to bytes, ignore case: b : 512 kB : 1000 K : 1024 mB : 1000*1000 m : 1024*1024 MB : 1000*1000 M : 1024*1024 GB : 1000*1...
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>import { ImageCallback } from '@jimp/core'; <|fim▁hole|>} export default function(): Blur;<|fim▁end|>
interface Blur { blur(r: number, cb?: ImageCallback<this>): this;
<|file_name|>offset_commit_request_test.go<|end_file_name|><|fim▁begin|>package sarama import "testing" var ( offsetCommitRequestNoBlocksV0 = []byte{ 0x00, 0x06, 'f', 'o', 'o', 'b', 'a', 'r', 0x00, 0x00, 0x00, 0x00} offsetCommitRequestNoBlocksV1 = []byte{ 0x00, 0x06, 'f', 'o', 'o', 'b', 'a', 'r', ...
<|file_name|>_text.js<|end_file_name|><|fim▁begin|>/* global Fae, SimpleMDE, toolbarBuiltInButtons */ /** * Fae form text * @namespace form.text * @memberof form */ Fae.form.text = { init: function() { this.overrideMarkdownDefaults(); this.initMarkdown(); }, /** * Override SimpleMDE's preference...
$this.parent().addClass('mde-focus');
<|file_name|>eo.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'image', 'eo', { alertUrl: 'Bonvolu tajpi la retadreson de la bildo', alt: 'Anstataŭiga Teksto', ...
validateBorder: 'La bordero devas esti entjera nombro.', validateHSpace: 'La horizontala spaco devas esti entjera nombro.',
<|file_name|>edit.js<|end_file_name|><|fim▁begin|>(function () { 'use strict'; /** * Introduce the vendorAppApp.customer.list.edit module * and configure it. * * @requires 'ui.router', * @requires 'ngMaterial', * @requires vendorAppApp.mongooseError * @requires vendorAppApp.customer.service ...
// inject configCustomerListEdit dependencies configureCustomerListEdit.$inject = ['$stateProvider'];
<|file_name|>cfServerGroupDetailsGetter.ts<|end_file_name|><|fim▁begin|>import { IPromise } from 'angular'; import { isEmpty } from 'lodash'; import { Observable } from 'rxjs'; import { IServerGroupDetailsProps, ServerGroupReader } from '@spinnaker/core'; import { ICloudFoundryLoadBalancer, ICloudFoundryServerGroup ...
return summary;
<|file_name|>NewsPage.js<|end_file_name|><|fim▁begin|>import Page from '../Page'; import './news.scss'; import RoomList from "../parts/RoomList"; export default class NewsPage extends Page { indexAction() { this.headerTitle = "新着・おすすめ"; var $switchPanel = $(` <div class="switch-panel"> <div cla...
$pickupBtn.addClass("selected"); RoomList.findAll({pickup:1}) .then( $roomList => { this.$contents.append($roomList);
<|file_name|>env.py<|end_file_name|><|fim▁begin|>from abc import abstractmethod import sys, abc if sys.version_info >= (3, 4): ABC = abc.ABC else: ABC = abc.ABCMeta('ABC', (), {}) import numpy as np from enum import Enum<|fim▁hole|> class Terminate(Enum): Null = 0 Fail = 1 Succ = 2 def __init__(sel...
class Env(ABC):
<|file_name|>ManejadorUbicar.java<|end_file_name|><|fim▁begin|>/* * To change this template, choose Tools | Templates<|fim▁hole|>package model; import controller.GestorLocalidad; import java.util.ArrayList; import org.w3c.dom.Document; /** * * @author soriagal */ public class ManejadorUbicar { private WebUbic...
* and open the template in the editor. */
<|file_name|>analysis-form-view.spec.js<|end_file_name|><|fim▁begin|>var Backbone = require('backbone'); var camshaftReference = require('builder/data/camshaft-reference'); var areaOfInfluenceTemplate = require('builder/editor/layers/layer-content-views/analyses/analysis-form-models/area-of-influence-form.tpl'); var Ba...
});
<|file_name|>Test1.py<|end_file_name|><|fim▁begin|>import numpy as np import cv2 import cv2.cv as cv #im = cv2.imread('/Users/asafvaladarsky/Documents/img/Ad0010401.png') im = cv2.imread('pic.png') imgray = cv2.cvtColor(im,cv2.COLOR_BGR2GRAY) invert = 255 - imgray cv2.imwrite('/Users/asafvaladarsky/Documents/pic1.png...
<|file_name|>metrics_client_example_test.go<|end_file_name|><|fim▁begin|>// Copyright 2018 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/lice...
}
<|file_name|>nvd3LineChart.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2014 DataTorrent, 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://w...
return d.value; };
<|file_name|>LongSerializationPolicy.java<|end_file_name|><|fim▁begin|>package com.google.gson; public enum LongSerializationPolicy { DEFAULT { public final JsonElement serialize(Long l) { return new JsonPrimitive((Number) l); } }, STRING { public final JsonElement seria...
<|file_name|>h5l.rs<|end_file_name|><|fim▁begin|>pub use self::H5L_type_t::*; use libc::{c_int, c_uint, c_void, c_char, size_t, ssize_t, int64_t, uint32_t}; use std::mem::transmute; use h5::{htri_t, haddr_t, herr_t, hbool_t, hsize_t, H5_index_t, H5_iter_order_t}; use h5i::hid_t; use h5t::{H5T_cset_t}; pub const H5L_...
pub copy_func: H5L_copy_func_t,
<|file_name|>ckeditor.files.js<|end_file_name|><|fim▁begin|>/** * Nooku Framework - http://www.nooku.org * * @copyright Copyright (C) 2011 - 2017 Johan Janssens and Timble CVBA. (http://www.timble.net) * @license GNU AGPLv3 <https://www.gnu.org/licenses/agpl.html> * @link https://github.com/timble/openpolice-pla...
}, setState: function() { // TODO: Implement pagination into the view
<|file_name|>strings.go<|end_file_name|><|fim▁begin|>// Description: utils/strings.go // Author: ZHU HAIHUA // Since: 2016-04-08 19:45 package util import ( "encoding/json" "fmt" . "reflect" "strconv" ) type StringStyle int const ( StringStyleShort StringStyle = iota StringStyleMedium StringStyleLong ) // To...
return "true"
<|file_name|>test_game.py<|end_file_name|><|fim▁begin|>import game as game import pytest import sys sys.path.insert(0, '..') def trim_board(ascii_board): return '\n'.join([i.strip() for i in ascii_board.splitlines()]) t = trim_board def test_new_board(): game.Board(3,3).ascii() == t(""" ... ... ....
...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. //! Emulates virtual and hardware devices. mod bus; mod cmos; #[cfg(feature = "direct")] pub mod dire...
pub use self::bus::Error as BusError; pub use self::bus::{
<|file_name|>add_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import os, sys, re args = sys.argv if not len(args) in (3, 4): print "Usage: add_test.py <rawdata file> <report file> [tests stash file]" print "If the last is not specified, `tests_stash.txt' is assumed" sys.exit(1) rawdata = [] for line in...
repdata = [] rexp = re.compile('(-?[0-9]+).*')
<|file_name|>TcpIpJoiner.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2008-2017, Hazelcast, 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:/...
private void lookForMaster(Collection<Address> possibleAddresses) throws InterruptedException { int tryCount = 0;
<|file_name|>simulation.py<|end_file_name|><|fim▁begin|>import heapq class AbstractSimulation(object): def __init__(self, reality, antmoves, stats): self.reality = reality self.antmoves = antmoves heapq.heapify(antmoves) self.stats = stats self.ticks = 0 def tick(self): ...
print 'ticks: %d, food_discovered: %d' % (self.ticks, stats.food_discovered) return tick_changed_items, False, stats.last_route
<|file_name|>scan_settings.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 from math import pi, atan class ScanSetting(object): """docstring for ScanSetting""" def __init__(self): super(ScanSetting, self).__init__() # for scan self.scan_step = 400 # steps self.theta_a =...
self.LaserRangeMergeDistance = 65 self.MINLaserRange = 3
<|file_name|>htmllinkelement.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::dom::attr::Attr; use crate::dom::bindings...
<|file_name|>fields.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Field classes. Includes all fields from `marshmallow.fields` in addition to a custom `Nested` field and `DelimitedList`. All fields can optionally take a special `location` keyword argument, which tells webargs where to parse the request a...
<|file_name|>web-asset.d.ts<|end_file_name|><|fim▁begin|>import * as React from 'react'; import {SvgIconProps} from '../../SvgIcon';<|fim▁hole|> export default function WebAsset(props: SvgIconProps): React.ReactElement<SvgIconProps>;<|fim▁end|>
<|file_name|>service.go<|end_file_name|><|fim▁begin|>// Code generated by goa v3.6.1, DO NOT EDIT. // // calc service // // Command: // $ goa gen goa.design/plugins/v3/cors/examples/calc/design -o // $(GOPATH)/src/goa.design/plugins/cors/examples/calc package calc <|fim▁hole|>) // The calc service exposes public endp...
import ( "context"
<|file_name|>misc.py<|end_file_name|><|fim▁begin|># # Licensed under the GNU General Public License Version 3 # # 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 License, o...
Dates can be expressed as delta values. For example, '2h' would
<|file_name|>regepe_flask_server.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from flask import Flask,render_template,send_file,Response,flash,request,redirect,session from werkzeug.utils import secure_filename import json import os.path import os import gzip import urllib from db import DbGetListOfDates,Db...
<|file_name|>cldrtree_test.go<|end_file_name|><|fim▁begin|>// Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package cldrtree import ( "bytes" "flag" "io/ioutil" "math/rand" "path/filepath" "reflect" "r...
path: path(calendar, 0, month, 0, wide, 11), result: "cM12",
<|file_name|>boolean_single.js<|end_file_name|><|fim▁begin|>#!/usr/bin/env node var argv = require('yargs/yargs')(process.argv.slice(2)) .boolean(['r','v'])<|fim▁hole|>console.dir(argv._);<|fim▁end|>
.argv ; console.dir([ argv.r, argv.v ]);
<|file_name|>AdobeReaderUpdatesURLProvider.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # Copyright 2014: wycomco GmbH (choules@wycomco.de) # 2015: modifications by Tim Sutton # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the L...
<|file_name|>send-iloop.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/lice...
use std::comm;
<|file_name|>SoundTouchEffect.cpp<|end_file_name|><|fim▁begin|>/********************************************************************** Audacity: A Digital Audio Editor SoundTouchEffect.cpp Dominic Mazzoni, Vaughan Johnson This abstract class contains all of the common code for an effect that uses SoundTouc...
<|file_name|>ui_fontgenerator.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'qt\ui\fontgen.ui' # # Created: Mon Jun 03 01:17:17 2013 # by: PyQt4 UI code generator 4.8.5 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore...
self.horizontalLayout_2.addWidget(self.btnSaveAs) self.btnLoad = QtGui.QPushButton(FontGenerator) self.btnLoad.setText(QtGui.QApplication.translate("FontGenerator", "&Open", None, QtGui.QApplication.UnicodeUTF8))
<|file_name|>negative_momentum_train_hook.py<|end_file_name|><|fim▁begin|>import torch from hypergan.train_hooks.base_train_hook import BaseTrainHook class NegativeMomentumTrainHook(BaseTrainHook): def __init__(self, gan=None, config=None, trainer=None): super().__init__(config=config, gan=gan, trainer=trainer...
d_grads = [_g - self.config.gamma * _g2 for _g, _g2 in zip(d_grads, self.d_grads)] g_grads = [_g - self.config.gamma * _g2 for _g, _g2 in zip(g_grads, self.g_grads)] self.d_grads = new_d_grads
<|file_name|>testingParser.py<|end_file_name|><|fim▁begin|>import parser import logging def test(code): log = logging.getLogger() parser.parser.parse(code, tracking=True) print "Programa con 1 var y 1 asignacion bien: " s = "program id; var beto: int; { id = 1234; }"<|fim▁hole|>print "Original: \n{0}".format(...
test(s)
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![feature(plugin)] #![plugin(rocket_codegen)] #![feature(custom_derive)] extern crate chrono; extern crate rocket; extern crate postgres; extern crate serde_json; extern crate rocket_contrib; #[macro_use] extern crate serde_derive; mod webapp_config; mod date_fiel...
#[get("/")] fn index() -> content::HTML<String> {
<|file_name|>commentOnArrayElement1.ts<|end_file_name|><|fim▁begin|>const array = [ /* element 1*/ 1 /* end of element 1 */, 2 <|fim▁hole|><|fim▁end|>
/* end of element 2 */ ];
<|file_name|>angular-exec.js<|end_file_name|><|fim▁begin|>// @flow // // Copyright (c) 2018 DDN. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. import highland from "highland"; import angular from "angular"; import { querySelector } from "...
s.write(fn(...args)); s.end(); } else if (inj.has(service)) { const svc = inj.get(service);
<|file_name|>legacyconfig_conversion.go<|end_file_name|><|fim▁begin|>package configconversion import ( "net" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/serializer" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "fmt" configv1 "github.com/openshift/api/config/v1" kubecontrolplanev1...
}
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2016/11/23 16:15 # @Author : xycfree<|fim▁hole|>import os<|fim▁end|>
# @Link : http://example.org # @Version : $
<|file_name|>main.js<|end_file_name|><|fim▁begin|>// ES2015 사용을 위한 babel 모듈 호출 import 'babel-polyfill'; // 전역 변수 객체 호출 import globalConfig from './helpers/global-config'; // npm 모듈 호출 import mobileDetect from 'mobile-detect'; //import scroll from 'scroll'; //import ease from 'ease-component'; import detectScrollPageO...
case 'js-copy-link' : console.log(index(eventTarget.target)); scroll.top( detectScrollPage,
<|file_name|>lineinfile.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.com> # (c) 2014, Ahti Kitsik <ak@ahtik.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the...
if params.get('line', None) is None:
<|file_name|>datetime.rs<|end_file_name|><|fim▁begin|><|fim▁hole|> * Copyright (c) Meta Platforms, Inc. and affiliates. * * This software may be used and distributed according to the terms of the * GNU General Public License version 2. */ use chrono::{FixedOffset, TimeZone}; use lazy_static::lazy_static; use monon...
/*
<|file_name|>file.py<|end_file_name|><|fim▁begin|>#-*- coding: utf-8 -*- import inspect from django import forms from django.conf import settings as globalsettings from django.contrib.admin.widgets import ForeignKeyRawIdWidget from django.contrib.admin.sites import site from django.core.exceptions import ImproperlyConf...
choices = None
<|file_name|>check_const.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.or...
impl<'a, 'tcx> CheckCrateVisitor<'a, 'tcx> { fn with_const(&mut self, in_const: bool, f: |&mut CheckCrateVisitor<'a, 'tcx>|) {
<|file_name|>views.py<|end_file_name|><|fim▁begin|>""" See LICENSE file for copyright and license details. """ from app import app from flask import render_template, flash, redirect #from app.forms import LoginForm from app.modules.constant import * @app.route("/") @app.route("/index") @app.route("/index...
@app.route("/<app_profile>/task/")
<|file_name|>sns.go<|end_file_name|><|fim▁begin|>// // goamz - Go packages to interact with the Amazon Web Services. // // https://wiki.ubuntu.com/goamz // // Copyright (c) 2011 Memeo Inc. // // Written by Prudhvi Krishna Surapaneni <me@prudhvi.net> // This package is in an experimental state, and does not currently...
var err Error if len(errors.Errors) > 0 { err = errors.Errors[0] }
<|file_name|>OperatingSystemVersionConstantServiceSettings.java<|end_file_name|><|fim▁begin|>/* * Copyright 2021 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 * * htt...
.defaultApiClientHeaderProviderBuilder();
<|file_name|>RecommendationLookup.java<|end_file_name|><|fim▁begin|>package de.codecentric.awesome.recommendation.core; import java.util.HashMap; import java.util.Map; /** * Created by afitz on 15.03.16. */ public class RecommendationLookup { private static RecommendationLookup ourInstance = new RecommendationL...
<|file_name|>converter.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of...
# notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the
<|file_name|>CollectionUtils.java<|end_file_name|><|fim▁begin|>/* * Copyright 2002-2008 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 * * ...
<|file_name|>addon-links.stories.js<|end_file_name|><|fim▁begin|>import { linkTo } from '@storybook/addon-links'; export default { title: 'Addon/Links', }; export const GoToWelcome = () => ({ template: '<my-button :rounded="true" @click="click" >This buttons links to Welcome</my-button>', methods: { click: ...
}); GoToWelcome.story = { name: 'Go to welcome',
<|file_name|>app.js<|end_file_name|><|fim▁begin|>/* The main program of test panel */ requirejs.config({ paths : { "dualless" : ".." }, baseUrl : ".." }); require(["debug/view/component", "debug/view/information", "dualless/directives/winbutton" ], function app(component, ...
<|file_name|>bar.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Rustdoc's HTML rendering module. //! //! This modules contains the bulk of the logic necessary for rendering a //! rustdoc `clean::Crate` instance to a set of static HTML pages. This //! rendering process is largely driven by the `format!` syntax extension to //! per...
}
<|file_name|>market.go<|end_file_name|><|fim▁begin|>package market import ( "github.com/Efruit/marqit/exchange" "github.com/Efruit/marqit/managers" "github.com/nu7hatch/gouuid" "time" ) type Exchange interface { manager.Bank manager.Broker manager.Ticker exchange.Dealership exchange.Auctioner Init() ...
Close(Normal bool) exchange.Summary // Sound the closing bell. Normal specifies the nature of the closing.
<|file_name|>correct.hpp<|end_file_name|><|fim▁begin|>// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. // Copyright (c) 2014 A...
order_as_direction<geometry::point_order<Ring>::value>::value, geometry::closure<Ring>::value > ring_area_type;
<|file_name|>nested_structure_coder_test.py<|end_file_name|><|fim▁begin|><|fim▁hole|># You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # ...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.
<|file_name|>PaginationInterceptorTest.java<|end_file_name|><|fim▁begin|>package com.baomidou.mybatisplus.test.plugins.paginationInterceptor; import java.io.Reader; import java.sql.Connection; import java.util.List; import org.apache.ibatis.io.Resources; import org.apache.ibatis.jdbc.ScriptRunner; import org.apache.i...
// 设置不count
<|file_name|>test_context.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation. # All Rights Reserved.<|fim▁hole|># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You m...
#
<|file_name|>no_0647_palindromic_substrings.rs<|end_file_name|><|fim▁begin|>struct Solution; impl Solution { pub fn count_substrings(s: String) -> i32 { let s = s.as_bytes(); let n = s.len() as i32; let mut ans = 0; for i in 0..(2 * n - 1) { // i 是中心点,包括了空隙,所以还要求出对应的索引。 ...
use super::*;
<|file_name|>float.js<|end_file_name|><|fim▁begin|>import Float from 'ember-advanced-form/components/float'; <|fim▁hole|><|fim▁end|>
export default Float;