prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>EditMovieCtrl.js<|end_file_name|><|fim▁begin|><|fim▁hole|>function EditMovieCtrl(MovieService,$stateParams) { // ViewModel const edit = this; edit.title = 'Edit Movies' + $stateParams.id; edit.back = function(){ window.history.back() } edit.checker = function(bool){ if(bool=='true') ...
<|file_name|>string.go<|end_file_name|><|fim▁begin|>package funcs import ( "fmt" "regexp" "sort" "strings" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/function" "github.com/zclconf/go-cty/cty/gocty" ) var JoinFunc = function.New(&function.Spec{ Params: []function.Parameter{ { Name: "s...
}, { Name: "substr",
<|file_name|>invoke-function.rs<|end_file_name|><|fim▁begin|>/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ use aws_config::meta::region::RegionProviderChain; use aws_sdk_lambda::{Client, Error, Region, PKG_VERSION}; use structopt::StructOpt; #[der...
/// /// * `-a ARN` - The ARN of the Lambda function. /// * `[-r REGION]` - The Region in which the client is created.
<|file_name|>DrivePopupButton.java<|end_file_name|><|fim▁begin|>/* * This file is part of muCommander, http://www.mucommander.com * Copyright (C) 2002-2012 Maxence Bernard * * muCommander is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by ...
// Listen to bookmark changes to update the button if a bookmark corresponding to the current folder // has been added/edited/removed BookmarkManager.addBookmarkListener(this);
<|file_name|>cat.rs<|end_file_name|><|fim▁begin|>#![crate_name = "cat"] #![feature(collections, rustc_private)] #![feature(box_syntax, unsafe_destructor)] /* * This file is part of the uutils coreutils package. * * (c) Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please...
println!("With no FILE, or when FILE is -, read standard input."); return 0; } if matches.opt_present("version") {
<|file_name|>metering_rpc_agent_api.py<|end_file_name|><|fim▁begin|># Copyright (C) 2013 eNovance SAS <licensing@enovance.com> # # Author: Sylvain Afchain <sylvain.afchain@enovance.com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License....
class MeteringAgentNotifyAPI(object):
<|file_name|>SequentialIntegerDataGenerator.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. The ASF license...
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>""" This file contains the unit tests for the :mod:`communication` app. Since this app has no models there is model and view tests: * :class:`~communication.tests.CommunicationModelTests` * :class:`~communication.tests.CommunicationViewTests` """ from lab_website....
def test_create_new_post_all(self): '''This test creates a :class:`~papers.models.Post` with all fields entered.'''
<|file_name|>MultiPointDomainType.java<|end_file_name|><|fim▁begin|>/** */ package net.opengis.gml311; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Multi Point Domain Type</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * </p> * <ul> * <li...
* Sets the value of the '{@link net.opengis.gml311.MultiPointDomainType#getMultiPoint <em>Multi Point</em>}' containment reference. * <!-- begin-user-doc -->
<|file_name|>test_import_resolver.py<|end_file_name|><|fim▁begin|># coding=utf-8 from __future__ import print_function, unicode_literals __author__ = "Sally Wilsak" import codecs import os import sys import textwrap import unittest import import_resolver # This isn't strictly correct; it will only wor...
"/home/badger/b.ts <- /home/badger/a.ts", ]) self.assertEqual(import_resolver.do_dependency_resolve(["/home/badger/a.ts"]), expected_string)
<|file_name|>amo.js<|end_file_name|><|fim▁begin|>module.exports = { domain:"messages", locale_data:{ messages:{ "":{ domain:"messages", plural_forms:"nplurals=2; plural=(n!=1);", lang:"mk" }, "%(addonName)s %(startSpan)sby %(authorList)s%(endSpan)s":[ "" ], "Extension Metadata":[ "" ], ...
case 5: return '[Изминатиот] dddd [во] LT'; }
<|file_name|>hao.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 from urllib.parse import urlencode from urllib.request import urlopen, Request from bs4 import BeautifulSoup from argparse import ArgumentParser from threading import Thread import re class HackAlunoOnline: def __init__( self , matricula , full_sea...
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main import ( "bufio" "fmt" "os" "strings" ) const version = "0.5-beta" const minNumWords = 10 const minNumHashtag = 2 const minNumUserInteractions = 2 const iterationsCount = 3 func main() { eye := ` ___________<|fim▁hole|> ,:d8888P...
.-=d88888888888b=-. .:d8888pr |\|/-\| rq8888b.
<|file_name|>watch.py<|end_file_name|><|fim▁begin|>import os import subprocess from pathlib import Path from time import sleep PACKAGES = Path('packages') class Module: def __init__(self, name, path=None, files=None, dependencies=None): self.name = name if path is None: path = PACKAGE...
utils = Module("utils") history = Module("history", dependencies=[utils])
<|file_name|>hooks.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from frappe import _ app_name = "erpnext" app_title = "ERPNext" app_publisher = "Frappe Technologies Pvt. Ltd." app_description = """ERP made simple""" app_icon = "fa fa-th" app_color = "#e74c3c" app_email = "info@erpnext.com" a...
<|file_name|>apiserver.go<|end_file_name|><|fim▁begin|>/* Copyright 2017 The Kubernetes Authors.<|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 may obtain a copy of the License at http://www.apache.org/licenses/LICENSE...
<|file_name|>StringValue.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. * The ASF licenses this file to You under t...
return this.lastString; } public void setLastString(String lastString) {
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>pub mod native;<|fim▁end|>
<|file_name|>factory.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 The Kubernetes 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.org/licenses...
// BindFlags adds any flags that are common to all kubectl sub commands. func (f *Factory) BindFlags(flags *pflag.FlagSet) { // Merge factory's flags
<|file_name|>js_interop_test.ts<|end_file_name|><|fim▁begin|>import {NUMBER, STRING} from "../ast/types"; import {Error, ErrorType} from "../base/error"; import {boot} from "../eval/boot"; import {Evaluator} from "../eval/evaluator"; import {InMemoryInputPort} from "../io/in_memory_input_port"; import {InMemoryOutputPo...
message: `want ${expectedResult}, got ${actualResult}`,
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import React from 'react'; import {connect} from 'cerebral-view-react'; import styles from './styles.css'; import { isObject, isArray, isString, isBoolean, isNumber, isNull } from 'common/utils'; import JSONInput from './JSONInput'; import connector from 'c...
<|file_name|>importeur.py<|end_file_name|><|fim▁begin|># -*-coding:Utf-8 -* # Copyright (c) 2010 LE GOFF Vincent # 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 source ...
.format(type)) if self.module_est_charge(nom):
<|file_name|>graphcut_app.py<|end_file_name|><|fim▁begin|>import logging import os import sys import tkinter from tkinter import ttk sys.path.append('../..') import cv2 from src.image.imnp import ImageNP from src.support.tkconvert import TkConverter from src.view.template import TkViewer from src.view.tkfonts import T...
self.set_all_grid_columnconfigure(self.frame_display_setting, 0)
<|file_name|>barb_demo.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import numpy as np import matplotlib.pyplot as plt # read in data. file = open('fcover.dat','r') ul=[];vl=[];pl=[] nlons=73; nlats=73 dellat = 2.5; dellon = 5. for line in file.readlines(): l = line.replace('\n','').split() ul.append(float(l[0]))...
from mpl_toolkits.basemap import Basemap
<|file_name|>setup_jruby.py<|end_file_name|><|fim▁begin|>import subprocess import sys import os<|fim▁hole|> def start(args, logfile, errfile): setup_util.replace_text("rails-stripped/config/database.yml", "host: .*", "host: " + args.database_host) try: subprocess.check_call("cp Gemfile-jruby Gemfile", shell=Tr...
import setup_util
<|file_name|>DeferredLogTests.java<|end_file_name|><|fim▁begin|>/* * Copyright 2012-2017 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 void isFatalEnabled() throws Exception { assertThat(this.deferredLog.isFatalEnabled()).isTrue(); }
<|file_name|>job.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from ..base import ComponentAPI class CollectionsJOB(object): """Collections of JOB APIS""" def __init__(self, client): self.client = client self.execute_task = ComponentAPI( client=self.client, method='POST...
self.get_agent_status = ComponentAPI( client=self.client, method='POST', path='/api/c/compapi/job/get_agent_status/', description=u'查询Agent状态',
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from crispy_forms.bootstrap import FormActions from crispy_forms.helper import FormHelper from crispy_forms.layout import HTML, Div, Field, Layout, Submit from django import forms from django.core.exceptions import ValidationError from django.ut...
widget=forms.PasswordInput ) helper = FormHelper()
<|file_name|>DisplayDefaultSignatureFileVersionCommand.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2016, The National Archives <pronom@nationalarchives.gsi.gov.uk> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided tha...
*/ public void setPrintWriter(PrintWriter printWriter) { this.printWriter = printWriter; }
<|file_name|>move-2-unique.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/l...
let x: Box<_> = box X{x: 1, y: 2, z: 3};
<|file_name|>MessagesAdapter.java<|end_file_name|><|fim▁begin|>/* * This file is part of eduVPN. * * eduVPN is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or...
@Override
<|file_name|>types.pb.go<|end_file_name|><|fim▁begin|>// Code generated by protoc-gen-gogo. // source: types.proto // DO NOT EDIT! /* Package api is a generated protocol buffer package. It is generated from these files: types.proto specs.proto objects.proto control.proto dispatcher.proto ca.proto snap...
<|file_name|>destructured-fn-argument.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://...
}
<|file_name|>manager.py<|end_file_name|><|fim▁begin|># Copyright (c) 2010-2012 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2....
os.environ['PYTHON_EGG_CACHE'] = '/tmp'
<|file_name|>status_change.go<|end_file_name|><|fim▁begin|>/* Copyright 2016 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 ...
s.changed.Insert(commit) } // PopChangedPullRequests returns the list of issues changed since last call
<|file_name|>env_utils.py<|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/. """Various utility functions used by this plugin""" import subpro...
stdout = run_command([node_path] + args)
<|file_name|>bigFrustrationWorld.py<|end_file_name|><|fim▁begin|>dimensions(8,8) wall((2,0),(2,4)) wall((2,4),(4,4)) wall((2,6),(6,6)) wall((6,6),(6,0))<|fim▁hole|>wall((6,2),(4,2)) initialRobotLoc(1.0, 1.0)<|fim▁end|>
<|file_name|>thompson.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*- from collections import defaultdict import numpy class ThompsonAgent: def __init__(self, seed=None): self._succeeds = defaultdict(int) self._fails = defaultdict(int) self._np_random = numpy.random.RandomState(see...
return self._np_random.beta( self._succeeds[arm] + 0.5, self._fails[arm] + 0.5)
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// library of matrix and vector functions // a 3 component vector pub struct Vec3{ pub x: f32, pub y: f32, pub z: f32 } // associated functions of Vec3 impl Vec3{ // used for constructing Vec3 nicely pub fn new(x:f32,y:f32,z:f32) -> Vec3 { Ve...
}
<|file_name|>configureStore.js<|end_file_name|><|fim▁begin|>import { createStore, applyMiddleware, compose } from 'redux' import logger from 'redux-logger' import thunkMiddleware from 'redux-thunk' import rootReducer from './reducers' const configureStore = () => { const composeEnhancers = window.__REDUX_DEVTOOLS_EX...
} export default configureStore
<|file_name|>0004_auto_20170428_0228.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-04-28 02:28 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('webcore', '0003_auto_20170427_182...
]
<|file_name|>bounding_sphere_ball.rs<|end_file_name|><|fim▁begin|>use crate::bounding_volume::{BoundingSphere, HasBoundingVolume}; use crate::math::{Isometry, Point}; use crate::shape::Ball; use na::RealField; impl<N: RealField> HasBoundingVolume<N, BoundingSphere<N>> for Ball<N> { #[inline] fn bounding_volume...
BoundingSphere::new(Point::origin(), self.radius) }
<|file_name|>pysix_moves.py<|end_file_name|><|fim▁begin|># copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of astroid. # # astroid is free software: you can redistribute it and/or modify it under # the terms of th...
import httplib as http_client import cookielib as http_cookiejar
<|file_name|>AngularFire.js<|end_file_name|><|fim▁begin|>import Firebase from 'firebase/firebase'; export class AngularFire { ref: Firebase; constructor(ref: Firebase) { this.ref = ref; } asArray() { return new FirebaseArray(this.ref); } } /* FirebaseArray */ export class FirebaseArray { ref: Fi...
<|file_name|>position.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/. */ <%! from data import to_rust_ident %> <%namespace name=...
self.0.has_viewport_percentage()
<|file_name|>page.js<|end_file_name|><|fim▁begin|>var http = require('supertest'); var shared = require('../shared'); var server = require('../app'); var app; describe('v2 user#page', function () { before(function (done) { server(function (data) { app = data; done(); }); }); it('should show u...
req.get('/user/page/' + shared.user.username) .expect(200, function (err, res) { var texts = [ '注册时间',
<|file_name|>sst_file_writer.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under the BSD-style license found in the // LICENSE file in the root directory of this source tree. An additional grant // of patent rights can be found in...
<|file_name|>sale.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- encoding: utf-8 -*- ########################################################################### # Module Writen to OpenERP, Open Source Management Solution # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). # All Rights Reserve...
u'Intenta vender el producto %s a un precio menor\ al estimado para su venta' % line.product_id.name)
<|file_name|>transaction.ts<|end_file_name|><|fim▁begin|>// okay, this is where we put our transaction logic // the actual logic behind it is fairly simple // okay this how I think transactions work. So to input a transation you sign it with your private key // which generates the string and can be verified from that...
const referencedUnspentTxOut: UnspentTxOut = findUnspentTxOut(txIn.txOutId,txIn.txOutIndex, aUnspentTxOuts);
<|file_name|>index.js<|end_file_name|><|fim▁begin|>module.exports = LoadsModels const resolve = require.resolve <|fim▁hole|> /* load( require('./create_root_portfolio.js'), { uri: resolve('./create_root_portfolio.js'), id: 'portfolios/root' } ) */ }<|fim▁end|>
function LoadsModels (models) { const load = models.load.bind(models)
<|file_name|>test_ical.py<|end_file_name|><|fim▁begin|># This file is part of wger Workout Manager. # # wger Workout Manager 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 version 3 of the Licen...
self.export_ical_token() self.export_ical_token_wrong()
<|file_name|>mus_musculus.js<|end_file_name|><|fim▁begin|>Genoverse.Genomes.mus_musculus = { "1": { "size": 195471971, "bands": [ { "id": "A1", "start": 2973781, "end": 8840440, "type": "gpos100" }, { "id": "A2", "start": 8840441, "end"...
"start": 43465981,
<|file_name|>tdAddBasic1.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # $Id: tdAddBasic1.py $ """ VirtualBox Validation Kit - Additions Basics #1. """ __copyright__ = \ """ Copyright (C) 2010-2015 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as availa...
if not fSkip: fRc = self.testGuestProperties(oSession, oTxsSession, oTestVm) and fRc; reporter.testDone(fSkip);
<|file_name|>CS_Cholinc.cpp<|end_file_name|><|fim▁begin|>// CS_Cholinc.cpp // // 2007/10/16 //--------------------------------------------------------- #include "NDGLib_headers.h" #include "CS_Type.h" #define TRACE_CHOL 0 /////////////////////////////////////////////////////////// // // Spa : buffer for storing sp...
bool ok() const { return (m_status != 0) ? false : true; } bool resize(int n); void set(CSd& A, int j);
<|file_name|>config.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/licenses/LICENSE-2.0 // /...
func ValidateForwardedRequestHeaders(hs []string) error { for _, h := range hs { if msg := haveInvalidForwardedRequestHeader(h); msg != "" {
<|file_name|>scheduler.py<|end_file_name|><|fim▁begin|># Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import time import shutil import logging import Queue from threading import Thread, Lo...
When this exception has been thrown, the analysis task will start again, and will try to use another machine, when available. """ pass
<|file_name|>grabbing.rs<|end_file_name|><|fim▁begin|>#[cfg(target_os = "android")] #[macro_use] extern crate android_glue; extern crate glutin; use glutin::{Event, ElementState}; mod support; #[cfg(target_os = "android")] android_start!(main); <|fim▁hole|> window.set_title("glutin - Cursor grabbing test"); ...
fn main() { let window = glutin::WindowBuilder::new().build().unwrap();
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Discussion XBlock """ import logging import six from six.moves import urllib from six.moves.urllib.parse import urlparse # pylint: disable=import-error from django.contrib.staticfiles.storage import staticfiles_storage from django.urls ...
:return: int course id
<|file_name|>TCDContent.java<|end_file_name|><|fim▁begin|>package org.techniche.technothlon.katana.tcd; import android.content.Context; import android.content.SharedPreferences; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.net.ConnectivityManager; import android.net.Net...
}
<|file_name|>image_tags.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf8 -*- import os.path from django import template FMT = 'JPEG' EXT = 'jpg' QUAL = 75 register = template.Library() def resized_path(path, size, method): "Returns the path for the resized image." dir, name = os.pa...
register.filter('scale', scale) register.filter('crop', crop)
<|file_name|>config_vlan.py<|end_file_name|><|fim▁begin|># Copyright 2015 Internap. # # 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 # # Unle...
<|file_name|>nib_length.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2.7 """ Print the number of bases in a nib file. usage: %prog nib_file """ <|fim▁hole|> nib = seq_nib.NibFile( file( sys.argv[1] ) ) print nib.length<|fim▁end|>
from bx.seq import nib as seq_nib import sys
<|file_name|>skeleton.py<|end_file_name|><|fim▁begin|>import sys from aimes.emgr.utils import * __author__ = "Matteo Turilli" __copyright__ = "Copyright 2015, The AIMES Project" __license__ = "MIT" # ----------------------------------------------------------------------------- def write_skeleton_conf(cfg, scale, cor...
elif uniformity == 'gauss': substitutes['UNIFORMITY_DURATION'] = "%s [%s, %s]" % \
<|file_name|>saturating_square.rs<|end_file_name|><|fim▁begin|>use malachite_base::num::basic::integers::PrimitiveInt; use malachite_base::num::basic::signeds::PrimitiveSigned; use malachite_base::num::basic::unsigneds::PrimitiveUnsigned; use malachite_base_test_util::generators::{signed_gen, unsigned_gen}; #[test] fn...
fn saturating_square_properties_helper_unsigned<T: PrimitiveUnsigned>() { unsigned_gen::<T>().test_properties(|x| {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import logging log = logging.getLogger(__name__) def has_bin(arg): """ Helper function checks whether args contains binary data<|fim▁hole|> :return: (bool) """ if type(arg) is list or type(arg) is tuple: return reduce(lambda has_binary,...
:param args: list | tuple | bytearray | dict
<|file_name|>InvalidTimeValueError.ts<|end_file_name|><|fim▁begin|>export class InvalidTimeValueError extends Error {<|fim▁hole|><|fim▁end|>
constructor(unit: string, providedValue: number) { super(`Cannot create a valid time with provided ${unit} value: ${providedValue}`); } }
<|file_name|>spanmap.rs<|end_file_name|><|fim▁begin|>use system::*; use span::Span; use objectheap::StaticObjectHeap; // Addressing bits: 48 // Page bits: 48 - 12 = 36 // 36 / 3: 12 pub const INDEX_BITS: usize = 12; pub const INDEX_SIZE: usize = 1 << INDEX_BITS; struct SpanMapLevel1 { pml: [usize; INDEX_SIZE], ...
}
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>mod common; mod color; mod math; mod ppm; mod renderer; mod shade_record; mod shape; mod tracer; mod view_plane; mod world; use std::cell::RefCell; use std::rc::Rc; use color::RGBColor; use renderer::Renderer;<|fim▁hole|>use world::World; fn main() { let mut view_...
use tracer::{Tracer, MultipleObjects}; use view_plane::ViewPlane;
<|file_name|>client_fi.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="fi_FI" version="2.1"> <context> <name>FileSystem</name> <message> <location filename="../src/libsync/filesystem.cpp" line="273"/> <source>The destination file has an unexpected size or modific...
<source>Currently there is no storage usage information available.</source>
<|file_name|>describe_invocations.go<|end_file_name|><|fim▁begin|>package ecs //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 requir...
return responseChan, errChan
<|file_name|>data.py<|end_file_name|><|fim▁begin|>import numpy as np import pywt from scipy.misc import imresize from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) X_L = 10 L = 14 N_BATCH = 50 OBS_SIZE = 30 # ---------------------------- helpers ...
<|file_name|>stub.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python #Copyright 2007,2008,2012 Sebastian Hagen # This file is part of gonium. # # gonium is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, eithe...
raise ValueError('Value {!a} for argument question is invalid'.format(question,))
<|file_name|>ng-i18next.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for i18next v0.3.6 // Project: https://github.com/i18next/ng-i18next // Definitions by: Cyril Schumacher <https://github.com/cyrilschumacher> // Definitions: https://github.com/borisyankov/DefinitelyTyped /// <reference path="../i18next/i18n...
interface I18nextProvider { options: I18nextOptions;
<|file_name|>request.py<|end_file_name|><|fim▁begin|>def get_ip_address(request): ip_address = request.META.get('HTTP_X_FORWARDED_FOR') <|fim▁hole|> return ip_address.split(',')[-1] return request.META.get('REMOTE_ADDR')<|fim▁end|>
if ip_address:
<|file_name|>index-page-sk_puppeteer_test.ts<|end_file_name|><|fim▁begin|>import { expect } from 'chai'; import { addEventListenersToPuppeteerPage, loadCachedTestBed, takeScreenshot, TestBed, } from '../../../puppeteer-tests/util'; import { END_BUSY_EVENT } from '../codesize-scaffold-sk/events'; describe('inde...
});
<|file_name|>Std-symbols.cpp<|end_file_name|><|fim▁begin|>#include <string> template std::allocator<char>::allocator(); template std::allocator<char>::~allocator(); template std::basic_string<char, std::char_traits<char>, std::allocator<char>>::basic_string(const char*, const std::allocator<char>&);<|fim▁hole|><|fim▁...
template std::basic_string<char, std::char_traits<char>, std::allocator<char>>::~basic_string(); template const char* std::basic_string<char, std::char_traits<char>, std::allocator<char>>::c_str() const noexcept;
<|file_name|>cppreference.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # formatter.py - format html from cplusplus.com to groff syntax # # Copyright (C) 2010 - 2015 Wei-Ning Huang (AZ) <aitjcize@gmail.com> # All Rights reserved. # # This file is part of cppman. # # This program is free software; you can r...
<|file_name|>0007_auto_20140805_2253.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|> from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('codecompetitions', '0006_auto_20140805_2234'), ] operations = [ migrations.AddField(...
from __future__ import unicode_literals
<|file_name|>Domain.java<|end_file_name|><|fim▁begin|>package org.whale.ext.domain; import java.util.ArrayList; import java.util.List; import org.whale.system.annotation.jdbc.Column; import org.whale.system.annotation.jdbc.Id; import org.whale.system.annotation.jdbc.Table; import org.whale.system.annotation.jdbc.Vali...
public Long getId() { return id; }
<|file_name|>uploadSnapshotDialog.js<|end_file_name|><|fim▁begin|>'use strict'; var form = $('[name="uploadForm"]'); <|fim▁hole|>exports.setDetails = function(url, id) { form.element(by.model('inputText')).sendKeys(url); form.element(by.model('snapshotId')).sendKeys(id); }; exports.submit = function() { f...
exports.getForm = function() { return form; };
<|file_name|>variance.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/licens...
<|file_name|>streaming_wordcount_it_test.py<|end_file_name|><|fim▁begin|># # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to Yo...
@attr('IT') def test_streaming_wordcount_it(self):
<|file_name|>cast-as-bool.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/li...
fn main() {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from opencvBuilder import exists,generate<|fim▁end|>
<|file_name|>cloudtasks_pb2_grpc.py<|end_file_name|><|fim▁begin|># Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.cloud.tasks_v2beta2.proto import ( cloudtasks_pb2 as google_dot_cloud_dot_tasks__v2beta2_dot_proto_dot_cloudtasks__pb2, ) from google.cloud.tasks_v2beta2.pr...
policy. Note: The Cloud Console does not check queue-level IAM permissions yet.
<|file_name|>vaunix.py<|end_file_name|><|fim▁begin|>from __future__ import division """ instek_pst.py part of the CsPyController package for AQuA experiment control by Martin Lichtman Handles sending commands to Instek PST power supplies over RS232. created = 2015.07.09 modified >= 2015.07.09 """ __au...
<|file_name|>builder.go<|end_file_name|><|fim▁begin|>package activekit func ItemsFromIter(maxIndex uint, next func(index uint) *MenuItem) MenuItems { var items = make(MenuItems, 0, maxIndex) for i := uint(0); i < maxIndex; i++ { var item = next(i) if item != nil { items = append(items, item) } } return it...
}
<|file_name|>test-tls-friendly-error-message.js<|end_file_name|><|fim▁begin|>// Copyright Joyent, Inc. and other Node contributors. // // 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 witho...
if (!process.versions.openssl) { console.error('Skipping because node compiled without OpenSSL.'); process.exit(0); }
<|file_name|>get_action.py<|end_file_name|><|fim▁begin|>e = .1 mean_list = base.List(self.get_theta(key="treatment"), base.Mean, ["control", "treatment"]) if np.random.binomial(1,e) == 1:<|fim▁hole|>else: self.action["treatment"] = mean_list.max() self.action["propensity"] = (1-e)<|fim▁end|>
self.action["treatment"] = mean_list.random() self.action["propensity"] = 0.1*0.5
<|file_name|>resized_fuse_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2022 The Deeplab2 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....
# limitations under the License. """Tests for resized_fuse."""
<|file_name|>rhs-type.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/licens...
// error-pattern:bye
<|file_name|>ComponentsFactory.java<|end_file_name|><|fim▁begin|>package com.github.nikolaymakhonin.android_app_example.di.factories; import android.content.Context; import android.support.annotation.NonNull; import com.github.nikolaymakhonin.android_app_example.di.components.AppComponent; import com.github.nikolaym...
ServiceComponent serviceComponent = buildServiceComponent(appContext);
<|file_name|>ContainsOperand.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright 2012 Apigee Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. ...
public void setValue(String value){
<|file_name|>Honeybee_EnergyPlus NoMass Opaque Material.py<|end_file_name|><|fim▁begin|># # Honeybee: A Plugin for Environmental Analysis (GPL) started by Mostapha Sadeghipour Roudsari # # This file is part of Honeybee. # # Copyright (c) 2013-2020, Mostapha Sadeghipour Roudsari <mostapha@ladybug.tools> # Honeybee is...
<|file_name|>glsl_std_450.py<|end_file_name|><|fim▁begin|>"""Instruction descriptions for the "SPIR-V Extended Instructions for GLSL" version 1.00, revision 2. """ INST_FORMAT = { 1 : { 'name' : 'Round', 'operands' : ['Id'], 'has_side_effects' : False, 'is_commutative' : False }...
39 : {
<|file_name|>api_incursions.go<|end_file_name|><|fim▁begin|>package esidev import ( "net/http" "time" "github.com/gorilla/mux" ) <|fim▁hole|>var _ = mux.NewRouter func GetIncursions(w http.ResponseWriter, r *http.Request) { var ( localV interface{} err error datasource string ) // shut up war...
var _ time.Time
<|file_name|>bootstrap-datetimepicker.min.js<|end_file_name|><|fim▁begin|>/* //! version : 3.1.3 ========================================================= bootstrap-datetimepicker.js https://github.com/Eonasdan/bootstrap-datetimepicker ========================================================= The MIT License (MIT...
if (i === 7) { html.append('<th class="dow">' + weekdaysMin[0] + '</th>'); } else { html.append('<th class="dow">' + weekdaysMin[i] + '</th>');
<|file_name|>test_debugger.py<|end_file_name|><|fim▁begin|>''' Test idlelib.debugger. Coverage: 19% ''' from idlelib import debugger from test.support import requires requires('gui') import unittest from tkinter import Tk class NameSpaceTest(unittest.TestCase): @classmethod def setUpClass(cls): cls....
@classmethod def tearDownClass(cls): cls.root.destroy()
<|file_name|>todo.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: MIT. See LICENSE import frappe import json from frappe.model.document import Document from frappe.utils import get_fullname, parse_addr exclude_from_linked_with = True class ToDo(Documen...
@frappe.whitelist() def new_todo(description): frappe.get_doc({ 'doctype': 'ToDo',
<|file_name|>boltdb_store_test.go<|end_file_name|><|fim▁begin|>package storage import ( "io/ioutil" "log" "os" "path/filepath" "testing" ) func TestSetBinlogPosition(t *testing.T) { dir, err := ioutil.TempDir("", "example") if err != nil { log.Fatal(err)<|fim▁hole|> store := &BoltDBStore{} store.Open(file) ...
} defer os.RemoveAll(dir) file := filepath.Join(dir, "temp.db")