prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>htmlreader.py<|end_file_name|><|fim▁begin|># Copyright 2008-2014 Nokia Solutions and Networks # # 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/l...
self.state = self.IGNORE def tr_start(self, attrs=None): if self.current_row is not None:
<|file_name|>callee.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/licenses...
return Callee {bcx: bcx, data: Closure(datum)}; } _ => {
<|file_name|>analyzer_wysinwyx.rs<|end_file_name|><|fim▁begin|>//! This module offers structs and traits for valueset analysis as inctroduced //! in "Analyzing Memory Access in x86 Executables" by Gogul Balakrishnan and //! Thomas Reps //! For a more complete work on this topic, see the dissertation(!) (there is //! al...
//! It offers datastructures specific to memory access //! VSA (value-set analysis) analyzes access patterns on memory
<|file_name|>globalscope.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::bindings::cell::{DomRefCell, RefMut}; us...
<|file_name|>unloggedin.py<|end_file_name|><|fim▁begin|>""" Commands that are available from the connect screen. """ import re import traceback from django.conf import settings from src.players.models import PlayerDB from src.objects.models import ObjectDB from src.server.models import ServerConfig from src.comms.model...
new_character = create.create_player(playername, None, password, permissions=permissions,
<|file_name|>validation_pool.py<|end_file_name|><|fim▁begin|># Copyright (c) 2011-2012 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. """Module that handles interactions with a Validation Pool. The validation pool is ...
FailedToSubmitAllChangesException): """Raised if we fail to submit any change due to non-fatal errors."""
<|file_name|>main.ts<|end_file_name|><|fim▁begin|>import {bootstrap, Component, View, NgIf, bind, Inject, Observable, FormBuilder} from 'angular2/angular2'; import {People} from '../people/people'; @Component({ selector: 'main' }) @View({ templateUrl: './components/main/main.html', directives: [People] })<|fim▁...
<|file_name|>vec-matching-autoslice.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apa...
[2, _, _] => panic!(), [1, a, b] => { assert!([a, b] == [2, 3]); }
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for Google Drive API v3 3.0 // Project: https://developers.google.com/drive/ // Definitions by: Bolisov Alexey <https://github.com/Bolisov> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 // IMPORTANT...
prettyPrint?: boolean;
<|file_name|>transformations.js<|end_file_name|><|fim▁begin|>/* * The MIT License * * Copyright 2015 Eduardo Weiland. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restrict...
<|file_name|>timing.py<|end_file_name|><|fim▁begin|>from time import time from os import remove from matplotlib.image import imread import json import subprocess import numpy as np import matplotlib.pyplot as plt def time_a_function(program, args): start = time() subprocess.call([program] + [args]) end = ...
<|file_name|>part2.rs<|end_file_name|><|fim▁begin|>// adventofcode - day 5 // part 2 use std::io::prelude::*; use std::fs::File; fn main(){<|fim▁hole|> let wordlist = import_data(); let mut nice_words = 0i32; for word in wordlist.lines(){ if contains_repeating_letter(word.to_string()) ...
println!("Advent of Code - day 5 | part 2"); // import data
<|file_name|>reassemble.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # import sys import csv from pprint import pprint """2018.10.28 John Dey consume CSV output from pwalk and reassemble directory data. File system data from pwalk is flattened and out of order. Rewalk the tree data and create two new fields ...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># ############################################################################# # AUTHOR BLOCK: # ############################################################################# # # RIB Mosaic RenderMan(R) IDE, see <http://sourceforge.net/projects/ribmosaic><|fim▁hole|>#...
# by Eric Nathen Back aka WHiTeRaBBiT, 01-24-2010 # This script is protected by the GPL: Gnu Public License
<|file_name|>main.py<|end_file_name|><|fim▁begin|>from os.path import dirname, join from math import ceil import numpy as np from bokeh.io import curdoc from bokeh.layouts import row, column, widgetbox from bokeh.models import ColumnDataSource, Slider, Div from bokeh.plotting import figure import audio from audio im...
eq_range = np.arange(EQ_CLAMP, dtype=np.float64) eq_data = dict( inner=np.tile(eq_range+2, NUM_BINS),
<|file_name|>adt-brace-enums.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 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...
// option. This file may not be copied, modified, or distributed
<|file_name|>PackageConstants.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python """ Package constants """ ## MIT License ## ## Copyright (c) 2017, krishna bhogaonker ## Permission is hereby granted, free of charge, to any person obtaining a ## copy of this software and associated documentation files (the "Software"...
'01/01/1984',
<|file_name|>ProfileOtherfiles.java<|end_file_name|><|fim▁begin|>/* * Geopaparazzi - Digital field mapping on Android based devices * Copyright (C) 2016 HydroloGIS (www.hydrologis.com) * * This program is free software: you can redistribute it and/or modify<|fim▁hole|> * (at your option) any later version. * * T...
* it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 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. pub mod aml;<|fim▁hole|>pub use self::sdt::HEADER_LEN; fn generate_checksum(data: &[u8]) -> u8 { ...
pub mod facs; pub mod rsdp; pub mod sdt;
<|file_name|>model2d.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2007-2021 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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 ...
<|file_name|>dataloader.js<|end_file_name|><|fim▁begin|>/* Plugin Name: amCharts Data Loader Description: This plugin adds external data loading capabilities to all amCharts libraries. Author: Martynas Majeris, amCharts Version: 1.0.2 Author URI: http://www.amcharts.com/ Copyright 2015 amCharts Licensed unde...
<|file_name|>relative.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import<|fim▁hole|>from . import mod<|fim▁end|>
<|file_name|>kubelet_test.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/lic...
kubelet.podKillingCh = make(chan *kubecontainer.Pod, 20) return &TestKubelet{kubelet, fakeRuntime, mockCadvisor, fakeKubeClient, fakeMirrorClient}
<|file_name|>properties_methods1.js<|end_file_name|><|fim▁begin|>/** @constructor */ function RecordSet(f) { /** @function */ this.write = f; } /* [ { symbols: [ { doc: { tags: [] }, returns: [], type: "", properties: [], ...
*/
<|file_name|>authUser.js<|end_file_name|><|fim▁begin|>var mongoose = require('mongoose'); var bcrypt = require('bcrypt-nodejs'); // define the schema for our user model var authUserSchema = mongoose.Schema({ unique_ID : String, username : String, password : String, role : ...
authUserSchema.methods.generateHash = function(password) {
<|file_name|>parser.rs<|end_file_name|><|fim▁begin|>extern crate thunderdome; #[cfg(test)] mod parser_tests { use thunderdome::parser::*; fn validate(q: &str) -> Option<ParsedGraphQuery> { let result = pre_parse(q); assert!(result.is_ok()); result.ok() } #[test] fn global...
<|file_name|>txdb-leveldb.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #include <map> #in...
CBatchScanner() : foundEntry(false) {} virtual void Put(const leveldb::Slice& key, const leveldb::Slice& value) {
<|file_name|>transform.rs<|end_file_name|><|fim▁begin|>//The forward dct's output coefficients are scaled by 8 //The inverse dct's output samples are clamped to the range [0, 255] fn level_shift_up(a: i32) -> u8 { if a < -128 {0u8} else if a > 127 {255u8} else {a as u8 + 128u8} } /* idct and fdct are Rust...
let t12 = t0 - t3; let t11 = t1 + t2; let t13 = t1 - t2;
<|file_name|>contrib.src.js<|end_file_name|><|fim▁begin|>/*! asynquence-contrib v0.13.0 (c) Kyle Simpson MIT License: http://getify.mit-license.org */ (function UMD(dependency,definition){ if (typeof module !== "undefined" && module.exports) { // make dependency injection wrapper first module.exports = fu...
}; }); // "go-style CSP"
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Models for Credit Eligibility for courses. Credit courses allow students to receive university credit for successful completion of a course on EdX """ from __future__ import absolute_import import datetime import logging from collections...
<|file_name|>application-insights.ts<|end_file_name|><|fim▁begin|>export interface AIMonthlySummary { successCount: number; failedCount: number; } export interface AIInvocationTrace { timestamp: string; timestampFriendly: string; id: string; name: string; success: boolean; resultCode: string...
Application_Type: string;
<|file_name|>event.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::codegen::EventBinding; use dom::bindings::co...
pub fn IsTrusted(&self) -> bool { self.trusted }
<|file_name|>tokenizer.py<|end_file_name|><|fim▁begin|># coding: utf-8 # # Copyright 2012 NAMD-EMAP-FGV # # This file is part of PyPLN. You can get more information at: http://pypln.org/. # # PyPLN is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publishe...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>fn main() { let mut highest: u32 = 0; for x in 1..1000 { for y in 1..1000 { let multiple: u32 = x * y; if (multiple > highest) && is_palindrome(&multiple.to_string()) { highest = multiple; ...
return false; }
<|file_name|>CreateIterResultObject.d.ts<|end_file_name|><|fim▁begin|>import CreateIterResultObject = require('../2016/CreateIterResultObject');<|fim▁hole|><|fim▁end|>
export = CreateIterResultObject;
<|file_name|>asha-confirm-paymnet-model.ts<|end_file_name|><|fim▁begin|>export class AshaConfirmPaymentModel{ p_101: number ; p_102: number ; p_103: number ; p_104: number ; p_105: number ; p_106: number ; p_107: number ; p_...
p_115: number ;
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from jx_elasticsearch.es52.painless._utils import Painless, LIST_TO_PIPE from jx_elasticsearch.es52.painless.add_op import AddOp from jx_elasticsearch.es52.painless.and_op import AndOp from jx_elasticsearch.es52.painless.basic_add_op import BasicAddOp from jx_elasti...
from jx_elasticsearch.es52.painless.basic_index_of_op import BasicIndexOfOp
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public<|fim▁hole|>//! //! Attributes this crate provides: //! //! - `#[privatize]` : Forces all fields in a struct/enum to be private //! - `#[derive(JSTraceable)]` : Auto-derives an implementation of `JST...
* 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/. */ //! Servo's compiler plugin/macro crate
<|file_name|>test_pdb_chain.py<|end_file_name|><|fim▁begin|><|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-2.0 # # Unless required b...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2018 João Pedro Rodrigues
<|file_name|>signup_page.py<|end_file_name|><|fim▁begin|>from givabit.backend.errors import AlreadyExistsException from givabit.backend.user import User from givabit.backend.user_repository import UserRepository from givabit.webapp.base_page import BasePage from givabit.webapp.url import Url class SignupPage(BasePage)...
self.user_repo = user_repository if user_repository is not None else UserRepository() def get(self):
<|file_name|>issue-69446-fnmut-capture.rs<|end_file_name|><|fim▁begin|>// Regression test for issue #69446 - we should display // which variable is captured // edition:2018 use core::future::Future; struct Foo; impl Foo { fn foo(&mut self) {} } async fn bar<T>(_: impl FnMut() -> T) where T: Future<Output = (...
<|file_name|>regions-ret-borrowed.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apach...
// option. This file may not be copied, modified, or distributed
<|file_name|>QueueArray.java<|end_file_name|><|fim▁begin|>package code.template; /** * * @author */ public class QueueArray { int QUEUE_SIZE; int front; int back; Integer[] queueArray; public QueueArray(int size) { queueArray = new Integer[size]; QUEUE_SIZE = ...
System.out.println(i+"/t" + queueArray[i]); } }
<|file_name|>array_ops.rs<|end_file_name|><|fim▁begin|>use crate::ndarray; use crate::ndarray_ext; #[cfg(feature = "mkl")] use crate::ndarray_ext::NdArrayViewMut; use crate::ndarray_ext::{NdArray, NdArrayView}; use crate::op; use crate::tensor::Tensor; use crate::tensor_ops::*; use crate::Float; use std::iter::FromIter...
} } else {
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Backend.AI Library documentation build configuration file, created by # sphinx-quickstart on Tue Mar 1 21:26:20 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that n...
<|file_name|>decompose.js<|end_file_name|><|fim▁begin|>define(["./_base", "dojo/_base/lang", "./matrix"], <|fim▁hole|> // compare two FP numbers for equality return Math.abs(a - b) <= 1e-6 * (Math.abs(a) + Math.abs(b)); // Boolean } function calcFromValues(/* Number */ r1, /* Number */ m1, /* Number */ r2, /* Nu...
function (g, lang, m){ function eq(/* Number */ a, /* Number */ b){ // summary:
<|file_name|>build.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/. */ extern crate peg; use std::io; use std::io::{Read, Write}; use...
<|file_name|>test_record_test.py<|end_file_name|><|fim▁begin|># Lint as: python3 """Unit tests for test_record module.""" import sys import unittest from openhtf.core import test_record def _get_obj_size(obj): size = 0 for attr in obj.__slots__: # pytype: disable=attribute-error size += sys.getsizeof(attr)...
data = attachment.data
<|file_name|>contacts.client.service.js<|end_file_name|><|fim▁begin|>'use strict'; //Contacts service used to communicate Contacts REST endpoints angular.module('contacts').factory('Contacts', ['$resource', function ($resource) { return $resource('api/v1/contacts/:contactId', { contactId: '@_id' }, { ...
} }); }
<|file_name|>xgen_pwr.go<|end_file_name|><|fim▁begin|>package pwr // DO NOT EDIT THIS FILE. GENERATED BY xgen. import ( "bits" "mmio" "unsafe" "stm32/o/f411xe/mmap" ) type PWR_Periph struct { CR RCR CSR RCSR } func (p *PWR_Periph) BaseAddr() uintptr { return uintptr(unsafe.Pointer(p)) } //emgo:const var P...
func (p *PWR_Periph) PVDO() RMCSR { return RMCSR{mmio.UM32{&p.CSR.U32, uint32(PVDO)}} }
<|file_name|>OpId.java<|end_file_name|><|fim▁begin|>/** * CArtAgO - DEIS, University of Bologna * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License...
<|file_name|>EventType.java<|end_file_name|><|fim▁begin|>package org.asciicerebrum.neocortexengine.domain.events; /** * * @author species8472 */ public enum EventType { /** * Event thrown directly after the initialization of a new combat round. */ COMBATROUND_POSTINIT, /** * Event thrown...
DAMAGE_INFLICTED, /** * The event of some character ending its turn. */
<|file_name|>maps.ts<|end_file_name|><|fim▁begin|>//need the following ///reference line so that ambient @types .d.ts declarations get loaded. /// <reference types="googlemaps" /> import * as xlib from "xlib"; import _ = xlib.lodash; const log = new xlib.logging.Logger( __filename ); import Promise = xlib.promise.blu...
// // // // //retry with backoff
<|file_name|>abstractwsgi.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # (c) 2015 Tuomas Airaksinen # # This file is part of automate-wsgi. # # automate-wsgi 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...
# # automate-wsgi is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
<|file_name|>devstack.py<|end_file_name|><|fim▁begin|>""" Specific overrides to the base prod settings to make development easier. """ # Silence noisy logs import logging from os.path import abspath, dirname, join from corsheaders.defaults import default_headers as corsheaders_default_headers # pylint: enable=unico...
'debug_toolbar.panels.versions.VersionsPanel', 'debug_toolbar.panels.timer.TimerPanel', 'debug_toolbar.panels.settings.SettingsPanel',
<|file_name|>event.rs<|end_file_name|><|fim▁begin|>use std::mem; use crate::syntax::SyntaxKind; use crate::{ParseError, TreeSink}; #[derive(Copy, Clone, PartialEq, Eq, Debug)] pub enum Event { BeginMarker, Begin(SyntaxKind, Option<usize>), Leaf(SyntaxKind), End, Error, Tombstone, } pub fn pro...
} Event::End => sink.finish_node(), Event::Leaf(kind) => { sink.token(kind);
<|file_name|>recurring_transaction_frequency.py<|end_file_name|><|fim▁begin|>""" The Plaid API The Plaid REST API. Please see https://plaid.com/docs/api for more details. # noqa: E501 Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from plaid.model_util...
attribute_map = {} _composed_schemas = None
<|file_name|>development.js<|end_file_name|><|fim▁begin|>module.exports.name = 'development'; module.exports.dbtype = "mssql";<|fim▁hole|>module.exports.windwalkerPort = 8080;<|fim▁end|>
module.exports.datasource = {user: "sa", password: "sa", host: "localhost", port: 1433};
<|file_name|>urls.py<|end_file_name|><|fim▁begin|><|fim▁hole|> https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based views 1. Add an import: from other_app...
"""code_for_good URL Configuration The `urlpatterns` list routes URLs to views. For more information please see:
<|file_name|>Script_Doc_Export.cpp<|end_file_name|><|fim▁begin|>/***************************************************************************** The Dark Mod GPL Source Code This file is part of the The Dark Mod Source Code, originally based on the Doom 3 GPL Source Code as published in 2011. The Da...
for( EventArgs::const_iterator i = args.begin(); i != args.end(); ++i ) { idTypeDef *type = idCompiler::GetTypeForEventArg( i->type ); // Use a generic variable name "a", "b", "c", etc. if no name present pugi::xml_node argNode = eventNode.append_child( "argument" );
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python<|fim▁hole|> if sys.version_info >= (3,): BOOST_LIB = 'boost_python3' else: BOOST_LIB = 'boost_python' module_RF24Network = Extension('RF24Network', libraries = ['rf24network', BOOST_LIB], sources = ['pyRF24Netw...
from distutils.core import setup, Extension import sys
<|file_name|>356_pegsnholes.cpp<|end_file_name|><|fim▁begin|>#include <cstdio> #include <iostream> #include <vector> #include <cstring> #include <cstdlib> #include <cmath> using namespace std; #define DEBUG #undef DEBUG //uncomment this line to pull out print statements #ifdef DEBUG #define TAB '\t' #define debug(a, ...
<|file_name|>payment_method_nonce.js<|end_file_name|><|fim▁begin|>//@ sourceMappingURL=payment_method_nonce.map // Generated by CoffeeScript 1.6.1 var AttributeSetter, PaymentMethodNonce, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) ...
})(AttributeSetter);
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Facebook, Inc. and its affiliates. * * This software may be used and distributed according to the terms of the * GNU General Public License version 2. */ //! See [`TracingCollector`] for the main structure. #![allow(unused_variables)] #![allow(d...
<|file_name|>quotedstring.go<|end_file_name|><|fim▁begin|>package opts // import "github.com/tiborvass/docker/opts" // QuotedString is a string that may have extra quotes around the value. The // quotes are stripped from the value. type QuotedString struct {<|fim▁hole|>// Set sets a new value func (s *QuotedString) Se...
value *string }
<|file_name|>set-focus.ts<|end_file_name|><|fim▁begin|>import {Directive, AfterViewInit, ElementRef, Renderer} from '@angular/core'; @Directive({ selector: '[setFocus]' }) export class SetFocusDirective implements AfterViewInit { constructor(public renderer: Renderer, public elementRef: ElementRef) { } ngAft...
this.elementRef.nativeElement, 'focus', []); } }
<|file_name|>exceptions.ts<|end_file_name|><|fim▁begin|>import {ListWrapper, List} from 'angular2/src/facade/collection'; import {stringify, BaseException, isBlank} from 'angular2/src/facade/lang'; function findFirstClosedCycle(keys: List<any>): List<any> { var res = []; for (var i = 0; i < keys.length; ++i) { ...
<|file_name|>conv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import logging as loggers import numpy as np import theano.tensor as T from theano.tensor.nnet import conv from theano.tensor.signal import downsample from deepy.utils import build_activation, UniformInitializer from dee...
def _setup_functions(self): self._activation_func = build_activation(self.activation)
<|file_name|>starter.dev.js<|end_file_name|><|fim▁begin|>;(function($){ $(document).ready( function(){ $('.fa_slider_simple').FeaturedArticles({ slide_selector : '.fa_slide', nav_prev : '.go-back', nav_next : '.go-forward', nav_elem : '.main-nav .fa-nav', effect : false, // events ...
if( typeof this.progressBar !== 'undefined' ){ this.progressBar.css({width:0}).animate( {'width' : '100%'},
<|file_name|>TestCeilRelaxed.rs<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www...
#include "TestCeil.rs" #pragma rs_fp_relaxed
<|file_name|>network_codes.py<|end_file_name|><|fim▁begin|>ucodes = { "U0001" : "High Speed CAN Communication Bus" , "U0002" : "High Speed CAN Communication Bus (Performance)" , "U0003" : "High Speed CAN Communication Bus (Open)" , "U0004" : "High Speed CAN Communication Bus (Low)" , "U0005" : "High Spe...
"U0071" : "Vehicle Communication Bus E (High)" , "U0072" : "Vehicle Communication Bus E (shorted to Bus E)" , "U0073" : "Control Module Communication Bus Off" , "U0074" : "Reserved by J2012" ,
<|file_name|>metadata.py<|end_file_name|><|fim▁begin|># Copyright 2017 Google Inc. and Skytruth Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at #<|fim▁hole|># WITHOUT WARRANTIES OR CONDI...
# 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,
<|file_name|>rollup.config.js<|end_file_name|><|fim▁begin|>import svelte from 'rollup-plugin-svelte'; import resolve from 'rollup-plugin-node-resolve'; import commonjs from 'rollup-plugin-commonjs'; import livereload from 'rollup-plugin-livereload'; import { terser } from 'rollup-plugin-terser'; import copy from 'rollu...
name: 'app', file: outputFile }, plugins: [
<|file_name|>account.box.edit.location.js<|end_file_name|><|fim▁begin|>(function () { 'use strict'; angular .module('openSenseMapApp') .controller('EditBoxLocationController', EditBoxLocationController); EditBoxLocationController.$inject = ['$scope', 'boxData', 'notifications', 'AccountService', 'Box'];...
function save () { return AccountService.updateBox(boxData._id, { location: vm.editMarker.m1 }) .then(function (response) { angular.copy(new Box(response.data), boxData);
<|file_name|>value.rs<|end_file_name|><|fim▁begin|>use std::fmt::{Debug, Display, Formatter, Error}; use std::fmt::Result as FmtResult; use num::Float; use std::mem; use super::clip::{ClipHolder}; #[derive(Debug, Clone, Eq, PartialEq, Hash)] pub enum Value { Int(i64), Float(FloatWrap), Bool(bool), Str...
Nil }
<|file_name|>decl.rs<|end_file_name|><|fim▁begin|>use easter::decl::{Dtor, DtorExt}; use unjson::ty::Object; use result::Result; use error::Error; use node::ExtractNode; pub trait IntoDecl { fn into_dtor(self) -> Result<Dtor>; } impl IntoDecl for Object { fn into_dtor(mut self) -> Result<Dtor> { let ...
Dtor::from_init_opt(lhs, init).map_err(Error::UninitializedPattern)
<|file_name|>main.js<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2014 Famous Industries, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including withou...
headerSize: 50, footerSize: 50
<|file_name|>testing.rs<|end_file_name|><|fim▁begin|>// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 use crate::{ raw::{config::*, security}, testing::s2n_tls::Harness, }; use bytes::Bytes; use core::task::Poll; use std::collections::VecDeque; pub m...
} pub fn poll(&mut self) -> Poll<Result<()>> { assert!(
<|file_name|>events.py<|end_file_name|><|fim▁begin|>EXCEPTION_INFO = 'exception_info' MESSAGE = 'message' PAYLOAD = 'payload' _event_handlers = { EXCEPTION_INFO: [], MESSAGE: [], PAYLOAD: [] } def _check_type(typ): if typ not in _event_handlers: raise ValueError('Unknown type: %s. Must be one...
<|file_name|>test_artificial_128_Fisher_MovingAverage_5__100.py<|end_file_name|><|fim▁begin|>import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art <|fim▁hole|>art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "MovingAverage", cycle_length = 5, transform = "Fisher...
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4<|fim▁hole|>from django.contrib import admin from .models import * admin.site.register(MessageInWaiting) admin.site.register(ResponseInWaiting) admin.site.register(Template)<|fim▁end|>
<|file_name|>moves.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/licenses/...
use util::ppaux::Repr; use util::common::indenter; use std::at_vec;
<|file_name|>exiter2.py<|end_file_name|><|fim▁begin|>import sys def bye(): sys.exit(40) # Crucial error: abort now! try: bye() except Exception: print('got it') # Oops--we ignored the exit <|fim▁hole|><|fim▁end|>
print('continuing...')
<|file_name|>liveness-init-in-fn-expr.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.a...
}; error!(f()); }
<|file_name|>integration.js<|end_file_name|><|fim▁begin|>module.exports = function (options, suite, test, expect, teardown) { require('./integration.expressions')(options, suite, test, expect, teardown); suite('tribe.storage.integration.' + options.type, function () { var storage = require('tribe.stor...
<|file_name|>CompositeContextTest.js<|end_file_name|><|fim▁begin|>import { suite, test, equal, isUndefined, isFalse, isTrue } from "../assert"; import CompositeContext from "di/CompositeContext"; import Context from "di/Context"; suite("CompositeContext", () => { test("no contexts", () => { const composite = ne...
}); const composite = new CompositeContext([primaryContext, secondaryContext]);
<|file_name|>RenderSVGResourceClipper.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. * Copyright (C) 201...
view().frameView().setPaintBehavior(oldBehavior); return true; }
<|file_name|>253_add_pci_requests_to_instance_extra_table.py<|end_file_name|><|fim▁begin|># 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/LIC...
table.create_column(new_column)
<|file_name|>TopKStateUpdater.java<|end_file_name|><|fim▁begin|>package storm.starter.trident.homework.state; import storm.trident.operation.TridentCollector; import storm.trident.state.BaseStateUpdater; import storm.trident.tuple.TridentTuple; import java.util.ArrayList; import java.util.List; /** * Updater class ...
String[] tag = hashTags.split(" ");
<|file_name|>ui-checkbox.js<|end_file_name|><|fim▁begin|>import Ember from 'ember'; import CheckboxMixin from '../mixins/checkbox-mixin'; export default Ember.Component.extend(CheckboxMixin, { type: 'checkbox', checked: false, onChange: function() { this.set('checked', this.$('input').prop('checked')); ...
<|file_name|>monit.py<|end_file_name|><|fim▁begin|>#! /usr/bin/python # vim: set fileencoding=utf-8 sw=4 ts=4 et: import rrdtool, os from def_rrds import rrds import def_metrics from def_metrics import metrics <|fim▁hole|> for i,f in enumerate(metrics[m]['rrd']): if not os.path.isfile(f): ...
for m in metrics: if isinstance(metrics[m]['rrd'], list): # multiples rrds
<|file_name|>standalone_bot.py<|end_file_name|><|fim▁begin|>""" Run this file to run bots as a standalone application, detached from the webapp """ from snoohelper.utils.teams import SlackTeamsController TESTING = False def main(): if not TESTING: SlackTeamsController("teams.ini", 'snoohelper_master.db'...
SlackTeamsController("teams_test.ini", 'snoohelper_test.db')
<|file_name|>pack_usb.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python #coding: utf8 import sys, struct data_size = 2*1024*1024 if len(sys.argv) != 3: print 'Using: ./pack_usb.py input.bin output.bin' sys.exit(0) fin = file(sys.argv[1], 'rb') data = fin.read() print 'Size: %d bytes' % len(data) if len(data...
print 'Checksum: 0x%04x' % checksum
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import os from setuptools import setup LONG_DESCRIPTION = """ A modular framework for mobile surveys and field data collection via offline-capable mobile web apps. """ def readme(): try: readme = open('README.md') except IOError: return LONG_...
'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7',
<|file_name|>twitter_eggmode.rs<|end_file_name|><|fim▁begin|>extern crate egg_mode; extern crate tokio; use super::notifier::Error; use super::NotifierStrategy; use super::Message; use self::tokio::runtime::current_thread::block_on_all; use std::string::ToString; pub struct TwitterEggMode { token: egg_mode::Token...
} }
<|file_name|>LED.java<|end_file_name|><|fim▁begin|>package org.usfirst.frc369.Robot2017Code.subsystems; import org.usfirst.frc369.Robot2017Code.Robot; import edu.wpi.first.wpilibj.Relay; import edu.wpi.first.wpilibj.command.Subsystem; /** * */ public class LED extends Subsystem { // Put methods for controllin...
public void LEDOn(){ Robot.LEDSys.equals(Relay.Value.kForward);
<|file_name|>PtConsequencesStructure.java<|end_file_name|><|fim▁begin|>// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be l...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>############################################################################### ## ## Copyright (C) 2014-2016, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vist...
identifier = 'org.vistrails.vistrails.pipelineedit'
<|file_name|>MysqlDriver.ts<|end_file_name|><|fim▁begin|>import {Driver} from "../Driver"; import {ConnectionIsNotSetError} from "../../error/ConnectionIsNotSetError"; import {DriverPackageNotInstalledError} from "../../error/DriverPackageNotInstalledError"; import {DriverUtils} from "../DriverUtils"; import {MysqlQuer...
*/ export class MysqlDriver implements Driver {
<|file_name|>bitcoin_ar.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="ar" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Woodcoin</source> ...