prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/** * Reparse the Grunt command line options flags. * * Using the arguments parsing logic from Grunt: * https://github.com/gruntjs/grunt/blob/master/lib/grunt/cli.js */ module.exports = function(grunt){ // Get the current Grunt CLI instance. var nopt = requir...
for (var i in parsedOptions){
<|file_name|>ProcessorManagementNamingStrategy.java<|end_file_name|><|fim▁begin|>/* * Copyright 2011 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 * ...
buffer.append(domainName).append(":"); buffer.append(KEY_CONTEXT + "=").append(getContextId(context)).append(","); buffer.append(KEY_TYPE + "=").append(TYPE_PROCESSOR).append(",");
<|file_name|>SamplePlayer.cpp<|end_file_name|><|fim▁begin|>/* * tracker/SamplePlayer.cpp * * Copyright 2009 Peter Barth * * This file is part of Milkytracker. * * Milkytracker is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * ...
}
<|file_name|>logs.go<|end_file_name|><|fim▁begin|>package types import "github.com/traefik/paerser/types" const ( // AccessLogKeep is the keep string value. AccessLogKeep = "keep" // AccessLogDrop is the drop string value. AccessLogDrop = "drop" // AccessLogRedact is the redact string value. AccessLogRedact = "...
<|file_name|>ipc.net.ts<|end_file_name|><|fim▁begin|>/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *----------...
const socket = createConnection(hook, () => { socket.removeListener('error', e); c(Client.fromSocket(new NodeSocket(socket), clientId)); });
<|file_name|>coerce-reborrow-imm-vec-rcvr.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// run-pass fn bar(v: &mut [usize]) -> Vec<usize> { v.to_vec() } fn bip(v: &[usize]) -> Vec<usize> { v.to_vec() } pub fn main() { let mut the_vec = vec![1, 2, 3, 100]; assert_eq!(the_vec.clone(), bar(&mut the_vec))...
<|file_name|>livecode.rs<|end_file_name|><|fim▁begin|>use futures::channel::mpsc::{self, UnboundedReceiver, UnboundedSender}; use futures::executor; use futures::future; use futures::prelude::*; use notify::*; use future_ext::{Breaker, FutureWrapExt}; use module::{audio_io::Frame, flow, Module}; use std::path::{Path...
self.bounds = bounds; }
<|file_name|>SingularValuesSlider.tsx<|end_file_name|><|fim▁begin|>import * as React from "react"; import * as noUiSlider from "nouislider"; export interface SVSliderProps { value: number; maxSvs: number; max: number; onUpdate: (svs: number) => void; } export class SingularValuesSlider extends React.Component...
<|file_name|>defaults_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2019 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 ...
package v1alpha1_test import ( "reflect"
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import include, url from django.contrib import admin urlpatterns = [<|fim▁hole|> url(r'^admin/', admin.site.urls), url(r'^webcam/', include('webCam.urls')), ]<|fim▁end|>
<|file_name|>text-input-test.js<|end_file_name|><|fim▁begin|>import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render, fillIn } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; module('Integration | Component | inputs/text-input', function (hooks)...
value: '123 hello', name: 'myInput',
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from flask import Flask<|fim▁hole|> app = Flask(__name__) bootstrap = Bootstrap() from .views import page def create_app(config): app.config.from_object(config) bootstrap.init_app(app) app.register_blueprint(page) return app<|fim▁end|>
from flask_bootstrap import Bootstrap
<|file_name|>test_image.py<|end_file_name|><|fim▁begin|># Authors: Emmanuelle Gouillart <emmanuelle.gouillart@normalesup.org> # Gael Varoquaux <gael.varoquaux@normalesup.org> # License: BSD 3 clause import numpy as np import scipy as sp from scipy import ndimage from nose.tools import assert_equal, assert_tr...
assert_raises(ValueError, extract_patches_2d, x, (4, 1))
<|file_name|>users.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core';<|fim▁hole|> @Injectable() export class UsersService { constructor(private http: Http) { } usersData = [{ 'uid': '23554654235325', 'firstname': 'Firstname 1', 'lastname': 'Lastname 1',...
import { Http, Headers, RequestOptions, Response } from '@angular/http'; import { User } from './_models/index';
<|file_name|>device_test.go<|end_file_name|><|fim▁begin|>package netio import ( "github.com/brutella/hc/db" "os" "reflect" "testing" ) <|fim▁hole|> var e db.Entity var client Device var err error database, _ := db.NewDatabase(os.TempDir()) client, err = NewDevice("Test Client", database) if err != nil { t...
func TestNewDevice(t *testing.T) {
<|file_name|>eventtypes.js<|end_file_name|><|fim▁begin|>'use strict'; /** * Types of events * @readonly * @enum {number} */ var EventTypes = { // Channel Events /** * A channel got connected * @type {EventType} */ CONNECT: "connect", /** * A channel got disconnected ...
GLOBALMESSAGE: "globalMsg", /** * An instruction/request to clear chat history
<|file_name|>forum.js<|end_file_name|><|fim▁begin|>/* [Discuz!] (C)2001-2099 Comsenz Inc. This is NOT a freeware, use is subject to license terms $Id: forum.js 33082 2013-04-18 11:13:53Z zhengqingpeng $ */ function saveData(ignoreempty) { var ignoreempty = isUndefined(ignoreempty) ? 0 : ignoreempty; var...
this.className = cls[0]; this.innerHTML = lang[0]; } }
<|file_name|>data.go<|end_file_name|><|fim▁begin|>// Copyright 2017 The Hugo 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/license...
<|file_name|>mouse.rs<|end_file_name|><|fim▁begin|>//! Back-end agnostic mouse buttons. use num::{ FromPrimitive, ToPrimitive }; /// Represent a mouse button. #[derive(Copy, Clone, RustcDecodable, RustcEncodable, PartialEq, Eq, Ord, PartialOrd, Hash, Debug)] pub enum MouseButton { /// Unknown mouse button. ...
fn from_isize(n: isize) -> Option<MouseButton> { FromPrimitive::from_u64(n as u64) } }
<|file_name|>writer.py<|end_file_name|><|fim▁begin|># Copyright 2022 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 <|fim▁hole|>from sis_provisioner.csv import get_filepath from sis_provisioner.csv.user_writer import make_import_user_csv_files from sis_provisioner.util.log import log_exception fr...
import logging import traceback from sis_provisioner.dao.uw_account import get_all_uw_accounts
<|file_name|>ManipulationSettingsContainer.ts<|end_file_name|><|fim▁begin|>import { EditorSettings, errors, NewLineKind, SettingsContainer } from "@ts-morph/common"; import { QuoteKind, UserPreferences } from "../compiler"; import { fillDefaultEditorSettings, newLineKindToString } from "../utils"; /** Kinds of indenta...
/** * FormatCodeSettings that are currently supported in the library.
<|file_name|>info.js<|end_file_name|><|fim▁begin|><|fim▁hole|> size = require('gulp-size'); // output size in console gulp.task('info', function() { // You can pass as many relative urls as you want return gulp.src(config.destPaths.root + '/*/**') .pipe(size()) });<|fim▁end|>
'use strict'; var config = require('../config'), gulp = require('gulp'),
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .waveform_utils import omega, k, VTEMFun, TriangleFun, SineFun from .current_utils import (<|fim▁hole|><|fim▁end|>
getStraightLineCurrentIntegral, getSourceTermLineCurrentPolygon, segmented_line_current_source_term, )
<|file_name|>eq.rs<|end_file_name|><|fim▁begin|>#![feature(core)] extern crate core; #[cfg(test)] mod tests { // pub trait FixedSizeArray<T> { // /// Converts the array to immutable slice // fn as_slice(&self) -> &[T]; // /// Converts the array to mutable slice // fn as_mut_slice(&m...
// } //
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Optcoretech documentation build configuration file, created by # sphinx-quickstart on Mon Sep 1 14:23:01 2014. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration va...
('index', 'Optcoretech.tex', u'Optcoretech Documentation',
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub type fflags_t = u32; pub type clock_t = i32; pub type ino_t = u32; pub type lwpid_t = i32; pub type nlink_t = u16; pub type blksize_t = u32; pub type clockid_t = ::c_int; pub type sem_t = _sem; pub type fsblkcnt_t = ::uint64_t; pub type fsfilcnt_t = ::uint64_t; pub ...
<|file_name|>code.java<|end_file_name|><|fim▁begin|>class LinkedList { public static void main(String[] a) { System.out.println(new LL().Start()); } } class Element { int Age; int Salary; boolean Married; public boolean Init(int v_Age, int v_Salary, boolean v_Married) { Age = v_...
public boolean SetNext(List v_next) {
<|file_name|>linedlg.py<|end_file_name|><|fim▁begin|># Sketch - A Python-based interactive drawing program # Copyright (C) 1997, 1998, 1999, 2001, 2002 by Bernhard Herzog # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as publishe...
self.dash_bitmap = bitmap
<|file_name|>cov.py<|end_file_name|><|fim▁begin|>from bacpypes.apdu import SubscribeCOVRequest, SimpleAckPDU, RejectPDU, AbortPDU from bacpypes.iocb import IOCB from bacpypes.core import deferred from bacpypes.pdu import Address from bacpypes.object import get_object_class, get_datatype from bacpypes.constructeddata im...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># definitions which are not being deprecated from wagtail.admin.forms from .models import ( # NOQA DIRECT_FORM_FIELD_OVERRIDES, FORM_FIELD_OVERRIDES, WagtailAdminModelForm,<|fim▁hole|><|fim▁end|>
WagtailAdminModelFormMetaclass, formfield_for_dbfield) from .pages import WagtailAdminPageForm # NOQA
<|file_name|>api.py<|end_file_name|><|fim▁begin|># Natural Language Toolkit: Stemmer Interface # # Copyright (C) 2001-2008 University of Pennsylvania # Author: Trevor Cohn <tacohn@cs.mu.oz.au> # Edward Loper <edloper@gradient.cis.upenn.edu> # Steven Bird <sb@csse.unimelb.edu.au> # URL: <http://nltk.sf.n...
@param token: The token that should be stemmed.
<|file_name|>test_parse_covtype_2.py<|end_file_name|><|fim▁begin|>import unittest, sys sys.path.extend(['.','..','../..','py']) import h2o2 as h2o import h2o_cmd, h2o_import as h2i, h2o_browse as h2b from h2o_test import find_file, dump_json, verboseprint expectedZeros = [0, 4914, 656, 24603, 38665, 124, 13, 5, 1338,...
k = parseResult['frames'][0]['key']['name'] # print "parseResult:", dump_json(parseResult)
<|file_name|>utf8_chars.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lice...
stack.unshift_char('ß');
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 Pierre Talbot (IRCAM) // 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 ...
pub mod type_name; pub mod calc;
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># pylint: disable=too-many-lines """ Component to interface with cameras. For more details about this component, please refer to the documentation at https://home-assistant.io/components/camera/ """ import asyncio import logging from aiohttp import web from homea...
@asyncio.coroutine
<|file_name|>gtest_env_var_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2008, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of...
def TestFlag(flag, test_val, default_val):
<|file_name|>count.spec.js<|end_file_name|><|fim▁begin|>import * as lamb from "../.."; import { nonFunctions, wannabeEmptyArrays } from "../../__tests__/commons"; describe("count / countBy", function () { var getCity = lamb.getKey("city"); var persons = [ { name: "Jane", surname: "Doe", age: 12, city:...
var personsAgeGroupCount = { under20: 3, over20: 1 };
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>/* * Panopticon - A libre disassembler * Copyright (C) 2017 Panopticon authors * * 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 ...
rreil_rvalue!({}) ), assignee: rreil_lvalue!({})
<|file_name|>coveragemodels.py<|end_file_name|><|fim▁begin|>from mongoengine import Document, StringField, DateTimeField, ListField, DateTimeField, IntField, BooleanField, \ ObjectIdField, FloatField class Covelement(Document): instructionsCov = IntField() instructionsMis = IntField() branchesCov = Int...
classCov = IntField() classMis = IntField()
<|file_name|>nest_test.py<|end_file_name|><|fim▁begin|># Copyright 2016 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.apache....
s1={"a": [2, 3], "b": [1, 2, 3]}, s2={"b": [5, 6, 7], "a": [8, 9]},
<|file_name|>validate_plug_ins.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import sys try: import __builtin__ except ImportError: import builtins as __builtin__ import os # python puts the program's directory path in sys.path[0]. In other words, the user ordinarily has no way # to override python...
qprint_pgm_footer()
<|file_name|>build.js<|end_file_name|><|fim▁begin|>const fs = require("fs"); const path = require("path"); const {template} = require("lodash"); const minimist = require("minimist"); const yaml = require("js-yaml"); const argv = minimist(process.argv.slice(2)); const conf = {}; try { const src = fs.readFileSync(pat...
path.join(__dirname, "kube-conf"), path.resolve(__dirname, "../kubernetes.yml"),
<|file_name|>Variable.js<|end_file_name|><|fim▁begin|>"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Variable = void 0; const VariableBase_1 = require("./VariableBase"); /** * A Variable represents a locally scoped identifier. These include arguments to functions. */ class Variab...
<|file_name|>transactionPending.js<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity 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...
className={ styles.transactionDetails } from={ from } fromBalance={ fromBalance } gasStore={ this.gasStore }
<|file_name|>common.go<|end_file_name|><|fim▁begin|>// Copyright 2014 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum 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 ...
length := uint64(len(data)) if start > length { start = length
<|file_name|>playwire.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import re,urlparse,json from liveresolver.modules import client from BeautifulSoup import BeautifulSoup as bs import xbmcgui def resolve(url): try: result = client.request(url) html = result result =...
url = base + link['url'] bitrate = link['bitrate']
<|file_name|>HelloWorld.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2010 RedEngine Ltd, http://www.redengine.co.nz. All rights reserved. *<|fim▁hole|> * * Unless required by applicable law or agreed to in writing, * software distributed under the Apache License Version 2.0 is distributed on an * "AS IS" ...
* This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0.
<|file_name|>nom.rs<|end_file_name|><|fim▁begin|>//! Useful parser combinators //! //! A number of useful parser combinators have already been implemented. //! Some of them use macros, other are implemented through functions. //! Hopefully, the syntax will converge to onely one way in the future, //! but the macros sys...
/// if parameter is true, parse a big endian i32 integer, /// otherwise a little endian i32 integer
<|file_name|>Multiples_of_3_and_5.py<|end_file_name|><|fim▁begin|>#If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. #Find the sum of all the multiples of 3 or 5 below 1000. <|fim▁hole|><|fim▁end|>
print sum([x for x in xrange(1,1000) if (x % 3 == 0) or (x % 5 == 0)])
<|file_name|>result-types.rs<|end_file_name|><|fim▁begin|><|fim▁hole|> // === CDB TESTS ================================================================================== // cdb-command: g // cdb-command: dx x,d // cdb-check:x,d : Ok [Type: enum$<core::result::Result<i32,str> >] // cdb-check: [...] __...
// cdb-only // min-cdb-version: 10.0.18317.1001 // compile-flags:-g
<|file_name|>sort.js<|end_file_name|><|fim▁begin|>'use strict'; function getReferenceMatrix (matrix, direction) { return matrix.unflatten().rows.sort((r1, r2) => { return (r1[1] > r2[1] ? 1 : r1[1] < r2[1] ? -1 : 0) * (direction === 'desc' ? -1 : 1); }); } function simpleSort (matrix, direction) { const referenc...
const i2 = order.indexOf(v2); return i1 > i2 ? -1 : i1 < i2 ? 1 : 0; }); const mapper = originalValues.map(v => orderedValues.indexOf(v))
<|file_name|>inc_trading.js<|end_file_name|><|fim▁begin|>function trading_init(){ if (!this.trading){ //if (this.trading === undefined || this.trading === null){ this.trading = apiNewOwnedDC(this); this.trading.label = 'Trading'; this.trading_create_escrow_bag(); this.trading.currants = 0; } var escrow...
//
<|file_name|>server.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compl...
<|file_name|>fs_test.go<|end_file_name|><|fim▁begin|>// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package http_test import ( "bytes" "errors" "fmt" "io" "io/ioutil" "mime" "mime/multipart" "net" ...
"/index.html": indexFile, } ts := httptest.NewServer(FileServer(fs))
<|file_name|>cstyle.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python -tt # # Copyright (C) 2005-2017 Erik de Castro Lopo <erikd@mega-nerd.com> # # Released under the 2 clause BSD license. """ This program checks C code for compliance to coding standards used in libsndfile and other projects I run. """ import re impo...
cfile.close ()
<|file_name|>plot_conv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import matplotlib.pyplot as plt from math import sqrt from math import log<|fim▁hole|>dx = [1/sqrt(16), 1/sqrt(64), 1/sqrt(256), 1/sqrt(1024)] dx_tri = [1/sqrt(32), 1/sqrt(128), 1/sqrt(512), 1/sqrt(2048)] dx_pert = [0.0270466, 0.0134827, 0.00...
<|file_name|>_define-length-compiled.js<|end_file_name|><|fim▁begin|>'use strict'; module.exports = function (t, a) { var foo = 'raz', bar = 'dwa', fn = function fn(a, b) { return this + a + b + foo + bar; }, result; result = t(fn, 3); a(result.call('marko', 'el', 'fe'), 'markoelferazdwa', "Conte...
}; //# sourceMappingURL=_define-length-compiled.js.map
<|file_name|>optiondialog.hpp<|end_file_name|><|fim▁begin|>/* optiondialog.hpp * * Copyright (C) 2010 Martin Skowronski * * 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 o...
}
<|file_name|>test-fs-write.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 without restriction, in...
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE.
<|file_name|>RepositoryUtils.java<|end_file_name|><|fim▁begin|>package velir.intellij.cq5.util; import javax.jcr.Node; import javax.jcr.NodeIterator; import javax.jcr.RepositoryException; import javax.jcr.Session; import java.util.ArrayList; import java.util.List; /** * Utility class for helping work with Repository...
* @throws RepositoryException */ public static NodeIterator getAllNodeTypes(Session session) throws RepositoryException { //get our node types root
<|file_name|>symboltablemanager.cpp<|end_file_name|><|fim▁begin|>/* author: dongchangzhang */ /* time: Thu Apr 20 14:48:28 2017 */ #include "symboltablemanager.h" #include <iostream> SymbolTableManager::SymbolTableManager() { main_table = do_create_new_table(START_INDEX); cursor = main_table; } addr_type Symb...
int SymbolTableManager::get_int(addr_type& addr)
<|file_name|>custom_association_rules.py<|end_file_name|><|fim▁begin|>import sys sys.path.append("..") from data_mining.association_rule.base import rules, lift, support from data_mining.association_rule.apriori import apriori from data_mining.association_rule.liftmin import apriorilift from pat_data_association_rules...
<|file_name|>one.py<|end_file_name|><|fim▁begin|>""" 1.0 version of the API. """ from sharrock.descriptors import Descriptor version = '1.0' class MultiversionExample(Descriptor):<|fim▁hole|> """ This is the first version of this particular function. """<|fim▁end|>
<|file_name|>cmd_form.go<|end_file_name|><|fim▁begin|>package handler import ( "errors" "fmt" "html" "net/http" "strings" "github.com/HouzuoGuo/laitos/daemon/httpd/middleware" "github.com/HouzuoGuo/laitos/lalog" "github.com/HouzuoGuo/laitos/toolbox" ) const HandleCommandFormPage = `<html> <head> <title>C...
}
<|file_name|>passport.js<|end_file_name|><|fim▁begin|>/** * Passport configuration * * This is the configuration for your Passport.js setup and where you * define the authentication strategies you want your application to employ. * * I have tested the service with all of the providers listed below - if you * com...
name: 'Google',
<|file_name|>long.serializer.inc.js<|end_file_name|><|fim▁begin|>module.exports = function ({ serializers, $lookup }) { serializers.inc.object = function () { return function (object, $step = 0) { let $_, $bite return function $serialize ($buffer, $start, $end) { swi...
return { start: $start, serialize: null } } } } ()
<|file_name|>test_visitors.py<|end_file_name|><|fim▁begin|>"""Unit-tests for `tree.visitors` """ from py2c import tree from py2c.tree import visitors from py2c.tests import Test, data_driven_test from nose.tools import assert_equal # TEST:: Add non-node fields # ====================================================...
<|file_name|>package-info.java<|end_file_name|><|fim▁begin|>// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon ...
// Generated on: 2014.05.14 at 05:14:09 PM CDT //
<|file_name|>relaycontrol.py<|end_file_name|><|fim▁begin|>import paho.mqtt.client as mqtt import json, time import RPi.GPIO as GPIO from time import sleep # The script as below using BCM GPIO 00..nn numbers GPIO.setmode(GPIO.BCM) # Set relay pins as output GPIO.setup(24, GPIO.OUT) # ----- CHANGE THESE FOR YOUR SE...
print("\nConnected with result code " + str(rc) + "\n")
<|file_name|>transit.rs<|end_file_name|><|fim▁begin|>#[derive(Debug, Clone)] pub struct Transit {<|fim▁hole|> duration: f64, decay: f64, phase: f64, } impl Transit { pub fn new((period, base, depth, duration, decay, phase): (f64,f64,f64,f64,f64,f64)) -> Transit { Transit { period, base, depth, d...
period: f64, base: f64, depth: f64,
<|file_name|>name.py<|end_file_name|><|fim▁begin|>from operator import attrgetter from plyj.model.source_element import Expression from plyj.utility import assert_type class Name(Expression): simple = property(attrgetter("_simple")) value = property(attrgetter("_value")) def __init__(self, value): ...
self._simple = False if isinstance(name, Name): self._value = self._value + '.' + name._value
<|file_name|>TestNativeAtanh.rs<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www...
<|file_name|>segaxbd.cpp<|end_file_name|><|fim▁begin|>// license:BSD-3-Clause // copyright-holders:Aaron Giles /*************************************************************************** Sega X-board hardware Special thanks to Charles MacDonald for his priceless assistance **********************************...
<|file_name|>euler3.py<|end_file_name|><|fim▁begin|>import time start = time.time() def prime_factors(n): l = [] i = 2 while n != 1: if n % i == 0: l.append(i) while n % i == 0: n = n // i i += 1 return l print(prime_factors(600851475143)[-1]...
print("time elapsed:", elapsed, "seconds")
<|file_name|>sv.extra.js<|end_file_name|><|fim▁begin|>// Validation errors messages for Parsley // Load this after Parsley Parsley.addMessages('sv', {<|fim▁hole|><|fim▁end|>
dateiso: "Ange ett giltigt datum (ÅÅÅÅ-MM-DD)." });
<|file_name|>input.webcomponent.js<|end_file_name|><|fim▁begin|>module.exports = MnInputCustomElement() function MnInputCustomElement() { const supportsCustomElements = 'customElements' in window if (!supportsCustomElements) {<|fim▁hole|> window.customElements.define('mn-input', require('./input.class.js')) ...
require('@webcomponents/custom-elements') } if (!window.customElements.get('mn-input')) {
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>""" This component provides HA sensor support for Ring Door Bell/Chimes. For more details about this platform, please refer to the documentation at<|fim▁hole|>import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from h...
https://home-assistant.io/components/sensor.ring/ """ from datetime import timedelta
<|file_name|>SafePaste.js<|end_file_name|><|fim▁begin|><|fim▁hole|>//>>built define("dojox/editor/plugins/nls/zh-tw/SafePaste",({"instructions":"已停用直接貼上。請使用標準瀏覽器鍵盤或功能表貼上控制項,在這個對話框中貼上內容。當您滿意要插入的內容之後,請按貼上按鈕。若要中斷插入內容,請按取消按鈕。"}));<|fim▁end|>
<|file_name|>Quote.cpp<|end_file_name|><|fim▁begin|>/* Copyright (C) 2005 Kimmo Pekkola 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 of the License, or (at your op...
} }
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). <|fim▁hole|><|fim▁end|>
from . import test_purchase_delivery
<|file_name|>codeMarble_py3des.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from py3Des.pyDes import triple_des, ECB, PAD_PKCS5 class TripleDES: __triple_des = None @staticmethod def init(): TripleDES.__triple_des = triple_des('1234567812345678', ...
def encrypt(data): return TripleDES.__triple_des.encrypt(data)
<|file_name|>telnetserver.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012 Bastian Kleineidam # # 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 of the License, or # (at your...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010-2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # ...
<|file_name|>directive-template.js<|end_file_name|><|fim▁begin|>'use strict'; require('angular/angular'); angular.module('<%= name %>Module', []) .directive('<%= name %>', [ function() { return { restrict: 'E', replace: true,<|fim▁hole|> scope....
templateUrl: 'src/<%= name %>/<%= name %>.tpl.html', scope: {}, link: function(scope, element, attrs) {
<|file_name|>hfs_alt.py<|end_file_name|><|fim▁begin|>''' Copyright 2011 Jean-Baptiste B'edrune, Jean Sigwald Using New BSD License: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must reta...
f = HFSCompressedResourceFork(self, v.data.resourceFork, v.data.fileID, decmpfs.compression_type, decmpfs.uncompressed_size) data = f.readAllBuffer(True, output_file) if output_file: output_file.write(data)
<|file_name|>run_on_dates.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import sys import os.path<|fim▁hole|> """ Run snapstream reader script for several files and out a table of match counts. Example: $ python run_on_dates.py eg01china.c 2014-01-01 2014-07-01 """ def validate(date_string): try: d...
import datetime import subprocess import time
<|file_name|>SubscriptionMigrationTest.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2008-2020, Hazelcast, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License a...
final CountingMigrationListener migrationListener = new CountingMigrationListener(); instance1.getPartitionService().addMigrationListener(migrationListener); final PayloadMessageListener<String> listener0 = new PayloadMessageListener<String>();
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from datetime import timedelta, datetime from django.contrib import messages from django.contrib.contenttypes.models import ContentType from django.core.cache import cache from django.db import transaction from django.http import Http404 from django.http import HttpRe...
<|file_name|>ServiceItemResource.java<|end_file_name|><|fim▁begin|>/* * Claudia Project * http://claudia.morfeo-project.org * * (C) Copyright 2010 Telefonica Investigacion y Desarrollo * S.A.Unipersonal (Telefonica I+D) * * See CREDITS file for info about members and contributors. * * This program is free software; you...
/** * Handle GETS */
<|file_name|>dump-rename.js<|end_file_name|><|fim▁begin|>#!/usr/bin/env node var JavaScriptBuffer = require('../type-inference'), fs = require('fs'), clc = require('cli-color'); var filename = process.argv[2]; var text = fs.readFileSync(filename, {encoding:"utf8"}); var lines = text.split(/\r?\n|\r/); var buff...
var line = lines[idx]; line = clc.black(line.substring(0,item.start.column)) +
<|file_name|>FloatRectCairo.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2010 Igalia S.L. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyrigh...
<|file_name|>three_d_earth.py<|end_file_name|><|fim▁begin|>from webalchemy import config FREEZE_OUTPUT = 'webglearth.html' class Earth: def __init__(self): self.width = window.innerWidth self.height = window.innerHeight # Earth params self.radius = 0.5 self.segments = 64...
<|file_name|>optimization_guide_web_contents_observer.cc<|end_file_name|><|fim▁begin|>// Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/optimization_guide/optimization_guide_web_c...
hints_target_urls_.clear(); return target_urls;
<|file_name|>test_setup.rs<|end_file_name|><|fim▁begin|>use std::os::raw; use std::ptr; use std::sync::Once; static START: Once = Once::new(); type SECStatus = raw::c_int; const SEC_SUCCESS: SECStatus = 0; // TODO: ugh this will probably have a platform-specific name... #[link(name = "nss3")] extern "C" { fn NSS_N...
0x04, 0x18, 0x94, 0x55, 0x0d, 0x07, 0x85, 0x93, 0x2e, 0x00, 0xea, 0xa2,
<|file_name|>rasterizer.rs<|end_file_name|><|fim▁begin|>use na::{Vector3, Vector4, Point3, Point4, Matrix3, Matrix4, Isometry3}; use na::{Norm, Diagonal, Inverse, Transpose}; use na; use std::path; use std::fs::File; use std::error::Error; use std::io::prelude::*; use std::f32; use std::i64; use std::f32::consts; use s...
let (_, camera, mesh) = mesh_by_idx(mesh_idx);
<|file_name|>__manifest__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2016 Onestein (<http://www.onestein.eu>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). {<|fim▁hole|> 'license': 'AGPL-3', 'depends': ['auth_oauth'], 'data': [ 'data/auth_oauth_data.xm...
'name': 'OAuth2 Disable Login with Odoo.com', 'version': '10.0.1.0.0', 'category': 'Tools', 'author': 'Onestein',
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::str; use std::u32; use std::fmt::Write;<|fim▁hole|> extern crate crypto; use crypto::md5::Md5; use crypto::digest::Digest; // It takes two hex digits to make a byte, so check // the first 2.5 bytes for zero values fn first_five_hex_zero(input: &[u8; 16]) -> bo...
<|file_name|>test_finite_field.py<|end_file_name|><|fim▁begin|>from crpyto_tool.libs.finite_field_op import FiniteFieldNumber if __name__ == '__main__': magical_number = FiniteFieldNumber(FiniteFieldNumber.magical_number, False)<|fim▁hole|> print 'Q5-(1):' + str(number2 - number3) number0 = FiniteFieldNumb...
print 'p(x): ' + str(magical_number) number2 = FiniteFieldNumber('0') number3 = FiniteFieldNumber('1000110')
<|file_name|>db_create.py<|end_file_name|><|fim▁begin|>from migrate.versioning import api from config import SQLALCHEMY_DATABASE_URI from config import SQLALCHEMY_MIGRATE_REPO from app import db import os.path db.create_all() if not os.path.exists(SQLALCHEMY_MIGRATE_REPO): api.create(SQLALCHEMY_MIGRATE_REPO, 'databas...
api.version_control(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO, api.version(SQLALCHEMY_MIGRATE_REPO))
<|file_name|>test_shapely_to_mpl.py<|end_file_name|><|fim▁begin|># (C) British Crown Copyright 2011 - 2012, Met Office # # This file is part of cartopy. # # cartopy 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 F...
exterior = np.array(shapely.geometry.box(0, 0, 12, 12).exterior.coords) interiors = [ np.array(shapely.geometry.box(1, 1, 2, 2, ccw=False).exterior.coords), np.array(shapely.geometry.box(1, 8, 2, 9, ccw=False).exterior.coords),