prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>copy.js<|end_file_name|><|fim▁begin|>'use strict'; <|fim▁hole|> images: { files: [ { cwd : 'src/assets/img/', src : '**/*', dest : '.build/img/', flatten : false, expand : true } ...
module.exports = {
<|file_name|>custom_mathcore.js<|end_file_name|><|fim▁begin|>LearnosityAmd.define([ 'jquery-v1.10.2', 'underscore-v1.5.2', 'vendor/mathcore' ], function ($, _, mathcore) { 'use strict'; var padding = 10, defaults = { "is_math": true, "response_id": "custom-mathcore-r...
Scorer: Scorer }; });
<|file_name|>DirectShow.cpp<|end_file_name|><|fim▁begin|><|fim▁hole|>#include "DirectShow.h"<|fim▁end|>
<|file_name|>layer.py<|end_file_name|><|fim▁begin|># encoding: latin2 """Repository of clusterPy's main class "Layer" """ __author__ = "Juan C. Duque, Alejandro Betancourt" __credits__ = "Copyright (c) 2009-10 Juan C. Duque" __license__ = "New BSD License" __version__ = "1.0.0" __maintainer__ = "RiSE Group" __email__ =...
<|file_name|>trace_restitution_pz.py<|end_file_name|><|fim▁begin|>from pyrocko import pz, io, trace from pyrocko.example import get_example_data # Download example data get_example_data('STS2-Generic.polezero.txt') get_example_data('test.mseed')<|fim▁hole|>zeros, poles, constant = pz.read_sac_zpk('STS2-Generic.polezer...
# read poles and zeros from SAC format pole-zero file
<|file_name|>tlp.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. import stix from stix.data_marking import MarkingStructure import stix.bindings.extensions.marking.tlp as tlp_binding @stix.register_extension class TLPMarkingStruc...
<|file_name|>colour.js<|end_file_name|><|fim▁begin|>/** * Visual Blocks Editor * * Copyright 2012 Google Inc. * http://blockly.googlecode.com/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the Lic...
} }; Blockly.Blocks['colour_blend'] = {
<|file_name|>DeleteSelected.js<|end_file_name|><|fim▁begin|>/** * Created by Lucian Tuca on 11/05/15. */ var DeleteSelectedCommand = function(commandString) { this.commandString = commandString; };<|fim▁hole|> // Map with the action from the context - basically what the command does. context.deleteShape()...
DeleteSelectedCommand.prototype.execute = function(context) {
<|file_name|>pyugrid_test.py<|end_file_name|><|fim▁begin|># coding: utf-8 # ##Test out UGRID-0.9 compliant unstructured grid model datasets with PYUGRID # In[1]: name_list=['sea_surface_elevation', 'sea_surface_height_above_geoid', 'sea_surface_height','water level', 'sea_surface_hei...
cubes.update({model: cube}) tris.update({model: get_triang(cube)})
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] use crate::{ cli::{Options, INLINE_PRELUDE}, prelude_template_helpers::StratificationHelper, }; use abigen::Abigen; use anyhow::anyhow; use boogie_backend...
/// dependencies of friends.
<|file_name|>RestHandler.cpp<|end_file_name|><|fim▁begin|>//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany /// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany /// /// Licensed under the Apache License, Version...
try { result = execute(); } catch (Exception const& ex) {
<|file_name|>test_surrogatepass.py<|end_file_name|><|fim▁begin|># Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. ## ## Test surrogatepass encoding error handler ...
# invalid surrogate pair (low, high) self.assertEqual("\ude51\uda2f".encode("utf_16_le", errors="surrogatepass"), b"Q\xde/\xda") self.assertEqual(b"Q\xde/\xda".decode("utf_16_le", errors="surrogatepass"), "\ude51\uda2f")
<|file_name|>gl.py<|end_file_name|><|fim▁begin|>from glad.lang.common.loader import BaseLoader from glad.lang.d.loader import LOAD_OPENGL_DLL _OPENGL_LOADER = \ LOAD_OPENGL_DLL % {'pre':'private', 'init':'open_gl', 'proc':'get_proc', 'terminate':'close_gl'} + ''' bool gladLoadGL() { boo...
<|file_name|>showmigrations.py<|end_file_name|><|fim▁begin|>from django.core.management.base import BaseCommand, CommandError from django.db import DEFAULT_DB_ALIAS, connections from django.db.migrations.loader import MigrationLoader class Command(BaseCommand): help = "Shows all available migrations for the curre...
shown = set() for node in graph.leaf_nodes(app_name): for plan_node in graph.forwards_plan(node):
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>use std::env; use cargo::ops::CompileOptions; use cargo::ops; use cargo::util::important_paths::{find_root_manifest_for_wd}; use cargo::util::{CliResult, Config}; #[derive(RustcDecodable)] pub struct Options { flag_package: Vec<String>, flag_jobs: Option<u32>...
Usage: cargo build [options]
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod requests; pub mod responses; #[derive(Debug, Clone, PartialEq)] pub struct Account { pub sku_name: String,<|fim▁hole|><|fim▁end|>
pub kind: String, }
<|file_name|>lorenz96.rs<|end_file_name|><|fim▁begin|>//! Lorenz 96 model //! https://en.wikipedia.org/wiki/Lorenz_96_model use crate::traits::*; use ndarray::*; #[derive(Clone, Copy, Debug)] pub struct Lorenz96 { pub f: f64, pub n: usize, } impl Default for Lorenz96 { fn default() -> Self { Lore...
} }
<|file_name|>functions.js<|end_file_name|><|fim▁begin|>$( document ).ready( function() { /** * * strict mode * */ 'use strict'; /** * * global variables * */ var windowWidth = 0; var windowHeight = 0; /** * * a...
};
<|file_name|>VuxTableColumnDefinition.js<|end_file_name|><|fim▁begin|>export default function VuxTableColumnDefinition (options) { return {<|fim▁hole|> ...{ key: 'id', label: 'Id', isDisabled: false, isHidden: false, isSortable: false, isSorting: false, sortDirection: 'des...
<|file_name|>test_ebs.py<|end_file_name|><|fim▁begin|># Copyright 2016-2017 Capital One Services, LLC # Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 import logging from botocore.exceptions import ClientError import mock from c7n.exceptions import PolicyValidationError from c7n.executor...
"tags": {'test-tag': 'custodian'}}] }, session_factory=factory, )
<|file_name|>libusb.go<|end_file_name|><|fim▁begin|>// Copyright 2017 the gousb 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 // // http://www.apache....
// If the device conforms to USB[23].x and the device is in high speed // mode: // Interval is expressed in microframe units (125 µs).
<|file_name|>collector.py<|end_file_name|><|fim▁begin|>""" The main purpose of this module is to expose LinkCollector.collect_links(). """ import cgi import functools import itertools import logging import mimetypes import os import re from collections import OrderedDict from pip._vendor import html5lib, requests fro...
# type: (Optional[int]) -> Callable[[F], F] raise NotImplementedError
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages from setuptools.command.test import test class TestCommand(test): def run(self): from tests.runtests import runtests runtests() setup(<|fim▁hole|> long_description=open('README.rst').read(), aut...
name='aino-utkik', version='0.9.1', description='Small, clean code with a lazy view dispatcher and class based views for Django.',
<|file_name|>day_06.rs<|end_file_name|><|fim▁begin|>use std::iter::Peekable; use std::str::{Chars, FromStr}; #[derive(Debug, PartialEq)] pub enum Ast { Num(f64), Op(char, Box<Ast>, Box<Ast>), } impl Ast { fn parse_num(chars: &mut Peekable<Chars>) -> Result<Self, ParseAstError> { let mut num = Stri...
Ok(Ast::Op(
<|file_name|>svcmsg.py<|end_file_name|><|fim▁begin|>import traceback import BigWorld from gui.Scaleform.daapi.view.lobby.messengerBar.NotificationListButton import NotificationListButton from xfw import * import xvm_main.python.config as config from xvm_main.python.logger import * ### @overrideMethod(NotificationL...
counterValue = ''
<|file_name|>loginService.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>import {Http,Response,ConnectionBackend,Headers,RequestMethod} from '@angular/http'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/toPromise'; import{AppHttpUtil} from '../appUtil/httpUtil...
import { Injectable } from '@angular/core';
<|file_name|>update_analytics_instance_details.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2016, 2018, 2021, Oracle and/or its affiliates. All rights reserved. // This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache Licens...
// The license used for the service. LicenseType LicenseTypeEnum `mandatory:"false" json:"licenseType,omitempty"`
<|file_name|>api.py<|end_file_name|><|fim▁begin|>from functools import wraps from itertools import chain from django.db.models import Prefetch, Q from django.urls import Resolver404, resolve from django.utils.functional import cached_property from django.utils.translation import ugettext_lazy as _ from rest_framework....
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages setup( name="gevent-websocket", version="0.3.6", description="Websocket handler for the gevent pywsgi server, a Python network library", long_description=open("README.rst").read(), author="Jeffrey Gelens"...
"License :: OSI Approved :: BSD License", "Programming Language :: Python", "Operating System :: MacOS :: MacOS X",
<|file_name|>footer.component.ts<|end_file_name|><|fim▁begin|>import {Component} from "@angular/core"; @Component({ moduleId: module.id, selector: 'ptc-footer',<|fim▁hole|> }<|fim▁end|>
templateUrl: 'footer.component.html' }) export class FooterComponent{
<|file_name|>mastakilla_spider.py<|end_file_name|><|fim▁begin|>from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from lyricwiki.items import LyricWikiItem class LyricWikiSpider(CrawlSpider): name = "mas...
"http://lyrics.wikia.com/Masta_Killa", #CHANGE URL ]
<|file_name|>score.py<|end_file_name|><|fim▁begin|>""" @author: Nikhith !! """ from pycricbuzz import Cricbuzz import json import sys """ Writing a CLI for Live score """ try: cric_obj = Cricbuzz() # cric_obj contains object instance of Cricbuzz Class matches = cric_obj.matches() except: prin...
<|file_name|>voice_message.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import sys, os sys.path.append(os.path.join(os.path.dirname(__file__), '..')) import messagebird # ACCESS_KEY = '' # MESSAGE_ID = '' try: ACCESS_KEY except NameError: print('You need to set an ACCESS_KEY constant in this file') s...
<|file_name|>MemStream.C<|end_file_name|><|fim▁begin|>/***********************************************************************<|fim▁hole|> This is OPEN SOURCE SOFTWARE governed by the Gnu General Public License (GPL) version 3, as described at www.opensource.org. ******************************************************...
MemStream.C BOOM : Bioinformatics Object Oriented Modules Copyright (C)2012 William H. Majoros (martiandna@gmail.com).
<|file_name|>util.go<|end_file_name|><|fim▁begin|>package metrics import ( "bufio" "fmt" "os" "reflect" "strings" ) // Combine two maps, with the second one overriding duplicate values. func combine(original, override map[string]string) map[string]string { // We know the size must be at least the length of the ...
i := len(original) for k, v := range newTags { combined[i] = buildTag(k, v)
<|file_name|>ex03.py<|end_file_name|><|fim▁begin|># https://www.w3resource.com/python-exercises/ # 3. Write a Python program to display the current date and time. # Sample Output : # Current date and time : # 2014-07-05 14:34:14 import datetime<|fim▁hole|> print now.strftime("%Y-%m-%d %H:%M:%S")<|fim▁end|>
now = datetime.datetime.now()
<|file_name|>symbols.py<|end_file_name|><|fim▁begin|># Copyright 2021 The Cirq Developers # # 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 #...
class SymbolInfo: """Organizes information about a symbol."""
<|file_name|>test_watch_tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (C) 2014-present Taiga Agile LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either...
client.login(user) response = client.get(url_detail)
<|file_name|>database.js<|end_file_name|><|fim▁begin|>//// config/database.js module.exports = { url: 'mongodb://gaurav:gaurav@dogen.mongohq.com:10056/cmpe275' <|fim▁hole|><|fim▁end|>
};
<|file_name|>IpcClient.cpp<|end_file_name|><|fim▁begin|>/* * synergy -- mouse and keyboard sharing utility * Copyright (C) 2012 Bolton Software Ltd. * Copyright (C) 2012 Nick Bolton * * This package is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * f...
#include "IpcReader.h"
<|file_name|>unit_test_benches.py<|end_file_name|><|fim▁begin|># Working Unit Test Benches for Network Simulator # Last Revised: 14 November 2015 by Sushant Sundaresh & Sith Domrongkitchaiporn ''' IMPORTANT: Please turn off logging (MEASUREMENT_ENABLE = False) in constants.py before running these testbenches. ''' # ...
def test_get_id(self): self.assertEqual(self.l.get_id(), self.ID)
<|file_name|>sendErrorOnError.py<|end_file_name|><|fim▁begin|>""" Answers with an Error message to a previous Error message. """ import copy import random from src import Msg from src import SomeIPPacket from src.attacks import AttackerHelper def sendErrorOnError(a, msgOrig): """ Attack Specific Function. """ ...
timestamp = None
<|file_name|>kk_dictionary.cpp<|end_file_name|><|fim▁begin|>#include "kk_dictionary.h" namespace penciloid { namespace kakuro { Dictionary::Dictionary() : data_(nullptr) { } <|fim▁hole|>void Dictionary::CreateDefault() { Release(); data_ = new unsigned int[kDictionarySize]; for (int n_cells = 0; n_c...
Dictionary::~Dictionary() { if (data_ != nullptr) delete[] data_; }
<|file_name|>adaptors.rs<|end_file_name|><|fim▁begin|>pub struct Pairs<I> where I: Iterator { iter: I, } impl<I> Pairs<I> where I: Iterator { pub fn new(iter: I) -> Self { Pairs { iter: iter } } } impl<I> Iterator for Pairs<I> where I: Iterator { type Item = (I::Item, I::Item); fn next(&m...
type Item = (I::Item, I::Item, I::Item); fn next(&mut self) -> Option<Self::Item> { let a = match self.iter.next() {
<|file_name|>optionsdialog.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, unicode_literals import xbmc from . import kodigui from .. import utils, variables as v class OptionsDialog(kodigui.BaseDialog): xmlFile = 'script-plex-option...
def onClick(self, controlID): if controlID in self.BUTTON_IDS:
<|file_name|>ParallelGatewayAsyncTest.java<|end_file_name|><|fim▁begin|>/* * Copyright 2021 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * ...
package org.jbpm.test.functional.gateway; import java.util.HashMap;
<|file_name|>input.cpp<|end_file_name|><|fim▁begin|>#include <chrono> #include <thread> #include "./input.h" #include "../common/SharedState.h" #include "../common/Logger.h" #include "./FaceDetector.h" using namespace std; void inputLoop() { SharedState& state = SharedState::getInstance(); Logger& logger = L...
bool isSmilingOld = fd.isSmiling;
<|file_name|>SessionListFragment.java<|end_file_name|><|fim▁begin|>/* * Copyright 2013 JCertifLab. * * 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/licens...
import android.widget.ListView; import android.widget.Toast;
<|file_name|>ValidFormatsForDocumentEnum.java<|end_file_name|><|fim▁begin|>package com.aspose.cloud.sdk.cells.model; public enum ValidFormatsForDocumentEnum { csv, <|fim▁hole|> text, html, pdf, ods, xls, spreadsheetml, xlsb, xps, tiff, jpeg, png, emf, bmp, gif }<|fim▁end|>
xlsx, xlsm, xltx, xltm,
<|file_name|>keyboard.rs<|end_file_name|><|fim▁begin|>#[cfg(not(any(test, rustdoc)))] use alloc::prelude::v1::*; #[cfg(any(test, rustdoc))] use std::prelude::v1::*; use crate::event::Event; use crate::util::UnsafeContainer; use crate::KERNEL_EVENTEMITTER; #[derive(Debug)] pub enum SpecialKey { Enter, } #[derive(...
Unicode(char),
<|file_name|>char_type_hash.fail.cpp<|end_file_name|><|fim▁begin|>//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: ...
static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n); static char_type* assign(char_type* __s, size_t __n, char_type __a);
<|file_name|>recursive-struct.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.apac...
}, value: 25,
<|file_name|>HMHomeManager.java<|end_file_name|><|fim▁begin|>/* Copyright 2014-2016 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ...
@Generated @Selector("superclass") public static native Class superclass_static();
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 TiKV Project Authors. Licensed under Apache-2.0. use error_code::{self, ErrorCode, ErrorCodeExt}; use std::error::Error as StdError; use std::result::Result as StdResult; quick_error! { #[derive(Debug)] pub enum Error { Other(err: Bo...
impl ErrorCodeExt for Error { fn error_code(&self) -> ErrorCode {
<|file_name|>application_timeline_server.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<|fim▁hole|> http://www.apache.org/licenses/LICENSE-2.0 Unless re...
regarding copyright ownership. The ASF licenses this file to you 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|>autotest_regression.py<|end_file_name|><|fim▁begin|>import logging from autotest.client.shared import error from virttest import aexpect, utils_misc @error.context_aware def run_autotest_regression(test, params, env): """ Autotest regression test: Use Virtual Machines to test autotest. ...
step3 = "pylint" try: session_server.cmd("cd /usr/local/autotest")
<|file_name|>stock_move.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by...
# # You should have received a copy of the GNU General Public License # along with this program. If not, see http://www.gnu.org/licenses/. #
<|file_name|>common.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2015, Peter Mrekaj. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE.txt file. // Package epiutil is an utility class with functions // common to all packages in the epi project. p...
// RandStr returns a string of length n constructed // from pseudo-randomly selected characters from t. // The pseudo-randomness uses random values from s.
<|file_name|>formatInventoryConfig.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export declare function formatInventoryConfig(inventoryConfig: any, toArray?: boolean): any;
<|file_name|>awesomethings.js<|end_file_name|><|fim▁begin|>'use strict'; describe('Service: awesomeThings', function() { // load the service's module beforeEach(module('initApp')); // instantiate service var awesomeThings; beforeEach(inject(function(_awesomeThings_) { awesomeThings = _awesomeThings_; ...
});
<|file_name|>lagrange_elements.py<|end_file_name|><|fim▁begin|># PPFem: An educational finite element code # Copyright (C) 2015 Matthias Rambausek # # 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 Foundati...
:param mapping: a Mapping instance to compute the "physical" coordinates of a point in reference space """ if mapping is not None: points = mapping.map_points(self.get_support_points())
<|file_name|>targetdevice.py<|end_file_name|><|fim▁begin|>import os import stat import time from inaugurator import sh class TargetDevice: _found = None @classmethod def device(cls, candidates): if cls._found is None: cls._found = cls._find(candidates) return cls._found ...
time.sleep(1) os.system("/usr/sbin/busybox mdev -s")
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># Django settings for imageuploads project. import os PROJECT_DIR = os.path.dirname(__file__) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'dja...
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
<|file_name|>app.module.ts<|end_file_name|><|fim▁begin|>/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under...
NzLayoutModule, NzMenuModule, NgZorroAntdModule,
<|file_name|>test_polygon.py<|end_file_name|><|fim▁begin|>import unittest from gis.protobuf.polygon_pb2 import Polygon2D, Polygon3D, MultiPolygon2D, MultiPolygon3D from gis.protobuf.point_pb2 import Point2D, Point3D class Polygon2DTestCase(unittest.TestCase): def test_toGeoJSON(self): polygon = Polygon2D(...
def test_toGeoJSON(self): multiPolygon = MultiPolygon3D(polygon=[Polygon3D(point=[Point3D(x=1.0, y=2.0, z=3.0),
<|file_name|>vec-ivec-deadlock.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.o...
let mut b = ~[a.clone(), a.clone()]; b = b + b; // FIXME(#3387)---can't write b += b }
<|file_name|>event.js<|end_file_name|><|fim▁begin|>'use strict'; describe('Controller: EventCtrl', function () {<|fim▁hole|> beforeEach(module('ngBrxApp')); var EventCtrl, scope; // Initialize the controller and a mock scope beforeEach(inject(function ($controller, $rootScope) { scope = $rootScope.$ne...
// load the controller's module
<|file_name|>client.go<|end_file_name|><|fim▁begin|>// Copyright (C) 2015 The GoHBase Authors. All rights reserved. // This file is part of GoHBase. // Use of this source code is governed by the Apache License 2.0 // that can be found in the COPYING file. package region import ( "encoding/binary" "errors" "fmt" ...
if err := c.write(b); err != nil {
<|file_name|>account.cpp<|end_file_name|><|fim▁begin|>/* $Id$ */ /* * Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2...
this->keyings.clear(); for (unsigned i = 0; i < prm.keying_count; ++i) {
<|file_name|>recent_commits_test.py<|end_file_name|><|fim▁begin|># coding: utf-8 # # Copyright 2018 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 # #...
self.assertEqual( len(response_dict['results']), feconf.COMMIT_LIST_PAGE_SIZE)
<|file_name|>main.ts<|end_file_name|><|fim▁begin|>import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { enableProdMode } from '@angular/core'; import { environment } from './environments/environment';<|fim▁hole|>} platformBrowserDynamic().bootstrapModule(AppModule).catch(err => console.l...
import { AppModule } from './app/app.module'; if (environment.production) { enableProdMode();
<|file_name|>socialnetwork.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from canaimagnulinux.wizard.interfaces import IChat from canaimagnulinux.wizard.interfaces import ISocialNetwork from canaimagnulinux.wizard.utils import CanaimaGnuLinuxWizardMF as _ from collective.beaker.interfaces import ISession fro...
except ImportError: # Plone < 4.1 from zope.app.pagetemplate import viewpagetemplatefile
<|file_name|>devices.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # StartOS Device Manager(ydm). # Copyright (C) 2011 ivali, Inc. # hechao <hechao@ivali.com>, 2011. __author__="hechao" __date__ ="$2011-12-20 16:36:20$" import gc from xml.parsers import expat from hwclass import * cl...
self.serial, self.width, self.config, self.capability) self.dev_type.setdefault((0, "system"), []).append(system)
<|file_name|>BeMoBI_PyAnalytics.py<|end_file_name|><|fim▁begin|>import os import pandas as pd import seaborn as sns dataDir = '..\\Test_Data\\' pilotMarkerDataFile = 'Pilot.csv' df = pd.read_csv( dataDir + '\\' + pilotMarkerDataFile,sep='\t', engine='python') repr(df.head()) # TODO times per position # plotting ...
<|file_name|>plot_regional_maxima.py<|end_file_name|><|fim▁begin|>""" ========================= Filtering regional maxima ========================= Here, we use morphological reconstruction to create a background image, which we can subtract from the original image to isolate bright features (regional maxima). First ...
<|file_name|>RepeaterChildSupport.js<|end_file_name|><|fim▁begin|>(function (enyo, scope) { /** * The {@link enyo.RepeaterChildSupport} [mixin]{@glossary mixin} contains methods and * properties that are automatically applied to all children of {@link enyo.DataRepeater} * to assist in selection support. (See {@link...
this.addRemoveClass(this.selectedClass || 'selected', this.selected);
<|file_name|>effective_tld_names.cc<|end_file_name|><|fim▁begin|>/* C++ code produced by gperf version 3.0.3 */ /* Command-line: gperf -a -L C++ -C -c -o -t -k '*' -NFindDomain -D -m 2 effective_tld_names.gperf */ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ && ('%' == 37) && ('&' == 38) && ...
-1, -1, 2061, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2062, -1, -1, -1,
<|file_name|>index.js<|end_file_name|><|fim▁begin|>var _ = require('lodash'), Promise = require('bluebird'), models = require('../../../../models'), utils = require('../../../../utils'), SubscribersImporter = require('./subscribers'), PostsImporter = require('./posts'), TagsImporter = require('....
<|file_name|>apply-location-offset.js<|end_file_name|><|fim▁begin|>export default function applyLocationOffset(rect, location, isOffsetBody) { var top = rect.top; var left = rect.left; if (isOffsetBody) { left = 0; top = 0; } return { top: top + location.top,<|fim▁hole|>} ...
left: left + location.left, height: rect.height, width: rect.width };
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>""" Django admin dashboard configuration. """ from config_models.admin import ConfigurationModelAdmin, KeyedConfigurationModelAdmin from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from common.djangoapps.xblock_django.models i...
('', { 'fields': ('name', 'template') }),
<|file_name|>grove_barometer_example_BMP085.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # GrovePi Example for using the Grove Barometer module (http://www.seeedstudio.com/depot/Grove-Barometer-HighAccuracy-p-1865.html) # # The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about Gr...
in the Software without restriction, including without limitation the rights
<|file_name|>decoder.py<|end_file_name|><|fim▁begin|># # This file is part of pyasn1 software. # # Copyright (c) 2005-2017, Ilya Etingof <etingof@gmail.com> # License: http://pyasn1.sf.net/license.html # from pyasn1.type import univ from pyasn1.codec.cer import decoder __all__ = ['decode'] class BitStringDecoder(dec...
<|file_name|>QuestStatus.java<|end_file_name|><|fim▁begin|>package org.winterblade.minecraft.harmony.api.questing; import org.winterblade.minecraft.scripting.api.IScriptObjectDeserializer; import org.winterblade.minecraft.scripting.api.ScriptObjectDeserializer; /** * Created by Matt on 5/29/2016. */ public enum Que...
} }
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>""" Map urls to the relevant view handlers """ <|fim▁hole|>from django.conf.urls import url from openedx.core.djangoapps.zendesk_proxy.v0.views import ZendeskPassthroughView as v0_view from openedx.core.djangoapps.zendesk_proxy.v1.views import ZendeskPassthroughView a...
<|file_name|>stylesheets.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 cssparser::{self, Parser, SourcePosition}; use media_...
(PropertyDeclaration::BackgroundSize(DeclaredValue::Value( longhands::background_size::SpecifiedValue( vec![longhands::background_size::single_value ::get_initial_specified_value()]))),
<|file_name|>annotate.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 The Kubernetes 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://www.apache.org/licenses/LICENSE-2.0 Unles...
o.newAnnotations, o.removeAnnotations, err = parseAnnotations(annotationArgs) if err != nil {
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main import ( "encoding/json" "fmt" "io/ioutil" "os" "os/signal" "path/filepath" "syscall" "text/tabwriter" "github.com/Sirupsen/logrus" ) const ( credentialsPath = "/var/run/secrets/boostport.com" ) type authToken struct { ClientToken string `j...
<-sigs }
<|file_name|>simple_save.py<|end_file_name|><|fim▁begin|># Copyright 2017 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. # You may obtain a copy of the License at # # http://www.apach...
from tensorflow.python.saved_model import builder
<|file_name|>_quantum_network.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python #coding: utf-8 -*- # (c) 2013, Benno Joy <benno@ansible.com> # # This module 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, eit...
<|file_name|>chi_squared_test.hpp<|end_file_name|><|fim▁begin|>/* chi_squared_test.hpp header file * * Copyright Steven Watanabe 2010 * Distributed under the Boost Software License, Version 1.0. (See * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * $Id: chi_squared_test....
update(prev_actual + current_actual, prev_expected + current_expected);
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin from books.models import * <|fim▁hole|># Register your models here. # Register your models here. class BookInfoAdmin(admin.ModelAdmin): list_display=('title','isbn','price') class GoodInfoAdmin(admin.ModelAdmin): list_display=('se...
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for enzyme-adapter-react-15 1.0 // Project: https://github.com/airbnb/enzyme, http://airbnb.io/enzyme // Definitions by: Tanguy Krotoff <https://github.com/tkrotoff><|fim▁hole|>// TypeScript Version: 3.1 import { EnzymeAdapter } from 'enzyme'; d...
// Jordan Harband <https://github.com/ljharb> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
<|file_name|>asm_2d.py<|end_file_name|><|fim▁begin|># This file is part of PooPyLab. # # PooPyLab is a simulation software for biological wastewater treatment processes using International Water Association # Activated Sludge Models. # # Copyright (C) Kai Zhang # # PooPyLab is free software: you can redistribute ...
""" return 0.0
<|file_name|>unrooted_must_root.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 syntax::{ast, codemap, visit}; use syntax::att...
/// /// This helps catch most situations where pointers like `JS<T>` are used in a way that they can be invalidated by a /// GC pass. pub struct UnrootedPass;
<|file_name|>fuzzy_logic_defuzzifier.py<|end_file_name|><|fim▁begin|># COPYRIGHT: Robosub Club of the Palouse under the GPL v3 import argparse import time import os import sys from copy import deepcopy from random import random sys.path.append(os.path.abspath("../..")) from util.communication.grapevine import Communic...
# movement/stabilization and should translate them into raw digital # values that can be sent over the serial interface. # microcontroller_interface.py currently does much of this processing,
<|file_name|>approvals.go<|end_file_name|><|fim▁begin|>package formatter import ( "fmt" "strconv" "github.com/keel-hq/keel/types" ) // Formatter headers const ( defaultApprovalQuietFormat = "{{.Identifier}} {{.Delta}}" defaultApprovalTableFormat = "table {{.Identifier}}\t{{.Delta}}\t{{.Votes}}\t{{.Rejected}}\t{...
<|file_name|>configure.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from build import ninja_common build = ninja_common.Build('serial/seriald') build.build_cmd( 'auv-seriald', [ 'main.cpp', 'config.cpp', 'device.cpp', 'device_list.cpp', ...
# auv_deps=['shm', 'auvlog', 'auv-serial'],)
<|file_name|>generated.pb.go<|end_file_name|><|fim▁begin|>/* Copyright The Kubernetes 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://www.apache.org/licenses/LICENSE-2.0 Unless...
func init() {
<|file_name|>0002_add_index_on_webhook_secret.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('telerivet', '0001_initial'), ] operations = [ ...
]
<|file_name|>examples.py<|end_file_name|><|fim▁begin|># $Id$ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ This module contains practical examples of Docutils client code. Importing this module from client code is not recommended; its contents are subj...