prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>make.js<|end_file_name|><|fim▁begin|>// Make screen : lists different control activities and allows to select which to use var MakeScreen = Screen.extend({ enter: function(){ // Display this screen this.display('make_screen'); // Setup button clicks this.html.fi...
screens.make = new MakeScreen();
<|file_name|>EXI_DeviceMemoryCard.cpp<|end_file_name|><|fim▁begin|>// Copyright 2008 Dolphin Emulator Project // Licensed under GPLv2+ // Refer to the license.txt file included. #include "Core/HW/EXI/EXI_DeviceMemoryCard.h" #include <array> #include <cstring> #include <memory> #include <string> #include "Common/Chun...
PanicAlertT("%s is not a directory, failed to move to *.original.\n Verify your " "write permissions or move the file outside of Dolphin",
<|file_name|>work_request_log_entry.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2016, 2018, 2019, Oracle and/or its affiliates. All rights reserved. // Code generated. DO NOT EDIT. // Object Storage Service API // // Common set of Object Storage and Archive Storage APIs for managing buckets, objects, and related ...
func (m WorkRequestLogEntry) String() string {
<|file_name|>asyncload.py<|end_file_name|><|fim▁begin|><|fim▁hole|>#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Shows how to use BitmapManager to asynchronously load a Bitmap from a file. Run this snippet providing a list of filenames of (high resolution) pictures: $ ./asyncload.py /path/to/mypics/*.jpg anotherp...
<|file_name|>parser.js<|end_file_name|><|fim▁begin|>'use strict'; if (/^((?!chrome).)*safari/i.test(navigator.userAgent)){ alert("We have detected you are using Safari. Please switch to Chrome or Firefox to properly use this app."); } var weekAbbrev = { Mo: "monday", Tu: "tuesday", We: "wednesday", ...
<|file_name|>defines_3.js<|end_file_name|><|fim▁begin|>var searchData= [ ['ime_5faddr_5fmax',['IME_ADDR_MAX',['../_a_p_i_8h.html#a6d369ee1e214daea8bf939aa817b5d00',1,'API.h']]], ['input',['INPUT',['../_a_p_i_8h.html#a1bb283bd7893b9855e2f23013891fc82',1,'API.h']]], ['input_5fanalog',['INPUT_ANALOG',['../_a_p_i_8h....
['interrupt_5fedge_5frising',['INTERRUPT_EDGE_RISING',['../_a_p_i_8h.html#a8bd8f2fe1b638ebff63e702d14880b12',1,'API.h']]] ];
<|file_name|>io.py<|end_file_name|><|fim▁begin|>import threading from ctypes import POINTER, Structure, byref, c_char, c_char_p, c_int, c_size_t from django.contrib.gis.geos.base import GEOSBase from django.contrib.gis.geos.libgeos import GEOM_PTR, GEOSFuncFactory from django.contrib.gis.geos.prototypes.errcheck impor...
# See https://trac.osgeo.org/geos/ticket/680. wkb = wkb[:-8] + b'\0' * 4 return six.memoryview(wkb)
<|file_name|>test_resource_flags.py<|end_file_name|><|fim▁begin|>import os import tempfile from rest_framework import status from hs_core.hydroshare import resource from .base import HSRESTTestCase class TestPublicResourceFlagsEndpoint(HSRESTTestCase): def setUp(self): super(TestPublicResourceFlagsEndp...
metadata_dict = [ {'description': {'abstract': 'My test abstract'}},
<|file_name|>test_bm_node.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012 NTT DOCOMO, INC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # htt...
memory_mb=2000, cpus=1, local_gb=1000) self.assertEqual(fn['pm_address'], '4') fn = db.bm_node_find_free(self.context, 'host2',
<|file_name|>updateShortReadParentCount.py<|end_file_name|><|fim▁begin|>import argparse import sys import logging import os import csv class ReadItem: def __init__(self, sequence, totalCount): self.Sequence = sequence self.TotalCount = totalCount self.SampleMap = {} class AnnotationItem: def __init__(...
shortReadFiles = []
<|file_name|>cholesky_op_test.py<|end_file_name|><|fim▁begin|>"""Tests for tensorflow.ops.tf.Cholesky.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.python.platform <|fim▁hole|>import tensorflow as tf class CholeskyOpTest(tf.test.Tes...
import numpy as np from six.moves import xrange # pylint: disable=redefined-builtin
<|file_name|>bibrank_tag_based_indexer_unit_tests.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Publi...
class TestListSetOperations(InvenioTestCase): """Test list set operations."""
<|file_name|>Scripting.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,shlex,shutil,traceback,errno,sys,stat from waflib import Utils,Configure,Logs,Options,ConfigSet,Context,E...
t=tarfile.open(self.get_arch_name())
<|file_name|>pibrellaMidi.py<|end_file_name|><|fim▁begin|>from mido import MidiFile from time import sleep import pibrella """ fade test pibrella.light.red.fade(0,100,10) sleep(11) pibrella.light.red.fade(100,0,10) sleep(11) """ """ start pibrella.buzzer.note(-9) sleep(.9) pibrella.buzzer.off() sleep(0.1) pibrella.bu...
""" fail
<|file_name|>daemon.go<|end_file_name|><|fim▁begin|>// Package daemon exposes the functions that occur on the host server // that the Docker daemon is running. // // In implementing the various functions of the daemon, there is often // a method-specific struct for configuring the runtime behavior. package daemon // im...
var pluginCli *containerd.Client // Windows is not currently using containerd, keep the
<|file_name|>h5_in_memory.py<|end_file_name|><|fim▁begin|>""" HDF5 in memory object Britton Smith <brittonsmith@gmail.com> """ import h5py import numpy as np import sys class H5InMemory(object): def __init__(self, fh): self.attrs = {} if fh is None: self.data = {} return ...
return "<H5InMemory Group object (%d items)>" % \
<|file_name|>OSimpleKeyIndexDefinitionTest.java<|end_file_name|><|fim▁begin|>package com.orientechnologies.orient.core.index; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.testng.Assert; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; ...
}
<|file_name|>timer.rs<|end_file_name|><|fim▁begin|>use libc::{uint32_t, c_void}; use std::mem; use sys::timer as ll; pub fn get_ticks() -> u32 { unsafe { ll::SDL_GetTicks() } } pub fn get_performance_counter() -> u64 { unsafe { ll::SDL_GetPerformanceCounter() } } pub fn get_performance_frequency() -> u64 { ...
#[test] fn test_timer_runs_multiple_times() { use std::sync::{Arc, Mutex};
<|file_name|>match_view.py<|end_file_name|><|fim▁begin|>import html import inflect import titlecase from flask import url_for from shared.pd_exception import DoesNotExistException from .. import APP, importing from ..data import match from ..view import View @APP.route('/match/<int:match_id>/') def show_match(matc...
raise DoesNotExistException() self.match = viewed_match
<|file_name|>issue-2735-3.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/li...
fn defer(b: &Cell<bool>) -> defer {
<|file_name|>match.rs<|end_file_name|><|fim▁begin|>// rustfmt-normalize_comments: true // Match expressions. fn foo() { // A match expression. match x { // Some comment. a => foo(), b if 0 < 42 => foo(), c => { // Another comment. // Comment. an_expressio...
_ => (),
<|file_name|>test_pdf_reader.py<|end_file_name|><|fim▁begin|># This file is part of rinohtype, the Python document preparation system. # # Copyright (c) Brecht Machiels. # # Use of this source code is subject to the terms of the GNU Affero General # Public License v3. See the LICENSE file or http://www.gnu.org/licenses...
def test_real(bytes_real, real): reader = PDFObjectReader(BytesIO(bytes_real)) result = reader.next_item() assert isinstance(result, cos.Real) and result == real
<|file_name|>release.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """SIP Flask Master Device package.""" import logging __subsystem__ = 'TangoControl' __service_name__ = 'FlaskMaster' __version_info__ = (1, 3, 0) __version__ = '.'.join(map(str, __version_info__)) __service_id__ = ':'.join(map(str, (__subsyst...
'__service_id__', 'LOG'
<|file_name|>utils.js<|end_file_name|><|fim▁begin|>/** * @summary Returns deep equality between objects * {@link https://gist.github.com/egardner/efd34f270cc33db67c0246e837689cb9} * @param obj1 * @param obj2 * @return {boolean} * @private */ export function deepEqual(obj1, obj2) { if (obj1 === obj2) { retu...
} } return true; }
<|file_name|>static_server.js<|end_file_name|><|fim▁begin|>var http = require("http"), url = require("url"), path = require("path"), fs = require("fs"), DS = "/"; var settings = { port: 8080, indexFile: "index.html", folder: { serverside: "serverside", client...
var static_server = http.createServer(function(request, response) { var uri = url.parse(request.url).pathname, filename;
<|file_name|>advanced_settings_menu.cpp<|end_file_name|><|fim▁begin|>/***************************** * advance_settings_menu.cpp * *****************************/ /**************************************************************************** * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * ...
#define INTERFACE_POS BTN_POS(1,5), BTN_SIZE(2,1) #define RESTORE_DEFAULTS_POS BTN_POS(1,6), BTN_SIZE(2,1) #define VELOCITY_POS BTN_POS(2,2), BTN_SIZE(1,1)
<|file_name|>test_summary2_unifiles.py<|end_file_name|><|fim▁begin|>import unittest, time, sys, random, math, getpass sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_import as h2i, h2o_util, h2o_browse as h2b, h2o_print as h2p import h2o_summ DO_TRY_SCIPY = False if getpass.getuser()=='kevin' or getp...
(None, 1.00, 2501.00, 5001.00, 7501.00, 10000.00), ('x', -100.00, -50.1, 0.974, 51.7, 100,00), ],
<|file_name|>hidden_submit_button.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright 2016 Google 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 * * http://www.apache.o...
<|file_name|>user_prompts.py<|end_file_name|><|fim▁begin|>from tests.support.asserts import assert_error, assert_dialog_handled from tests.support.fixtures import create_dialog from tests.support.inline import inline alert_doc = inline("<script>window.alert()</script>") def get_window_rect(session): return sess...
response = get_window_rect(session)
<|file_name|>0020_auto_20201213_2014.py<|end_file_name|><|fim▁begin|># Generated by Django 3.1.4 on 2020-12-13 20:14 import django.core.validators from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import django_ca.models class Migration(migrations.Migration): ...
<|file_name|>actionsAtoms.ts<|end_file_name|><|fim▁begin|>import { atom } from 'jotai'; import { Resource } from '../models';<|fim▁hole|>export const resourcesToCheckAtom = atom<Array<Resource>>([]); export const resourcesToDisacknowledgeAtom = atom<Array<Resource>>([]);<|fim▁end|>
export const selectedResourcesAtom = atom<Array<Resource>>([]); export const resourcesToAcknowledgeAtom = atom<Array<Resource>>([]); export const resourcesToSetDowntimeAtom = atom<Array<Resource>>([]);
<|file_name|>kane.py<|end_file_name|><|fim▁begin|>__all__ = ['Kane'] from sympy import Symbol, zeros, Matrix, diff, solve_linear_system_LU, eye from sympy.utilities import default_sort_key from sympy.physics.mechanics.essential import ReferenceFrame, dynamicsymbols from sympy.physics.mechanics.particle import Particle...
subdict = dict(zip(uaux + uauxdot, [0] * (len(uaux) + len(uauxdot))))
<|file_name|>states-int-test.js<|end_file_name|><|fim▁begin|>var flow = require('js-flow'), assert = require('assert'), tubes = require('evo-tubes'); describe('evo-states', function () { var TIMEOUT = 60000; var sandbox; beforeEach(function (done) { this.timeout(TIMEOUT); (sandbox...
this.waitForSync({ key: 'key' }, function (data, client, index) { return [0, 1].every(function (i) { var nodeVal = data.d[connector.clients[i].localId]; return nodeVal && nodeVal.d == 'val' + i;
<|file_name|>CommandObject.java<|end_file_name|><|fim▁begin|>/* * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public Lic...
<|file_name|>tables.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. */ //! Analyze tracing data for edenscm //! //! This is edenscm application specific. It's n...
} _ => {} } }
<|file_name|>particle.js<|end_file_name|><|fim▁begin|>define(['../lib/circle', '../lib/aura', './collision', '../lib/vector', '../lib/dictionary'],function(Circle, Aura, collision, Vector, Dictionary){ var Particle = function(world, options) { var options = options || {} Circle.call(this, options); //TODO: i...
Particle.prototype.setPosition = function(pos){ this.prevPosition = this.position || pos; this.constructor.prototype.setPosition.call(this, pos); };
<|file_name|>test_cython_optimize.py<|end_file_name|><|fim▁begin|>""" Test Cython optimize zeros API functions: ``bisect``, ``ridder``, ``brenth``, and ``brentq`` in `scipy.optimize.cython_optimize`, by finding the roots of a 3rd order polynomial given a sequence of constant terms, ``a0``, and fixed 1st, 2nd, and 3rd o...
def test_brentq_full_output():
<|file_name|>ipython_config.py<|end_file_name|><|fim▁begin|># Configuration file for ipython. c = get_config() # noqa: F821 c.Completer.use_jedi = False # ------------------------------------------------------------------------------ # InteractiveShellApp configuration # ---------------------------------------------...
# c.TerminalIPythonApp.force_interact = False
<|file_name|>declare.rs<|end_file_name|><|fim▁begin|>// https://rustbyexample.com/variable_bindings/declare.html // http://rust-lang-ja.org/rust-by-example/variable_bindings/declare.html fn main() { // Declare a variable binding let a_binding; { let x = 2; // Initialize the bindin...
// Error! Use of uninitialized binding // println!("another binding: {}", another_binding); // error[E0381]: use of possibly uninitialized variable: `another_binding`
<|file_name|>penguin_cli.py<|end_file_name|><|fim▁begin|>import click import os import penguin.pdf as pdf import penguin.utils as utils def check_src(src): if not all((map(utils.is_valid_source, src))): raise click.BadParameter("src arguments must be either a valid directory" ...
with open(dst, 'wb') as f: combined_pdf.write(f)
<|file_name|>test_nonlin.py<|end_file_name|><|fim▁begin|>""" Unit tests for nonlinear solvers Author: Ondrej Certik May 2007 """ from numpy.testing import assert_, dec, TestCase, run_module_suite from scipy.optimize import nonlin from numpy import matrix, diag, dot from numpy.linalg import inv import numpy as np SOL...
def test_broyden2(self): # Broyden methods solve linear systems exactly in 2*N steps self._check(nonlin.BroydenSecond(alpha=1.0), 20, 41, False) self._check(nonlin.BroydenSecond(alpha=1.0), 20, 41, True)
<|file_name|>clipgrab_si.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0" language="sl_SI"> <defaultcodec>UTF-8</defaultcodec> <context> <name>ClipGrab</name> <message> <location filename="clipgrab.cpp" line="37"/> <source>Automatic language ...
</message> <message> <location filename="mainwindow.ui" line="646"/> <source>Proxy settings</source>
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod renderer; mod render_cache; mod render_state; mod lexeme_mapper; mod line_numbers; mod scrollable_region; <|fim▁hole|>pub use self::render_state::RenderState; pub use self::lexeme_mapper::{LexemeMapper, MappedLexeme}; pub use self::line_numbers::LineNumbers; pub use ...
pub use self::renderer::BufferRenderer; pub use self::render_cache::RenderCache;
<|file_name|>conv.go<|end_file_name|><|fim▁begin|>package tempconv // CToF converts a Celsius temperature to Fahrenheit func CToF(c Celsius) Fahrenheit {<|fim▁hole|>// FToC converts s Fahrenheit temperature to Celsius func FToC(f Fahrenheit) Celsius { return Celsius((f - 32) * 5 / 9) }<|fim▁end|>
return Fahrenheit(c * 9 / 5 + 32) }
<|file_name|>LoadingView.js<|end_file_name|><|fim▁begin|>/** Loading progress view @class LoadingView @constructor @return {object} instantiated LoadingView **/<|fim▁hole|> var LoadingView = Backbone.View.extend({ /** Constructor @method initialize **/ initialize: fun...
define(['jquery', 'backbone'], function ($, Backbone) {
<|file_name|>unix.py<|end_file_name|><|fim▁begin|># Implements twisted-based UNIX domain socket transport import sys from twisted.internet import reactor from pysnmp.carrier.twisted.dgram.base import DgramTwistedTransport from pysnmp.carrier import error domainName = snmpLocalDomain = (1, 3, 6, 1, 2, 1, 100, 1, 13) c...
d and d.addCallback(lambda x: None) DgramTwistedTransport.closeTransport(self)
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from openpyxl import load_workbook from libs.xlsxInterface import getLevelTypes, travesalLevels import models from prettyprint import pp from functools import partial from django.db import transaction def generateLevels(levelDict, levelTypes, c...
levelType = levelTypes[index] if value not in currentDict:
<|file_name|>anchorGenerator.py<|end_file_name|><|fim▁begin|># anchorGenerator from models.anchor import * # main function if __name__=='__main__': # TEMP: Wipe existing anchors # anchors = Anchor.all(size=1000) # Anchor.delete_all(anchors) # THIS IS TEMPORARY: anchors = {'Vaccination', 'Vaccinations', 'Vaccine'...
<|file_name|>DiscoveredDeviceParent.java<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> * Copyright 2016 The OpenDCT 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...
<|file_name|>KeyParser.ts<|end_file_name|><|fim▁begin|>/** * KeyParser.ts * * Simple parsing logic to take vim key bindings / chords, * and return a normalized object. */ export interface IKey { character: string shift: boolean alt: boolean control: boolean meta: boolean } export interface IK...
chordParts.push("alt") }
<|file_name|>videoscraper.py<|end_file_name|><|fim▁begin|># -*- coding: UTF-8 -*- ''' videoscraper scraper for Exodus forks. Nov 9 2018 - Checked Updated and refactored by someone. Originally created by others. ''' import json, urllib, urlparse from resources.lib.modules import client<|fim▁hole|>from ...
<|file_name|>32.d.ts<|end_file_name|><|fim▁begin|>import * as React from "react"; import { CarbonIconProps } from "../../"; declare const MobileAdd32: React.ForwardRefExoticComponent<<|fim▁hole|><|fim▁end|>
CarbonIconProps & React.RefAttributes<SVGSVGElement> >; export default MobileAdd32;
<|file_name|>PathSimpleCopy.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- #*************************************************************************** #* * #* Copyright (c) 2015 Yorik van Havre <yorik@uncreated.net> * #* ...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
pub mod ray_tracer;
<|file_name|>issue-85943-no-suggest-unsized-indirection-in-where-clause.rs<|end_file_name|><|fim▁begin|>// Regression test for #85943: should not emit suggestions for adding // indirection to type parameters in where-clauses when suggesting // adding `?Sized`. struct A<T>(T) where T: Send; struct B(A<[u8]>);<|fim▁hole|...
//~^ ERROR the size for values of type pub fn main() { }
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import {flags} from '@heroku-cli/command' import {cli} from 'cli-ux' import BaseCommand from '../../../base'<|fim▁hole|> export default class EventsIndex extends BaseCommand { static description = 'list webhook events on an app' static examples = [ '$ heroku ...
<|file_name|>error.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Minio Python Library for Amazon S3 Compatible Cloud Storage, # (C) 2015, 2016, 2017 Minio, 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 ob...
<|file_name|>VisualLayers.ts<|end_file_name|><|fim▁begin|>// Work started at https://discourse.threejs.org/t/12503/35 import {Camera, Object3D, Renderer, Scene as ThreeScene, WebGLRenderer} from 'three' /** * Allows rendering objects into one ore more visual layers that are stacked on * top of each other. Think of ...
return layer }
<|file_name|>knearest.cpp<|end_file_name|><|fim▁begin|>/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If yo...
int buf_sz; void operator()( const cv::Range& range ) const {
<|file_name|>MedicalRoster.stories.js<|end_file_name|><|fim▁begin|>import React from "react"; import StorybookWrapper from "stories/helpers/storybookWrapper.js"; import baseProps from "stories/helpers/baseProps.js"; import Component, {<|fim▁hole|> export default { title: "Cards|Medical/MedicalRoster", }; export cons...
MEDICAL_ROSTER_CREW_SUB, MEDICAL_ROSTER_QUERY, MEDICAL_ROSTER_SUB, } from "components/views/MedicalRoster/index.js";
<|file_name|>CsvUpsertExecutor.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 y...
<|file_name|>websocket.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::cell::DomRefCell; use dom::bindings::cod...
atom!("close"),
<|file_name|>image_math.cpp<|end_file_name|><|fim▁begin|>/* * image_math.cpp * PHD Guiding * * Created by Craig Stark. * Copyright (c) 2006-2010 Craig Stark. * All rights reserved. * * This source code is distributed under the following "BSD" license * Redistribution and use in source and binar...
array[7] = img.ImageData[(x+1) + (y+1) * xsize];
<|file_name|>XMLparamPrint.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ demos reading HiST camera parameters from XML file """ from histutils.hstxmlparse import xmlparam from argparse import ArgumentParser if __name__ == "__main__": p = ArgumentParser() p.add_argument("fn", help="xml filename to ...
print(params)
<|file_name|>tokenize.test.js<|end_file_name|><|fim▁begin|>const assert = require('assert'); const md5 = require('blueimp-md5'); const createApp = require('../../lib'); describe('tokenize service', () => { it('tokenizes and stems', () => { const app = createApp(); const text = `what's the weather in vancouve...
<|file_name|>QuickSort.py<|end_file_name|><|fim▁begin|>""" Author: Maneesh Divana <mdaneeshd77@gmail.com> Interpreter: Python 3.6.8 Quick Sort Worst Case: O(n^2) Average Case: O(nlog n) Best Case: O(nlog n) """ from random import shuffle def partition(arr: list, left: int, right: int) -> int: """Partitions the g...
qsort(ARR, LEFT, RIGHT) print("\nSorted array:", ARR, "\n")
<|file_name|>handlebars.min.js<|end_file_name|><|fim▁begin|>hljs.registerLanguage("handlebars",(()=>{"use strict";function e(...e){ return e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null;var n })).join("")}return n=>{const a={ "builtin-name":"action bindattr collection component concat debugger each each-in g...
literal:"true false undefined null"}}),o={begin:/\(/,end:/\)/},m={
<|file_name|>window.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENS...
mainLayout->addWidget(penStyleComboBox, 4, 1); mainLayout->addWidget(penCapLabel, 3, 2, Qt::AlignRight);
<|file_name|>category.js<|end_file_name|><|fim▁begin|>/// <reference path="/Content/base/ro/js/rocms.helpers.js" /> /// <reference path="base.js" /> function mapCategoriesToIds(categories) { var result = $(categories).map(function () { return { heartId: this.heartId, childrenCatego...
self.childrenCategories.push(category); } else {
<|file_name|>json-ui.component.ts<|end_file_name|><|fim▁begin|>/* * Squidex Headless CMS * * @license<|fim▁hole|> * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. */ import { Component, Input } from '@angular/core'; import { FormGroup } from '@angular/forms'; import { FieldDto, JsonFieldProper...
<|file_name|>request_headers.rs<|end_file_name|><|fim▁begin|>use std::fmt::{self}; use header; /// The `Access-Control-Request-Headers` request header, /// part of [CORS](http://www.w3.org/TR/cors/). /// /// > The `Access-Control-Request-Headers` header indicates which headers will /// > be used in the actual request...
fn parse_header(raw: &[Vec<u8>]) -> Option<AccessControlRequestHeaders> { header::parsing::from_comma_delimited(raw).map(AccessControlRequestHeaders) }
<|file_name|>QuestionService.ts<|end_file_name|><|fim▁begin|>import Promise = require('bluebird'); import _ = require("underscore"); import CategoryRepository = require("./../datagateway/repository/CategoryRepository"); import ICategoryRepository = require("./../datagateway/repository/ICategoryRepository"); import IQ...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 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, either version...
extern crate rlp; extern crate ethcore; extern crate ethcore_bigint as bigint;
<|file_name|>variance-regions-direct.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.ap...
struct Test3<'a, 'b, 'c> { //~ ERROR regions=[[+, +, +];[];[];[]] x: extern "Rust" fn(&'a int), y: extern "Rust" fn(&'b [int]), c: extern "Rust" fn(&'c str),
<|file_name|>rfc3414.py<|end_file_name|><|fim▁begin|># # This file is part of pyasn1-modules software. # # Copyright (c) 2005-2017, Ilya Etingof <etingof@gmail.com> # License: http://pyasn1.sf.net/license.html # # SNMPv3 message syntax #<|fim▁hole|>from pyasn1.type import constraint from pyasn1.type import namedtype fr...
# ASN.1 source from: # http://www.ietf.org/rfc/rfc3414.txt #
<|file_name|>views.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # # Created on 2013-10-11 # # @author: Bartosz Nowak sztosz@gmail.com # # This file is licensed GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 from __future__ import unicode_literals import unicodecsv from datetime import...
report.user = self.request.user report.save() return super(DamageReportsCreate, self).form_valid(form)
<|file_name|>winston-syslog.js<|end_file_name|><|fim▁begin|>/* * syslog.js: Transport for logging to a remote syslog consumer * * (C) 2011 Squeeks and Charlie Robbins * MIT LICENCE * */ var dgram = require('dgram'), net = require('net'), util = require('util'), glossy = require('glossy'), winston...
// this.connected = false;
<|file_name|>anoncreds.rs<|end_file_name|><|fim▁begin|>use futures::Future; use serde_json; use serde_json::{map::Map, Value}; use indy::{anoncreds, blob_storage, ledger}; use time; use settings; use utils::constants::{LIBINDY_CRED_OFFER, REQUESTED_ATTRIBUTES, PROOF_REQUESTED_PREDICATES, ATTRS, REV_STATE_JSON}; use ut...
pub fn build_cred_def_request(issuer_did: &str, cred_def_json: &str) -> VcxResult<String> { if settings::indy_mocks_enabled() {
<|file_name|>borrowck-uniq-via-lend.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.apa...
let mut v = box 3i;
<|file_name|>thread_pool.cpp<|end_file_name|><|fim▁begin|>#include <ncore/sys/wait.h> #include "thread_pool.h" namespace ncore { ThreadPool::ThreadPool() : work_threads_(), running_(0) { exec_proc_.Register(this, &ThreadPool::DoJobs); } ThreadPool::~ThreadPool() { fini(); } bool Thre...
<|file_name|>TemplateTest.py<|end_file_name|><|fim▁begin|>"""Fonctionnal testing for "Python In HTML" (PIH) and "HTML In Python" (HIP). """ __author__ = "Didier Wenzek (didier.wenzek@free.fr)" # The code under test is in the .. directory. import sys sys.path.append('..') # We use the Python unit testing framework imp...
def test_PIH_PrintValue(self): """<%= an %> tags are used to print python value."""
<|file_name|>check-rpc-mappings.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2009-2019 The Bitcoin Core developers # Copyright (c) 2014-2019 The DigiByte Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-...
# Source file (relative to root) containing conversion mapping
<|file_name|>recordio.hpp<|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 the ...
true)) {}
<|file_name|>multi_settings_source_test.go<|end_file_name|><|fim▁begin|>package infrastructure_test import ( "errors" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "github.com/cloudfoundry/bosh-agent/infrastructure" fakeinf "github.com/cloudfoundry/bosh-agent/infrastructure/fakes" boshsettings "githu...
BeforeEach(func() { source1.PublicKeyErr = nil })
<|file_name|>hash.py<|end_file_name|><|fim▁begin|>''' Copyright (C) 2016-2019 Vanessa Sochat. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your opti...
else: file_filter = get_level(level,version=version,
<|file_name|>PageStoreSpec.js<|end_file_name|><|fim▁begin|>describe('paging', function(){ var welcomeHolder = app.PageStore.welcome; var roomsHolder = app.PageStore.rooms; beforeEach(function(){ app.PageStore.welcome = welcomeHolder; app.PageStore.rooms = roomsHolder; }); it('should have a welcome ...
<|file_name|>DMF.py<|end_file_name|><|fim▁begin|>#coding:utf8 from baseclass.DeepRecommender import DeepRecommender import numpy as np from random import choice,random,randint,shuffle from tool import config import tensorflow as tf #According to the paper, we only class DMF(DeepRecommender): def __init__(self,co...
userList = self.data.user.keys()
<|file_name|>confirm_donation.js<|end_file_name|><|fim▁begin|>angular.module('bhima.controllers') .controller('ConfirmDonationController', ConfirmDonationController); ConfirmDonationController.$inject = [ '$scope', '$q', '$http', 'validate', 'connect', '$location', 'uuid', 'SessionService' ]; function ConfirmDonati...
<|file_name|>test_deconvolution.cpp<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright 2018 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
conv_desc, *eng); auto conv = convolution_forward(conv_primitive_desc, conv_src->get(), weights_tr, conv_dst.get());
<|file_name|>urlPathHttpMatcher_test.go<|end_file_name|><|fim▁begin|>//Copyright (C) 2015 dhrapson //This program is free software: you can redistribute it and/or modify //it under the terms of the GNU General Public License as published by //the Free Software Foundation, either version 3 of the License, or //(at your...
result := matcher.MatchUrlPath("/abc/def") Expect(result).To(BeTrue()) })
<|file_name|>AtMostXVerificationTest.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockitousage.verification; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert....
} catch (NoInteractionsWanted e) {
<|file_name|>sockopt_unix.go<|end_file_name|><|fim▁begin|>// Copyright 2021 The etcd 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/LICEN...
"golang.org/x/sys/unix" )
<|file_name|>attrib32.C<|end_file_name|><|fim▁begin|>// PR c++/35315 typedef union { int i; } U __attribute__((transparent_union)); static void foo(U) {} static void foo(int) {} void bar() {<|fim▁hole|>} typedef union U1 { int i; } U2 __attribute__((transparent_union)); // { dg-warning "ignored" } static void foo2...
foo(0);
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate log; extern crate env_logger; extern crate yak_client; extern crate capnp; extern crate log4rs; extern crate rusqlite; extern crate byteorder; #[cfg(test)] extern crate quickcheck; #[cfg(test)] extern crate rand; use std::default::Default; use...
&ServerError::DownstreamError(ref e) => e.description(),
<|file_name|>main.py<|end_file_name|><|fim▁begin|>"""Main entry points for scripts.""" from __future__ import print_function, division from argparse import ArgumentParser from collections import OrderedDict from copy import copy from datetime import datetime import glob import json import logging import math import o...
xctrbounds[nonrefs], snctrbounds) # put fitted results back in parameter lists.
<|file_name|>minesweeper.js<|end_file_name|><|fim▁begin|>/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(ins...
/******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
<|file_name|>ClusterProcessHasLabelsId.java<|end_file_name|><|fim▁begin|>package com.silicolife.textmining.core.datastructures.dataaccess.database.dataaccess.implementation.model.core.entities; // Generated 23/Mar/2015 16:36:00 by Hibernate Tools 4.3.1 import javax.persistence.Column; import javax.persistence.Embedda...
if (!(other instanceof ClusterProcessHasLabelsId)) return false; ClusterProcessHasLabelsId castOther = (ClusterProcessHasLabelsId) other;
<|file_name|>maintenance.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 Outbrain 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 http://www.apache.org/licenses/LICENSE-2....
IsActive bool Owner string
<|file_name|>para_training_local.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # setup of the grid parameters # default queue used for training training_queue = { 'queue':'q1dm', 'memfree':'16G', 'pe_opt':'pe_mth 2', 'hvmem':'8G', 'io_big':True } <|fim▁hole|> # number of audio files that one job should prepro...
# the queue that is used solely for the final ISV training step isv_training_queue = { 'queue':'q1wm', 'memfree':'32G', 'pe_opt':'pe_mth 4', 'hvmem':'8G' }
<|file_name|>WebMapTileServiceImageryProvider.js<|end_file_name|><|fim▁begin|>/*global define*/ define([ '../Core/combine', '../Core/Credit', '../Core/defaultValue', '../Core/defined', '../Core/defineProperties', '../Core/DeveloperError', '../Core/Event', ...