prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>QueryPipeline.java<|end_file_name|><|fim▁begin|>/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.semantic.swing.tree.querybuilder; import java.util.ArrayList; import java.util.List;<|fim▁hole|>import org.apache.lucene.search.BooleanQuery; impo...
<|file_name|>check_mesos_active_frameworks.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright 2015-2016 Yelp 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:/...
<|file_name|>view.js<|end_file_name|><|fim▁begin|>// Ember.assert, Ember.deprecate, Ember.warn, Ember.TEMPLATES, // jQuery, Ember.lookup, // Ember.ContainerView circular dependency // Ember.ENV import Ember from 'ember-metal/core'; import create from 'ember-metal/platform/create'; import Evented from "ember-runtime/mi...
_controllerDidChange: observer('controller', function() { if (this.isDestroying) { return; }
<|file_name|>config.py<|end_file_name|><|fim▁begin|>import logging import socket from unipath import Path class BaseConfig(object): DEBUG = False TESTING = False LOG_LEVEL = logging.INFO SITE_ROOT = Path(__file__).absolute().parent STDNET_DB_URL = "redis://localhost:6379?db=0" GEOIP_DB_URL_IP...
<|file_name|>sql_table_builder.cc<|end_file_name|><|fim▁begin|>// Copyright 2016 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 "components/password_manager/core/browser/sql_table_builder.h" #include <algorith...
// Check there is no index in the current version that references |old_name|. DCHECK(std::none_of(indices_.begin(), indices_.end(),
<|file_name|>lemkelcp.py<|end_file_name|><|fim▁begin|>import numpy as np class lemketableau: def __init__(self,M,q,maxIter = 100): n = len(q) self.T = np.hstack((np.eye(n),-M,-np.ones((n,1)),q.reshape((n,1)))) self.n = n self.wPos = np.arange(n) self.zPos = np.arange(n,2*n) ...
if i != ind: b = self.T[i,-2] self.T[i] -= b * self.T[ind]
<|file_name|>CurrentCourseStore.spec.js<|end_file_name|><|fim▁begin|>'use strict'; var CurrentCourseStore = require('../../../js/stores/CurrentCourseStore'); var CourseActions = require('../../../js/actions/CourseActions'); require('../../../utils/createAuthenticatedSuite')('Store: CurrentCourse', function() { ...
it('should load a course on action', function(done) { CourseActions.openCourse(1, function(err) { (err === null).should.be.true; // jshint ignore:line CurrentCourseStore.course.should.be.instanceOf(Object);
<|file_name|>admin.menus.edit.js<|end_file_name|><|fim▁begin|>/* globals Mustache */ var NAILS_Admin_CMS_Menus_Create_Edit; NAILS_Admin_CMS_Menus_Create_Edit = function(items) { /** * Avoid scope issues in callbacks and anonymous functions by referring to `this` as `base` * @type {Object} */ var ...
<|file_name|>SmelterRecipeHandler.java<|end_file_name|><|fim▁begin|>package mcjty.deepresonance.jei.smelter; import mezz.jei.api.recipe.IRecipeWrapper; import javax.annotation.Nonnull; public class SmelterRecipeHandler implements mezz.jei.api.recipe.IRecipeHandler<SmelterRecipeWrapper> { private final String id...
} @Nonnull
<|file_name|>MountDirectories.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # MountDirectories.py: this file is part of the GRS suite # Copyright (C) 2015 Anthony G. Basile # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Lice...
# This is useful for tmpfs filesystems. tmp = list(mount.values()) tmp = tmp[0]
<|file_name|>procfs.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This software may be used and distributed according to the terms of the * GNU General Public License version 2. */ //! Measurement based on procfs (/proc) use super::Bytes; use super::Measure; /// Mea...
let rchar_overhead = io_str.len() as u64;
<|file_name|>industrial_dual_analog_in.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Industrial Dual Analog In Plugin Copyright (C) 2015 Olaf Lüke <olaf@tinkerforge.com> Copyright (C) 2015-2016 Matthias Bolte <matthias@tinkerforge.com> industrial_dual_analog_in.py: Industrial Dual Analog In Plugin Implem...
<|file_name|>box.ts<|end_file_name|><|fim▁begin|>import { Proxy, LambdaProxy } from "../../../src"; import { BoxApi, Box } from "../api/box";<|fim▁hole|> public async produce(type: string): Promise<Box> { return this.proxy(this.produce, arguments); } }<|fim▁end|>
@Proxy(BoxApi) export class BoxProxy extends LambdaProxy implements BoxApi {
<|file_name|>bindless.rs<|end_file_name|><|fim▁begin|>/*! Without bindless textures, using a texture in a shader requires binding the texture to a specific bind point before drawing. This not only slows down rendering, but may also prevent you from grouping multiple draw calls into one because of the limitation to the...
} }
<|file_name|>environment.py<|end_file_name|><|fim▁begin|>import yaml from os import makedirs from os.path import join,dirname,realpath,isdir script_dir = dirname(realpath(__file__)) default_yml_filepath = join(script_dir,'defaults.yml') defaults = { "output_dir": 'output', "header_img_dir": 'imgs/headers/', ...
<|file_name|>rollup.config.js<|end_file_name|><|fim▁begin|>"use strict"; import clear from "rollup-plugin-clear"; import resolve from "rollup-plugin-node-resolve"; import commonjs from "rollup-plugin-commonjs"; import typescript from "rollup-plugin-typescript2"; import screeps from "rollup-plugin-screeps"; let cfg; c...
plugins: [ clear({ targets: ["dist"] }), resolve(),
<|file_name|>_tensorflow.py<|end_file_name|><|fim▁begin|>""" Module containing functions to differentiate functions using tensorflow. """ try: import tensorflow as tf from tensorflow.python.ops.gradients import _hessian_vector_product except ImportError: tf = None from ._backend import Backend, assert_back...
if isinstance(objective, tf.Tensor): if (argument is None or not
<|file_name|>run.py<|end_file_name|><|fim▁begin|>""" Current driven domain-wall motion with constant current and spin accumulation. """ # Copyright (C) 2011-2015 Claas Abert # # This file is part of magnum.fe. # # magnum.fe is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate postgres; use postgres::stmt::Statement; use postgres::types::ToSql; use postgres::rows::{Row, Rows}; use postgres::error::Error; use std::marker::PhantomData; use std::iter::Iterator; pub trait FromRow { fn from_row<'a>(row: &Row<'a>) -> Self; } pub...
}
<|file_name|>submit.agts.py<|end_file_name|><|fim▁begin|>def agts(queue): d = queue.add('dipole.py', ncpus=4, walltime=60)<|fim▁hole|><|fim▁end|>
queue.add('plot.py', deps=d, ncpus=1, walltime=10, creates=['zero.png', 'periodic.png', 'corrected.png', 'slab.png']) queue.add('check.py', deps=d, ncpus=1, walltime=10)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|># Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under t...
#
<|file_name|>db.py<|end_file_name|><|fim▁begin|># Copyright 2015-2016 Hewlett Packard Enterprise Development Company, LP # # 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...
if not available_pools: LOG.error("No default pools available")
<|file_name|>test_dhcp_rpc_agent_api.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013 Red Hat, 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/L...
def test__schedule_network_no_new_agents(self): network = {'id': 'foo_net_id'} self._test__schedule_network(network,
<|file_name|>dictTest.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import print_function, absolute_import, division from builtins import str import sys import unittest import re import os dirname = os.path.dirname(__file__) sys.path.insert(0, os.path.join(dirname, '..', '..', '..')) import u...
elif isinstance(item1, list):
<|file_name|>autonomousEventsHandling.js<|end_file_name|><|fim▁begin|>function autonomous_start() { autonomousStartTime = gameVideo.currentTime; initializeEvents();<|fim▁hole|>}<|fim▁end|>
<|file_name|>index.js<|end_file_name|><|fim▁begin|>'use strict'; var path = require('path'); var mergeTrees = require('broccoli-merge-trees'); var SassCompiler = require('../broccoli-sass'); function SASSPlugin() { this.name = 'ember-cli-sass'; this.ext = ['scss', 'sass']; } SASSPlugin.prototype.toTree = functio...
setupPreprocessorRegistry: function(type, registry) { registry.add('css', new SASSPlugin()); },
<|file_name|>workspaceloader.py<|end_file_name|><|fim▁begin|># Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifi...
<|file_name|>FontProperties.ts<|end_file_name|><|fim▁begin|>export type FontProperties = { fontVariant?: string, fontStretch?: string,<|fim▁hole|> fontWeight?: string | number, fontStyle?: string, unicodeRange?: string, };<|fim▁end|>
<|file_name|>gui_helper.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # -*- coding: utf-8 -*- # # gui_helper.py - # Copyright 2013 Tomas Hozza <thozza@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # t...
def widget_override_color(widget, color_string=None): if color_string: widget.override_color(Gtk.StateFlags.NORMAL,
<|file_name|>ndb_lib_move_data.hpp<|end_file_name|><|fim▁begin|>/* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 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; vers...
int code; char message[512]; NdbError ndberror; // valid if code > 0 bool is_temporary() const;
<|file_name|>models.py<|end_file_name|><|fim▁begin|># encoding: utf-8 # Copyright 2011 Tree.io Limited # This file is part of Treeio. # License www.tree.io/license """ Sales module objects. """ from django.core.urlresolvers import reverse from django.db import models from treeio.core.models import Object, User, Modu...
return sum def update_total(self): self.get_total()
<|file_name|>directives.js<|end_file_name|><|fim▁begin|>(function () { 'use strict'; var directives = angular.module('data-services.directives', []), relationshipFormatter = function(cellValue, options, rowObject) { var i, result = '', field; for (i = 0; i < rowObject.fields.le...
'Accept': 'application/x-www-form-urlencoded', 'Content-Type': 'application/x-www-form-urlencoded'
<|file_name|>vgg16.py<|end_file_name|><|fim▁begin|>from __future__ import division, print_function import os, json from glob import glob import numpy as np from scipy import misc, ndimage from scipy.ndimage.interpolation import zoom import keras from keras import backend as K from keras.layers.normalization import Ba...
model.add(MaxPooling2D((2, 2), strides=(2, 2)))
<|file_name|>try_except_finally.py<|end_file_name|><|fim▁begin|>''' c++ finally ''' def myfunc(): b = False try: print('trying something that will fail...') print('some call that fails at runtime') f = open('/tmp/nosuchfile') except: print('got exception') finally: print('finally cleanup') b = True T...
<|file_name|>protobuf_gen.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, ...
sources_by_base[base].add(source) return sources_by_base
<|file_name|>ScanGrid.ts<|end_file_name|><|fim▁begin|>/** * Copyright 2016 Jim Armstrong (www.algorithmist.net) * * Licensed under the Apache License, Version 2.0 (the "License"); <|fim▁hole|> * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distribut...
* 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
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/** * Export exceptions * @type {Object}<|fim▁hole|>module.exports = { Schema: require('./Schema'), Value: require('./Value') }<|fim▁end|>
*/
<|file_name|>Khmer-Symbols-code-points.js<|end_file_name|><|fim▁begin|>// All code points in the Khmer Symbols block as per Unicode v5.0.0: [ 0x19E0, 0x19E1, 0x19E2, 0x19E3, 0x19E4, 0x19E5, 0x19E6, 0x19E7, 0x19E8, 0x19E9, 0x19EA, 0x19EB, 0x19EC, 0x19ED, 0x19EE, 0x19EF, 0x19F0, 0x19F1, 0x19F2, 0x19F3...
<|file_name|>ClientProducer.java<|end_file_name|><|fim▁begin|>package com.nutcore.nut.correlationid; import javax.enterprise.inject.Produces; import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; /** * Created by davidecerbo on 14/11/2016. */ public class ClientProducer<|fim▁hole|> { ...
{ @Produces public Client newClient()
<|file_name|>mozmap.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/. */ //! The `MozMap` (open-ended dictionary) type. use dom::bindi...
<|file_name|>StatisticsPlusPlusTest.java<|end_file_name|><|fim▁begin|>package org.opencompare; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.net.URI; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util....
for (int k=0;k<occurences.length;k++){ double percent = occurences[k]/values.size();
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::collections::{HashSet, HashMap}; use std::env; use std::fmt; use std::fs::File; use std::io; use std::io::{Read, BufReader, Write}; use std::process::exit; use failure::{Fallible, bail, ensure, ResultExt}; use csv; fn main() { let argv: Vec<String> = env::...
a 4197777065174346899 2162 1 a 4197777065174346897 2163 1082 a 1041598151317810622 1082 39 a 1041598151317810620 1121 1121
<|file_name|>nested-attribute.js<|end_file_name|><|fim▁begin|>//On page load // TODO - remove nonconflict stuff once prototype is gone for good var $j = jQuery.noConflict(); replace_ids = function(s){ var new_id = new Date().getTime(); return s.replace(/NEW_RECORD/g, new_id); } $j(function() { $j('a[id*=neste...
var template = $j(this).attr('href').replace(/.*#/, ''); html = replace_ids(eval(template)); $j('#ul-' + $j(this).attr('id')).append(html);
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ tests.contrib ~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the contrib modules. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details.<|fim▁hole|><|fim▁end|>
"""
<|file_name|>libxml2_example_test.go<|end_file_name|><|fim▁begin|>package libxml2_test import ( "log" "net/http" "github.com/lestrrat/go-libxml2" "github.com/lestrrat/go-libxml2/parser" "github.com/lestrrat/go-libxml2/types" "github.com/lestrrat/go-libxml2/xpath" ) func ExampleXML() { res, err := http.Get("ht...
} }
<|file_name|>MeanDifferenceMedianMovement.java<|end_file_name|><|fim▁begin|>package madsdf.ardrone.controller.neuralnet; import com.google.common.eventbus.EventBus; import java.util.Arrays; import java.util.LinkedList; import java.util.ListIterator; import madsdf.shimmer.gui.AccelGyro; /** * Movement model ...
}
<|file_name|>reflectionblock.py<|end_file_name|><|fim▁begin|># =========================================================================== # eXe <|fim▁hole|># 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 Softwa...
# Copyright 2004-2006, University of Auckland #
<|file_name|>0009_snippet_client_options.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django_mysql.models class Migration(migrations.Migration): dependencies = [<|fim▁hole|> migrations.AddField( ...
('base', '0008_auto_20160331_1405'), ] operations = [
<|file_name|>adapters.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 The Grin Developers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENS...
<|file_name|>pipeline.py<|end_file_name|><|fim▁begin|>import json import logging import inspect from .decorators import pipeline_functions, register_pipeline from indra.statements import get_statement_by_name, Statement logger = logging.getLogger(__name__) class AssemblyPipeline(): """An assembly pipeline that...
... Phosphorylation(braf, map2k1)]
<|file_name|>config.py<|end_file_name|><|fim▁begin|>""" Set the configuration variables for fabric recipes. """<|fim▁hole|>env.warn_only = True try: import ConfigParser as cp except ImportError: import configparser as cp # Python 3.0 config = {} _config = cp.SafeConfigParser() if not os.path.isfile("fabri...
from fabric.api import env from fabric.colors import yellow import os
<|file_name|>basemanager.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals import json import requests import six from datetime import datetime from six.moves.urllib.parse import parse_qs from xml.etree.ElementTree import Element, SubElement, tostring from xml.parsers.expat import ExpatError fro...
"Expected the API to say OK but received %s" % data["Status"]
<|file_name|>jquery.ui.effect-transfer.js<|end_file_name|><|fim▁begin|>/*! * jQuery UI Effects Transfer 1.10.1 * http://jqueryui.com * * Copyright 2013 jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/transfer-effect/ * ...
endPosition = target.offset(), animation = { top: endPosition.top - fixTop ,
<|file_name|>type_alias.go<|end_file_name|><|fim▁begin|>package main import ( "log" "github.com/xitongsys/parquet-go-source/local" "github.com/xitongsys/parquet-go/parquet" "github.com/xitongsys/parquet-go/reader" "github.com/xitongsys/parquet-go/writer" ) type NameString string type AgeInt int32 type Student ...
<|file_name|>os.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2015 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/license...
}
<|file_name|>reference.ts<|end_file_name|><|fim▁begin|>// get around horrible TypeScript output ordering /// <reference path="src/main/ts/Animation/IAnimation.ts" /> /// <reference path="src/main/ts/Animation/AbstractAnimation.ts" /> /// <reference path="src/main/ts/MVP/IModel.ts" /> /// <reference path="src/main/ts/...
/// <reference path="src/main/ts/MVP/Error/IErrorModel.ts" /> /// <reference path="src/main/ts/MVP/Error/IRetryErrorModel.ts" /> /// <reference path="src/main/ts/MVP/Form/CompositeFormSubmitModel.ts" />
<|file_name|>project_issue.py<|end_file_name|><|fim▁begin|>#-*- coding: utf-8 -*- from openerp.osv import fields, osv <|fim▁hole|> _columns = { 'project_issue_solution_id': fields.many2one('project.issue.solution', 'Linked Solution'), 'issue_description': fields.html('Issue Description'), 's...
class project_issue(osv.osv): _inherit = 'project.issue'
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from setuptools import setup<|fim▁hole|>setup(name='edith', version='0.1.0a1', description='Edit-distance implementation with edit-path retrieval', author='david weil (tenuki)', author_email='tenuki@gmail.com', url='h...
<|file_name|>test_import.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ Test of the omero import control. Copyright 2009 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt """ import pytest from path import path import omer...
def testImportNoClientDirFails(self, tmpdir, clientdir_exists): """Test fake screen import"""
<|file_name|>balloongame.py<|end_file_name|><|fim▁begin|># Copyright 2008 by Kate Scheppke and Wade Brainerd. # This file is part of Typing Turtle. # # Typing Turtle 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 Found...
<|file_name|>EntityMetadataBuilderTest.java<|end_file_name|><|fim▁begin|>package org.motechproject.mds.builder.impl; import javassist.CannotCompileException; import javassist.ClassPool; import javassist.CtClass; import javassist.CtField; import javassist.NotFoundException; import org.apache.commons.lang.reflect.FieldU...
<|file_name|>organization-cleanup-test.js<|end_file_name|><|fim▁begin|>import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit';<|fim▁hole|> module('Unit | Adapter | organization cleanup', function(hooks) { setupTest(hooks); // Replace this with your real tests. test('it exists', function(as...
<|file_name|>counter.rs<|end_file_name|><|fim▁begin|>//! A wrapper which counts the number of records pushed past and updates a shared count map.<|fim▁hole|>use progress::CountMap; use dataflow::channels::Content; use Push; /// A wrapper which updates shared `counts` based on the number of records pushed. pub struct C...
use std::rc::Rc; use std::cell::RefCell;
<|file_name|>test_artificial_1024_RelativeDifference_MovingAverage_30_12_0.py<|end_file_name|><|fim▁begin|>import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art <|fim▁hole|><|fim▁end|>
art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "MovingAverage", cycle_length = 30, transform = "RelativeDifference", sigma = 0.0, exog_count = 0, ar_order = 12);
<|file_name|>div.rs<|end_file_name|><|fim▁begin|>#![feature(core)] extern crate core; #[cfg(test)] mod tests { use core::ops::Div; #[derive(Copy, Clone)] struct A<T> { value: T } impl Div for A<T> { type Output = A<T>; fn div(self, rhs: A<T>) -> Self::Output { A { value: self.value / rhs...
// forward_ref_binop! { impl Div, div for $t, $t } // )*) // }
<|file_name|>Cursor.js<|end_file_name|><|fim▁begin|>import React from 'react'; import PropTypes from 'prop-types'; import styled, { keyframes } from 'styled-components'; const blink = keyframes` from, to { opacity: 1; } 50% { opacity: 0; } `; const CursorSpan = styled.span` font-weight: 100; color...
<|file_name|>Northeast.js<|end_file_name|><|fim▁begin|><|fim▁hole|>var RealDirection = require("../../RealDirection"); var MessageCategory = require("../../MessageCategory"); var _dir = RealDirection.NORTHEAST; class Northeast extends Command{ constructor(){ super(); this.rule = /^n(?:orth)?e(?:ast)?$/g; } exe...
var Command = require("../Command");
<|file_name|>OvfPlatform.py<|end_file_name|><|fim▁begin|># vi: ts=4 expandtab syntax=python ############################################################################## # Copyright (c) 2008 IBM Corporation # All rights reserved. This program and the accompanying materials # are made available under the terms of the E...
(langCode, encoding) = getdefaultlocale()
<|file_name|>RuntimeConstantPoolOOM.java<|end_file_name|><|fim▁begin|>package com.entrepidea.jvm; import java.util.ArrayList; import java.util.List; /** * @Desc: * @Source: 深入理解Java虚拟机:JVM高级特性与最佳实践(第2版) * Created by jonat on 10/18/2019. * TODO need revisit - the code seem just running - supposedly it should end...
while(true){ l.add(String.valueOf(i++).intern());
<|file_name|>ssh_args_test.go<|end_file_name|><|fim▁begin|>package ssh_test import ( fakesys "github.com/cloudfoundry/bosh-utils/system/fakes" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" boshdir "github.com/cloudfoundry/bosh-cli/director" . "github.com/cloudfoundry/bosh-cli/ssh" )<|fim▁hole|> var _ = D...
<|file_name|>testingLexer.py<|end_file_name|><|fim▁begin|>import lexer s = "program id; var beto: int; { id = 1234; }" lexer.lexer.input(s) for token in lexer.lexer:<|fim▁hole|> print token<|fim▁end|>
<|file_name|>ExprTimeInTimeZone.java<|end_file_name|><|fim▁begin|>package uk.tim740.skUtilities.util; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.SkriptParser; import ch.njol.skript.lang.util.SimpleExpression; import ch.njol.util.Kleenean; import org.bukkit.event.Event; import uk.tim740.skUtiliti...
<|file_name|>flexx_in_thread.py<|end_file_name|><|fim▁begin|>""" Example showing running Flexx' event loop in another thread. This is not a recommended use in general. Most parts of Flexx are not thread-save. E.g. setting properties should generally only be done from a single thread. Event handlers are *always* called...
thread, or using ``new_loop=True`` (as is done here).
<|file_name|>MapperSqlType.java<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2015 Born Informatik AG (www.born.ch) * * 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 * * ...
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>import re from django.conf import settings from django.core.exceptions import ValidationError from django.core.validators import _lazy_re_compile, BaseValidator, URLValidator class EnhancedURLValidator(URLValidator): """ Extends Django's built-in URLVal...
schemes = settings.ALLOWED_URL_SCHEMES
<|file_name|>extern.rs<|end_file_name|><|fim▁begin|>extern "C" { fn c_func(x: *mut *mut libc::c_void); <|fim▁hole|> fn foo() -> uint64_t; pub fn bar() ; } extern { fn DMR_GetDevice(pHDev: *mut HDEV, searchMode: DeviceSearchMode, pSearchString: *const c_char, devNr: c_uint, wildcard: c_char) -> TDMR_E...
fn c_func(x: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, y: YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY); #[test123]
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>/// Encode an usize fn gray_encode(integer: usize) -> usize { (integer >> 1) ^ integer } /// Decode an usize fn gray_decode(integer: usize) -> usize { match integer { 0 => 0, _ => integer ^ gray_decode(integer >> 1), } } fn main() { for...
i, i,
<|file_name|>alzheimer.js<|end_file_name|><|fim▁begin|>(function () { "use strict"; var fs = require("fs"), path = require("path"), os = require("os"), util = require("util"), Stream = require("stream"); var VALUE = 0, ERROR = 1, STREAM = 2, ERRORSTREAM = 3, FULLF...
// Try to make the cell a regular value try {
<|file_name|>opts.rs<|end_file_name|><|fim▁begin|>pub mod before_move { use super::super::Status; use super::super::PunningStats; use super::super::super::cube::rot; pub fn depth_bigger_or_equal_best_sol(status: & Status, punning_stats : &mut PunningStats) -> bool { match status.best_found { ...
<|file_name|>adxl345.go<|end_file_name|><|fim▁begin|>package devices import ( "bytes" "encoding/binary" "errors" "fmt" i2c "github.com/davecheney/i2c" "log" ) const ( regDevid = 0x00 regThreshTap = 0x1d regOfsX = 0x1e regOfsY = 0x1f regOfsZ = 0x20 regDur = ...
} adxl.bus = bus return &adxl, nil
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import '../config/public-config'; import { ClientLogger } from '@cdm-logger/client'; import { ClientTypes } from '@common-stack/client-react';<|fim▁hole|> // tslint:disable-next-line:no-shadowed-variable constructor(private modules) {} public getCacheKey(st...
import modules, { MainRoute } from './module'; class UtilityClass {
<|file_name|>app_store.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2013 Tim O'Shea # # This file is part of PyBOMBS # # PyBOMBS 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 ve...
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License
<|file_name|>timeout.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate holmes; use holmes::simple::*; use std::time::{Duration, Instant}; // The whole point of this test is to take an excessively long execution // and make sure it terminates about on time if a limiter is provided #[test] pub fn infinity() { ...
}) })); core.run(holmes.quiesce()).unwrap();
<|file_name|>factory.go<|end_file_name|><|fim▁begin|>// Copyright OpenTelemetry 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-...
return nil, fmt.Errorf("unable to extract port for the gRPC endpoint: %w", err) }
<|file_name|>classif_and_ktst.py<|end_file_name|><|fim▁begin|>"""Classification-based test and kernel two-sample test. Author: Sandro Vega-Pons, Emanuele Olivetti. """ import os import numpy as np from sklearn.metrics import pairwise_distances, confusion_matrix from sklearn.metrics import pairwise_kernels from sklear...
os.makedirs(save_dir)
<|file_name|>span-from-proc-macro.rs<|end_file_name|><|fim▁begin|>// aux-build:custom-quote.rs // aux-build:span-from-proc-macro.rs // compile-flags: -Z macro-backtrace #[macro_use] extern crate span_from_proc_macro; #[error_from_attribute] //~ ERROR cannot find type `MissingType` struct ShouldBeRemoved;<|fim▁hole|>#...
<|file_name|>SurveyComponent.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from '@angular/core'; import { MdDialogRef } from '@angular/material'; import { NavigationEnd, Router } from '@angular/router'; @Component({ moduleId: module.id, selector: 'app-survey', templateUrl: '/templates/share...
}
<|file_name|>vandpd.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode}; use ::RegType::*; use ::instruction_def::*; use ::Operand::*; use ::Reg::*; use ::RegScale::*; fn vandpd_1() { run_test(&Instruction { mnemonic: Mnemonic::VANDPD, op...
run_test(&Instruction { mnemonic: Mnemonic::VANDPD, operand1: Some(Direct(XMM14)), operand2: Some(Direct(XMM23)), operand3: Some(IndirectScaledIndexed(RDX, RDX, Eight, Some(OperandSize::Xmmword), None)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(Mask...
<|file_name|>xcore.rs<|end_file_name|><|fim▁begin|>//! Contains xcore-specific types use core::convert::From; use core::{cmp, fmt, slice}; // XXX todo(tmfink): create rusty versions pub use capstone_sys::xcore_insn_group as XcoreInsnGroup; pub use capstone_sys::xcore_insn as XcoreInsn; pub use capstone_sys::xcore_reg...
<|file_name|>angular-socialshare.js<|end_file_name|><|fim▁begin|>'use strict'; /* * * angular-socialshare v0.0.2 * * ♡ CopyHeart 2014 by Dayanand Prabhu http://djds4rce.github.io * * Copying is an act of love. Please copy. * */ angular.module('djds4rce.angular-socialshare', []) .factory('$FB', ['$windo...
scope.shares = 0; }); } $timeout(function() {
<|file_name|>compileProtos.ts<|end_file_name|><|fim▁begin|>/**<|fim▁hole|> * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
<|file_name|>HandPick.tsx<|end_file_name|><|fim▁begin|>import * as React from "react"; import {Hand} from "../models/Hand"; export interface HandPickProps { hands: Hand []; onPick: (hand: Hand) => void; }; export class HandPick extends React.Component<HandPickProps, {}> { render() { return ( ...
<|file_name|>public-api.ts<|end_file_name|><|fim▁begin|>export * from './version'; export * from './utils/index'; export * from './common-behaviors/index'; export * from './line/line'; export * from './error/error-options'; export * from './formatters/index'; export * from './validation/index'; export * from './highlig...
export * from './pop-up/index';
<|file_name|>appearance.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Team: # J Phani Mahesh <phanimahesh@gmail.com> # Barneedhar (jokerdino) <barneedhar@ubuntu.com> # Amith KK <amithkumaran@gmail.com> # Georgi Karavasilev <motorslav@gmail.com> # Sam Tran <samvtran@gmail.c...
<|file_name|>rebound_boundary.py<|end_file_name|><|fim▁begin|># PyParticles : Particles simulation in python # Copyright (C) 2012 Simone Riva # # 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, e...
<|file_name|>loader.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 """ Loader import modules from zip files that are stored in ./libs/ directory author: Steve Göring contact: stg7@gmx.de 2014 """ import os import sys for m in filter(lambda x: ".zip" in x, os.listdir(os.path.dirname(os.pa...
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + "/libs/")
<|file_name|>user.js<|end_file_name|><|fim▁begin|>let mongoose = require('mongoose') let userSchema = mongoose.Schema({ // userModel properties here... local: {<|fim▁hole|> }, password: { type: String, required: true } }, facebook: { id: String, ...
email: { type: String, required: true
<|file_name|>Connect4_RandomAI.py<|end_file_name|><|fim▁begin|>from Player import Player import random import numpy import time class Connect4_RandomAI(Player): def __init__(self,value): # Initialize the random number generator using the current time as a seed so that we don't see the exact same AI ...
##### # Pick a random valid column to drop our disc in
<|file_name|>IndegreeDatasetModel.java<|end_file_name|><|fim▁begin|>package lodVader.spring.REST.models.degree; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import org.junit.Test; import com.mongodb.BasicDBList; import com....
tmpDataset = new DatasetDB(r.targetDataset); result.append(tmpDataset.getTitle());
<|file_name|>playlists.py<|end_file_name|><|fim▁begin|>import mutagen import os import re import sys from optparse import OptionParser music_file_exts = ['.mp3', '.wav', '.ogg'] seconds_re = re.compile('(\d+)(\.\d+)? seconds') def main(argv): (options, args) = build_parser().parse_args(argv) validate_options...
f = {} meta['title'] = f.get('title', [os.path.basename(path)])[0] meta['artist'] = f.get('artist',